hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/net/ethernet/sfc/mcdi_port_common.c
....@@ -974,12 +974,15 @@
974974
975975 /* A QSFP+ NIC may actually have an SFP+ module attached.
976976 * The ID is page 0, byte 0.
977
+ * QSFP28 is of type SFF_8636, however, this is treated
978
+ * the same by ethtool, so we can also treat them the same.
977979 */
978980 switch (efx_mcdi_phy_get_module_eeprom_byte(efx, 0, 0)) {
979
- case 0x3:
981
+ case 0x3: /* SFP */
980982 return MC_CMD_MEDIA_SFP_PLUS;
981
- case 0xc:
982
- case 0xd:
983
+ case 0xc: /* QSFP */
984
+ case 0xd: /* QSFP+ */
985
+ case 0x11: /* QSFP28 */
983986 return MC_CMD_MEDIA_QSFP_PLUS;
984987 default:
985988 return 0;
....@@ -1077,7 +1080,7 @@
10771080
10781081 case MC_CMD_MEDIA_QSFP_PLUS:
10791082 modinfo->type = ETH_MODULE_SFF_8436;
1080
- modinfo->eeprom_len = ETH_MODULE_SFF_8436_LEN;
1083
+ modinfo->eeprom_len = ETH_MODULE_SFF_8436_MAX_LEN;
10811084 break;
10821085
10831086 default: