Skip to content

Instantly share code, notes, and snippets.

@tinbotu
Last active April 18, 2024 16:00
Show Gist options
  • Save tinbotu/7ad2d21dcb7b2a8142df16792a46ce3b to your computer and use it in GitHub Desktop.
Save tinbotu/7ad2d21dcb7b2a8142df16792a46ce3b to your computer and use it in GitHub Desktop.
log: patching Intel X520 10G*2 SFP+ NIC EEPROM to unlock third party transceivers (succeed)
#
# ref. https://forums.servethehome.com/index.php?threads/patching-intel-x520-eeprom-to-unlock-all-sfp-transceivers.24634/
#
#
# 1.boot Ubuntu20.04LTS Desktop Live ISO image with USB Flash memory.
# 2.after, install tools """ apt install ethtool net-tools """
#
#
ubuntu@ubuntu:$
ubuntu@ubuntu:$ #### unsupported module (transceiver) ####
ubuntu@ubuntu:$
ubuntu@ubuntu:$ dmesg | grep fail
[ 0.794308] ixgbe 0000:02:00.0: failed to load because an unsupported SFP+ or QSFP module type was detected.
[ 1.109096] [drm] failed to retrieve link info, disabling eDP
ubuntu@ubuntu:$
ubuntu@ubuntu:$
ubuntu@ubuntu:$ #### it seems to be linkdown, but linked up on switch side ####
ubuntu@ubuntu:$
ubuntu@ubuntu:$ sudo ethtool enp2s0f1
Settings for enp2s0f1:
Supported ports: [ FIBRE ]
Supported link modes: 10000baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: No
Supported FEC modes: Not reported
Advertised link modes: 10000baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: No
Advertised FEC modes: Not reported
Speed: Unknown!
Duplex: Unknown! (255)
Port: Other
PHYAD: 0
Transceiver: internal
Auto-negotiation: off
Cannot get wake-on-lan settings: Operation not permitted
Current message level: 0x00000007 (7)
drv probe link
Link detected: no
ubuntu@ubuntu:$
ubuntu@ubuntu:$
ubuntu@ubuntu:$
ubuntu@ubuntu:$ lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers [8086:191f] (rev 07)
00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) [8086:1901] (rev 07)
00:01.1 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x8) [8086:1905] (rev 07)
00:02.0 Display controller [0380]: Intel Corporation HD Graphics 530 [8086:1912] (rev 06)
00:14.0 USB controller [0c03]: Intel Corporation 100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller [8086:a12f] (rev 31)
00:14.2 Signal processing controller [1180]: Intel Corporation 100 Series/C230 Series Chipset Family Thermal Subsystem [8086:a131] (rev 31)
00:16.0 Communication controller [0780]: Intel Corporation 100 Series/C230 Series Chipset Family MEI Controller #1 [8086:a13a] (rev 31)
00:17.0 SATA controller [0106]: Intel Corporation Q170/Q150/B150/H170/H110/Z170/CM236 Chipset SATA Controller [AHCI Mode] [8086:a102] (rev 31)
00:1b.0 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #17 [8086:a167] (rev f1)
00:1c.0 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #1 [8086:a110] (rev f1)
00:1c.2 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #3 [8086:a112] (rev f1)
00:1d.0 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #9 [8086:a118] (rev f1)
00:1d.7 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #16 [8086:a11f] (rev f1)
00:1f.0 ISA bridge [0601]: Intel Corporation Z170 Chipset LPC/eSPI Controller [8086:a145] (rev 31)
00:1f.2 Memory controller [0580]: Intel Corporation 100 Series/C230 Series Chipset Family Power Management Controller [8086:a121] (rev 31)
00:1f.3 Audio device [0403]: Intel Corporation 100 Series/C230 Series Chipset Family HD Audio Controller [8086:a170] (rev 31)
00:1f.4 SMBus [0c05]: Intel Corporation 100 Series/C230 Series Chipset Family SMBus [8086:a123] (rev 31)
00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (2) I219-V [8086:15b8] (rev 31)
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP104 [GeForce GTX 1080] [10de:1b80] (rev a1)
01:00.1 Audio device [0403]: NVIDIA Corporation GP104 High Definition Audio Controller [10de:10f0] (rev a1)
02:00.0 Ethernet controller [0200]: Intel Corporation Ethernet 10G 2P X520 Adapter [8086:154d] (rev 01)
02:00.1 Ethernet controller [0200]: Intel Corporation Ethernet 10G 2P X520 Adapter [8086:154d] (rev 01)
05:00.0 USB controller [0c03]: ASMedia Technology Inc. ASM1142 USB 3.1 Host Controller [1b21:1242]
06:00.0 Non-Volatile memory controller [0108]: Intel Corporation SSD Pro 7600p/760p/E 6100p Series [8086:f1a6] (rev 03)
ubuntu@ubuntu:$
ubuntu@ubuntu:$
ubuntu@ubuntu:$ sudo ethtool -e enp2s0f1 | head -100
Offset Values
------ ------
0x0000: 60 09 02 00 00 00 40 00 6d 00 fd 00 8d 01 a3 01
0x0010: a9 01 af 01 b7 01 bf 01 c7 01 cf 01 09 02 b8 05
0x0020: 00 05 ff ff ff ff ff ff ff ff fa fa 9d 37 c8 02
0x0030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x0040: a3 37 ff ff ff ff ff ff ff ff ff ff ff ff 94 37
0x0050: 8e 37 28 40 37 40 40 36 fc ff 27 08 00 80 48 02
0x0060: 21 01 00 40 22 23 3b 40 21 01 00 40 ff ff 3a 36
0x0070: 00 00 ff ff ff ff ff ff ff ff ff ff ff ff 9c 29
0x0080: 2c 00 94 00 00 00 96 00 06 00 90 00 ff 00 92 00
0x0090: ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
(snip...)
ubuntu@ubuntu:$
ubuntu@ubuntu:$ #### read, this bit! (worksforme) ####
ubuntu@ubuntu:$
ubuntu@ubuntu:$ sudo ethtool -e enp2s0f1 offset 0x58 length 1
Offset Values
------ ------
0x0058: fc
ubuntu@ubuntu:$
ubuntu@ubuntu:$ #### write eeprom ####
ubuntu@ubuntu:$
ubuntu@ubuntu:$ sudo ethtool -E enp2s0f1 magic 0x154d8086 offset 0x58 value 0xfd
ubuntu@ubuntu:$
ubuntu@ubuntu:$
ubuntu@ubuntu:$ #### read ####
ubuntu@ubuntu:$
ubuntu@ubuntu:$ sudo ethtool -e enp2s0f1 offset 0x58 length 1
Offset Values
------ ------
0x0058: fd
ubuntu@ubuntu:$
ubuntu@ubuntu:$
ubuntu@ubuntu:$
ubuntu@ubuntu:$
ubuntu@ubuntu:$ sudo ethtool -e enp2s0f1 |head -10
Offset Values
------ ------
0x0000: 60 09 02 00 00 00 40 00 6d 00 fd 00 8d 01 a3 01
0x0010: a9 01 af 01 b7 01 bf 01 c7 01 cf 01 09 02 b8 05
0x0020: 00 05 ff ff ff ff ff ff ff ff fa fa 9d 37 c8 02
0x0030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x0040: a3 37 ff ff ff ff ff ff ff ff ff ff ff ff 94 37
0x0050: 8e 37 28 40 37 40 40 36 fd ff 27 08 00 80 48 02
0x0060: 21 01 00 40 22 23 3b 40 21 01 00 40 ff ff 3a 36
0x0070: 00 00 ff ff ff ff ff ff ff ff ff ff ff ff 9b 29
ubuntu@ubuntu:$
ubuntu@ubuntu:$ exit
Script done on 2020-08-05 11:54:51+00:00 [COMMAND_EXIT_CODE="0"]
ubuntu@ubuntu:$
ubuntu@ubuntu:$ #### Linked up ####
ubuntu@ubuntu:$
ubuntu@ubuntu:$ sudo ethtool enp2s0f0
Settings for enp2s0f0:
Supported ports: [ FIBRE ]
Supported link modes: 10000baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: No
Supported FEC modes: Not reported
Advertised link modes: 10000baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: No
Advertised FEC modes: Not reported
Speed: 10000Mb/s
Duplex: Full
Port: FIBRE
PHYAD: 0
Transceiver: internal
Auto-negotiation: off
Supports Wake-on: d
Wake-on: d
Current message level: 0x00000007 (7)
drv probe link
Link detected: yes
ubuntu@ubuntu:$
ubuntu@ubuntu:$ #### IP addresses are successfully assigned by dhcp4, ra,... ####
ubuntu@ubuntu:$
ubuntu@ubuntu:$ ifconfig enp2s0f0
enp2s0f0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.21.5.252 netmask 255.255.252.0 broadcast 172.21.7.255
inet6 2400:4070:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx prefixlen 64 scopeid 0x0<global>
inet6 fe80::36a6:73a1:xxxx:xxxx prefixlen 64 scopeid 0x20<link>
inet6 2400:4070:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx prefixlen 64 scopeid 0x0<global>
ether a0:36:xx:xx:xx:xx txqueuelen 1000 (Ethernet)
RX packets 15470 bytes 16579082 (16.5 MB)
RX errors 0 dropped 627 overruns 0 frame 0
TX packets 9089 bytes 933537 (933.5 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ubuntu@ubuntu:$
ubuntu@ubuntu:$ #### transceiver detection was successful ####
ubuntu@ubuntu:$
ubuntu@ubuntu:$ dmesg | grep ixbge
[ 0.782434] ixgbe: Intel(R) 10 Gigabit PCI Express Network Driver - version 5.1.0-k
[ 0.782435] ixgbe: Copyright (c) 1999-2016 Intel Corporation.
[ 0.947905] ixgbe 0000:02:00.0: Multiqueue Enabled: Rx Queue count = 8, Tx Queue count = 8 XDP Queue count = 0
[ 0.948192] ixgbe 0000:02:00.0: 32.000 Gb/s available PCIe bandwidth (5 GT/s x8 link)
[ 0.948513] ixgbe 0000:02:00.0: MAC: 2, PHY: 19, SFP+: 5, PBA No: G73129-007
[ 0.948514] ixgbe 0000:02:00.0: a0:36:xx:xx:xx:xx
[ 0.950449] ixgbe 0000:02:00.0: Intel(R) 10 Gigabit Network Connection
[ 0.950507] libphy: ixgbe-mdio: probed
[ 2.238720] ixgbe 0000:02:00.1: Multiqueue Enabled: Rx Queue count = 8, Tx Queue count = 8 XDP Queue count = 0
[ 2.239003] ixgbe 0000:02:00.1: 32.000 Gb/s available PCIe bandwidth (5 GT/s x8 link)
[ 2.239323] ixgbe 0000:02:00.1: MAC: 2, PHY: 1, PBA No: G73129-007
[ 2.239323] ixgbe 0000:02:00.1: a0:36:xx:xx:xx:xx
[ 2.242015] ixgbe 0000:02:00.1: Intel(R) 10 Gigabit Network Connection
[ 2.242045] libphy: ixgbe-mdio: probed
[ 2.242618] ixgbe 0000:02:00.0 enp2s0f0: renamed from eth0
[ 2.286220] ixgbe 0000:02:00.1 enp2s0f1: renamed from eth1
[ 32.451148] ixgbe 0000:02:00.0: registered PHC device on enp2s0f0
[ 32.605230] ixgbe 0000:02:00.1: registered PHC device on enp2s0f1
[ 32.630032] ixgbe 0000:02:00.0 enp2s0f0: detected SFP+: 5
[ 32.930117] ixgbe 0000:02:00.0 enp2s0f0: NIC Link is Up 10 Gbps, Flow Control: RX/TX
ubuntu@ubuntu:$
@ixs
Copy link

ixs commented Aug 14, 2020

Haha. Just saw this.
I wrote https://gist.github.com/ixs/dbaac42730dea9bd124f26cbd439c58e to make life easier... Patch in one go...

@cd-stephen
Copy link

thanks @tinbotu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment