From patchwork Thu May 3 20:00:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 908219 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=osuosl.org (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="NhkidCwt"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40cQwx0gmwz9s4n for ; Fri, 4 May 2018 06:00:16 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 18C6725EC9; Thu, 3 May 2018 20:00:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bDngW4ErBiG2; Thu, 3 May 2018 20:00:14 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 6271625D64; Thu, 3 May 2018 20:00:14 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 016ED1CEF86 for ; Thu, 3 May 2018 20:00:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id F2754878DB for ; Thu, 3 May 2018 20:00:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 16cbTwc5HT9O for ; Thu, 3 May 2018 20:00:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 68CBB878E7 for ; Thu, 3 May 2018 20:00:10 +0000 (UTC) Received: from localhost (unknown [69.71.5.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D73322176D; Thu, 3 May 2018 20:00:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1525377610; bh=CpWCio5lcVsq8GHp8SdMz2hvqi/AegQnMsxchyg3KQc=; h=Subject:From:To:Cc:Date:From; b=NhkidCwt2YTQTWLAstbejUf+DKK1iVSw7spcujED7Ops5zSDk+mZXhi2NlFMIC6w4 hJoeNoh5nPM9uoFkhqBAaMSDufQo39VoOyUkDcSwzVOHJ1FtKS1NPbELi9dDpouVwo 8fUAxWFTf8WbjljKUIPaXocS4wEs4PuaJLONFlSY= From: Bjorn Helgaas To: Jeff Kirsher , Ganesh Goudar , Michael Chan , Ariel Elior Date: Thu, 03 May 2018 15:00:07 -0500 Message-ID: <152537719056.62474.2571390812509425478.stgit@bhelgaas-glaptop.roam.corp.google.com> User-Agent: StGit/0.18 MIME-Version: 1.0 Subject: [Intel-wired-lan] [PATCH v6 0/5] PCI: Improve PCIe link status reporting X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jakub Kicinski , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Tal Gilboa , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, everest-linux-l2@cavium.com, Tariq Toukan Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" This is based on Tal's recent work to unify the approach for reporting PCIe link speed/width and whether the device is being limited by a slower upstream link. The new pcie_print_link_status() interface appeared in v4.17-rc1; see 9e506a7b5147 ("PCI: Add pcie_print_link_status() to log link speed and whether it's limited"). That's a good way to replace use of pcie_get_minimum_link(), which gives misleading results when a path contains both a fast, narrow link and a slow, wide link: it reports the equivalent of a slow, narrow link. This series removes the remaining uses of pcie_get_minimum_link() and then removes the interface itself. I'd like to merge them all through the PCI tree to make the removal easy. This does change the dmesg reporting of link speeds, and in the ixgbe case, it changes the reporting from KERN_WARN level to KERN_INFO. If that's an issue, let's talk about it. I'm hoping the reduce code size, improved functionality, and consistency across drivers is enough to make this worthwhile. --- Bjorn Helgaas (5): 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() ixgbe: Report PCIe link properties with pcie_print_link_status() PCI: Remove unused pcie_get_minimum_link() drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 23 ++----- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 19 ------ drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 75 ---------------------- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 47 -------------- drivers/pci/pci.c | 43 ------------- include/linux/pci.h | 2 - 6 files changed, 9 insertions(+), 200 deletions(-)