Get Intel X520 SFP+ card working Proxmox/Debian

The Intel X520 has a built in list of support SFP+ transceivers. We are using generic modules which have very good ratings and have never given us any issues. The trouble is, when booting, we would see an error message similar to this:

Once Proxmox loads, you won’t see any of the X520 SFP+ interfaces when running ip addr show

There are two ways to get the card to accept SFP+ transceivers which are not on the default allow list.

Method 1 – Allow unsupported SFP+ modules

This is the simplest method and basically instructs the ixgbe driver to load the card and ports regardless of whether the currently installed transceiver is unsupported. This is achieved as follows:

Test whether allowing this option in the ixgbe config would result in the card being visible when running ip addr show:

rmmod ixgbe
modprobe ixgbe allow_unsupported_sfp=1
ip addr show

If you see your interfaces appear, then you know that using the allow_unsupported_sfp option would get the Intel X520-2 “working”. The above commands are not persistent, so be sure the follow the rest of this guide to ensure allow_unsupported_sfp is loaded by ixgbe when rebooting.

Assuming the above test is successful, we will now update initramfs to ensure the changes are persistent across reboots:

nano /etc/modprobe.d/ixgbe.conf

Paste the following and save:

options ixgbe allow_unsupported_sfp=1
update-initramfs -u
reboot

Credit: https://serverfault.com/questions/1028798/unsupported-module-type-was-detected-during-boot-of-intel-x520-i350-card-in-de

Method 2 – Modify the EEPROM of the X520 to allow all SFP+ transceivers

This method is more technical, but will allow you to use this card without having to instruct the the ixgbe driver to allow unsupported SFP+ transceivers. This method modifies the EEPROM of the card, thus making it useable with SFP+ transceivers outside of the predefined allowed transceivers. Proceed with care, as you can mess your card up if not careful.

Assuming your interface is enp4s0f0, use the ethtool to dump the current EEPROM of your card:

ethtool -e enp4s0f0

Copy the first 96 bytes of the card and keep these values safe in case you need to revert. The first 96 bytes should look as follows:

Offset		Values
------		------
0x0000:		60 07 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 38 05 
0x0020:		ff f7 ff ff ff ff ff ff ff ff fa fa 0e 1e 48 02 
0x0030:		ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
0x0040:		14 1e ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
0x0050:		08 1e 40 40 42 40 ba 1c fc ff a4 08 00 80 ff ff

The word value we’re interested in is at offset 0x58 with value 0xFC. This is highlighted in the snippet below:

Offset		Values
------		------
0x0000:		60 07 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 38 05 
0x0020:		ff f7 ff ff ff ff ff ff ff ff fa fa 0e 1e 48 02 
0x0030:		ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
0x0040:		14 1e ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
0x0050:		08 1e 40 40 42 40 ba 1c fc ff a4 08 00 80 ff ff 

If we represent 0xFC in binary, we have the following value:

11111100

As you can see the last digit is a 0, which means that the X520-2 card will NOT accept any SFP+ transceivers which are not on its “allowed list”. The goal now is to change the 0 to 1 to ALLOW all SFP+ transceivers.

The ixgbe driver requires us to supply a “magic” value to confirm the change to the EEPROM. This magic value is the PCI device ID followed by the vendor ID. The values can be obtained as follows:

lspci -nn | grep "Ethernet"

The output will look as follows:

04:00.0 Ethernet controller [0200]: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [8086:10fb] (rev 01)

Now, we build our command to be passed to ethtool which will modify the EEPROM of the card and allow any SFP+ transceiver:

ethtool -E enp4s0f0 magic 0x10fb8086 offset 0x58 value 0xfd

If you now dump the EEPROM again:

ethtool -e enp4s0f0

You’ll notice that word value has now changed to to fd which results in the 0 being change to 1 in binary, and effectively allowing the card to accept any SFP+ transceiver. Below is the end result:

Offset		Values
------		------
0x0000:		60 07 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 38 05 
0x0020:		ff f7 ff ff ff ff ff ff ff ff fa fa 0e 1e 48 02 
0x0030:		ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
0x0040:		14 1e ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
0x0050:		08 1e 40 40 42 40 ba 1c fd ff a4 08 00 80 ff ff 

And that’s it! The EEPROM of your Intel X520-2 card has been modified to allow any SFP+ transceiver to work.

Credit to Nathan: https://forums.servethehome.com/index.php?threads/patching-intel-x520-eeprom-to-unlock-all-sfp-transceivers.24634/

NOTE: Be sure to use the correct interface name, and only copy this guide exactly if your word values match these exactly. If the value are slightly different (generally they wouldn't be), be sure to calculate your offsets correctly.