Message ID | 1394712342-15778-54-Taiwan-albertk@realtek.com |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
From: Hayes Wang <hayeswang@realtek.com> Date: Thu, 2 Oct 2014 16:01:22 +0800 > @@ -3480,6 +3480,9 @@ rtl_ethtool_set_eee(struct net_device *net, struct ethtool_eee *edata) > > ret = tp->rtl_ops.eee_set(tp, edata); > > + if (ret == 0) > + ret = mii_nway_restart(&tp->mii); Please test this canonically as "if (!ret)" and delete the empty line between the function call and the return value test. Thank you. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index a4d4c4a..e4dcfc1 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -3480,6 +3480,9 @@ rtl_ethtool_set_eee(struct net_device *net, struct ethtool_eee *edata) ret = tp->rtl_ops.eee_set(tp, edata); + if (ret == 0) + ret = mii_nway_restart(&tp->mii); + usb_autopm_put_interface(tp->intf); out:
Restart autonegotiation is necessary after setting EEE. Signed-off-by: Hayes Wang <hayeswang@realtek.com> --- drivers/net/usb/r8152.c | 3 +++ 1 file changed, 3 insertions(+)