[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87f2b231-2e16-e7b8-963b-fc86c407bc96@loongson.cn>
Date: Sat, 3 Jun 2023 10:35:50 +0800
From: Jianmin Lv <lvjianmin@...ngson.cn>
To: Vladimir Oltean <vladimir.oltean@....com>
Cc: Liu Peibao <liupeibao@...ngson.cn>, Bjorn Helgaas <helgaas@...nel.org>,
linux-pci@...r.kernel.org, netdev@...r.kernel.org,
Bjorn Helgaas <bhelgaas@...gle.com>, Rob Herring <robh@...nel.org>,
Claudiu Manoil <claudiu.manoil@....com>, Michael Walle <michael@...le.cc>,
linux-kernel@...r.kernel.org, Binbin Zhou <zhoubinbin@...ngson.cn>,
Huacai Chen <chenhuacai@...ngson.cn>
Subject: Re: [PATCH pci] PCI: don't skip probing entire device if first fn OF
node has status = "disabled"
On 2023/6/2 下午6:16, Vladimir Oltean wrote:
> 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?
>
This way does work only for the specified device. There are other
devices, such as HDA, I2S, etc, which have shared pins. Then we have to
add of_device_is_available() checking to those drivers one by one. And
we are not sure if there are other devices in new generation chips in
future. So I'm afraid that the way you mentioned is not suitable for us.
Thanks,
Jianmin
Powered by blists - more mailing lists