Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp98642pxk; Wed, 16 Sep 2020 20:14:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQZ06QeOZL1ee9qTd7DzyW3Gi1WCSydGifYsisZph8J+7IBy9IrV5udaA9yAQM45hXC4ea X-Received: by 2002:a17:907:37b:: with SMTP id rs27mr30313639ejb.0.1600312475013; Wed, 16 Sep 2020 20:14:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600312475; cv=none; d=google.com; s=arc-20160816; b=gByqaOfNIk16XRKCdcwW4m2eau6LcBMAb1fcohq+w5MFK+oc97blak0V3umT6KkQ2N 1Efpu7NA9/fVe4ex/xDyLcSOsHDcztgRoMcnjVG9ml8Dam6XyME0yKpvJ/EprbG0J4mK AwOFpmJjPBToj5zWpIZHS+P1GRh2OqVKXAO8H0pdFt7E1X/EfG2x8B5ekaXKoTpaRKia xEM/QiMJ7zokNGixDHC9/EDqyq9+XMG9SgI3cOks422XIoa2JibbRJ3kIo+ApsO2m0IA Uy994W1ozJFyWeXWThOR1T66tp0sufhpGbD3IftBCx3omgZftqDBVdJwQ+1cMSKwoYad zrAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Bb9B11eCivxPDOxPGYCNptgsmSVh3UlA/TMn/OGTs70=; b=ftTMQzFXIOLhh4hSYezsZcupd1gIpzh19lDJ3t/ciZjxbau9gWDB0UqLAKusQgM2k7 lIzQDlXMORpBwh3tYGUkQc1D+nV4ZMd1es5AbwYnpl02BDc551l29M6I9Xhfyj/6KR4N V0g0ggJIND3c0FMyHOeiazkThBdUSZamBVPR8PM4IRrzKJKWzPVDw8XS4DGttYUq2trF YK4twqgS3KZtCzHXoEkSIQ0qOASgTowYp3kzZuvdrqi/Kel8u3UeiUuozSak5mRfjku8 ELu4WASd2fVLJ9If1D24w7eb7kbcGta63wiPM1MEab6w97rYqvMfhrtWtGWSETCPHfyr 2FdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=Kulw2Zgq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y17si7203241edt.218.2020.09.16.20.14.11; Wed, 16 Sep 2020 20:14:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=Kulw2Zgq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726064AbgIQDNM (ORCPT + 99 others); Wed, 16 Sep 2020 23:13:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726047AbgIQDNL (ORCPT ); Wed, 16 Sep 2020 23:13:11 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3815C061788 for ; Wed, 16 Sep 2020 20:13:09 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id e11so3462067wme.0 for ; Wed, 16 Sep 2020 20:13:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Bb9B11eCivxPDOxPGYCNptgsmSVh3UlA/TMn/OGTs70=; b=Kulw2ZgqEeM4N7LvjNnWIqASSdQbasKueZxTVDcbPfjQ42wY2942by6Y+AJjPRHlq9 MRKwApsFEZXLlaFykfxspjQ5HzLnqkU1WZ3e5of50+K6l10f3eDRFFOLCz396J6HG8yf WF7QTHCHLdxhjw7dBtHP0XqnrPAkyaU1d7gak= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Bb9B11eCivxPDOxPGYCNptgsmSVh3UlA/TMn/OGTs70=; b=fmV5bJtR2Ryz5GctCk4OlYMDF3KLrxcmUX+eL9IU3G/8kp/MGVRC2I+N6elRO1QBec nr7oF56UTaez1st7w2yhtmo4RLs6tKhvdlYVHzmiF7LcP+kPpb4uvbT6+MmMFQZczGas aqkaVE4dy0ASewelSzI9SnXIm51u3181t53XUTaKG/D0ibfaS7DDz+3uaLxPdtrnI7gt 5lTiXV3wjSbeNrsmOLG9WjTYVlLa8KbLrEjaZfy+LOjmuP7wDeNv1N32jCydWyCIVZiE 5MfxyQrVTAp/Zpnyf86bFoCh68PdavO0K8C1sVBPDirc6VoNbgHn5bx3D9RoxUJ2J/Il Ac2g== X-Gm-Message-State: AOAM533mlgrzhrGuFTxtlj5ovE+0Ai/lC0XMfwihSS1Aljyywt7LKTVe BmD8iFWHAxKjMv2zDoRIDDtbIz2zwpazFgOb2pSdXA== X-Received: by 2002:a1c:7f8b:: with SMTP id a133mr8054540wmd.155.1600312387899; Wed, 16 Sep 2020 20:13:07 -0700 (PDT) MIME-Version: 1.0 References: <20200915134541.14711-1-srinath.mannam@broadcom.com> <20200915134541.14711-4-srinath.mannam@broadcom.com> <20200917015245.GA678675@bogus> In-Reply-To: <20200917015245.GA678675@bogus> From: Srinath Mannam Date: Thu, 17 Sep 2020 08:42:56 +0530 Message-ID: Subject: Re: [PATCH v2 3/3] PCI: iproc: Display PCIe Link information To: Rob Herring Cc: Lorenzo Pieralisi , Bjorn Helgaas , Ray Jui , linux-pci@vger.kernel.org, BCM Kernel Feedback , Linux Kernel Mailing List , Linux ARM Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 17, 2020 at 7:22 AM Rob Herring wrote: > Hi Rob, Thanks for review. > On Tue, Sep 15, 2020 at 07:15:41PM +0530, Srinath Mannam wrote: > > After successful linkup more comprehensive information about PCIe link > > speed and link width will be displayed to the console. > > > > Signed-off-by: Srinath Mannam > > --- > > drivers/pci/controller/pcie-iproc.c | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/drivers/pci/controller/pcie-iproc.c b/drivers/pci/controller/pcie-iproc.c > > index cc5b7823edeb..8ef2d1fe392c 100644 > > --- a/drivers/pci/controller/pcie-iproc.c > > +++ b/drivers/pci/controller/pcie-iproc.c > > @@ -1479,6 +1479,7 @@ int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res) > > { > > struct device *dev; > > int ret; > > + struct pci_dev *pdev; > > struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie); > > > > dev = pcie->dev; > > @@ -1542,6 +1543,11 @@ int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res) > > goto err_power_off_phy; > > } > > > > + for_each_pci_bridge(pdev, host->bus) { > > + if (pci_pcie_type(pdev) == PCI_EXP_TYPE_ROOT_PORT) > > + pcie_print_link_status(pdev); > > + } > > If this information is useful for 1 host implementation, why not all of > them and put this in a common spot. In common, pcie_print_link_status() is called during pci device caps initialization, if the available link bandwidth is less than capabilities of devices. Few EP drivers also used this function to print link bandwidth info. This host can be configured for different link speeds and link widths on different platforms so we thought displaying link bandwidth after successful linkup is helpful to know link details. Thanks & Regards, Srinath. > > Rob