Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp7811848rwn; Wed, 14 Sep 2022 05:02:36 -0700 (PDT) X-Google-Smtp-Source: AA6agR60jSE80cKrfrdH218Nh3Z9STKY3m6tTCPTq6CfIE7yzjNVjUDLhPUm/M8hjcCER+RX3Kum X-Received: by 2002:a17:907:97d4:b0:77c:99cc:2d6f with SMTP id js20-20020a17090797d400b0077c99cc2d6fmr11699905ejc.363.1663156956259; Wed, 14 Sep 2022 05:02:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1663156956; cv=pass; d=google.com; s=arc-20160816; b=WWM83Q4SVEjdEAGJcQf1yqqyUZA3SMZ1EMfxqKBsd1C5DqDLmtylDy+nwQuYw8mi/3 5h2Y76+gkUH8CSB1IITD7wyQwczS93c6BkdFX4JXL4E7eaubUEABcYLNYMGqckkbpOo4 a/5+zMQkk/VVr2F3AoXWdKsjeoEfisacooVDxuLxRh4XWqh7q3fAfnWnSx0w7Mrt2g3b bFFprCvT77UIyJDpiEQ2HK72SuXH3s+5lrwOOc0Mdgvb8WOTAHC6LkLgsUPelUVNIdWk GWxdcACDwNUFhCEE3y3XDIfuzXJfKGKm7x+exO+oXW938Pw8wj4lCwfX0swzvu7Ma5p9 NUkg== 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=HU7v+5Bzz5lvCsyV1K0YnkmulZGh+N8zwRGsqLRJO1c=; b=Ftpkp9M5TDP56guzSLryRzb8nURluhomWuBPWBsBCblxEt8bKcIzs9E0m2KN2DXBlR M3Q2rI+cgMckN5f+akvipGF4jr7oiMLxrz1MPIwy/6/7qa0rtzXyzRQ5n7qAFJCYWFwt vr9BhltXy4ge5ehRmDLl81dwjUAM2co7E+Z3gl+LjEbMg4Qg+ToWgPsiMxoiFEdMAazF ucwp+GjdQmRoDEzmkeHon0YJDD8OgECOnrNwFbf7BqQRp3crV8Zc+KVOmOSsfHXpfJP0 PGv9dkCy6QAOLMzfoP3OJJD6kWcWbq8N8+xHEl9LyHLu/UfPl5OUtOisPMR7A6362PIQ iqSQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=S+OofwfI; 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 fp9-20020a1709069e0900b0077333743446si9433444ejc.572.2022.09.14.05.02.09; Wed, 14 Sep 2022 05:02: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=S+OofwfI; 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 S229816AbiINLxI (ORCPT + 99 others); Wed, 14 Sep 2022 07:53:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229769AbiINLxG (ORCPT ); Wed, 14 Sep 2022 07:53:06 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2070.outbound.protection.outlook.com [40.107.93.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5CA97AC26; Wed, 14 Sep 2022 04:53:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YtjNQ4RCt7+Lvl/w/ePEgyXmTTAZjOFz+EAol+MY5+up/FZtjeoEnF6ffgHGeWhsbBMMPEpkEtzCrTBsWXTgbCjFU2BYCmQiBcSaU1dzd+dgLq6ZS+egQncEOq79TF/xBgfkKiRmyTHnQHMFmmb29O2kuH80bL9RSrYCbSTkuhaOuY91aviDfE43Pj3tb1P5D8WRaOTnSpnc8dtKpZauexnCtuhBhZygcTuKrJsRf9Fr2Hnfmc8u1TEQSMe7J43DrXquImabA4+zp438lR3jdUyPxNUGD3P2xSiztafFvbP+Gs9yQfg0YOMs/AMPaW7E6Y1L0t8Q4lZ2CFOj9phRpA== 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=HU7v+5Bzz5lvCsyV1K0YnkmulZGh+N8zwRGsqLRJO1c=; b=Nr0zMEn1UaCdgzu6etO9XN8gb4NjqSd7OR6MYZoQkFk240stqcQwpFFwMPEw1E70JPmW6wUpiqVvnPF0Px2g+A5wVvOxjT2Wws40ZBAWojVYII7+RzHzRzkE3AUNJiYg1Kitp7D72iJo8m4cp1wPyT4wxnYP+GtZo5PTrQJvL8o4V28+/PTgDSHnhBOzV46dmgp0xemcNUbv000U0X59SXFrnc8xhh/5maQErIEvVaKmNR/fYM69EzhQgWV9Kqadfri9+JfCdZky7zqlVNdL+iTMaEJz0siQPTmxEyzN1giEffNgJzJv5cYRHdWOLTpj4LDvA1NB2pWzmyrrerFH5g== 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=HU7v+5Bzz5lvCsyV1K0YnkmulZGh+N8zwRGsqLRJO1c=; b=S+OofwfITT5vyMz54qOXe515WWHgD/RpsPhdasScFu+PtTuOo3TMZu4uBIpMZsNhI8QJzkpL1Z1/oicixYPOweF/fZ3qgV5FE3lxqMBvbT3/DBNZUW//r0lNYDjQwU8dSYSoSFuISI+l+SUu/qsHihPKZFj77ij6Xe20mA7dlhlHU2Y7jaDdRW4B4qbd22DThRfGrso1BA+PgR3L8OchJLzBjGiCjrGD28Hv0bnVjQJPV20m4Ozyj9Z07KBu5ENFukObFPYTuzqGmUsUnhEtxX4SuPG127H/vc6n8omVK3d4J4CE/vgpEuSJW2Xfyl/AHvgowQkBmOXFPF4YRIqtaA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from CO6PR12MB5444.namprd12.prod.outlook.com (2603:10b6:5:35e::8) by DM4PR12MB5053.namprd12.prod.outlook.com (2603:10b6:5:388::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.14; Wed, 14 Sep 2022 11:53:03 +0000 Received: from CO6PR12MB5444.namprd12.prod.outlook.com ([fe80::7090:22ef:abb3:ae9f]) by CO6PR12MB5444.namprd12.prod.outlook.com ([fe80::7090:22ef:abb3:ae9f%7]) with mapi id 15.20.5612.022; Wed, 14 Sep 2022 11:53:03 +0000 Message-ID: <6c952bcc-7e66-7385-ad80-e9b084aea440@nvidia.com> Date: Wed, 14 Sep 2022 12:52:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH V1] PCI: dwc: Use dev_info for PCIe link down event logging Content-Language: en-US To: Manivannan Sadhasivam Cc: Vidya Sagar , Bjorn Helgaas , 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> <29b39edd-10ab-b679-f270-67b0b406ca2f@nvidia.com> <20220914111857.GF16459@workstation> <5ffe3dfa-28a5-a5fc-0ae2-28927c39dc03@nvidia.com> <20220914114306.GG16459@workstation> From: Jon Hunter In-Reply-To: <20220914114306.GG16459@workstation> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0126.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2c6::17) To CO6PR12MB5444.namprd12.prod.outlook.com (2603:10b6:5:35e::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR12MB5444:EE_|DM4PR12MB5053:EE_ X-MS-Office365-Filtering-Correlation-Id: c4b2c25c-7a9a-4fb3-0c1f-08da9647adf8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: djAYfLBqonwdBgi8/HNNry98txDUeAhQVoWfbxBM0yCYyBXWN7Jzlf8ALINNPlaEPde2ShfdDjylaio4TXAUT8sY4hmfOJbX1G0hMtfmw8W9WRgC9PDNtWcfxcTgNyRkN4XuXOrh6tbmKbIiqhtkLNIY4LBm5G1rJO1Rdg1qCmFgoKn9t4nJ7tnFpQ2mrt8ZtFD9h8kx31yFOTRAttlxJ+QNfQyLIU0XDk/FbN4k9nu1f/wRGDew6ZN2X8HbrNOVrOv7n1RvAaHTpjfxEOfFn9cUlsCCCeu5V6DY9X6Bbwoe33fG2z6PdehPhGwRXpCaNpvvd5c67aLgGAlu8NdR+afxHR84uWtZEn8HRbtResWGUVre9HxIIZpHVY95rxwiV+DZbzeMXQxYrQbmbjkRZOKvSLE/yid8QLgjpXXIyqKDhu0Dr0uvIlSX6jX02Xn8HH2AINummj1d2Qjk1yKhdfxhgypSiiXWDtPg+DRfwvya3HcqxdiSJkYw21zX8bUXTMVpdKMTPp3slw1xJ2S6LouS6YMJT3Z6i0mt2IAhb/obNJYXU2xRBRFwTGdvuGPVgVrQOXJL1rbEp+vZClG6LMfrKTdtZqIXauQI82SFBjbLFqlko78j6quBB1WGKGE7VKnzqszWZUV3HpP5axSjHn+Z5Oat+l4CLpwsNKbnH5fFwkHoa7rWPPIOyKmH9/v/Te5xzSHo+K0MS3jzCN+TGDalcI9IuzZjf/Zxuh5ZFm5eDatkbTTTpl4lI33MC7tMQxd7FDp5KFE2xOu1YSSEn5PrtwyLJar07kw8U/8I2no= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR12MB5444.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(39860400002)(396003)(366004)(376002)(346002)(136003)(451199015)(53546011)(7416002)(31686004)(478600001)(36756003)(6512007)(66556008)(186003)(31696002)(2906002)(66476007)(41300700001)(8936002)(2616005)(54906003)(6666004)(86362001)(83380400001)(6506007)(66946007)(4326008)(6486002)(8676002)(6916009)(5660300002)(38100700002)(316002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZExXYmEwZUl6KzlxaVdFV3RrTVR6K1dkcHd6bjdHQ3JlQW9ORVhIdFRqaWtV?= =?utf-8?B?S1BKSUZkTmFJb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=?utf-8?B?MjU1K0lyVVhRSHFKSDU4OFB6V3loMnNWZ2lHRWt0KytlUGZGUjVlazBoQ0Vu?= =?utf-8?B?Snhyem9mQUJ0TlZGTGNXZTRjaVFaK1ZzWU01aWNrN3R3S0QxVEtGZnA0YXdo?= =?utf-8?B?bWwzQit0NnhZRzN1MjJ3YzdOSWpoMTNuNWhwRHJsS2VRa3JrNnVMbnc4MUIr?= =?utf-8?B?anBzUnJzNnlBd0toWU1TOW4zYjNNbEhWMzNKL0FXa1diYmJNQ29VN2tpdU1p?= =?utf-8?B?Yk5NTzlYR0toVnhQOHlGaGU0SjlmcG1uTEZaK1hLaWJkdWppNTUzTHBJZlBa?= =?utf-8?B?NHVjT3FrcWRNaWM5TlZBL1AydEtGMno0TW1mNWNmL0piYzBvZXBhQWlFZVB5?= =?utf-8?B?OGdXM3dqRk04YlNFSDFhQkUweVh3PT0=?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: c4b2c25c-7a9a-4fb3-0c1f-08da9647adf8 X-MS-Exchange-CrossTenant-AuthSource: CO6PR12MB5444.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2022 11:53:03.3154 (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: l8Urk5EONAkmP3ZTY4Y431BWxDj4QfVfKnLmAmyIAiw0UgjdpB4+d03PueSmX99aaISG62ev/wktmX/4Ba7meg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5053 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 On 14/09/2022 12:43, Manivannan Sadhasivam wrote: > On Wed, Sep 14, 2022 at 12:25:51PM +0100, Jon Hunter wrote: >> >> On 14/09/2022 12:18, Manivannan Sadhasivam wrote: >>> On Wed, Sep 14, 2022 at 04:32:10PM +0530, Vidya Sagar wrote: >>>> 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. >>> >>> Right. >>> >>>> 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. >>>> >>> >>> As I mentioned earlier, timeout can happen due to an issue with PHY layer >>> also. In those cases, "dev_err()" is relevant. >>> >>> And I also agree that absence of the device should not be treated as an >>> error. But my question is, if you know that the slot is going to be >>> empty always, why cannot you just disable it in dts? >> >> I really don't think that makes sense from a usability perspective. You want >> to allow users to connect PCI cards and for them to work without having to >> update the DTB. I have plenty of open PCI slots on my PC and I would be a >> bit upset if someone told me I need to update the PC firmware each time I >> wanted to use a new slot. >> > > My question was, "do you think the slot is going to be empty always". > This can happen with slots exposed through a connector (not a PCIe one) and > users would plug in add-on cards for accessing the slots. In those > cases, the add-on specific devicetree can enable the PCIe instance and > use it. > > But from your reply, I can infer that the slot is exposed on a standard > PCIe connector and users would connect a PCIe device any time. Correct it is exposed via a standard connector. Yes for PCIe slots that are not connected to an on-board device or connector, in that case it would make sense to disable, but this is not the case here. Jon -- nvpublic