Skip to contentSkip to conversation

i40e: Change user notification of non-SFP module in i40e_get_module_info()

PATCH In review Andrii Staikov 2 participants 2 messages Oct 9, 2023 – Oct 20, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i40e: Change user notification of non-SFP module in i40e_get_module_info()

Make the driver not produce an error message on "ethtool -m ethX" command when a non-SFP module is encountered hence there is no possibility to read the EEPROM. Make the message to appear in the debug log rather than as an error string.

Change the return code to -EOPNOTSUPP and the string to make it more verbose.

---
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_ethtool.c +2 -2
index 80c6205bacc4..fe12fc6bab97 100644
@@ -5582,8 +5582,8 @@ static int i40e_get_module_info(struct net_device *netdev,
 		modinfo->eeprom_len = I40E_MODULE_QSFP_MAX_LEN;
 		break;
 	default:
-		netdev_err(vsi->netdev, "Module type unrecognized\n");
-		return -EINVAL;
+		netdev_dbg(vsi->netdev, "SFP module type unrecognized or no SFP connector used.\n");
+		return -EOPNOTSUPP;
 	}
 	return 0;
 }
Signature · 6 lines
2.25.1

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Tested-by on v1 1/1
#1 lore raw
Quoted 16 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Andrii Staikov
Sent: Monday, October 9, 2023 8:05 PM
To: [email protected]
Cc: Drewek, Wojciech <[email protected]>; Stefan Assmann <[email protected]>; Staikov, Andrii <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-next v1] i40e: Change user notification of non-SFP module in i40e_get_module_info()

Make the driver not produce an error message on "ethtool -m ethX" command when a non-SFP module is encountered hence there is no possibility to read the EEPROM. Make the message to appear in the debug log rather than as an error string.

Change the return code to -EOPNOTSUPP and the string to make it more verbose.

Quoted 8 lines
---
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan