Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp66893rwd; Tue, 30 May 2023 16:20:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ksQT8pZgCyEGPq8ZzYIg4XAnECQkppivtL86ncpumNuWnZM8dK78rRVJMpViQ+g/fXTTO X-Received: by 2002:a05:6a00:1816:b0:63b:8423:9e31 with SMTP id y22-20020a056a00181600b0063b84239e31mr4498821pfa.11.1685488856312; Tue, 30 May 2023 16:20:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685488856; cv=pass; d=google.com; s=arc-20160816; b=0vq+IHcu219weTolrvsQhCYoHtJ7aKLEDkMKpcxcVUbcKwk5NIk0A5kkuFJimTy3ML kesqx4D4ST3jDMTs1iqg6MuhfSOzBNVPJHW8H7nJQf3Y8lzmwoaojlQlS8VQ0NJELZgv S4yc5ZEM8BT/Mj2tNVyc+KiVhxmCMgYNzKl3QAmpIhrbZNTyFEodo6ta8qiAtnU/1gxX xFj2VykOyZ7+LNKyWx9x9LesEYFGDXcYidcm9I7avkDqJ+YU7hOoZO2WGkpVg7FHV/mV RsWxe/scme9QQ6FD9TQR1npvP+1ieT0pNybwJzx1aYaHg5oo2mck+iF+B+wj/IrCXf6j zRBg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=zG7xYUMG0n3gsvTCSmGYZQaKLjWXkwITzhR+YMyPcRM=; b=ioRgo6EKPvx7Y+2LXJFM9bohJwH2PiWOkO04NTv+XjGuKuA0iLWTE7ifk9/Ceai4YT 4aVLx9ZmfAX5nu/8XdMZUhU2jPLAgy6AaeD8DwlOCB8qxDD4VG3nm3htaQaKOYEQRUG1 s/oYcxN1iVwpXWjv0Szb+UAZo5jA6qsR2npVevkHjtuMYgm8I1iATnxUb8ak2cPjsAy/ v5aty87cwXoS/2wVCuW1WxySMScL2bnZ2vgyR2EbPsqsehqfBJIn3qVqcR72x+HuSAWz EWaus8cowIji1JUolJbQqyOm4YmsvDAec/ct/6krQ/4BeKcrWciwaNwX+kEGdUCMsIPq LNVQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=EeXBUH5e; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c124-20020a621c82000000b0064d337029ecsi2450861pfc.200.2023.05.30.16.20.41; Tue, 30 May 2023 16:20:56 -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=@nxp.com header.s=selector2 header.b=EeXBUH5e; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233782AbjE3XPT (ORCPT + 99 others); Tue, 30 May 2023 19:15:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231843AbjE3XPS (ORCPT ); Tue, 30 May 2023 19:15:18 -0400 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2048.outbound.protection.outlook.com [40.107.105.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A26B0E5; Tue, 30 May 2023 16:15:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LEwaYVrseaMY0SGDtm/OFnl2MKTqrHyrP4MzHAn10d8EISbQezgVHk0n1xYGCOiMMeTx98UaVtaZSJ9gQQRgor0BUa4W+9utsbIQ7zH1oCAT91N9BezY+w6SBNsQfZLwpaPv9nkZ41JtQvtERlFsDYMe7m6IgrtTuTun6Ewa3ITcWLJyjd0OXz/XopkshxlraPyOxPg5q64BIIAvKa35xU5SJC7C6IICQXfYUQq9oz/+v7QRNOuFv07Vvp4Pesb3HHEXcGh2na1hoKuCMS2I08TLWVsNjxN/uAPL/mspuoCF/LCEpIFIt7+wOGxb7NpUPNv1Ha3iZq1i89wiZMmFHA== 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=zG7xYUMG0n3gsvTCSmGYZQaKLjWXkwITzhR+YMyPcRM=; b=ABw906BG4jy0V7EO7BpkFrS8KnBCnRjWXoLlXBuC8eFCDLsqflalLaH3N1/1VuH5jnj080sKTfWugLavITaXbLxXPrxXB3uL04luL+rcdX/9UGZ/440EA1uiu6eEm5PSa4QSDrc1gsV+g8rV7sAR4IHsegIoWX7HGC+gBpC1lvDCZZu1KgMxEVSXqgz3BbF41uZOyb0sRAGqS6KVjoYo44HCW5Y0Mbrsyc0mo4l8fGomjG0OLEy1Qd8T8gs2L1g1fLpcPuJc51WvJo3/r9YTJisPTYxKuC90dVMNnbbgjfu5Jm+xCQQhnpO0IDXBJYE5vpds0CgStk9FVK7KB+jTCw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zG7xYUMG0n3gsvTCSmGYZQaKLjWXkwITzhR+YMyPcRM=; b=EeXBUH5eTKysGNkRJ9MYWGJ/9X3UPOYEFn+5CL8RaYwqStXUYJfn1lu35OqzaxvGqP7YByI6GymWxMjhKi5FgnQPCJWiggnw9eIjqKRwOHqye47+J02v7o0FeN7CeFtO3uCN3tXnhie/5p1GXQBmMKqIAoZJojyNiC1xfynus90= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB8PR04MB6459.eurprd04.prod.outlook.com (2603:10a6:10:103::19) by VE1PR04MB7232.eurprd04.prod.outlook.com (2603:10a6:800:1af::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.23; Tue, 30 May 2023 23:15:14 +0000 Received: from DB8PR04MB6459.eurprd04.prod.outlook.com ([fe80::5ca3:2022:337:7c40]) by DB8PR04MB6459.eurprd04.prod.outlook.com ([fe80::5ca3:2022:337:7c40%7]) with mapi id 15.20.6433.022; Tue, 30 May 2023 23:15:13 +0000 Date: Wed, 31 May 2023 02:15:09 +0300 From: Vladimir Oltean To: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, netdev@vger.kernel.org, Bjorn Helgaas , Rob Herring , Claudiu Manoil , Michael Walle , linux-kernel@vger.kernel.org Subject: Re: [PATCH pci] PCI: don't skip probing entire device if first fn OF node has status = "disabled" Message-ID: <20230530231509.4bybb5nw4xyxxq2m@skbuf> References: <20230530220436.fooxifm47irxqlrj@skbuf> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: FR2P281CA0041.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:92::12) To DB8PR04MB6459.eurprd04.prod.outlook.com (2603:10a6:10:103::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB8PR04MB6459:EE_|VE1PR04MB7232:EE_ X-MS-Office365-Filtering-Correlation-Id: 42524e5a-df3b-468a-338f-08db6163b8d3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: S9xPHSrVD/o00sHRuNplqIO2jKqNweKDtGwdlwsAuN7aN6gJ4+fw73HxwuFK0vYlmFE40xwFBV/4shQFdJWyB11rYCiJgp3beLX0z6VH9vpOpI5q+d6nJDNMbjy2iIyaCi53ozxXwRUlrWAtSPIbnrtV6jG7cfIdLyToyvOCT73pLVD7YfM+lSdWVRGO6R2Fw5pzPJlpoZAO0Poez73TtN8nKEDePhahO86KbRCzqMx0eVm6DOfa0Z7WKxG0yaCV+18tc1I5IaIVq5mTL7q6Wm//lG0XycjtRdjwJsKrZ1SBIQSkwwKfEcgcRFLY565udusLa6xA16LNenD7EwlQSrFl+yUu5EpQXkiyOeUdsT+i4xXPRVOVbVpfU/PxaFvbiMDIlKA0bt7cwLWiJiKo3694p9gCIaAc49fjpm9Hm0DXRLbdq6+V78vJ0d9eXsYauvQDodZn0nAS8GuvatO/W85klA2VpriUIQrXQDgOJkKBWAFv04Amny4HpOLQln+Z+d5RCb8kr1gsNsmlG/dY18ggE47e3s1iDP3umyAUFreNU8NmQHub5husVKWf/gOV X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB8PR04MB6459.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(7916004)(4636009)(39860400002)(396003)(346002)(136003)(376002)(366004)(451199021)(26005)(1076003)(38100700002)(41300700001)(6486002)(6666004)(186003)(6512007)(6506007)(9686003)(478600001)(54906003)(6916009)(66556008)(66946007)(4326008)(66476007)(316002)(5660300002)(8676002)(8936002)(44832011)(33716001)(2906002)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?XcBtnet2379H9K6CIL9VMSk2jeeozx5JWTtCKFUTbTzaJJZNCj5x4RhkLFi4?= =?us-ascii?Q?Y0lc6tJHohKLUEJEARyJRBBnzjXzWFZropa9RppzHgERaMHitQPZXtlN7hl9?= =?us-ascii?Q?d44IbmS60P5sD/q/u2S2DInsg9/gwCBk/zy1qd6V/RHc6mm/rJkCvTZ61Vgl?= =?us-ascii?Q?YCSkcJSpiPiMswm9v47LMSN31IMKAs9t7Nr7qUED0Pd+BH+UGUlwpsGgJ6+Q?= =?us-ascii?Q?3M6M6n1UTU6zIDjyTXxZBeekV0mLWkTdlp/bJzUEpofBuSA9YyZl1dN88+zD?= =?us-ascii?Q?TyfFB5uYq8rcd181dist7j2mlleYhfHh+s7FfyQNpF3tS8mQKDCUxr8vNDMh?= =?us-ascii?Q?13cLBu5wlH+zScG6lMX7r+e4SWKp3A8foWu+k10nvTa14I7KTM8AMYwgslXD?= =?us-ascii?Q?cD7pBSwbaEVZULbqqVzhk+PWMhPFsjzh0DWPCTc+snsUUWVoL5e8mBx4ElT+?= =?us-ascii?Q?2OLpUSenYZ49FDjyDZFtiuB9mtEp71LSNEQaghmoA+tv33SZslpSX3Gr7TDb?= =?us-ascii?Q?GSoDKwiQyAzHcYrtgaRce42in4m0Mvtplr8q58hr8A4mImzWt9vWdRvDehwg?= =?us-ascii?Q?18Uyqi3b0tgpMzfsy+WnbZCIwvfm/aU2k20+ciXzVDiGyi41qPYP4d5qh3j7?= =?us-ascii?Q?N8zcUUlKg+Gmo3Q1tZ+uwe0zrOZuNkwSah7uQdqaJwK4GuB5wnSAkofzFEWG?= =?us-ascii?Q?rWTYEGwUqyWvxXh4NflRFRoct+Ieds6ze+4zxj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3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 42524e5a-df3b-468a-338f-08db6163b8d3 X-MS-Exchange-CrossTenant-AuthSource: DB8PR04MB6459.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 May 2023 23:15:13.4932 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: TaDyFNBIXuHbP8o5puuQYgAldqGA3FbHbDxfxbxa0f5EUiR4N9S4UMnDmcblM5vXAqtfaN9GBu04zKuBm5H96g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB7232 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, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 Tue, May 30, 2023 at 05:27:24PM -0500, Bjorn Helgaas wrote: > Ah, you're right, sorry I missed that. Dispensing with the SERDES > details would make this more obvious. Lesson learned. When I had just gotten out of college, every time I asked the coworkers in my company what they're up to, I was amazed by them just proceeding to tell me all the nitty gritty details of what they're doing and debugging, like I was supposed to understand or care for that matter. "Dude, can't you just paint the high level idea without using dorky words?" Now I'm one of them... > Not sure why this needs to change the pci_scan_slot() path, since > Function 0 is present and enumerable even though it's not useful in > some cases. Well, the rationale for me was pretty simple: it's the pci_scan_slot() logic that I want to change - continue enumeration in some cases when the pci_dev for fn 0 is NULL - and I'm otherwise perfectly okay with pci_scan_slot() getting a NULL pci_dev from pci_setup_device() for fn 0. That wasn't something I had in mind to change. This patch is what it takes to propagate a qualifier, without leaving a mark in any structure, for that NULL return code: is it NULL because enumeration came up with nothing, or is it NULL because pci_set_of_node() said so? > Seems like something in pci_set_of_node() or a quirk could do whatever > you need to do. Could you help me out with a more detailed hint here? I'm not really familiar with the PCI core code. You probably mean to suggest leaving a stateful flag somewhere, though I'm not exactly sure where that is, that would reach pci_scan_slot() enough to be able to alter its decision.