Subject: Re: Should we report bus width/speed via ethtool?

From: Ben Greear <[email-masked]>
Date: Wed, 05 Dec 2012 15:09:11 -0800

On 12/05/2012 02:36 PM, David Miller wrote:
> From: Ben Greear <[email-masked]>
> Date: Wed, 05 Dec 2012 13:35:01 -0800
>
>> It seems the only way to get the current pci-e bus speed & width
>> in ixgbe (and probably many other NICs) is by parsing output
>> of lspci -vvv.
>>
>> I'd personally find it easier if this info were available via
>> ethtool API.
>
> You could just as easily have ethtool determine the PCI device
> location (using existing facilities) and fetch the PCI-e info from the
> PCI sysfs files.

Any particular sysfs file?  I've been grubbing around in there
and I don't see anything that specifies bus width or speed..

Maybe it's some binary blob that needs decoding?

Thanks,
Ben

-- 
Ben Greear <[email-masked]>
Candela Technologies Inc  http://www.candelatech.com