lspci 显示网卡不存在的总线地址

lspci 显示网卡不存在的总线地址

我正在尝试确定我的网卡正在使用哪个 PCI Express 插槽(我需要检查正确的配置)。我为此使用了 lspci 和 dmidecode,但我无法在 dmidecode 中找到来自 lspci 的总线地址

lspci 的输出是:

01:00.0 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)                                                       
01:00.1 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)

总线地址为 01:00,有 2 个端口 0 和 1

但 dmidecode -t 9 输出未显示该插槽

# dmidecode 2.12                                                                                                                                             
SMBIOS 2.7 present.                                                                                                                                          

Handle 0x0008, DMI type 9, 17 bytes                                                                                                                          
System Slot Information                                                                                                                                      
        Designation: SLOT 1                                                                                                                                  
        Type: 32-bit PCI                                                                                                                                     
        Current Usage: In Use                                                                                                                                
        Length: Other                                                                                                                                        
        ID: 0                                                                                                                                                
        Characteristics:                                                                                                                                     
                3.3 V is provided                                                                                                                            
                Opening is shared                                                                                                                            
                PME signal is supported                                                                                                                      
        Bus Address: 0000:08:1e.0                                                                                                                            

Handle 0x000D, DMI type 9, 17 bytes                                                                                                                          
System Slot Information
        Designation: SLOT 6
        Type: x16 PCI Express 3
        Current Usage: In Use
        Length: Long
        Characteristics:
                3.3 V is provided
                Opening is shared
                PME signal is supported
        Bus Address: 0000:01:01.0

lspci -s 01:01.0      does not give me anything

这是什么意思?如何获取我的 NIC 的插槽号和 pci express 版本和宽度?

当我使用时:

lspci -vv

NIC 的输出如下:

...
            LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s, Exit Latency L0s <1us, L1 <8us
                    ClockPM- Surprise- LLActRep- BwNot-
            LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk+
                    ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
            LnkSta: Speed 5GT/s, Width x8, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
            DevCap2: Completion Timeout: Range ABCD, TimeoutDis+, LTR-, OBFF Not Supported
            DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled
            LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
                     Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                     Compliance De-emphasis: -6dB
...

宽度速度这是卡正在使用的实际宽度和速度,或者是卡希望使用的?(如果我将其连接到较慢的 PCI,它会相同吗,或者它会显示卡实际正在使用的吗?)

谢谢

答案1

需要澄清一些问题:首先,

lspci -s 01:01.0 没有给我任何东西

这是因为你的网卡处于01:00.0,而不是 01:01.0。

其次,lspci 和 dmidecode 之间有一些关系,但关系不大。根据手册

... 是一个以人类可读格式转储计算机 DMI(有人说是 SMBIOS)表内容的工具

而相反

lspci 是一个用于显示系统中 PCI 总线及其所连接设备的信息的实用程序。

存在重叠,但不存在同一性。具体来说,BIOS 不需要知道任何有关总线地址的信息。

您可以通过 dmidecode 找到您的系统拥有哪种类型的快速卡:

     # dmidecode -t 9
     # dmidecode 2.12
     SMBIOS 2.5 present.

     Handle 0x000C, DMI type 9, 13 bytes
     System Slot Information
        Designation: SD CARD
        Type: Other
        Current Usage: In Use
        Length: Other
        Characteristics:
            3.3 V is provided
            Hot-plug devices are supported

      Handle 0x000D, DMI type 9, 13 bytes
      System Slot Information
        Designation: EXPRESS CARD
        Type: x1 PCI Express
        Current Usage: In Use
       Length: Other
       ID: 1
       Characteristics:
            3.3 V is provided
            Hot-plug devices are supported

在我的例子中,您可以看到我有一张 x1 PCI Express 类型的快速卡。但这就是我从 BIOS 中得到的全部信息,没有提到总线地址。

为了找到你的无线网络,如果如果您有板载卡而不是 USB 加密狗,您可以执行以下操作:

     # dmidecode -t baseboard
     # dmidecode 2.12
     SMBIOS 2.5 present.

     Handle 0x0002, DMI type 2, 14 bytes
     Base Board Information
        Manufacturer: TOSHIBA
        Product Name: PORTEGE R930
        Version: Version A0
        Serial Number: C0CZA019
        Asset Tag: 0000000000
        Features:
            Board is a hosting board
        Location In Chassis: Center
        Chassis Handle: 0x0003
        Type: Motherboard

      Handle 0x000E, DMI type 10, 16 bytes
        On Board Device 1 Information
           Type: Other
           Status: Enabled
           Description: USB
        On Board Device 2 Information
           Type: Video
           Status: Enabled
           Description: VIDEO
        On Board Device 3 Information
           Type: Ethernet
           Status: Enabled
           Description: ETHERNET
        On Board Device 4 Information
           Type: Sound
           Status: Enabled
           Description: SOUND
        On Board Device 5 Information
           Type: Other
           Status: Enabled
           Description: WIRELESS LAN
        On Board Device 6 Information
           Type: Other
           Status: Enabled
           Description: WIRELESS WAN

您会看到我的底板有两个无线插槽,LAN 和 WAN。

至于您的网卡的功能,就我而言,我有:

   # lspci -vvn -s 04:00.0
     04:00.0 0280: 8086:088e (rev 24)
     Subsystem: 8086:4060
     Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
     Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
     Latency: 0, Cache Line Size: 64 bytes
     Interrupt: pin A routed to IRQ 47
     Region 0: Memory at e2500000 (64-bit, non-prefetchable) [size=8K]
     Capabilities: [c8] Power Management version 3
            Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
            Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
     Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
            Address: 00000000fee003b8  Data: 0000
     Capabilities: [e0] Express (v1) Endpoint, MSI 00
            DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <512ns, L1 unlimited
                    ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset+
            DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                    RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+ FLReset-
                    MaxPayload 128 bytes, MaxReadReq 128 bytes
            DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr+ TransPend-
            LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <4us, L1 <32us
                    ClockPM+ Surprise- LLActRep- BwNot-
            LnkCtl: ASPM L1 Enabled; RCB 64 bytes Disabled- CommClk+
                    ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
            LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
     Capabilities: [100 v1] Advanced Error Reporting
            UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
            UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
            UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
            CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
            CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
            AERCap: First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
     Capabilities: [140 v1] Device Serial Number c8-f7-33-ff-ff-4c-cc-e1
     Kernel driver in use: iwlwifi

从这里你清楚地看到,你所指的能力是链接,而不是设备的属性。如果您将同一设备连接到较慢的插槽,则显示的功能将不如您在此处看到的功能,因为它们是链接的属性,而不是设备的属性。

编辑:

只是为了澄清我对 Jan 的问题的回答:我有一个不同的系统,其中dmidecode说我有 4 个带有总线地址的组件:

          Bus Address: 0000:02:1c.1
          Bus Address: 0000:00:02.0
          Bus Address: 0000:00:19.0
          Bus Address: 0000:00:19.0

lspci而是报告以下外围设备:

          # lspci | cut -d: -f1-3 | awk '{print $1}'
            00:00.0
            00:02.0
            00:14.0
            00:16.0
            00:1a.0
            00:1b.0
            00:1c.0
            00:1c.1
            00:1c.3
            00:1d.0
            00:1f.0
            00:1f.2
            00:1f.3
            02:00.0
            03:00.0

显然,只有一个是正确的(视频卡)。以太网卡和 wifi 卡是两个都(?)报告dmidecode总线地址为 00:19.0,而实际上总线地址为 02:00.0 和 03:00.0。显然,dmidecode这是错误的。

相关内容