Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp7581707rwn; Wed, 14 Sep 2022 00:38:02 -0700 (PDT) X-Google-Smtp-Source: AA6agR7BtJQ9mZnKmzedctkLr1WwQBm3o2EE6qWwOAzd/lQUNB5DHla4MeaBtWC9MrJ4khftw+Dy X-Received: by 2002:a05:6402:90d:b0:443:ef4c:480f with SMTP id g13-20020a056402090d00b00443ef4c480fmr29356212edz.128.1663141082530; Wed, 14 Sep 2022 00:38:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663141082; cv=none; d=google.com; s=arc-20160816; b=apouJJ68aaC/JEHqg84ClGKJ+s5eLBiPNAukcke8+HZbdTwzpOU3mxMe2OKuHzpUTz cwRBKnMxeVtqkKAsaimsc9chKaYP5G4KzpMgF3QdlTWNg+yB3DBDypJXXLFSRaHoPaop dIgyLAmdcnsMinOEwU53orj4SjAQeb+P+7TV+JYuHSD8jAFoM52nK7IOXaCQFAQZP6uG 18dIep60zpwpXJ+KvwdELEJ5FVQvML0HssTWhzB7EDaNwapunegJ8gwx8cEpbCpYXF4E 1slRDDf6KbO8EdtixjBxSvYRpW8iOkh2/iny++qQmZ1/dooaIQTt8Jecq4/egbAHq7cH CoCA== 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 :dkim-signature; bh=fRKf+imVw7MttIFJnauud7q8IBR969IuIIWD8g4fCPA=; b=XZPSztOYhueMjZoSydvd4Waenp8Ma0hByZI7p9ndt8KvtVdG4prLfph1mA/S8PMxYO Rg0G6lX8ykvDG8h8DXgXyD1I04r8CveXACtPsBQtbXiIRXBnPjq1CZIWOwBWRrcBGsFw 5NyxQa4eeH/fAHMNv4mHXbxZ4jm5eJnngzDbEb2dzoavZw1S2GD7ikK2B5AXjx4yMuOI C7pUmqA+s87cd3ZMqKBB2xZVrpZCftrbpDV+s5eZKq4XQkcLNL4CMIWvpFrF56OmyVTd jp8KtVRVO7oKn8+MFMMItej1ugrGiBVDIQlEzClZJ7HSXKOiEQsdRy3HGKRnug+qo30j 6HRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PUXE6B3a; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s5-20020a17090699c500b0077073b26373si6582640ejn.426.2022.09.14.00.37.36; Wed, 14 Sep 2022 00:38:02 -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=@linaro.org header.s=google header.b=PUXE6B3a; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229975AbiINGYX (ORCPT + 99 others); Wed, 14 Sep 2022 02:24:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229909AbiINGYV (ORCPT ); Wed, 14 Sep 2022 02:24:21 -0400 Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2485B7269E for ; Tue, 13 Sep 2022 23:24:18 -0700 (PDT) Received: by mail-pg1-x535.google.com with SMTP id q9so4302657pgq.8 for ; Tue, 13 Sep 2022 23:24:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date; bh=fRKf+imVw7MttIFJnauud7q8IBR969IuIIWD8g4fCPA=; b=PUXE6B3aPHP+SZGAuLS15FDgWLtMLluRF4EnRnapMrcQ/7eXfJhaqd6vSwaDNGravW /Npbi5K0MPHIHcbnYARE1ZMDeGP2qJH6/1hfVOPuHui/wtwcCAbhbpVplIejXXxe1k67 EWO4k2b5toBpqgzKTMSwfHH0mnfQnCVygq3Yb/IOOfdfW8TzxuMZbn9z/FAJ48z2DTww HwQZVPpv+XI8+8NqFX1QBcRZMRvVCGZUqvhne9x7Pqc/Lj1qRo1e9P8LzUFG8JLyvpJ1 3wOvrvNBboWiYlfZ1teVZXOucF2L/ff/0OeZiEhiHSuzp0xK1x1ml+1813aszt2UGqxX iF9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date; bh=fRKf+imVw7MttIFJnauud7q8IBR969IuIIWD8g4fCPA=; b=6Md9RacMXvexBuKmt4w1Y0aCM6A7vPxMSEB6YALXh9SpJIAEdls1p2iIEXxaPPgBzP MN21aoAEuMXdYNF5D+ZEtJkaimImf8y9t1XUH2+ctaBnLDKqaxe8Bq23a9qzRwlBdOVt 5yM3kvleIOVEqY4IXFlqbnLMPSmI5Qibx4vw6vSoa8nytwVcJFkyo9zF/Zs/DBocCkcn qAoLa44sWtj8AemBiAGMJBWOw2Q06nQen7/KLpUOdJYNe922FqyS6DeB5v9JFV8suT9z oZ0P3cQ64x2SKA53wqQZ/XSzMnUoUnEpufsfx9dCwMVwHjJvZMIUzwR1jzvUs9rEHV9g d55w== X-Gm-Message-State: ACgBeo3Agw7t1ZzKw13POSRiA8Zgoc0fOstaRGv5fU3r27O5ifsUobE7 ScxIETF6VoInMdKhaGrnTVODdMZa3WbebT4= X-Received: by 2002:a63:451a:0:b0:439:246e:807e with SMTP id s26-20020a63451a000000b00439246e807emr8559930pga.347.1663136657408; Tue, 13 Sep 2022 23:24:17 -0700 (PDT) Received: from workstation ([117.202.184.122]) by smtp.gmail.com with ESMTPSA id y12-20020a17090322cc00b00177fb862a87sm9888045plg.20.2022.09.13.23.24.12 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Sep 2022 23:24:16 -0700 (PDT) Date: Wed, 14 Sep 2022 11:54:11 +0530 From: Manivannan Sadhasivam To: Bjorn Helgaas Cc: Jon Hunter , Vidya Sagar , jingoohan1@gmail.com, gustavo.pimentel@synopsys.com, lpieralisi@kernel.org, robh@kernel.org, kw@linux.com, bhelgaas@google.com, treding@nvidia.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, kthota@nvidia.com, mmaddireddy@nvidia.com, sagar.tv@gmail.com Subject: Re: [PATCH V1] PCI: dwc: Use dev_info for PCIe link down event logging Message-ID: <20220914062411.GD16459@workstation> References: <20220913200746.GA619956@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220913200746.GA619956@bhelgaas> User-Agent: Mutt/1.9.4 (2018-02-28) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 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. We workaround this issue by disabling the PCIe instances in devicetree for which there would be no devices connected. Thanks, Mani > > Bjorn