Re: Help with listing devices in physical PCI slots

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 24, 2014 at 7:34 PM, Bjorn Helgaas <bhelgaas@xxxxxxxxxx> wrote:
> [+cc Matt, Jordan]

> I was really trying to ask "what is the specific information you have
> about your network port that you want to match up with something from
> PCI?"

Sorry; what I had in mind was the PCI address: domain/bus/device/function.

> It sounds like what you're really after is "Consistent Network Device
> Naming" [1].  I'm not very familiar with it, but it might be a way to
> do what you need.  It looks like it can use SMBIOS to help figure out
> naming information, so maybe that will work even if we don't have the
> PCIe slot information.

That's true. I'm aware of biosdevname; I have a similar user
application, tailored for our platform.

I get a list of all PCI network devices and for each one I look up its
interface name in sysfs.
>From SMBIOS I get the list of physical slots along with their
corresponding  bus addresses.
Then, I match the lists and identify the physical slot for every network device.

I was trying to simplify the design and thought that it would be
easier if the physical slot number would be already available in sysfs
hierarchy.

> It does seem like the way we expose PCIe slot information is
> unnecessarily tied to the question of whether the slot supports
> hotplug.  Maybe the slot number, e.g., the PCIe or SHPC "Physical Slot
> Number" could be exposed in the device directory of the upstream
> bridge, e.g., /sys/devices/pci0000:00/0000:00:1c.3/slot.

Yes, this could be helpful. I was looking for a PCI address inside
/sys/bus/pci/slots/X but this is better.

Thank you,
Cristina

-- 
CRISTINA OLARIU * Elfiq Networks * Software Developer
T. 514.667.0611 x 821 *  E.  colariu@xxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux