Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp504176rwi; Thu, 27 Oct 2022 04:20:21 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5IhphzZKhOv9dQFd4OeMHGgikkUFpgh+aeIYuwmR4SMxlc8NrQRx7UdJCd7QyT2yEy1ANm X-Received: by 2002:a17:907:2da5:b0:78e:1208:8783 with SMTP id gt37-20020a1709072da500b0078e12088783mr42168118ejc.743.1666869620870; Thu, 27 Oct 2022 04:20:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666869620; cv=none; d=google.com; s=arc-20160816; b=PdeKFa4AZdznE1N0LtnYPG0u3AbAzUOb+k3aBYJlCRBusPiT465aIQHyoEUZuyzNSQ BqMNqqTJDdr5/1RkteIZof5dj9AY2+MKeI2l8iKd2XlLuCIfG1oytp/zjF3k1t1BVuse RIJ53ELcIUkKWcFFKoxYXTzcK4DcvhKvrG+Q50nufZycxxJcwYjhfLWOO/piLiZ6E6uF j5IE6v4nAsD6vFYnzw3VJ1BzWanfMVmQ4WRI/sQd1tgj0W1lUHA6KStL2rfhlhvhOmjh CCZkAVZspHrcXaR0uhXPT2jaypdGYCs4vho/txj2UarTVzex0KQPPF6mgq0QmSEjD5+O CoYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=gfjSKorD+JpWUrkLdIO6Gmq1wfUKMg3BKpb3Fqtrl1A=; b=S0b8vWZB/b1B67MXElMhA7bJB1bkSXDkrbc+M3BInER8EF/0/abIxeSBhZv4VoAPyI LUzKFE99t8j8iL+yc+GqIGLiRaGLFSWC4sIexao/B1FpfItj7Ou+YZ4pHN9c76bSx9b4 v55vU0quiNP3bW05QFYQkkGYSdC3rKUL3BTWO9qKuI09cdq9Dg6Zu70SIh5tPo5o4WLa 1BvbwaXADrz16V/ueHn8PujrboqTdzqPGySggXU1v+PubQa9N5zWBGnYE2CqNccY3yuy Ousby2L9Dz9qz5Y5BtlbrmSyO1z5tzSEXyIVETGiXK6Ka0FFIxPfr9xxjSlOEwYZpTym inDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DaIsOYvW; 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 nc13-20020a1709071c0d00b00741688254f4si1364391ejc.163.2022.10.27.04.19.52; Thu, 27 Oct 2022 04:20:20 -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=DaIsOYvW; 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 S235059AbiJ0LD0 (ORCPT + 99 others); Thu, 27 Oct 2022 07:03:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233971AbiJ0LDY (ORCPT ); Thu, 27 Oct 2022 07:03:24 -0400 Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C9B8AA3FB for ; Thu, 27 Oct 2022 04:03:24 -0700 (PDT) Received: by mail-pg1-x533.google.com with SMTP id e129so981281pgc.9 for ; Thu, 27 Oct 2022 04:03:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=gfjSKorD+JpWUrkLdIO6Gmq1wfUKMg3BKpb3Fqtrl1A=; b=DaIsOYvWr/SW43ZSzs0tzVEdeKVybotiPfkw8dc7++/uhB0DBsH5RcBTreHj2F0b61 u4mfnRLDwM0fMMfse6ImuMk3Kg0MxgnAmeKULMIHc3HnCc8KqC1VAmDFBioeBz+Lc8rn UGWxo7beG3Uwx2e4eJTwVxL/Vp56V8JYDB3RvyOApWulyiCDwK8OauX+grsQveyuJOnF GgnM8mZFpoZ6XeXTyM7yesl6gOpm7pLp2AH970wBptWHrFDAvyH1YXQxw7SEViVlN9QS yfOlNSdkj+9+iBinTpK7bRl41e8XPz567OS9l3OHH5a57J4MPBIsCqPz57YH8LJAJTdn 59fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=gfjSKorD+JpWUrkLdIO6Gmq1wfUKMg3BKpb3Fqtrl1A=; b=PfKXwcY4PEr1ewwlRHIljzNWdFBsbsNSzBKQmQnmDS4VaQXrm73xLwWBBGhoSCXSmS 5cM3rdKlcg2ZDPyB9Vs+0tP+tAUJbqUnpAYiWns42XWz5aFAK37StntdXvmK0HrxT0Ql 1/RbuiErmGi201fl37jndfGRlg4VXHHRZ1yHCwPqQhjGM7pX+QDKHSWl/ws/mutTqH08 Yrd5Hx6QJBgwi+MTLzUo1CNr4V9kWDGKJjlAcHQFV75HWpbPD+QHc8dnqe8Nm4N64AKM mIUUxjc3nZImSbp4QtmL/Za0nTl7Lf6Ts7kyZYyn8rDV2v38R+ewp6DPNTpneCeWF5q1 PIyA== X-Gm-Message-State: ACrzQf1QJsgRqvcIGkeGdbNK3p2KRiwmTTfBdMxzbenSlTPONgFbvz9x AbG6vTFLYLxPDfLutmimu7vY X-Received: by 2002:a63:6a03:0:b0:43a:18ce:7473 with SMTP id f3-20020a636a03000000b0043a18ce7473mr43457431pgc.616.1666868603589; Thu, 27 Oct 2022 04:03:23 -0700 (PDT) Received: from thinkpad ([117.202.186.162]) by smtp.gmail.com with ESMTPSA id b12-20020a170903228c00b0018696c5d61esm954826plh.151.2022.10.27.04.03.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Oct 2022 04:03:22 -0700 (PDT) Date: Thu, 27 Oct 2022 16:33:16 +0530 From: Manivannan Sadhasivam To: Lorenzo Pieralisi Cc: Rob Herring , Bjorn Helgaas , Jon Hunter , Vidya Sagar , Jingoo Han , Gustavo Pimentel , 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: <20221027110316.GA76627@thinkpad> References: <20220913200746.GA619956@bhelgaas> <20220914062411.GD16459@workstation> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 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, Oct 27, 2022 at 11:39:02AM +0200, Lorenzo Pieralisi wrote: > 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. > > I read this as "trying to bring the link up is mandatory because > we can't detect an empty slot, therefore ~1ms delay during boot > is unavoidable" and on that Rob's suggestion applies. > Right. Rob's suggestion came as areply to my worry on waiting for link up during boot. > Just to understand where this thread is going. The suggestion > above does not change the aim of this patch, that seems reasonable > to me and it makes sense even if/when what Rob is suggesting is > implemented. > > Is that correct ? > Yes, Rob's suggestion makes sense to me. And it has to be implemented as a separate patch but this patch itself is required to demote the error log to debug. Thanks, Mani > Thanks, > Lorenzo -- மணிவண்ணன் சதாசிவம்