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:57:45AM -0800, Gary Hade wrote:
> On Mon, Jan 25, 2010 at 09:52:37AM +0100, Andreas Besse wrote:
> > 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?
> > >   
> > >> 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 ?
> > >
> > > 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).
> > >   
> > sorry my statement is a bit ambiguous. For a single card there is no
> > issue, but for multiple cards of the same type.
> > 
> > If multiple DVB cards of the same type, but with different
> > signals/cables are used, the cards need to identified.
> > > Does the behavior you described with your board exist with all boards?
> > >
> > > 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.
> 
> Andreas, Would the physical slot number to PCI ID mapping
> provided in /sys/bus/pci/slots by the 'pci_slot' driver possibly
> be of any use to you?

That mapping should be already there if it is provided by the BIOS.

Also, Andreas, I see a symlink for all v4l devices already created in a
persistant manner on the more recent udev releases.  So you could just
use that instead of the "raw" device node, and all should be good.

thanks,

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