Re: Getting bus ID of root bus behind a bridge

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

 



Matthew Wilcox <matthew <at> wil.cx> writes:

> 
> On Sat, May 02, 2009 at 11:15:52AM +0000, Lifesaver wrote:
> > Matthew Wilcox <matthew <at> wil.cx> writes:
> > 
> > > Try adding:
> > >     printk("slot number : %x", PCI_SLOT(bus->self->devfn));
> > 
> > I actually tried this already, bus->self is zero as well, 
> > and de-referencing it crashes the driver..
> 
> You need to be one level down ... stop before you reach bus->self == NULL.
> 

I am stopping before bus becomes null. which is why bus is not null, but 
bus->self is. I will try your suggestion tomorrow - stopping one level
earlier. 


> I might be able to give a better answer if I understood what you were
> trying to do here.  Are you looking for something that matches the slot
> number on the back of the machine?  Are you trying to determine whether
> two devices are on the same plugin card?  Something else?
> 


Yes I am trying to programatically find the slot position on the back by 
looking at pci_dev structure of a device on the card (there are upto 4 such 
devices on one board)




--
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