* [PATCH net-next] r8152: nway reset after setting eee
@ 2014-10-02 8:01 Hayes Wang
2014-10-03 22:08 ` David Miller
[not found] ` <1394712342-15778-54-Taiwan-albertk-Rasf1IRRPZFBDgjK7y7TUQ@public.gmane.org>
0 siblings, 2 replies; 4+ messages in thread
From: Hayes Wang @ 2014-10-02 8:01 UTC (permalink / raw)
To: netdev; +Cc: nic_swsd, linux-kernel, linux-usb, Hayes Wang
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(+)
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:
--
1.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH net-next] r8152: nway reset after setting eee 2014-10-02 8:01 [PATCH net-next] r8152: nway reset after setting eee Hayes Wang @ 2014-10-03 22:08 ` David Miller [not found] ` <1394712342-15778-54-Taiwan-albertk-Rasf1IRRPZFBDgjK7y7TUQ@public.gmane.org> 1 sibling, 0 replies; 4+ messages in thread From: David Miller @ 2014-10-03 22:08 UTC (permalink / raw) To: hayeswang; +Cc: netdev, nic_swsd, linux-kernel, linux-usb 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. ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <1394712342-15778-54-Taiwan-albertk-Rasf1IRRPZFBDgjK7y7TUQ@public.gmane.org>]
* [PATCH net-next v2] r8152: nway reset after setting eee [not found] ` <1394712342-15778-54-Taiwan-albertk-Rasf1IRRPZFBDgjK7y7TUQ@public.gmane.org> @ 2014-10-06 2:36 ` Hayes Wang 2014-10-06 21:51 ` David Miller 0 siblings, 1 reply; 4+ messages in thread From: Hayes Wang @ 2014-10-06 2:36 UTC (permalink / raw) To: netdev-u79uwXL29TY76Z2rM5mHXA Cc: nic_swsd-Rasf1IRRPZFBDgjK7y7TUQ, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA, Hayes Wang Restart autonegotiation is necessary after setting EEE. Signed-off-by: Hayes Wang <hayeswang-Rasf1IRRPZFBDgjK7y7TUQ@public.gmane.org> --- drivers/net/usb/r8152.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index b9a9815..6532620 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -3471,6 +3471,8 @@ rtl_ethtool_set_eee(struct net_device *net, struct ethtool_eee *edata) goto out; ret = tp->rtl_ops.eee_set(tp, edata); + if (!ret) + ret = mii_nway_restart(&tp->mii); usb_autopm_put_interface(tp->intf); -- 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next v2] r8152: nway reset after setting eee 2014-10-06 2:36 ` [PATCH net-next v2] " Hayes Wang @ 2014-10-06 21:51 ` David Miller 0 siblings, 0 replies; 4+ messages in thread From: David Miller @ 2014-10-06 21:51 UTC (permalink / raw) To: hayeswang; +Cc: netdev, nic_swsd, linux-kernel, linux-usb From: Hayes Wang <hayeswang@realtek.com> Date: Mon, 6 Oct 2014 10:36:04 +0800 > Restart autonegotiation is necessary after setting EEE. > > Signed-off-by: Hayes Wang <hayeswang@realtek.com> Applied, thanks. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-10-06 21:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-02 8:01 [PATCH net-next] r8152: nway reset after setting eee Hayes Wang
2014-10-03 22:08 ` David Miller
[not found] ` <1394712342-15778-54-Taiwan-albertk-Rasf1IRRPZFBDgjK7y7TUQ@public.gmane.org>
2014-10-06 2:36 ` [PATCH net-next v2] " Hayes Wang
2014-10-06 21:51 ` David Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).