[Intel-wired-lan] [PATCH net-next v1] i40e: Add appropriate error message logged for incorrect duplex setting
Kamil Maziarz
kamil.maziarz at intel.com
Thu Sep 8 08:07:10 UTC 2022
From: Alicja Kowalska <alicjax.kowalska at intel.com>
Nothing logged in dmesg for attempting to set incorrect duplex.
Add appropriate error message logged for incorrect duplex setting.
Signed-off-by: Alicja Kowalska <alicjax.kowalska at intel.com>
Signed-off-by: Kamil Maziarz <kamil.maziarz at intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 7e75706f76db..2299f13cea77 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -1287,8 +1287,10 @@ static int i40e_set_link_ksettings(struct net_device *netdev,
* trying to set something that we do not support.
*/
if (memcmp(©_ks.base, &safe_ks.base,
- sizeof(struct ethtool_link_settings)))
+ sizeof(struct ethtool_link_settings))) {
+ netdev_err(netdev, "Only speed and autoneg are supported.\n");
return -EOPNOTSUPP;
+ }
while (test_and_set_bit(__I40E_CONFIG_BUSY, pf->state)) {
timeout--;
--
2.25.1
More information about the Intel-wired-lan
mailing list