Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp852238rwn; Thu, 15 Sep 2022 07:20:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5XimjdF+AbQUaT78jli6V+b5UkPNq9zotISfSYJbYj0mu2F0lUw54/r2DyWz2yYA0/qW+F X-Received: by 2002:a17:906:7953:b0:780:41c:359b with SMTP id l19-20020a170906795300b00780041c359bmr168254ejo.546.1663251640459; Thu, 15 Sep 2022 07:20:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663251640; cv=none; d=google.com; s=arc-20160816; b=DqEWRPZqj/rQ1XwLr25u2z7R+xKBflDOAzmSmWcp79bFqaZggbMUBhhpL08HGjm9pj 3dDemQ0XNrJNFg8+973HsAP2GeyjXwKTAThv/ELHdVB7z/XTpebM+25jN4FsemB8XRrm uesBP2BzTkxX36XzxBrPMbuEd3tt/wNLUS40CBF5exGJzEXMSTiLspcMWh4Z3hevf3za v1sUWqvmfiGqXQSrWxYefLEHPhrwYWpAk/5Muh/QAS3seDCfBd0agXRERZ/3rVJv/NkP A5qmX6vnr8IiydjeHV346yc6fKOKf/gSN/hV+4TUyUrlQyZKaJN/p780g6VPo0/yvlVT N7tQ== 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=bFnpIjiBdmu/c66UTCvh+tjbgf6uU3xZJE5kFgGZ5oE=; b=BhL2Ld8qlKL1oWHbHQvmHMSdYDcG1NKzB4tr70QszfTQL6uSnledX8W2rtcCN07+2t ip67BeDJ2M3Vl6gKsKgs9U1k03eCQ/YqhG1iJVdfpltcUIP0rTXHtK4ueeoSfgxKDtIY 6ePecSqCSIv5FW1VF1xIfiFybGtDXpsljuTar2CwNgm0UjEOQP+z+apIweldcBv7BUnD MkFsKUGZWY5yp5AiLjqL3yT+aiKEVr89XK9iaL9ULGwsBpVgZHI2mheA5xgrGP/lEWLk vL+A0A3tfiQY0MBhhNbkDvNHwdUkA9FUP45KuUXlWC+ZYdX6I7LKzVpAbr0dJh8khgIp ZUTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TPIrv3Ci; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ht14-20020a170907608e00b007806fdd9797si1010605ejc.320.2022.09.15.07.20.14; Thu, 15 Sep 2022 07:20:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TPIrv3Ci; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229997AbiIOOQt (ORCPT + 99 others); Thu, 15 Sep 2022 10:16:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229947AbiIOOQm (ORCPT ); Thu, 15 Sep 2022 10:16:42 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4561C69F41; Thu, 15 Sep 2022 07:16:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BA94961610; Thu, 15 Sep 2022 14:16:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2F823C43140; Thu, 15 Sep 2022 14:16:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663251400; bh=5gn6U2gMf+YiHhYqij02bOYFEkJnL8aAHNUZBBNFwqA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=TPIrv3Ci1oWTVd44RXuS2dyMe21AzdUeTbfErfkFOCLagid67OVjX8MxKK/R7ugxi ay2QLiyiVNnaERFnxN0+WstLTEGROCbAid6CMkTFjBTF4ZzSdIKMpMdJ1izP0fMh3q dyR2cWGf7lNN2eqQR3BTiopuFjexYFwAZaDupZBweNXTdtKHHm0crIULwDJSuQXDM9 nfF1LUGoabvEI5DPIawyb9HLEKrXqmRwnT69lj3dWLjCtu5p6JxUElCxTpri1ZxTQG E8ojuewmaYyifY6ATG3p/2Mf0xup7SE9AYm6HQT+VYiFeQdotqEeuucoy+jjCmj7Ab PpHQ2QCYjYncQ== Received: by mail-vs1-f41.google.com with SMTP id 129so19433106vsi.10; Thu, 15 Sep 2022 07:16:40 -0700 (PDT) X-Gm-Message-State: ACrzQf1NJbmxg94cHyao9p8VLu/fovuPstMNJxLx4KB0sb1V9l4xuX/V dipZXAK9HbHrWmd9RS6cpvAatSy6QRgznGdbLA== X-Received: by 2002:a67:dd88:0:b0:398:d3f3:3cf0 with SMTP id i8-20020a67dd88000000b00398d3f33cf0mr1367511vsk.26.1663251398975; Thu, 15 Sep 2022 07:16:38 -0700 (PDT) MIME-Version: 1.0 References: <20220913200746.GA619956@bhelgaas> <20220914062411.GD16459@workstation> In-Reply-To: <20220914062411.GD16459@workstation> From: Rob Herring Date: Thu, 15 Sep 2022 09:16:27 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH V1] PCI: dwc: Use dev_info for PCIe link down event logging To: Manivannan Sadhasivam Cc: Bjorn Helgaas , Jon Hunter , Vidya Sagar , Jingoo Han , Gustavo Pimentel , Lorenzo Pieralisi , Krzysztof Wilczynski , Bjorn Helgaas , Thierry Reding , PCI , "linux-kernel@vger.kernel.org" , Krishna Thota , Manikanta Maddireddy , sagar.tv@gmail.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 14, 2022 at 1:24 AM Manivannan Sadhasivam wrote: > > On Tue, Sep 13, 2022 at 03:07:46PM -0500, Bjorn Helgaas wrote: > > On Tue, Sep 13, 2022 at 06:00:30PM +0100, Jon Hunter wrote: > > > On 13/09/2022 17:51, Manivannan Sadhasivam wrote: > > > > On Tue, Sep 13, 2022 at 03:42:37PM +0530, Vidya Sagar wrote: > > > > > Some of the platforms (like Tegra194 and Tegra234) have open slots and > > > > > not having an endpoint connected to the slot is not an error. > > > > > So, changing the macro from dev_err to dev_info to log the event. > > > > > > > > But the link up not happening is an actual error and -ETIMEDOUT is being > > > > returned. So I don't think the log severity should be changed. > > > > > > Yes it is an error in the sense it is a timeout, but reporting an error > > > because nothing is attached to a PCI slot seems a bit noisy. Please note > > > that a similar change was made by the following commit and it also seems > > > appropriate here ... > > > > > > commit 4b16a8227907118e011fb396022da671a52b2272 > > > Author: Manikanta Maddireddy > > > Date: Tue Jun 18 23:32:06 2019 +0530 > > > > > > PCI: tegra: Change link retry log level to debug > > > > > > > > > BTW, we check for error messages in the dmesg output and this is a new error > > > seen as of Linux v6.0 and so this was flagged in a test. We can ignore the > > > error, but in this case it seem more appropriate to make this a info or > > > debug level print. > > > > Can you tell whether there's a device present, e.g., via Slot Status > > Presence Detect? If there's nothing in the slot, I don't know why we > > would print anything at all. If a card is present but there's no > > link, that's probably worthy of dev_info() or even dev_err(). > > > > I don't think all form factors allow for the PRSNT pin to be wired up, > so we cannot know if the device is actually present in the slot or not all > the time. Maybe we should do if the form factor supports it? > > > I guess if you can tell the slot is empty, there's no point in even > > trying to start the link, so you could avoid both the message and the > > timeout by not even calling dw_pcie_wait_for_link(). > > Right. There is an overhead of waiting for ~1ms during boot. Async probe should mitigate that, right? Saravana is working toward making that the default instead of opt in, but you could opt in now. Rob