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.

--
Jean-Sébastien Pédron
hostb0@pci0:0:0:0:      class=0x060000 card=0x86871558 chip=0xd1328086 rev=0x11 
hdr=0x00
    cap 00[40] = unknown
pcib1@pci0:0:3:0:       class=0x060400 card=0x00008086 chip=0xd1388086 rev=0x11 
hdr=0x01
    cap 0d[40] = PCI Bridge card=0x00008086
    cap 05[60] = MSI supports 2 messages, vector masks 
    cap 10[90] = PCI-Express 2 root port slot max data 256(256) link x16(x16)
                 speed 2.5(5.0)
    cap 01[e0] = powerspec 3  supports D0 D3  current D0
    ecap 0001[100] = AER 1 0 fatal 0 non-fatal 0 corrected
    ecap 000d[150] = ACS 1
    ecap 000b[160] = Vendor 0
none0@pci0:0:8:0:       class=0x088000 card=0x00870058 chip=0xd1558086 rev=0x11 
hdr=0x00
    cap 10[40] = PCI-Express 2 root endpoint max data 128(128) link x0(x0)
                 ASPM disabled(L0s)
    ecap 000b[100] = Vendor 0
none1@pci0:0:8:1:       class=0x088000 card=0x00870058 chip=0xd1568086 rev=0x11 
hdr=0x00
    cap 10[40] = PCI-Express 2 root endpoint max data 128(128) link x0(x0)
                 ASPM disabled(L0s)
    ecap 000b[100] = Vendor 0
none2@pci0:0:8:2:       class=0x088000 card=0x00870058 chip=0xd1578086 rev=0x11 
hdr=0x00
    cap 10[40] = PCI-Express 2 root endpoint max data 128(128) link x0(x0)
                 ASPM disabled(L0s)
    ecap 000b[100] = Vendor 0
none3@pci0:0:8:3:       class=0x088000 card=0x00870058 chip=0xd1588086 rev=0x11 
hdr=0x00
none4@pci0:0:16:0:      class=0x088000 card=0x00870058 chip=0xd1508086 rev=0x11 
hdr=0x00
none5@pci0:0:16:1:      class=0x088000 card=0x00870058 chip=0xd1518086 rev=0x11 
hdr=0x00
ehci0@pci0:0:26:0:      class=0x0c0320 card=0x86871558 chip=0x3b3c8086 rev=0x05 
hdr=0x00
    cap 01[50] = powerspec 2  supports D0 D3  current D0
    cap 0a[58] = EHCI Debug Port at offset 0xa0 in map 0x14
    cap 13[98] = PCI Advanced Features: FLR TP
hdac1@pci0:0:27:0:      class=0x040300 card=0x86871558 chip=0x3b568086 rev=0x05 
hdr=0x00
    cap 01[50] = powerspec 2  supports D0 D3  current D0
    cap 05[60] = MSI supports 1 message, 64 bit enabled with 1 message
    cap 10[70] = PCI-Express 1 root endpoint max data 128(128) FLR link x0(x0)
    ecap 0002[100] = VC 1 max VC1
    ecap 0005[130] = Root Complex Link Declaration 1
pcib2@pci0:0:28:0:      class=0x060400 card=0x86871558 chip=0x3b428086 rev=0x05 
hdr=0x01
    cap 10[40] = PCI-Express 2 root port slot max data 128(128) link x1(x1)
                 speed 2.5(2.5) ASPM disabled(L0s/L1)
    cap 05[80] = MSI supports 1 message 
    cap 0d[90] = PCI Bridge card=0x86871558
    cap 01[a0] = powerspec 2  supports D0 D3  current D0
pcib3@pci0:0:28:1:      class=0x060400 card=0x86871558 chip=0x3b448086 rev=0x05 
hdr=0x01
    cap 10[40] = PCI-Express 2 root port slot max data 128(128) link x0(x1)
                 speed 0.0(2.5) ASPM disabled(L0s/L1)
    cap 05[80] = MSI supports 1 message 
    cap 0d[90] = PCI Bridge card=0x86871558
    cap 01[a0] = powerspec 2  supports D0 D3  current D0
pcib4@pci0:0:28:3:      class=0x060400 card=0x86871558 chip=0x3b488086 rev=0x05 
hdr=0x01
    cap 10[40] = PCI-Express 2 root port slot max data 128(128) link x1(x1)
                 speed 2.5(2.5) ASPM disabled(L0s/L1)
    cap 05[80] = MSI supports 1 message 
    cap 0d[90] = PCI Bridge card=0x86871558
    cap 01[a0] = powerspec 2  supports D0 D3  current D0
pcib5@pci0:0:28:4:      class=0x060400 card=0x86871558 chip=0x3b4a8086 rev=0x05 
hdr=0x01
    cap 10[40] = PCI-Express 2 root port slot max data 128(128) link x1(x1)
                 speed 2.5(2.5) ASPM disabled(L0s/L1)
    cap 05[80] = MSI supports 1 message 
    cap 0d[90] = PCI Bridge card=0x86871558
    cap 01[a0] = powerspec 2  supports D0 D3  current D0
pcib6@pci0:0:28:7:      class=0x060400 card=0x86871558 chip=0x3b508086 rev=0x05 
hdr=0x01
    cap 10[40] = PCI-Express 2 root port slot max data 128(128) link x0(x1)
                 speed 0.0(2.5) ASPM disabled(L0s/L1)
    cap 05[80] = MSI supports 1 message 
    cap 0d[90] = PCI Bridge card=0x86871558
    cap 01[a0] = powerspec 2  supports D0 D3  current D0
ehci1@pci0:0:29:0:      class=0x0c0320 card=0x86871558 chip=0x3b348086 rev=0x05 
hdr=0x00
    cap 01[50] = powerspec 2  supports D0 D3  current D0
    cap 0a[58] = EHCI Debug Port at offset 0xa0 in map 0x14
    cap 13[98] = PCI Advanced Features: FLR TP
pcib7@pci0:0:30:0:      class=0x060401 card=0x86871558 chip=0x24488086 rev=0xa5 
hdr=0x01
    cap 0d[50] = PCI Bridge card=0x86871558
isab0@pci0:0:31:0:      class=0x060100 card=0x86871558 chip=0x3b038086 rev=0x05 
hdr=0x00
    cap 09[e0] = vendor (length 16) Intel cap 1 version 1
ahci0@pci0:0:31:2:      class=0x010601 card=0x86871558 chip=0x3b2f8086 rev=0x05 
hdr=0x00
    cap 05[80] = MSI supports 1 message enabled with 1 message
    cap 01[70] = powerspec 3  supports D0 D3  current D0
    cap 12[a8] = SATA Index-Data Pair
    cap 13[b0] = PCI Advanced Features: FLR TP
none6@pci0:0:31:3:      class=0x0c0500 card=0x86871558 chip=0x3b308086 rev=0x05 
hdr=0x00
vgapci0@pci0:2:0:0:     class=0x030000 card=0x86871558 chip=0x68a01002 rev=0x00 
hdr=0x00
    cap 01[50] = powerspec 3  supports D0 D1 D2 D3  current D0
    cap 10[58] = PCI-Express 2 legacy endpoint max data 256(256) link x16(x16)
                 speed 2.5(2.5) ASPM disabled(L0s/L1)
    cap 05[a0] = MSI supports 1 message, 64 bit 
    ecap 000b[100] = Vendor 1 ID 1
    ecap 0001[150] = AER 1 0 fatal 1 non-fatal 1 corrected
hdac0@pci0:2:0:1:       class=0x040300 card=0x86871558 chip=0xaa581002 rev=0x00 
hdr=0x00
    cap 01[50] = powerspec 3  supports D0 D1 D2 D3  current D0
    cap 10[58] = PCI-Express 2 legacy endpoint max data 256(256) link x16(x16)
                 speed 2.5(2.5) ASPM disabled(L0s/L1)
    cap 05[a0] = MSI supports 1 message, 64 bit enabled with 1 message
    ecap 000b[100] = Vendor 1 ID 1
    ecap 0001[150] = AER 1 0 fatal 1 non-fatal 1 corrected
iwn0@pci0:3:0:0:        class=0x028000 card=0x11218086 chip=0x42358086 rev=0x00 
hdr=0x00
    cap 01[c8] = powerspec 3  supports D0 D3  current D0
    cap 05[d0] = MSI supports 1 message, 64 bit enabled with 1 message
    cap 10[e0] = PCI-Express 1 endpoint max data 128(128) FLR link x1(x1)
                 speed 2.5(2.5) ASPM disabled(L0s/L1)
    ecap 0001[100] = AER 1 0 fatal 0 non-fatal 1 corrected
    ecap 0003[140] = Serial 1 00216affff5aec90
re0@pci0:7:0:0: class=0x020000 card=0x86871558 chip=0x816810ec rev=0x03 hdr=0x00
    cap 01[40] = powerspec 3  supports D0 D1 D2 D3  current D0
    cap 05[50] = MSI supports 1 message, 64 bit 
    cap 10[70] = PCI-Express 2 endpoint IRQ 1 max data 128(256) link x1(x1)
                 speed 2.5(2.5) ASPM disabled(L0s/L1)
    cap 11[ac] = MSI-X supports 4 messages, enabled
                 Table in map 0x20[0x0], PBA in map 0x20[0x800]
    cap 03[cc] = VPD
    ecap 0001[100] = AER 1 0 fatal 0 non-fatal 1 corrected
    ecap 0002[140] = VC 1 max VC0
    ecap 0003[160] = Serial 1 03000000684ce000
none7@pci0:9:0:0:       class=0x0c0010 card=0x86871558 chip=0x2380197b rev=0x00 
hdr=0x00
    cap 01[44] = powerspec 3  supports D0 D3  current D3
    cap 10[80] = PCI-Express 1 endpoint max data 128(128) link x1(x1)
                 speed 2.5(2.5) ASPM disabled(L0s/L1)
    cap 05[94] = MSI supports 1 message 
none8@pci0:9:0:1:       class=0x088000 card=0x86871558 chip=0x2382197b rev=0x00 
hdr=0x00
    cap 01[a4] = powerspec 3  supports D0 D3  current D3
    cap 10[80] = PCI-Express 1 endpoint max data 128(128) link x1(x1)
                 speed 2.5(2.5) ASPM disabled(L0s/L1)
    cap 05[94] = MSI supports 1 message 
sdhci_pci0@pci0:9:0:2:  class=0x080501 card=0x86871558 chip=0x2381197b rev=0x00 
hdr=0x00
    cap 01[a4] = powerspec 3  supports D0 D3  current D0
    cap 10[80] = PCI-Express 1 endpoint max data 128(128) link x1(x1)
                 speed 2.5(2.5) ASPM disabled(L0s/L1)
    cap 05[94] = MSI supports 1 message 
none9@pci0:9:0:3:       class=0x088000 card=0x86871558 chip=0x2383197b rev=0x00 
hdr=0x00
    cap 01[a4] = powerspec 3  supports D0 D3  current D3
    cap 10[80] = PCI-Express 1 endpoint max data 128(128) link x1(x1)
                 speed 2.5(2.5) ASPM disabled(L0s/L1)
    cap 05[94] = MSI supports 1 message 
hostb1@pci0:255:0:0:    class=0x060000 card=0x80868086 chip=0x2c528086 rev=0x04 
hdr=0x00
hostb2@pci0:255:0:1:    class=0x060000 card=0x80868086 chip=0x2c818086 rev=0x04 
hdr=0x00
hostb3@pci0:255:2:0:    class=0x060000 card=0x80868086 chip=0x2c908086 rev=0x04 
hdr=0x00
hostb4@pci0:255:2:1:    class=0x060000 card=0x80868086 chip=0x2c918086 rev=0x04 
hdr=0x00
hostb5@pci0:255:3:0:    class=0x060000 card=0x80868086 chip=0x2c988086 rev=0x04 
hdr=0x00
hostb6@pci0:255:3:1:    class=0x060000 card=0x80868086 chip=0x2c998086 rev=0x04 
hdr=0x00
hostb7@pci0:255:3:4:    class=0x060000 card=0x80868086 chip=0x2c9c8086 rev=0x04 
hdr=0x00
hostb8@pci0:255:4:0:    class=0x060000 card=0x80868086 chip=0x2ca08086 rev=0x04 
hdr=0x00
hostb9@pci0:255:4:1:    class=0x060000 card=0x80868086 chip=0x2ca18086 rev=0x04 
hdr=0x00
hostb10@pci0:255:4:2:   class=0x060000 card=0x80868086 chip=0x2ca28086 rev=0x04 
hdr=0x00
hostb11@pci0:255:4:3:   class=0x060000 card=0x80868086 chip=0x2ca38086 rev=0x04 
hdr=0x00
hostb12@pci0:255:5:0:   class=0x060000 card=0x80868086 chip=0x2ca88086 rev=0x04 
hdr=0x00
hostb13@pci0:255:5:1:   class=0x060000 card=0x80868086 chip=0x2ca98086 rev=0x04 
hdr=0x00
hostb14@pci0:255:5:2:   class=0x060000 card=0x80868086 chip=0x2caa8086 rev=0x04 
hdr=0x00
hostb15@pci0:255:5:3:   class=0x060000 card=0x80868086 chip=0x2cab8086 rev=0x04 
hdr=0x00
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to