Get pci slot number in driver

Jim Harris jim.harris at gmail.com
Mon Aug 24 15:19:02 UTC 2015


On Mon, Aug 24, 2015 at 1:17 AM, Nomad Esst via freebsd-drivers <
freebsd-drivers at freebsd.org> wrote:

> Is it possible to find out the pci slot number on which the card is
> mounted in driver? I tried pci_get_slot but it's always 0.Any ideas about
> doing this?
> regards
>

What do the PCI bus, slot, and function numbers for this device show up as
in "pciconf -l" output?

For PCI Express endpoints, the PCI slot number (also sometimes referred to
as PCI device number) is typically 0.  These endpoints are more typically
differentiated by their PCI bus number, not slot number.

-Jim

_______________________________________________
> freebsd-drivers at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-drivers
> To unsubscribe, send any mail to "freebsd-drivers-unsubscribe at freebsd.org"
>


More information about the freebsd-hackers mailing list