Crossflash HPE 640sfp28 to MCX4121A-ACAT

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.
I'm following up on my attempt long ago just to share experiences, in case someone else runs into the same things.

I followed the pattern of -allow_psid_change burn to try and move HPE 640SFP28 to the MCX4121A-ACT on a variety of hosts.

Everything essentially worked fine on hosts where the HCA was directly consumed by the host OS.

However, I still repeated my last failures from 2024 when using vfio passhrough, which I can only attribute to Mellanox firmware being somehow incompatible with the HPE HCA (YMMV, it could be operator error too).

My results:
- Direct usage in Windows, HCA works fine
- Direct usage in Linux, HCA works fine
- vfio passthrough from Linux host (proxmox) -> Linux VM (openwrt) <-- failure

I fixed previous issues with PCI-E link speeds being reported incorrectly (0.00Gb/s) by passing through as a PCI-*E* device and not just PCI (that is a PEBCAK for sure).

But nothing got me a working HCA in the VM. I went through a lot of debug attempts, the device shows up in dmesg, everything looks OK, but never gets an IP from the ISP, cannot serve an IP (it acts in my router machine).

Every time I flashed back to the HPE FW, things worked perfectly. Everytime I moved to the Mellanox FW, the HCA stopped working.

So, YMMV, just be wary of cross flashing if you are using the device in a passthrough environment.
 
I'm following up on my attempt long ago just to share experiences, in case someone else runs into the same things….

I ran into something very parallel to this during my CX5 PCIe Gen4 enablement work. When cross-flashing a Dell-branded ConnectX-5 to stock Mellanox firmware, autonegotiation broke, among other issues. The root cause turned out to be that OEM cards carry a custom provisioning profile baked into the firmware. In the Dell case, this included things like Socket Direct PCIe configuration and board-specific tuning parameters that the stock Mellanox image simply doesn’t account for. Strip those out by flashing generic firmware and the card may appear functional in some contexts but fail in others, which lines up exactly with what you’re seeing with passthrough working bare-metal but breaking under VFIO.

It may be worth doing a binary diff between the HPE firmware and the equivalent stock Mellanox image. When I did this with the Dell variant, I was able to isolate an OEM-specific configuration profile (~95 bytes in that case) responsible for the board-level tuning. From there, you could potentially build a hybrid image that retains the HPE provisioning profile while pulling in whatever you need from the stock firmware.

 
  • Like
Reactions: blunden
I ran into something very parallel to this during my CX5 PCIe Gen4 enablement work. When cross-flashing a Dell-branded ConnectX-5 to stock Mellanox firmware, autonegotiation broke, among other issues. The root cause turned out to be that OEM cards carry a custom provisioning profile baked into the firmware. In the Dell case, this included things like Socket Direct PCIe configuration and board-specific tuning parameters that the stock Mellanox image simply doesn’t account for. Strip those out by flashing generic firmware and the card may appear functional in some contexts but fail in others, which lines up exactly with what you’re seeing with passthrough working bare-metal but breaking under VFIO.

It may be worth doing a binary diff between the HPE firmware and the equivalent stock Mellanox image. When I did this with the Dell variant, I was able to isolate an OEM-specific configuration profile (~95 bytes in that case) responsible for the board-level tuning. From there, you could potentially build a hybrid image that retains the HPE provisioning profile while pulling in whatever you need from the stock firmware.


Wow, this is amazing. Thank you for the write up and the inspiration. I will try to at least follow the same approach to understand what could be different between the two firmwares.
 
  • Like
Reactions: Bulls729
HAH! @Bulls729, you are amazing, thank you so much!! I just tried to do some exploration with Claude Opus 4.6, and look what it found:

Code:
  ┌───────────────────────┬─────┬────────┐
  │                       │ HPE │ NVIDIA │
  ├───────────────────────┼─────┼────────┤
  │ module 0 → local_port │ 1   │ 0      │
  ├───────────────────────┼─────┼────────┤
  │ module 1 → local_port │ 0   │ 1      │
  ├───────────────────────┼─────┼────────┤
  │ module power level    │ 1   │ 4      │
  └───────────────────────┴─────┴────────┘

I would have never guessed this to be the case, but I flashed the FW again, swapped the transceiver / DAC on the physical port.... AND IT WORKS!

It was literally just a FW mapping change between ports, that is why it always looked OK but nothing ever "clicked", I was asking for DHCP from the internal network and advertising back to my ISP!

So cool, now I can leave the NVIDIA FW running on the Connect-X 4 and see if everything is ok... to be honest I have no good reason for cross flashing other than wanting to be more "OEM"... all this troubleshooting feels a bit pointess in the end... but now I know :)
 
  • Like
Reactions: Bulls729
Thanks @Djeross, yes that makes sense. I actually realized this when I flashed the Dell firmware back on to the card as I didn't like the always-on behavior of the LEDs with the generic Mellanox firmware. The latest Dell firmware for the 020NJD or 0MRT0D (CX4121C) class of ConnectX-4 Lx cards is hot off the press as it came out just two weeks ago, so I just ended up going with that as it's even newer than the latest Mellanox firmware. My guess (not based in fact, but just a hypothesis) is this Dell-specific firmware is based on this most recent Nvidia/Mellanox firmware from late-2024, but with the Dell hardware in mind, so I see no harm in going with this firmware for now. Am I losing out on any Mellanox/Nvidia-specific features? Nothing I can tell so far.

I'm surprised Dell make the latest firmware so hard to find as I had to employ some keyword-based trickery on the Dell site for support/drivers, along with "sort by most recent" instead of the default "most relevant". Google was also pretty unhelpful here.

In any case, I guess an open question I have is if there's any advantage to enabling the write protection again, after the flashing procedure is over. And if yes, would the right way to do it be with Top,8-SubSectors?

If anyone is looking for the latest Dell Firmware (January 2026) coming from Google as I did it can be found here: NVIDIA Mellanox Firmware Release 14.32.21.04 for NVIDIA Mellanox ConnectX-4 Lx Ethernet Adapters | Driver Details | Dell US

To be able to find the latest Dell firmware for the Connectx-4 the URL with the search query is this one: Search Support | Dell US
 
  • Like
Reactions: blunden