Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp950324rwn; Thu, 15 Sep 2022 08:26:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5jS+593/58PPUR/9zCoVa1Z4VFmfri1G20FRT09uuIWxrcKrUDMnZN20gJtC1WNidg2qMI X-Received: by 2002:a17:902:d2d0:b0:178:329d:a5ed with SMTP id n16-20020a170902d2d000b00178329da5edmr121139plc.142.1663255612542; Thu, 15 Sep 2022 08:26:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663255612; cv=none; d=google.com; s=arc-20160816; b=WpgA73nqiJ5P7biGA0nuPe3o2nuUr4h0/2/MqgZQ8WbBk7ABAVZpOC5BZvuS+dr1bI Mebp0mIkniBB0dNOWozpUQjSHczMm1kKIdkTyoDRAbt0IrJL7TgiFRsJqeyyEXSnfo3Y oyzbJIHlb2CdervzTpU/oQAYt5hr8QjMOmRDD+1J24ykdZo9JzFBa33GraE0vB8nWTpM k5/Evthgj+5mWYqmylE8JvTc7NBSIvyqDGfWJoFeX+uERbTiehO1f1ozohVqLypOmHJX YJJUOpTWR38wRQ2s5cpi3Fc7cDHa+rlrwUNveMVsnmMyXwpe2fsX9zwwTh8PYND43bfu 8Ejw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=VkxdjYXd2hLEu64vFZhO2MkuzyG3Kxswm1wmM8sDvMc=; b=IcBhJyWxJMplcwmiuTPf/KQLxA1C2EDaatBz47dMkAn51HQTA2IRr2GL1TQ4COovoX YzXLnsXay1Kb3VLOePXnRqUXAnEEeGtmEMs+mtqGRV2s/IPEnBZfKySDekZYmymUAUlB SmKdvPOBCSuu0hLUFqdY7/Ee4pros+/Bik4sraZHrG8biMgQFLw2meWEcwvY7xKNKFy9 UfFUWKpHp2O5oLoTwQYp4neNmwNQ8LlBbjA3sHRXX8hMej/K9daILo6jjpIgiTPiTXHq hXCoFpPKFy0XDVbW+cVM3JeuTdxzbGqY/1EeVFJH5jh/egdLGAJBil88FngwvVsQ0jxu CqRw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a37-20020a631a25000000b0042b420afe76si9239763pga.475.2022.09.15.08.26.38; Thu, 15 Sep 2022 08:26:52 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230193AbiIOOxG (ORCPT + 99 others); Thu, 15 Sep 2022 10:53:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230079AbiIOOxA (ORCPT ); Thu, 15 Sep 2022 10:53:00 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2117974DF6; Thu, 15 Sep 2022 07:52:59 -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 ams.source.kernel.org (Postfix) with ESMTPS id 2D849B81EC0; Thu, 15 Sep 2022 14:52:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44004C433D6; Thu, 15 Sep 2022 14:52:50 +0000 (UTC) Date: Thu, 15 Sep 2022 20:22:41 +0530 From: Manivannan Sadhasivam To: Rob Herring 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 Subject: Re: [PATCH V1] PCI: dwc: Use dev_info for PCIe link down event logging Message-ID: <20220915145241.GE4550@workstation> References: <20220913200746.GA619956@bhelgaas> <20220914062411.GD16459@workstation> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,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 Thu, Sep 15, 2022 at 09:16:27AM -0500, Rob Herring wrote: > 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. > No. The delay is due to the DWC core waiting for link up that depends on the PCIe device to be present on the slot. The driver probe order doesn't apply here. Thanks, Mani > Rob