Re: pcie_slot.c

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

 



On Sun, Dec 13, 2009 at 03:58:54PM -0800, Yinghai Lu wrote:
> On Sun, Dec 13, 2009 at 5:40 AM, Matthew Wilcox <matthew@xxxxxx> wrote:
> >
> > This is the code I've been using to test the cur/max bus speed changes.
> > It creates a pci_slot for every PCIe bridge in the system that claims
> > to have a slot. ?Unfortunately, my motherboard manufacturer (Asus)
> > didn't bother to set the Slot bits correctly, so it looks like this:
> >
> > ls /sys/bus/pci/slots/
> > 0 ?0-1 ?0-2 ?0-3 ?0-4 ?1 ?1-1 ?2 ?2-1 ?3 ?5 ?6
> >
> > I should have slots labelled 1 to 6, but several of the links which are
> > to onboard devices still have the Slot bits set
> 
> some could be silicon bug. like the 00:1c.0 in ICH10. and can not be
> disabled from BIOS.

I think it's sheer carelessness.  There's 6 physical slots in the system,
labelled 1 to 6 in the documentation (since it's a generic motherboard,
there's no labelling on the case to match).

According to the PCI config space, the X58's Root Port 1 connects to Slot
1, RP 3 to Slot 2, RP7 to Slot 5 and RP9 to Slot 6.  All five ports on
the ICH10 connect to Slot 0 (and are actually connected to motherboard
devices).  Root Port 3 is connected to an Nvidia switch, which connects
to three slots, which are marked in config space as slots 1, 2 and 3.

Somewhere I have a text file which tells me which ports are connected
to which slots, but I can't find it right now.  I think one of the slots
might have the right number, but probably only by coincidence.


We could ignore slot number 0, as that's plausibly what some BIOS person
thinks is the right way to indicate that this bridge doesn't connect to
a slot.

On the other hand, I have an Asrock motherboard (945/ICH7 vintage) that
has every PCIe port reporting a connection to slot 0.  So that doesn't
work too well either.


At the end of the day, until Windows checks this (software can at least
check that all slot numbers in the system are unique), there's going to
be no incentive for consumer motherboard manufacturers to get this right.
I'm sure Sun and HP get it right, but there's no equivalent attention
to detail for commodity hardware.

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
--
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