Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1994850rwd; Fri, 2 Jun 2023 03:20:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6xsuPfmXQZ2ZT+0Zbn8h9O3lcLrKJS7kuPBUAXibj5LAlFC8qUGvDKTwzSt+L6E2Aeqi7M X-Received: by 2002:a05:6a00:21c9:b0:64b:205:dbf3 with SMTP id t9-20020a056a0021c900b0064b0205dbf3mr14388642pfj.34.1685701249234; Fri, 02 Jun 2023 03:20:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685701249; cv=pass; d=google.com; s=arc-20160816; b=gcKP0S1tPIscUYQ/tIwKGJJWskxN74X1RNqIOeXbjhepTcr2wlYqBqRelsARsfGwLt 1J6oaJbQbrSOrAkQVEx3P9nSkFPSqKPTAZZnXjc4+V/GCQ8NMrgM7O+Q3xX1aGhIxSJi qix4zt4Thc4TIz91nT/h3nhCl995B9OAGknwMVHiiNNG7SAccdFpEGrwpQFdfFeMV946 +ghLtk+Iwmfg2vQ7gMqn4ahTLDp00YBX2oHJXC7dQG8rLqLmsYspsk/e8y5G5GjFcv9o eim1Nh6LCwMtnFRKXpmrrjzWb1gG5EfdxWr02Yf3e9sxFosIBWdG6bvV1qithHL+moIe 4dTQ== 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-transfer-encoding:content-disposition:references:message-id :subject:cc:to:from:date:dkim-signature; bh=palefHqkdCXUSxcSh8pSOE3kKrzI67pWlFf8WwKnHGg=; b=dza46s0hWjVQCDyrH6KGWm8KM0sZNBW2OSaeBmFqy+BQVm7Zxi6Ahn7DW2+OlfEsS1 BNn1RoZ+AHsSwSnoXlygyeJCXti0VupLtMpvFOEc1L7tb7tGhiXMAJmJg+2/RqqTcEWD QpLf/Z5/vLoAWjQi3xjaSUsDz2TqoSXzYgIkPkQZsDkvEnak8LjJO0/MIix0/U7uOCk7 +N6dyJvI120VodKAlkKePQco7xXQ4EvEPrGEYPM7KaNKGgM/YAyRLwq35l76x8UWE7Nu GcESq3ogaX///U9VhRQNYHR+zfI+1ahHnWjWJ2OymfySM1MfiGPrcY88GnNqcUsMtqH+ T/Ng== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=V20wOK7J; 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 188-20020a6206c5000000b0065299d0f32fsi505094pfg.212.2023.06.02.03.20.37; Fri, 02 Jun 2023 03:20:49 -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=V20wOK7J; 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 S235091AbjFBKQh (ORCPT + 99 others); Fri, 2 Jun 2023 06:16:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234510AbjFBKQf (ORCPT ); Fri, 2 Jun 2023 06:16:35 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2076.outbound.protection.outlook.com [40.107.20.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 640E318D; Fri, 2 Jun 2023 03:16:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CPKWoEIUOQli6fNzGW+38RlYWlQ0Cn6AfxYsfOVE/mBvrgW1aig53d2ymHAYP/ot0CSBOGgAgAXIslkbjNL0MA6iP8GNnHURAnbCYsrNv5wgUr2UtjhqoMLUCPx9VbcOGe5udS4WAFcszWvQ/aLidNMswxaS/D3I5aEU4SIgtgRZ1VeCHbxM5uYOYYwovqCEPRV/M4stT0S/bdcIg6Xew2RPYntHxrsQkPxu7FFt7lfCOuQ0JrViQ9DZp4IMNgELpxD93iYUaqU772KQa1iQgaG3dAqQUEP08Gt7zWgFZWzR2DU3sPmTP4mf3qLFjrMZVOgftQPxpDhqhElydpNBkA== 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=palefHqkdCXUSxcSh8pSOE3kKrzI67pWlFf8WwKnHGg=; b=n9ZXXlWilQX2Y0ehMKSQOqL0byfaMEzLtE2RB0N5q3NbCua7UnI67mBnlOF3tANBwxE93C+FruxWMK64MXdxM6L4Tgi8I4FKl3rzg4MrEtlREXu7LKOJfoScOO+TMhlaGLvQKsuX/skpQ8yq9a2LSZVRvwu9VAtCAjvAC9X9ngWIlYLTJQPKLeTbofRe90AuRJq9C7nwdqo92lKRgOMqMeiS5PCNpXQc1v5DojByvWu/dNT8esU4vvEDyITSg2E2XYTEj2efb/8E0Vk7qL/Bw98o4yPeHn1s9lK0J1fZ8Y6QAKHGQ5ANLj98ok4scI9smK8vWysL0m5RDDrXaBOr6A== 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=palefHqkdCXUSxcSh8pSOE3kKrzI67pWlFf8WwKnHGg=; b=V20wOK7JCXR7qEhc6aIr9/5ioeg2oCNSes8juMusJLoEL0N+p7sJfaIIlMDFBpTiGucQ01/h9djd9Sa/NplJS9zzq+zmbT46FNOTOUo/SuFFaTGAlSVupxbJot1Mus/xC7eV0dHahr2LKMQqyzNivXgg21kE6uAyGd43um3WrMs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) by DU2PR04MB8855.eurprd04.prod.outlook.com (2603:10a6:10:2e2::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.26; Fri, 2 Jun 2023 10:16:32 +0000 Received: from AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::47e4:eb1:e83c:fa4a]) by AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::47e4:eb1:e83c:fa4a%4]) with mapi id 15.20.6455.020; Fri, 2 Jun 2023 10:16:32 +0000 Date: Fri, 2 Jun 2023 13:16:28 +0300 From: Vladimir Oltean To: Jianmin Lv Cc: Liu Peibao , Bjorn Helgaas , linux-pci@vger.kernel.org, netdev@vger.kernel.org, Bjorn Helgaas , Rob Herring , Claudiu Manoil , Michael Walle , linux-kernel@vger.kernel.org, Binbin Zhou , Huacai Chen Subject: Re: [PATCH pci] PCI: don't skip probing entire device if first fn OF node has status = "disabled" Message-ID: <20230602101628.jkgq3cmwccgsfb4c@skbuf> References: <20230601163335.6zw4ojbqxz2ws6vx@skbuf> <20230601221532.2rfcda4sg5nl7pzp@skbuf> <7a7f78ae-7fd8-b68d-691c-609a38ab3161@loongson.cn> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7a7f78ae-7fd8-b68d-691c-609a38ab3161@loongson.cn> X-ClientProxiedBy: BE1P281CA0124.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:7a::10) To AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB6452:EE_|DU2PR04MB8855:EE_ X-MS-Office365-Filtering-Correlation-Id: 4ceb6c9e-9b77-4c42-67a1-08db63526ff5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AdSKMjJoEwKOhzEGD1uj/wti0bpZVTkU1QzbGvSgCljAkDR8ZU/D9PCS3YskuegmMxQYE9kU1DHy2AKosGEq+ueSN+gsMemfaJLzT087nWMIrVhmxVbebr8KQJeAoktZRbUMhyy6rQKqo7Uer0Mrsm9U7JSIu4gm3CyGVcZewbl0gP1JS6hfgSwjPm7O91SgmDX4AEH6WuoIrmi5OeRc00Qcqv68Po4hd6PmQMYsYTr+4TMdiJBtgYEWJWZVBR4BRWwZSdDJxavef0VAeGMSda1sgBjCygANFzTK5q6ZIAD28kQuZYbqlb1CnPIzTEJC9hOAponsfmhRhajPBhLzHR1o7qFB457Ly+m1KnDxNNyoqdOjzG4NY6mguj7MyjUud6H0mTjXkPGffL9cj1BpQ5woxNrtvwatLFBO3EqPeRJbtkkFzMi4xYyKQlG8X7iWTl1m92GkwKYcoZyWC2tWCqBj/gYHFWp2hs/WJYuCnRL1ZbRAJB/7UISf4dRjJITm1pxycgM3VRVqs4JK2vdQg0n9GizhJfbCc94+cJrhfQg= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR04MB6452.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(7916004)(4636009)(346002)(376002)(396003)(136003)(39860400002)(366004)(451199021)(186003)(86362001)(6486002)(33716001)(966005)(316002)(6666004)(4326008)(6916009)(41300700001)(66946007)(66556008)(66476007)(54906003)(478600001)(44832011)(7416002)(5660300002)(26005)(9686003)(2906002)(83380400001)(6506007)(6512007)(8676002)(8936002)(1076003)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?c0VIZVlFdjBqbGwxWGZPT3BrLzdLbjJTRHJmeU1YNFdCV3dEZTYzOWZFNDFG?= =?utf-8?B?cUpUc09VVlRlZHlJSEJSQ0w3OHRXNzdsdVY2MjY5eWZVUTlpbG52Vk9tcmRk?= =?utf-8?B?RUlmYndaZ2t1S3Mzckw5UnBZbnM3d2ZoRXVXdjlKK1dsQ0ZxMVZCeS9uMFpu?= =?utf-8?B?YlN3aXZPaXhUQ0NDYkdjYndXM0l1NnVsOW44b3JDUE1UOThRV0djeGVMUkVI?= =?utf-8?B?eGoreiszclU3Nk90Zm11UzkzdG9GTnZ3SlZNaG12S1BOS1M1cEhCRlVHalJs?= =?utf-8?B?bWZTWGVFWUx6N01Eek9OOG5valJjeFRYMzVvam11ZEVIb0lJRUhHN0lTNmV0?= =?utf-8?B?a0xpODB6TE01MzBsSjRDcmNPTFZwazhrVVV4bk5UQ29qL0ptMmNpY2pkMFFl?= =?utf-8?B?RzhnL0pwdXRkVFBzaU04cVFYbnR3NHNzdUhjazR0cUtwamkxUnM2SXhubHZM?= =?utf-8?B?M2JmVURBSzJNUlJTSlBkNG5VZTljdnBEUFhrWjFFTUswT3FBQUlLTUZTTEQr?= =?utf-8?B?dXZuQmRJYlF0QkFobk5ET2tuWGMvVG1CZkJSVHM5UHZ2TXhOM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I1WHJrUXhTZURkN0l5eFhuaEpy?= =?utf-8?B?anNwb3ltS0t6aEYxQkJpQ1FaaXYreng5OE0xVGhoWXlIRVFVYTJtUURQNXYx?= =?utf-8?B?RlhCWVQrRlNqczJHcGVUd2dKL1RlVTVFT0lzYVJTYW1GTjBsdTFIcGpmemE3?= =?utf-8?B?bytjeXFkT0NpdkJXTWV4SHgvVzY4WTk0SXZXeFQyWGxlYUlnb0NmYXNHQzBL?= =?utf-8?B?R21PTjVERGZvSkNzRzlRQUgwZytFTC94emVNRWJSaEpXaWo4ODlpZEVTbS92?= =?utf-8?B?RGJHTDh1eXJ2ME9Ra3lKc2JGaXFGTXZxdDUvN3FXZHpKVXhlMVVHTHdrdExT?= =?utf-8?B?VUV6MHNXNStIZjVBaU5NYzArd0dxOFJpRVVtY3pURWdvSm82SCt2c0lTVGc3?= =?utf-8?B?VjZ5eHh6OXFRdDduYUMwMklEWXY1R1A0VmhGUDdMTmk1SWkxcG5xeFM4bEZJ?= =?utf-8?B?VldRNEdBYkZwc3NOanNsYk9sRmZ4M1RuMGJWcmxJYTErWnVhaVZmdzdiVDIx?= =?utf-8?B?clpwN3pkTDc1S2ozSUI5bGpScWRZT01oUzV0ZjhlTnFTQ2xJMUM5M3JQWm1y?= =?utf-8?B?a00ycHdWeE9hOVgxNmwvaTdNTkJiS2NtYmR3NG5kR25QTzBzdHRHbURTUjdy?= =?utf-8?B?N2lzV3pEaXBrVWFLcG5haGdQbWxyeXZJOXBKQ3BSU2srM0pUaEFOUzdHbUZK?= =?utf-8?B?TXc9PQ==?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4ceb6c9e-9b77-4c42-67a1-08db63526ff5 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB6452.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 10:16:32.1776 (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: MlGtQ7tv1GvME9U/gCTyBialKuz6JrVH2p7yuq2UNOsU9Xp/nwi3N+3Jps5pqfOKPzvFEzbhNJmKI+Qx1H+zhQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8855 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 Hi Jianmin, On Fri, Jun 02, 2023 at 03:36:18PM +0800, Jianmin Lv wrote: > On 2023/6/2 下午3:21, Liu Peibao wrote: > > Hi all, > > > > It seems that modification for current PCI enumeration framework is > > needed to solve the problem. If the effect of this modification is not > > easy to evaluate, for the requirement of Loongson, it should be OK that > > do the things in Loongson PCI controller driver like discussed > > before[1]. > > > > Br, > > Peibao > > > > [1] https://lore.kernel.org/all/20221114074346.23008-1-liupeibao@loongson.cn/ > > > > Agree. For current pci core code, all functions of the device will be > skipped if function 0 is not found, even without the patch 6fffbc7ae137 > (e.g. the func 0 is disabled in bios by setting pci header to 0xffffffff). > So it seems that there are two ways for the issue: > > 1. Adjust the pci scan core code to allow separate function to be > enumerated, which will affect widely the pci core code. > 2. Only Adjust loongson pci controller driver as Peibao said, and any > function of the device should use platform device in DT if function 0 is > disabled, which is acceptable for loongson. > > Thanks, > Jianmin How about 3. handle of_device_is_available() in the probe function of the "loongson, pci-gmac" driver? Would that not work?