Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp7787718rwn; Wed, 14 Sep 2022 04:38:36 -0700 (PDT) X-Google-Smtp-Source: AA6agR7dTjKtUsKAyn0+tn2PAGiiIColhQB8LMrYNCCwcCJH2WWe1lIW7zW+poShHDRDEyoLDb4t X-Received: by 2002:a05:6a00:1624:b0:540:984f:9a64 with SMTP id e4-20020a056a00162400b00540984f9a64mr30408745pfc.46.1663155516138; Wed, 14 Sep 2022 04:38:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1663155516; cv=pass; d=google.com; s=arc-20160816; b=wWOLegKALQvmssIL1gRcwFw3jwTEOQjq7E++cFzaViqk6bQtUswrABxbrCEzzM11Fb rOMa0TAYox7mVR0Ko+5P/m+DfDl/CmtScdxeVijZeCyDJG59wl6jydl/kWLuHb6GNlPF roi88mIPayk3L7a1jeA8WjxVOEphw4QTNAjrL07tiKCZXCgeEhvRpW4s6NIRSEsMWOvq tTXiI0ZX+h6FYjZJcu3XE0TVY1A2FM5CqvDHZQNbK9pcvlX2OB+/znPT5hDxX30z5VMM /V1jgnf9vlRiYHZGP9LniG0YkpNfODpSrznrtddraGhtEcRVr4LIWLt0z08f3i6IRAty tmkw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=YA7LxOznQcV98rhQePLHv0wh6gZOvwN1QyvZkuc/0QY=; b=PEpU2+gQNneF2YD2aFfakviok1ifu4BMZJVKQfz4vTk/GKtbfr4kBfgS4tPPNa2a10 mpooTR8MN/0pOxDdzSX+baviu+UaMDt6lyiErUomGJrmEPvGsZAT6cvanOsii3sQq4KP +SxdKlw37ToZtUnscmxlXY3lM0joBs2imfn275YBNhkr78DWkDuNWpGUMQz5o/eUOkfq zuclJWB7fWIPGiv6eYcYrYQPMtUbhfl15qqgn9/CT2hM3jksbCLV35iVhJ1OszOadcI1 +pGTjd5cN8hgWZ3t1CvdVDBvJtGChZGZD6zFjrEMAmcrtKL50DmeahHTRcDNn1e1I1BD 7oIw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b="XqZTBUM/"; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.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=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x18-20020a170902821200b00172cb948c68si14008604pln.227.2022.09.14.04.38.24; Wed, 14 Sep 2022 04:38:36 -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=@Nvidia.com header.s=selector2 header.b="XqZTBUM/"; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.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=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230053AbiINLCa (ORCPT + 99 others); Wed, 14 Sep 2022 07:02:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230029AbiINLC1 (ORCPT ); Wed, 14 Sep 2022 07:02:27 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2068.outbound.protection.outlook.com [40.107.223.68]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F0423AE7D; Wed, 14 Sep 2022 04:02:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GttlbbJGWg4aMKMG9GG/UKtcusd3lp04JM3AKNi3N/Bm89T1L+plbQlio8nxntBxIgymNlJUMGFxgKt6yRXk3utHuEXakeg5jQabGhXNVsoXvjZsNR7ujjvADBswdyniSNJXLlm7iXIh+gHThm4s2VmsTD6esQNR9iYKi3Zu5gLMtkIws9XH8fOm5XZ0UXd5XTw153ywQySxrI7kOOGwQacXgf3SotkI+U0F615YT70MKg/mQGhLMOStxHACnN/ggDd95siSBJ/KxVjWewpMAHjwBpKUgHzKRDeNsz8Q/EA96vofbeXY13hNx5SuobvuQUk6ES+2WdNudEy9kA7oDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YA7LxOznQcV98rhQePLHv0wh6gZOvwN1QyvZkuc/0QY=; b=D4iPmsAZvnIz4YrlI8IZfORxxwYyjgFwiyAbHg+BGdBH5DWZ69YAYtar55m90CUzlQIvMnF/qUeE/lpDvS/TusROeKaXuiWRatI4MKTqYqeroML4H2WRatyXa9C34SUqWU5TtwtgWUvAoK1mXClhujeEK4b1USplrmjm18g9RD0whKbposnkl5El3UvOC/PD/o//tSssicT6CiepDK30eqCJV/v3off/bQFO/32vvqalKoZUg2epZekSCN4Q1NawjMg3nOWpFx3+T5kjagwt3v7iiGPI6obmSZPYQiSIZmfcu0u2T9UgeSJ0bQDAxRH58YxcGJBIb+1nEeRt16l2Ww== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YA7LxOznQcV98rhQePLHv0wh6gZOvwN1QyvZkuc/0QY=; b=XqZTBUM/pbYGxa7pYKopsywGs34NnfX25LJpNm7AJKw4vTsuakg9m5qNH82p9LqaVS/006fiu0+J+n39sG4CCnJ/h6XRp1spisSBL0UdczkrmI09o5nKwRJ3vmUmdAmpkLQmy0h+puZtIdz8YLYHZYUFyiLuvkSqOm2s2CE1HJrOWyuRfsikxDdxkif/izXgccXDIXlFg0zoFysDgMq54hZIDPZGNfQHQA5ZJGz/rCrI8tDQFo2LtiUVvX/tgeaoOrLR//wTPTML9+LQsIqYMeF0shTCCCiUEv+JqdyWxJ3drPowpcwZuF/4t2EZ8qxVeqr+beyrlZ2C7mebpTM6dQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from BN8PR12MB2900.namprd12.prod.outlook.com (2603:10b6:408:69::18) by CH2PR12MB4037.namprd12.prod.outlook.com (2603:10b6:610:7a::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.23; Wed, 14 Sep 2022 11:02:23 +0000 Received: from BN8PR12MB2900.namprd12.prod.outlook.com ([fe80::1d26:504d:7cde:3158]) by BN8PR12MB2900.namprd12.prod.outlook.com ([fe80::1d26:504d:7cde:3158%7]) with mapi id 15.20.5612.022; Wed, 14 Sep 2022 11:02:22 +0000 Message-ID: <29b39edd-10ab-b679-f270-67b0b406ca2f@nvidia.com> Date: Wed, 14 Sep 2022 16:32:10 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: [PATCH V1] PCI: dwc: Use dev_info for PCIe link down event logging Content-Language: en-US To: Manivannan Sadhasivam , Bjorn Helgaas Cc: Jon Hunter , 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 References: <20220913200746.GA619956@bhelgaas> <20220914062411.GD16459@workstation> From: Vidya Sagar In-Reply-To: <20220914062411.GD16459@workstation> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MA0PR01CA0107.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a01:af::15) To BN8PR12MB2900.namprd12.prod.outlook.com (2603:10b6:408:69::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8PR12MB2900:EE_|CH2PR12MB4037:EE_ X-MS-Office365-Filtering-Correlation-Id: 95a43bfe-2ebe-4b54-463e-08da96409940 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MdG1fSfBWcSv70+RnJVQ9zRkWOGyc77aXW+RemAo7mE2GqKUNo02iPR4mk5eBhR8WGmWI1Yu2AP3sEgGEXWBB+jTllXDmhV4GUdifvRR4QTpVb+khn297teJhIUedzbJvHh6rnEJzSgX9ByVb/3LMe2Jpen5LpJes6w8AJ8twraFOJH7Y6GBpk2dEfnqaQ2Y7wAPUVVAMmVP7+eCccdQuw6iL9b7YKBdsfetEASoQlqN2KZrJMap3qJXj6TsO3uBj9anO+V0bNhs62zKAeRCA2iw5ORC63vaR3NtgQK7ng5uhCU1jRo2cKl5mXNcFd+QU8CWGX94k4zbUAAbEMdrKcU5EBzPQQ2FxfEsNjAjmnnZTr4IVCC/617+DY4DQok2g1E9BvEWlVahOTGN9qY6peaSmnek9CiY/Ywl2EinEcVU8/v5gW3oIWIznqYpiCFPhJEnymQ+oTRVy3+tGzEe4gzOiaVhK0AaU7PnlXyOrWYkfqlvFETnDwfdITlfgyZ7rcyK/J1XxAbFuKZ5HP+880KSJagqfv6AisPXlR/fPpPaWcKDjKgwNTVTnBNA7Sn2zdVEX+9sv8aOmB4iUJ6MercFvQGFX9gCojunaWGnGOJ4VDLQNfXuKOtfOic1OqKVtrovwR1RbatN2Hwh5uc8YDC67TU42Mq71NruUgAIQXCJq2BRl83Hu6raWqahTa9S/uc6B/YnGhuMTSkonn/NMw1xCLEjwEjrFia42syqD2Ju/ZNFihPBUX9L4tqQAQRlh6BFmyB4o40ji++AuzD8e8d+MBi+E+BT87pTBoxBEVE= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN8PR12MB2900.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(39860400002)(136003)(346002)(376002)(396003)(366004)(451199015)(36756003)(86362001)(38100700002)(31696002)(31686004)(53546011)(6506007)(2906002)(7416002)(478600001)(41300700001)(6666004)(26005)(6512007)(2616005)(6486002)(83380400001)(186003)(66946007)(5660300002)(4326008)(8676002)(8936002)(66476007)(66556008)(316002)(110136005)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZlZIbHFmbTVPK0pOVDlMT3JaK3YxcVpmOUtOdjhVUmNtU2NyVFI4T0RLWWlM?= =?utf-8?B?T1dFM0d1Tkt0a2lZeDlVL1hFQkFsdEozRWUzYnN5NmhSS3JOK2NXNmMxT1JQ?= =?utf-8?B?bjZRQ2YydUFHRU82OEtyOFczSTJJMkcvbGZITFk0dCtlMFI3bXY3TVdreGNn?= =?utf-8?B?dUpDaXUrblRqL0M1R2w1bCtteWNOcldrcTkwVnZTc0ZUN21sWE9MNTdUNDA3?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TQ0ek5wcFdvZ0dncElkZkZEdnA5NTQz?= =?utf-8?B?SW56djhHQ3kxU2pOb2V6ZWNvVWNKQmhQRGJ2VzdTY05wbVh5bE5LZngzeVE0?= =?utf-8?Q?zP9Fu+Az/B3sC/Mw5smV0DxuV?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 95a43bfe-2ebe-4b54-463e-08da96409940 X-MS-Exchange-CrossTenant-AuthSource: BN8PR12MB2900.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2022 11:02:22.2983 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Vu68pMVwTxQqGsAaNKv9464uv+GICUGAVq/IaXRXVi6Ap/NZYP083ZlcJG0Cr+lS8glMlQ3qurMhanpkuOA8Yg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4037 X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_NONE,T_SCC_BODY_TEXT_LINE 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 Agree with Mani. Not all form factors support PRSNT pin (Ex:- M.2 Key-M form factor) and even if the slot form factor supports PRSNT, it is not mandatory to have a GPIO routed to the PRSNT pin of the slot. Also, since these are development platforms, we wouldn't want to keep changing a controller's status in the DT, instead want to know the device's presence/absence (by way of link up) looking at the log. In my honest opinion, I don't think the absence of a device in the slot should be treated as an error. Thanks, Vidya Sagar On 9/14/2022 11:54 AM, Manivannan Sadhasivam wrote: > External email: Use caution opening links or attachments > > > 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