From: Johannes Berg Date: Sat, 29 Jun 2013 17:23:13 +0000 (+0200) Subject: alx: treat flow control correctly in alx_set_pauseparam() X-Git-Tag: v3.11-rc1~64^2~86 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=ef0cc4b1d296ce041e3b24d103177dd70642740c;p=linux.git 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 Signed-off-by: Johannes Berg Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/atheros/alx/ethtool.c b/drivers/net/ethernet/atheros/alx/ethtool.c index 6fa2aec2bc81..50a91d012bce 100644 --- a/drivers/net/ethernet/atheros/alx/ethtool.c +++ b/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 */