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

From: Ben Greear <[email-masked]>
Date: Wed, 05 Dec 2012 16:44:39 -0800

On 12/05/2012 04:20 PM, Brice Goglin wrote:
> Le 05/12/2012 16:01, David Miller a écrit :
>> lspci might be a good place to figure this out :-) It's probably
>> grovelling around in PCI config space to determine these things.
>
> Right, it looks from PCI_EXP_LNKSTA in the config space (only works as
> root). Here's how we do the same in hwloc (using the pciutils lib
> underneath):
>
> https://svn.open-mpi.org/trac/hwloc/browser/trunk/src/topology-libpci.c#L399

Thanks..but it seems easier to just parse the text output of lspci -vvv

Ben

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