Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp766236imm; Thu, 31 May 2018 09:02:38 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLZGX/ilHY2wLTVuLOcMYp1hldyFOCkYLmCcSMyMUlo68D70x4IC2Ua9f9i6as9Az1YANQp X-Received: by 2002:a17:902:bd95:: with SMTP id q21-v6mr7293228pls.237.1527782558578; Thu, 31 May 2018 09:02:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527782558; cv=none; d=google.com; s=arc-20160816; b=cfsYPIly/2+FNiiANbZy4QrZ62IcsEdOcFrQvCzCcGXlsjpLqwOvULKxGM4fBF7mS7 EnzDzy2zqG92JXgGFq0s05479xnE2fPoiVlPIfHCLjJRd04OLNepJx2+weHE8byn3cc0 99IhIRjnyLxeruLEktuwLnwkJOnwG89nSA3Me0nhI6zaYI16gQxBTtqtN2GeneIzsL+V w1mx/BEICEFQ+MfzW9HaitKUMgUoIHNAqeap4ZV3xW/R4RxTbpLsoY+nrfvMd8zxsaXJ aZeGTn0kunK8dkfifSS4MbgArL2sFVlQMjWQH1hr2otlY5fsZ9j6LmSUkDKpPnXJuIog r7Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=/AI9A+vKSk7s3loKCr/u0d3S9EmAh5Y4EbOaCElNNR0=; b=EuYNEc/+Az1slNXsfd2ME/gKeV1thqz6y2PBf3LF5Hf1Un4num+PnaTutb/tVbTXen XhE/jHp+YbIx7L4yaeIkCnhKYdMhHYl29WNwjXlIi+Ub1sRtYreTSZbAB+d6G9PK6zpu M/e/qiXhyRt+mAWESuy/Vq7w5ndvlvAyU7Itbc6R3/M1ck/NQRHbJi9glKCI6V+FKSsZ DumTK3nRf/gG53ghzOr3+LGkt6rikaC11YmFq1CsP7GatCo91QqrCmxAv+8Jduwpz6KE uflIfty+wjhIsQxcatWUgeeB869IPA2eLwjZdS6fKZ5QI4nhizufnC4o2LgGrQLRxPCG Q34g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hySfVnGd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 67-v6si37379829pla.475.2018.05.31.09.02.24; Thu, 31 May 2018 09:02:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hySfVnGd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755589AbeEaQBu (ORCPT + 99 others); Thu, 31 May 2018 12:01:50 -0400 Received: from mail-ot0-f195.google.com ([74.125.82.195]:41742 "EHLO mail-ot0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755456AbeEaQBs (ORCPT ); Thu, 31 May 2018 12:01:48 -0400 Received: by mail-ot0-f195.google.com with SMTP id t1-v6so25863000oth.8; Thu, 31 May 2018 09:01:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=/AI9A+vKSk7s3loKCr/u0d3S9EmAh5Y4EbOaCElNNR0=; b=hySfVnGdTBEunEOkxFXeg6PkbMQgqXRH0yOKh+eS644/Wk8Wgsk266h2EIISNMuo+u rYaBJyy/GOCewdB8lBtH7JdnjbtVRb32PjhdBA59iTCDfAWCBsK8rhWo8s8lRej31mVD wUUa5tfknFUktv2XtcmHlHvuDaywuKy5TW/gnDqGAt2ajOvaDEsu66IR+lxGsrFowMfr gj3jRf/XOLrBRl3G5fkaS7au+s17d0O70lXoJmFqzxZyTQFKKDcuXIwORdCfIHBa/vtd 0iNIk9xsrdxxyCUKcztObrG3Vhwr5Om3p8/ozDVLACK7rg/TXngLjdzJVMQlSHpEF6C1 cNIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=/AI9A+vKSk7s3loKCr/u0d3S9EmAh5Y4EbOaCElNNR0=; b=tGJEtc8/+jl+vgm8lZCds2VLhK10sXhi7D+w1RANEh+0Jo2P5/HrdaR61nalXwfBNI lnge4SBElJ17hrrX1wrqjVaAwfzdArhCKnu9nK9MSYwv9WQhJrMywN9F/umCgiiAKB59 uEmYGGMqo3wku1A4+/oCGVF4Y/Yu3jq7FZELM+kk3qTNucYR9dpynfbwN5lvDrRGPCye H9ipMROjcoeFNceqxCvOM5MMgf8LDSyOH2MjmmIu5bsy6ZjWn2G3i2BFhU5cVl+H0gj9 USva1U0tWNBu2o+/GUi5c1SHAU93vEsPy/QZbLzxyIxEywH0KPtWcZnIlGjZU4+WEhPM VATg== X-Gm-Message-State: ALKqPwerDZTVEIdfF5+DNTtid3oZFiQU+BMYKJBeeF01nD64eTTR8fFu TC/i15BKwrgkmRTPPCggKcusorBiYDg= X-Received: by 2002:a9d:2b32:: with SMTP id o47-v6mr5188006otb.346.1527782507059; Thu, 31 May 2018 09:01:47 -0700 (PDT) Received: from nuclearis2_1.gtech (c-98-201-114-184.hsd1.tx.comcast.net. [98.201.114.184]) by smtp.gmail.com with ESMTPSA id f67-v6sm22352136oih.21.2018.05.31.09.01.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 May 2018 09:01:45 -0700 (PDT) Subject: Re: [PATCH] PCI: Check for PCIe downtraining conditions To: Sinan Kaya , Alex_Gagniuc@Dellteam.com, bhelgaas@google.com Cc: Austin.Bolen@dell.com, Shyam.Iyer@dell.com, keith.busch@intel.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180531150535.9684-1-mr.nuke.me@gmail.com> <28004506-24f0-6d10-2d1e-074e0483d2f9@codeaurora.org> <4e0611c872054e768daa96b302651db3@ausx13mps321.AMER.DELL.COM> <3b8a895b-3080-7ddb-cbfd-5aa972e9bf65@gmail.com> <35563ce3-e235-096c-4b9b-5f3664d67d0f@codeaurora.org> From: "Alex G." Message-ID: <093b2789-39a1-db9e-5783-b0488b3c9ccd@gmail.com> Date: Thu, 31 May 2018 11:01:45 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <35563ce3-e235-096c-4b9b-5f3664d67d0f@codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/31/2018 10:54 AM, Sinan Kaya wrote: > On 5/31/2018 11:46 AM, Alex G. wrote: >>> https://lkml.org/lkml/2018/3/30/553 >> Oh, pcie_get_speed_cap()/pcie_get_width_cap() seems to handle the >> capability. Not seeing one for status and speed name. >> >>> are you working on linux-next? >> v4.17-rc7 >> > > I think everything you need is in the series. I don't know which linux > tree this landed or if it landed. Probably, it is shipping for 4.18. > Need some help from Bjorn where to locate these. > > Fri, 30 Mar 2018 16:04:40 -0500 > > Bjorn Helgaas (6): > bnx2x: Report PCIe link properties with pcie_print_link_status() > bnxt_en: Report PCIe link properties with pcie_print_link_status() > cxgb4: Report PCIe link properties with pcie_print_link_status() > fm10k: Report PCIe link properties with pcie_print_link_status() > ixgbe: Report PCIe link properties with pcie_print_link_status() > PCI: Remove unused pcie_get_minimum_link() I remember seeing some of these in my tree. > Tal Gilboa (8): > PCI: Add pcie_get_speed_cap() to find max supported link speed > PCI: Add pcie_get_width_cap() to find max supported link width > PCI: Add pcie_bandwidth_capable() to compute max supported link bandwidth > PCI: Add pcie_bandwidth_available() to compute bandwidth available to device I definitely have these. > PCI: Add pcie_print_link_status() to log link speed and whether it's limited This one, I have, but it's not what I need. This looks at the available bandwidth from root port to endpoint, whereas I'm only interested in downtraining between endpoint and upstream port. Alex