]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
nfp: flower: change get/set_eeprom logic and enable for flower reps
authorJames Hershaw <james.hershaw@corigine.com>
Mon, 23 Jan 2023 13:41:35 +0000 (14:41 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 25 Jan 2023 02:19:12 +0000 (18:19 -0800)
commit74b4f1739d4e81810e1d20f0e6ad3d3c63a32c13
tree4b7806f3c05092f89ffc0ff4147910715261aee8
parent90317bcdbd337b9e88f253650f6ab9dfe667be64
nfp: flower: change get/set_eeprom logic and enable for flower reps

The changes in this patch are as follows:

- Alter the logic of get/set_eeprom functions to use the helper function
nfp_app_from_netdev() which handles differentiating between an nfp_net
and a nfp_repr. This allows us to get an agnostic backpointer to the
pdev.

- Enable the various eeprom commands by adding the 'get_eeprom_len',
'get_eeprom', 'set_eeprom' callbacks to the nfp_port_ethtool_ops struct.
This allows the eeprom commands to work on representor interfaces,
similar to a previous patch which added it to the vnics.
Currently these are being used to configure persistent MAC addresses for
the physical ports on the nfp.

Signed-off-by: James Hershaw <james.hershaw@corigine.com>
Reviewed-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/20230123134135.293278-1-simon.horman@corigine.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c