Patch "nfp: change eeprom length to max length enumerators" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    nfp: change eeprom length to max length enumerators

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     nfp-change-eeprom-length-to-max-length-enumerators.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 4d00fb18aa843904c9ffc01ddd5496ab601428cf
Author: Jaco Coetzee <jaco.coetzee@xxxxxxxxxxxx>
Date:   Wed Nov 9 15:27:57 2022 -0500

    nfp: change eeprom length to max length enumerators
    
    [ Upstream commit f3a72878a3de720661b7ed0d6b7f7c506ddb8a52 ]
    
    Extend the size of QSFP EEPROM for types SSF8436 and SFF8636
    from 256 to 640 bytes in order to expose all the EEPROM pages by
    ethtool.
    
    For SFF-8636 and SFF-8436 specifications, the driver exposes
    256 bytes of EEPROM data for ethtool's get_module_eeprom()
    callback, resulting in "netlink error: Invalid argument" when
    an EEPROM read with an offset larger than 256 bytes is attempted.
    
    Changing the length enumerators to the _MAX_LEN
    variants exposes all 640 bytes of the EEPROM allowing upper
    pages 1, 2 and 3 to be read.
    
    Fixes: 96d971e307cc ("ethtool: Add fallback to get_module_eeprom from netlink command")
    Signed-off-by: Jaco Coetzee <jaco.coetzee@xxxxxxxxxxxx>
    Reviewed-by: Louis Peens <louis.peens@xxxxxxxxxxxx>
    Signed-off-by: Simon Horman <simon.horman@xxxxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c b/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
index 62546d197bfd..865865adfefc 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
@@ -1264,15 +1264,15 @@ nfp_port_get_module_info(struct net_device *netdev,
 
 		if (data < 0x3) {
 			modinfo->type = ETH_MODULE_SFF_8436;
-			modinfo->eeprom_len = ETH_MODULE_SFF_8436_LEN;
+			modinfo->eeprom_len = ETH_MODULE_SFF_8436_MAX_LEN;
 		} else {
 			modinfo->type = ETH_MODULE_SFF_8636;
-			modinfo->eeprom_len = ETH_MODULE_SFF_8636_LEN;
+			modinfo->eeprom_len = ETH_MODULE_SFF_8636_MAX_LEN;
 		}
 		break;
 	case NFP_INTERFACE_QSFP28:
 		modinfo->type = ETH_MODULE_SFF_8636;
-		modinfo->eeprom_len = ETH_MODULE_SFF_8636_LEN;
+		modinfo->eeprom_len = ETH_MODULE_SFF_8636_MAX_LEN;
 		break;
 	default:
 		netdev_err(netdev, "Unsupported module 0x%x detected\n",



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux