]> git.ipfire.org Git - thirdparty/linux.git/commit
ionic: fix persistent MAC address override on PF
authorMohammad Heib <mheib@redhat.com>
Tue, 17 Mar 2026 17:08:06 +0000 (19:08 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 19 Mar 2026 22:45:30 +0000 (15:45 -0700)
commitcbcb3cfcdc436d6f91a3d95ecfa9c831abe14aed
tree0a6e40dc950427fbab497cfb05879cfdf7e4d327
parenta1d9d8e833781c44ab688708804ce35f20f3cbbd
ionic: fix persistent MAC address override on PF

The use of IONIC_CMD_LIF_SETATTR in the MAC address update path causes
the ionic firmware to update the LIF's identity in its persistent state.
Since the firmware state is maintained across host warm boots and driver
reloads, any MAC change on the Physical Function (PF) becomes "sticky.

This is problematic because it causes ethtool -P to report the
user-configured MAC as the permanent factory address, which breaks
system management tools that rely on a stable hardware identity.

While Virtual Functions (VFs) need this hardware-level programming to
properly handle MAC assignments in guest environments, the PF should
maintain standard transient behavior. This patch gates the
ionic_program_mac call using is_virtfn so that PF MAC changes remain
local to the netdev filters and do not overwrite the firmware's
permanent identity block.

Fixes: 19058be7c48c ("ionic: VF initial random MAC address if no assigned mac")
Signed-off-by: Mohammad Heib <mheib@redhat.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Brett Creeley <brett.creeley@amd.com>
Link: https://patch.msgid.link/20260317170806.35390-1-mheib@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/pensando/ionic/ionic_lif.c