aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igc/igc_main.c
diff options
context:
space:
mode:
authorIdo Schimmel <[email protected]>2025-04-09 11:24:40 +0000
committerPaolo Abeni <[email protected]>2025-04-10 12:32:43 +0000
commiteaa517b77e63442260640d875f824d1111ca6569 (patch)
treed17125655f10e38f1c2dc84e75a4b29284b402e0 /drivers/net/ethernet/intel/igc/igc_main.c
parentMerge tag 'nf-25-04-10' of git://git.kernel.org/pub/scm/linux/kernel/git/netf... (diff)
downloadkernel-eaa517b77e63442260640d875f824d1111ca6569.tar.gz
kernel-eaa517b77e63442260640d875f824d1111ca6569.zip
ethtool: cmis_cdb: Fix incorrect read / write length extension
The 'read_write_len_ext' field in 'struct ethtool_cmis_cdb_cmd_args' stores the maximum number of bytes that can be read from or written to the Local Payload (LPL) page in a single multi-byte access. Cited commit started overwriting this field with the maximum number of bytes that can be read from or written to the Extended Payload (LPL) pages in a single multi-byte access. Transceiver modules that support auto paging can advertise a number larger than 255 which is problematic as 'read_write_len_ext' is a 'u8', resulting in the number getting truncated and firmware flashing failing [1]. Fix by ignoring the maximum EPL access size as the kernel does not currently support auto paging (even if the transceiver module does) and will not try to read / write more than 128 bytes at once. [1] Transceiver module firmware flashing started for device enp177s0np0 Transceiver module firmware flashing in progress for device enp177s0np0 Progress: 0% Transceiver module firmware flashing encountered an error for device enp177s0np0 Status message: Write FW block EPL command failed, LPL length is longer than CDB read write length extension allows. Fixes: 9a3b0d078bd8 ("net: ethtool: Add support for writing firmware blocks using EPL payload") Reported-by: Damodharam Ammepalli <[email protected]> Closes: https://lore.kernel.org/netdev/[email protected]/ Tested-by: Damodharam Ammepalli <[email protected]> Signed-off-by: Ido Schimmel <[email protected]> Reviewed-by: Damodharam Ammepalli <[email protected]> Reviewed-by: Petr Machata <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/igc/igc_main.c')
0 files changed, 0 insertions, 0 deletions