问题描述:

问题描述:

我不确定这里是不是合适的提问地点。不幸的是,我对这些都不太了解,所以我不能确定这个问题是与 igb 驱动程序、芯片固件(eeprom?)、sfp 模块、卡本身还是其他什么有关。

环境:

  • 操作系统:Ubuntu 20.10
  • 内核:5.8.0-25-generic
  • NIC:英特尔 82576 EF-SFP(8086:10E7)又名 E1G42EF(Serdes?)
  • PXE:1.5.89
  • 驱动程序:igb-5.6.0-k

问题描述:

将此卡与我的 Cisco MGBSX1 MMF SFP 模块一起使用绝对没有问题。移除和插入模块,建立连接,一切正常。

当我尝试使用 Cisco MGBT1 RJ45 SFP 模块时出现问题。

当我插入模块、将其移除,然后再次将其插入任一端口时,卡会失去其 pcie 链接并且不再响应。

错误:

igb 0000:02:00.0 enp2s0f0: PCIe link lost
igb 0000:02:00.0 enp2s0f0: igb: enp2s0f0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX
igb 0000:02:00.1 enp2s0f1: PCIe link lost
igb 0000:02:00.1 enp2s0f1: igb: enp2s0f1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX

重新加载驱动程序rmmod igbmodprobe igb出现以下错误:

------------[ cut here ]------------
NETDEV WATCHDOG: enp2s0f0 (igb): transmit queue 0 timed out
WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:442 dev_watchdog+0x25b/0x270
Modules linked in: igb zfs(PO) zunicode(PO) zavl(PO) icp(PO) zcommon(PO) znvpair(PO) spl(O) zlua(PO) snd_sof_pci snd_sof_intel_byt snd_sof_intel_ipc snd_sof_intel_hda_common snd_soc_hdac_hda snd_sof_xtensa_dsp snd_sof_intel_hda snd_sof snd_hda_ext_core snd_soc_acpi_intel_match snd_soc_acpi snd_soc_core snd_compress ac97_bus snd_hda_codec_hdmi snd_pcm_dmaengine snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio snd_hda_intel snd_intel_dspcfg snd_hda_codec intel_rapl_msr snd_hda_core mei_hdcp snd_hwdep intel_rapl_common snd_pcm intel_pmc_bxt intel_telemetry_pltdrv intel_punit_ipc intel_telemetry_core snd_seq_midi snd_seq_midi_event rtsx_usb_ms snd_rawmidi memstick x86_pkg_temp_thermal intel_powerclamp input_leds coretemp rapl snd_seq intel_cstate snd_seq_device snd_timer serio_raw wmi_bmof efi_pstore at24 snd mei_me intel_xhci_usb_role_switch roles mei soundcore nxp_nci_i2c ucsi_acpi nxp_nci typec_ucsi nci typec nfc mac_hid sch_fq_codel parport_pc ppdev lp parport
ip_tables x_tables autofs4 overlay nls_iso8859_1 dm_mirror dm_region_hash dm_log hid_logitech_hidpp hid_logitech_dj uas rtsx_usb_sdmmc hid_generic usb_storage rtsx_usb usbhid i915 crct10dif_pclmul drm_kms_helper crc32_pclmul ghash_clmulni_intel syscopyarea aesni_intel sysfillrect sysimgblt fb_sys_fops cec rc_core crypto_simd cryptd glue_helper drm psmouse r8169 xhci_pci i2c_i801 ahci lpc_ich realtek i2c_smbus dca xhci_pci_renesas libahci i2c_algo_bit wmi i2c_hid hid video [last unloaded: igb]
CPU: 0 PID: 0 Comm: swapper/0 Tainted: P           O      5.8.0-25-generic #26-Ubuntu
Hardware name: LENOVO 90GA003XGE/36C8, BIOS O2XKT33A 05/09/2019
RIP: 0010:dev_watchdog+0x25b/0x270
Code: 85 c0 75 e5 eb 9c 4c 89 ff c6 05 26 85 1c 01 01 e8 2a 93 fa ff 44 89 e9 4c 89 fe 48 c7 c7 58 7a c8 b9 48 89 c2 e8 ba 30 64 ff <0f> 0b e9 7a ff ff ff 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 0f
RSP: 0018:ffffae2f40003e78 EFLAGS: 00010286
RAX: 0000000000000000 RBX: ffff8e8a00c068c0 RCX: 000000000000083f
RDX: 0000000000000000 RSI: 00000000000000f6 RDI: 000000000000083f
RBP: ffffae2f40003ea8 R08: 0000000000000004 R09: 000000000000042c
R10: 0000000000000000 R11: 0000000000000001 R12: ffff8e8a00c06940
R13: 0000000000000000 R14: ffff8e8a4ff24480 R15: ffff8e8a4ff24000
FS:  0000000000000000(0000) GS:ffff8e8a77c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fd3359d5000 CR3: 00000001e400a000 CR4: 00000000003406f0
Call Trace:
 <IRQ>
 ? pfifo_fast_enqueue+0x150/0x150
 call_timer_fn+0x32/0x130
 __run_timers.part.0+0x184/0x280
 ? lapic_next_deadline+0x26/0x30
 ? clockevents_program_event+0x8f/0xe0
 run_timer_softirq+0x2a/0x50
 __do_softirq+0xd0/0x2a1
 asm_call_irq_on_stack+0x12/0x20
 </IRQ>
 do_softirq_own_stack+0x3d/0x50
 irq_exit_rcu+0x95/0xd0
 sysvec_apic_timer_interrupt+0x3b/0x90
 asm_sysvec_apic_timer_interrupt+0x12/0x20
RIP: 0010:cpuidle_enter_state+0xb7/0x3f0
Code: 3f fb e6 46 e8 4a 5d 74 ff 48 89 45 d0 0f 1f 44 00 00 31 ff e8 fa 68 74 ff 80 7d c7 00 0f 85 d3 01 00 00 fb 66 0f 1f 44 00 00 <45> 85 e4 0f 88 df 01 00 00 49 63 d4 48 8d 04 52 48 8d 0c d5 00 00
RSP: 0018:ffffffffba203de8 EFLAGS: 00000246
RAX: ffff8e8a77c2c6c0 RBX: ffff8e8a77c36e00 RCX: 000000000000001f
RDX: 0000000000000000 RSI: 0000000055785785 RDI: 0000000000000000
RBP: ffffffffba203e28 R08: 0000011d7e0ab089 R09: 000000003a20a000
R10: 0000000000000e23 R11: ffff8e8a77c2b364 R12: 0000000000000007
R13: ffffffffba36adc0 R14: 0000000000000007 R15: 0000000000000000
 ? cpuidle_enter_state+0xa6/0x3f0
 cpuidle_enter+0x2e/0x40
 cpuidle_idle_call+0x145/0x200
 do_idle+0x7a/0xe0
 cpu_startup_entry+0x20/0x30
 rest_init+0xae/0xb0
 arch_call_rest_init+0xe/0x1b
 start_kernel+0x43a/0x45a
 x86_64_start_reservations+0x24/0x26
 x86_64_start_kernel+0x8b/0x8f
 secondary_startup_64+0xb6/0xc0
---[ end trace fabba6c9a6177673 ]---

在那之后:

igb 0000:02:00.0: can't change power state from D3hot to D0 (config space inaccessible)
igb 0000:02:00.0 0000:02:00.0 (uninitialized): PCIe link lost
igb 0000:02:00.0: PHY reset is blocked due to SOL/IDER session.
igb 0000:02:00.0: The NVM Checksum Is Not Valid
igb: probe of 0000:02:00.0 failed with error -5
igb 0000:02:00.1: can't change power state from D3hot to D0 (config space inaccessible)
igb 0000:02:00.1 0000:02:00.1 (uninitialized): PCIe link lost
igb 0000:02:00.1: PHY reset is blocked due to SOL/IDER session.
igb 0000:02:00.1: The NVM Checksum Is Not Valid
igb: probe of 0000:02:00.1 failed with error -5

lscpi 显示:

02:00.0 Ethernet controller [0200]: Intel Corporation 82576 Gigabit Network Connection [8086:10e7] (rev ff)
02:00.1 Ethernet controller [0200]: Intel Corporation 82576 Gigabit Network Connection [8086:10e7] (rev ff)

如果发生这种情况,我必须关闭电源才能再次使用 NIC。这几乎就像 RJ45 SFP 模块“毒害”了端口。

如果我插入 RJ45 SFP 模块进行启动,该端口甚至不会在 Ubuntu 中出现。第二个端口工作正常。

错误:

igb: probe of 0000:02:00.0 failed with error -2
igb 0000:02:00.1: enabling device (0000 -> 0002))

我可以通过取出 RJ45 SFP 模块、插入 MMF 模块并重新加载驱动程序来“恢复”端口。但此后,如果我再次插入 RJ45 模块,我会再次丢失 PCIe 链接。

工作配置

有一种配置可以使整个设置正常工作。如果我使用空插槽启动,然后插入 RJ45 SFP 模块,然后插入 MMF 模块,则一切正常。只有当我移除 RJ45 模块并将其再次插入任何插槽时(或者如果我在插入模块的情况下启动),才会出现问题。每次我想要重新启动时都必须这样做,这相当不愉快。如果可能的话,我不想忍受那样。

我也在具有不同主板的 FreeBSD 和 Windows 机器上尝试了所有这些操作,但错误仍然相同。

另一个有效的配置是加载 Ubuntu 10.04。使用此版本,如果在启动前插入模块,则两个模块都可以工作。再次移除和插入 RJ45 模块会导致与上述相同的错误。如果 Ubuntu 10.04 不是那么旧,这将是一个可以接受的解决方案。对我来说,重要的是,在已插入模块的情况下,启动后两个端口都可以工作。

移除 NIC 并重新扫描 PCIe 总线

我尝试从系统中移除 NIC,然后使用以下方法重新扫描 PCIe 总线脚本是用户在另一个论坛上发布的。我对其进行了修改,以便删除两个端口。

不幸的是,删除有效,但重新扫描无法恢复卡。它也没有显示任何新错误。

如果我“热插拔”它,它也可以再次工作。我的意思是在机器开机并启动到 Ubuntu 时将其从 PCIe 插槽中物理移除并再次插入。

我从各处保存了日志(dmesg、ethtool、lspci、lshw、modinfo),如果您需要更多信息,请告诉我。

我也通过 sourceforge 联系了英特尔,但英特尔员工说,他们根本不支持 igb 驱动程序中的可插入模块......这意味着我不能指望它在新的驱动程序版本中得到修复。

...我猜想此时也可能是错误的 PCB 设计或固件。

我列表上的下一件事是找到最新的内核或驱动程序版本,其中两个端口在启动后都可以工作,并且在启动时插入模块......并尝试另一个 RJ-45 Sfp 模块 ofc。

还有什么想法我还可以尝试吗?

感谢您的阅读。

答案1

好的,所以在启动前插入 RJ45-SFP 模块时,使模块工作的最后一个驱动程序是igb-3.0.22从 2011 年开始。不幸的是,你只能使用这个2.6.x内核。在较新的内核上它不会编译。切换端口仍然会导致卡丢失 pcie 链接。我查看了下一个版本(igb-3.1.16)的代码,卡检测不同 SFP 介质类型的方式发生了重大变化。我没有足够的时间学习 C 或内核模块调试,即使我可以修复它,也没有办法在 10 年的开发过程中进行此修复并让英特尔接受它,所以我将卡退还给了卖家。

我所咨询的英特尔人员的说法似乎并非 100% 正确。他们曾经支持此卡/驱动程序上的 RJ45-SFP 模块...我猜他们曾经放弃过它,或者现在只接受某些模块...或者我只是在胡说八道,实际上问题出在我的模块上。

如果有人知道可以与 RJ45-SFP 模块一起使用的 1gbe SFP NIC,请告诉我。我不想使用 10gb 的,因为它的功耗更高。

相关内容