net: ethtool: Allow write mechanism of LPL and both LPL and EPL
Subsystems (3)
PATCH 1/1 net: ethtool: Allow write mechanism of LPL and both LPL and EPL
CMIS 5.2 standard section 9.4.2 defines four types of firmware update supported mechanism: None, only LPL, only EPL, both LPL and EPL.
Currently, only LPL (Local Payload) type of write firmware block is supported. However, if the module supports both LPL and EPL the flashing process wrongly fails for no supporting LPL.
Fix that, by allowing the write mechanism to be LPL or both LPL and EPL.
--- net/ethtool/cmis_fw_update.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
net/ethtool/cmis_fw_update.c +6 -2
@@ -35,7 +35,10 @@ struct cmis_cdb_fw_mng_features_rpl {__be16 resv7; }; -#define CMIS_CDB_FW_WRITE_MECHANISM_LPL 0x01 +enum cmis_cdb_fw_write_mechanism { +CMIS_CDB_FW_WRITE_MECHANISM_LPL =0x01 , +CMIS_CDB_FW_WRITE_MECHANISM_BOTH =0x11 , +}; static int cmis_fw_update_fw_mng_features_get(struct ethtool_cmis_cdb *cdb,
@@ -64,7 +67,8 @@ cmis_fw_update_fw_mng_features_get(struct ethtool_cmis_cdb *cdb, } rpl = (struct cmis_cdb_fw_mng_features_rpl *)args.req.payload; -if (!(rpl->write_mechanism ==CMIS_CDB_FW_WRITE_MECHANISM_LPL )) { +if (!(rpl->write_mechanism ==CMIS_CDB_FW_WRITE_MECHANISM_LPL || + rpl->write_mechanism ==CMIS_CDB_FW_WRITE_MECHANISM_BOTH )) {ethnl_module_fw_flash_ntf_err (dev, ntf_params,"Write LPL is not supported" ,NULL );
Signature · 1 line
2.45.0
This patch was applied to netdev/net.git (main) by Paolo Abeni <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <[email protected]>:
Quoted 8 lines · On Mon, 12 Aug 2024 17:08:24 +0300 you wrote:
CMIS 5.2 standard section 9.4.2 defines four types of firmware update supported mechanism: None, only LPL, only EPL, both LPL and EPL.
Currently, only LPL (Local Payload) type of write firmware block is supported. However, if the module supports both LPL and EPL the flashing process wrongly fails for no supporting LPL.
[...]
Here is the summary with links:
- [net] net: ethtool: Allow write mechanism of LPL and both LPL and EPL
https://git.kernel.org/netdev/net/c/fde25c20f518
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html