nfp: add support for eeprom get and set command
authorBaowen Zheng <baowen.zheng@corigine.com>
Thu, 25 Aug 2022 14:12:23 +0000 (16:12 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 30 Aug 2022 09:28:15 +0000 (11:28 +0200)
commite6686745e327ce07ea6b95fe975ce745be9908de
treea1356f1c309b4daf91514b53dbd99d7ac51823cf
parent2b88354d37ca672dc8c467f8c9d14aaa18df78d4
nfp: add support for eeprom get and set command

Add support for eeprom get and set operation with ethtool command.
with this change, we can support commands as:

 #ethtool -e enp101s0np0 offset 0 length 6
 Offset          Values
 ------          ------
 0x0000:         00 15 4d 16 66 33

 #ethtool -E enp101s0np0 magic 0x400019ee offset 5 length 1 value 0x88

We make this change to persist MAC change during driver reload and system
reboot.

Signed-off-by: Baowen Zheng <baowen.zheng@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c