i40e: Introduce recovery mode support
Subsystems (2)
PATCH 1/1 i40e: Introduce recovery mode support
This patch introduces "recovery mode" to the i40e driver. It is part of a new Any2Any idea of upgrading the firmware. In this approach, it is required for the driver to have support for "transition firmware", that is used for migrating from structured to flat firmware image. In this new, very basic mode, i40e driver must be able to handle particular IOCTL calls from the NVM Update Tool and run a small set of AQ commands.
--- drivers/net/ethernet/intel/i40e/i40e.h | 1 + .../net/ethernet/intel/i40e/i40e_ethtool.c | 14 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 321 ++++++++++++++++-- 3 files changed, 305 insertions(+), 31 deletions(-)
drivers/net/ethernet/intel/i40e/i40e.h +1 -0
@@ -150,6 +150,7 @@ enum i40e_state_t { __I40E_CLIENT_L2_CHANGE, __I40E_CLIENT_RESET, __I40E_VIRTCHNL_OP_PENDING, + __I40E_RECOVERY_MODE,/* This must be last as it determines the size of the BITMAP */ __I40E_STATE_SIZE__, };
drivers/net/ethernet/intel/i40e/i40e_ethtool.c +13 -1
@@ -5141,6 +5141,12 @@ static int i40e_get_module_eeprom(struct net_device *netdev,return 0 ; } +static const struct ethtool_ops i40e_ethtool_recovery_mode_ops = { + .set_eeprom = i40e_set_eeprom, + .get_eeprom_len = i40e_get_eeprom_len, + .get_eeprom = i40e_get_eeprom, +}; +static const struct ethtool_ops i40e_ethtool_ops = { .get_drvinfo = i40e_get_drvinfo, .get_regs_len = i40e_get_regs_len,
@@ -5189,5 +5195,11 @@ static const struct ethtool_ops i40e_ethtool_ops = {void i40e_set_ethtool_ops (struct net_device *netdev) { - netdev->ethtool_ops = &i40e_ethtool_ops; +struct i40e_netdev_priv *np =netdev_priv (netdev); +struct i40e_pf *pf = np->vsi->back; + +if (!test_bit (__I40E_RECOVERY_MODE, pf->state)) + netdev->ethtool_ops = &i40e_ethtool_ops; +else + netdev->ethtool_ops = &i40e_ethtool_recovery_mode_ops; }
drivers/net/ethernet/intel/i40e/i40e_main.c +291 -30
424 lines not on this page · raw message
Signature · 1 line
2.19.2
PATCH 1/1 i40e: Introduce recovery mode support
Quoted 8 lines · Alice Michael
This patch introduces "recovery mode" to the i40e driver. It is part of a new Any2Any idea of upgrading the firmware. In this approach, it is required for the driver to have support for "transition firmware", that is used for migrating from structured to flat firmware image. In this new, very basic mode, i40e driver must be able to handle particular IOCTL calls from the NVM Update Tool and run a small set of AQ commands.
Quoted 7 lines
Signed-off-by Alice Michael <[email protected]>Signed-off-by Piotr Marczak <[email protected]>--- drivers/net/ethernet/intel/i40e/i40e.h | 1 + .../net/ethernet/intel/i40e/i40e_ethtool.c | 14 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 321 ++++++++++++++++-- 3 files changed, 305 insertions(+), 31 deletions(-)
Even though I have assigned this to Aaron and Andrew for validation, Don
Buchholz has the setup to test and verify this patch. Please work with Don
to get this tested.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20190329/799cf1a3/attachment.asc>
PATCH 1/1 i40e: Introduce recovery mode support
In reply to Alice MichaelQuoted 8 lines · Alice Michael
This patch introduces "recovery mode" to the i40e driver. It is part of a new Any2Any idea of upgrading the firmware. In this approach, it is required for the driver to have support for "transition firmware", that is used for migrating from structured to flat firmware image. In this new, very basic mode, i40e driver must be able to handle particular IOCTL calls from the NVM Update Tool and run a small set of AQ commands.
Quoted 8 lines
Signed-off-by Alice Michael <[email protected]>Signed-off-by Piotr Marczak <[email protected]>--- drivers/net/ethernet/intel/i40e/i40e.h | 1 + .../net/ethernet/intel/i40e/i40e_ethtool.c | 14 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 321 ++++++++++++++++-- 3 files changed, 305 insertions(+), 31 deletions(-)