Commit 30872d83 authored by Alicja Kowalska's avatar Alicja Kowalska Committed by Tony Nguyen
Browse files

i40e: Add appropriate error message logged for incorrect duplex setting



Nothing logged in dmesg for attempting to set incorrect duplex.
Add appropriate error message logged for incorrect duplex setting.

Signed-off-by: default avatarAlicja Kowalska <alicjax.kowalska@intel.com>
Signed-off-by: default avatarKamil Maziarz <kamil.maziarz@intel.com>
Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent 6d4d584a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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(&copy_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--;