svn commit: r258930 - head/sys/dev/drm2

John Baldwin jhb at freebsd.org
Mon Dec 9 21:47:50 UTC 2013


On Friday, December 06, 2013 7:07:43 pm Jean-Sébastien Pédron wrote:
> Le 05/12/2013 16:05, John Baldwin a écrit :
> >>> Eh, vgapci is the right place to read this.  The LINK_CAP here is 
telling
> >>> you the width of the slot you are plugged into, not the width of the 
card
> >>> that is plugged into the slot.
> >>
> >> I'm sorry, my knowledge of PCI is very limited (still learning) and I
> >> don't understand your comment. Could you please expand on it?
> >
> > [explanation]
> 
> Thank you very much for the explanation!
> 
> > Can you provide pciconf -lc output from your machine
> 
> You'll find it attached.
> 
> > and tell me what you think the function should be returning (i.e.
> > are you trying to determine the speed of the slot, or the speed of
> > the card?)
> 
> The result of this function is used to initialize the card (ie. it does 
> more steps if speed is 5.0). The debug message is "enabling PCIE gen 2 
> link speeds" in this case. I admit I don't know what the code is doing 
> exactly, so I haven't any expectation :)
> 
> What I see is that now, this part of the initialization is similar to 
> Linux 3.8 on the same computer: in both OSes, the PCI ID of the bridge 
> and the linkcap/linkcap2 values are logged, and the PCI ID/values are 
> matching.

Ok, after looking at the original version of this function in Linux, it
does read the capabilities from the parent bridge of the slot, not
from the card itself, so your change is correct.

-- 
John Baldwin


More information about the svn-src-head mailing list