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: 908236 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="NhkidCwt"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 40cQyn3y53z9s3Z for ; Fri, 4 May 2018 06:01:53 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751133AbeECUAL (ORCPT ); Thu, 3 May 2018 16:00:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:33218 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750822AbeECUAK (ORCPT ); Thu, 3 May 2018 16:00:10 -0400 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= Subject: [PATCH v6 0/5] PCI: Improve PCIe link status reporting From: Bjorn Helgaas To: Jeff Kirsher , Ganesh Goudar , Michael Chan , Ariel Elior Cc: linux-pci@vger.kernel.org, everest-linux-l2@cavium.com, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Tal Gilboa , Tariq Toukan , Jacob Keller , Jakub Kicinski 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 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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(-)