lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 17 Nov 2022 10:05:00 +0800
From:   Liu Peibao <liupeibao@...ngson.cn>
To:     Bjorn Helgaas <helgaas@...nel.org>
Cc:     Bjorn Helgaas <bhelgaas@...gle.com>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Lorenzo Pieralisi <lpieralisi@...nel.org>,
        Krzysztof WilczyƄski <kw@...ux.com>,
        Jiaxun Yang <jiaxun.yang@...goat.com>,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        Huacai Chen <chenhuacai@...ngson.cn>,
        Jianmin Lv <lvjianmin@...ngson.cn>,
        Yinbo Zhu <zhuyinbo@...ngson.cn>,
        wanghongliang <wanghongliang@...ngson.cn>,
        linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V5] PCI: loongson: Skip scanning unavailable child devices

On 11/17/22 2:14 AM, Bjorn Helgaas wrote:
> On Wed, Nov 16, 2022 at 05:57:46PM +0800, Liu Peibao wrote:
>> On 11/15/22 1:11 AM, Bjorn Helgaas wrote:
>>> On Mon, Nov 14, 2022 at 03:43:46PM +0800, Liu Peibao wrote:
> 
>>> I assume there's a single device in the hardware, and both the
>>> "platform device" and the PCI device" refer to that single device?
>>>
>>> And there's some reason you prefer to use the platform device
>>> interface to enumerate that device?
>>
>> No, they are not the same device. For example, GMAC1(on chip PCI device) and
>> GPIO(platform device, not PCI device) 14 use the same pin. The function for
>> this pin can be configured by one bit in general register, eg, 0 for GPIO 14,
>> 1 for GMAC1. Sometimes, GPIO 14 is preferred, so configure the pin with
>> function GPIO 14 and disable GMAC1.
> 
> Ah, I see, so there's some circuit that can be driven by either the
> platform (GPIO) device or the PCI (GMAC1) device.
> 

That is really the point. Sorry for my poor description and English :).

>> Overall, how about the following refactored commit log:
>>
>> "This patch adds a mechanism to disable on chip PCI devices by DT. Typically,
>> when there are pins shareable between the platform device and the on chip PCI
>> device, if the PCI device is not preferred, add `status = "disabled"` property
>> to this PCI device DT node.
>>
>> For example, on LS2K1000, GMAC1(on chip PCI device) and GPIO(platform device,
>> not PCI device) 14 share the same pin. If GMAC1 is not preferred, add
>> `status = "disabled"` property in GMAC1 DT node."
> 
>   Add a mechanism ...
> 
> (Instead of "This patch adds ..."; no need to say "this patch" because
> it's obvious that the commit log applies to *this patch*)
> 
> Add spaces before "(", e.g., "GMAC1 (on-chip PCI device)".
> 
> Looks good!
> 
> Bjorn
> 

I will modify these and send the next version patch.

Thanks a lot!

BR,
Peibao

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ