Re: [PATCH] pci-sysfs: Make PCI bridge attribute visible in sysfs
From: Bjorn Helgaas
Date: Thu May 04 2017 - 08:59:20 EST
On Thu, May 4, 2017 at 2:32 AM, Vee Khee Wong <vee.khee.wong@xxxxxx> wrote:
>
>
> On Mon, 2017-04-17 at 10:41 -0500, Bjorn Helgaas wrote:
>> On Mon, Apr 17, 2017 at 12:50 AM, Wong Vee Khee <vee.khee.wong@xxxxxx
>> > wrote:
>> >
>> > From: vwong <vee.khee.wong@xxxxxx>
>> >
>> > Export the PCIe link attributes of PCI bridges to sysfs.
>> This needs justification for *why* we should export these via sysfs.
>>
>> Some of these things, e.g., secondary/subordinate bus numbers, are
>> already visible to non-privileged users via "lspci -v".
>>
> We need to expose these attributes via sysfs due to several reasons
> listed below:
>
> 1) PCIe capabilities info such as Maximum/Actual link width and link speed only visible to privileged users via "lspci -vvv". The software that my team is working on need to get PCIe link information as non-root user.
>
> 2) From a client perspective, it require a lot of overhead parsing output of lspci to get PCIe capabilities. Our application is only interested in getting PCIe bridges but lspci print info for all PCIe devices.
I'm looking for a revised patch that incorporates the justification in
the changelog and addresses the code comments I made.
Bjorn