Kaynağa Gözat

alx: treat flow control correctly in alx_set_pauseparam()

Even when alx_setup_speed_duplex() is called, we still
need to call alx_cfg_mac_flowcontrol() and set hw->flowctrl
if flow control changed.

This was a bug I accidentally introduced while simplifying
the original driver.

Reported-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Johannes Berg 12 yıl önce
ebeveyn
işleme
ef0cc4b1d2
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 2 1
      drivers/net/ethernet/atheros/alx/ethtool.c

+ 2 - 1
drivers/net/ethernet/atheros/alx/ethtool.c

@@ -187,7 +187,8 @@ static int alx_set_pauseparam(struct net_device *netdev,
 
 	if (reconfig_phy) {
 		err = alx_setup_speed_duplex(hw, hw->adv_cfg, fc);
-		return err;
+		if (err)
+			return err;
 	}
 
 	/* flow control on mac */