Message ID | 20221109202757.147024-1-simon.horman@corigine.com (mailing list archive) |
---|---|
State | Accepted |
Commit | f3a72878a3de720661b7ed0d6b7f7c506ddb8a52 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net] nfp: change eeprom length to max length enumerators | expand |
Hello: This patch was applied to netdev/net.git (master) by David S. Miller <davem@davemloft.net>: On Wed, 9 Nov 2022 15:27:57 -0500 you wrote: > From: Jaco Coetzee <jaco.coetzee@corigine.com> > > 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. > > [...] Here is the summary with links: - [net] nfp: change eeprom length to max length enumerators https://git.kernel.org/netdev/net/c/f3a72878a3de You are awesome, thank you!
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c b/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c index 22a5d2419084..1775997f9c69 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c @@ -1477,15 +1477,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",