Re: Order of PCI ID's

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

 



On Mon, Jan 25, 2010 at 09:25:27AM +0100, Andreas Besse wrote:
> Greg KH wrote:
> > On Fri, Jan 22, 2010 at 06:34:51PM +0100, Andreas Besse wrote:
> >   
> >> Hi,
> >>
> >> I observed that the PCI Bus id's of the onboard network cards changed
> >> after I added a PCIe Dual DVB-Card to my system.
> >>
> >> The ID's changed from 02:00.0, 03:00.0 (see lspci_with_dvb.txt) to
> >> 03:00.0, 04:00.0 (see lspci_with_dvb.txt)
> >>
> >> How is the ordering of PCI/PCIe devices determined in generally by the
> >> linux PCI subsystem?
> >>     
> >
> > Totally random, depending on the phase of the moon, and the location of
> > your computer in relation to the nearest large body of water.
> >
> > Seriously, this is expected, you can not rely on pci bus ids to remain
> > constant, especially if you have changed the physical system (like
> > adding a card which you did.)
> >
> >   
> >> is the Bus ID for a specific PCI/PCIe Slot deterministic at every boot
> >> if no hotplug (removing or adding PCI/PCie cards) is involved?
> >>
> >> can I assume that the Bus ID's don't change if I don't add or remove any
> >> PCI/PCie cards?
> >>     
> >
> > Nope, I have a machine here that will reorder things every 4th boot or
> > so.  It's a "feature" of the BIOS according to the bug I filed with the
> > manufacturer that they closed out as invalid.
> >   
> do you have a link to the bug report?

No, sorry.  I don't know any hardware manufacturers that have public bug
reports, do you?

> > So never rely on these ids, they can not be guaranteed to be stable, and
> > will not be.
> >   
> If PCI bus IDs are not usable, what other mechanisms do exist for
> knowing which particular physical hardware device (plugged into a
> PCI/PCIe slot) is assigned to which particular Linux device ?

Look for something unique on the device?  A serial number?  A device id?
Something else?

> I want to identify a DVB S2-Card which is plugged into a specific
> PCIe-Slot by a udev rule and assigns a specific linux device (e.g.
> /dev/dvb/adapter0).

I know the udev developers were trying to create some unique rules for
v4l devices, you might ask them, as that is where something like this is
solved, not in the kernel.

> Does the behavior you described with your board exist with all boards?

Yes.

> If yes, I wonder how Linux can at all be used for any reliable
> hardware appliance, which includes two identical PCI boards, which
> need to be distinguished due to different signals/cables being
> connected to each board.

Use udev, that is what it was created for.

good luck,

greg k-h
--
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