netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch v1] ax88179_178a: add reset functionality in reset_resume
@ 2015-06-21  6:16 Vivek Bhagat
       [not found] ` <CA+vmRF7nC2Ndzzt+QRj2YG7yQEtHw=3ZBuNBCqyM7nqErFoU-g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Vivek Bhagat @ 2015-06-21  6:16 UTC (permalink / raw)
  To: netdev, linux-usb

Without reset functionality in reset_resume, iperf connection does not
establish after suspend/resume however ping works at the same time.
iperf connection fails with wrong checksum error shown by tcpdump.

reset function inside reset_resume solves above bug. We have verified
this issue on ASIX based ST Lab, Cadyce dongle.

Signed-off-by: Vivek Kumar Bhagat <vivek.bhagat@samsung.com>
Signed-off-by: Praveen Kumar <praveen.k09@samsung.com>

---
 drivers/net/usb/ax88179_178a.c |   14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c
index e6338c1..00928c0 100644
--- a/drivers/net/usb/ax88179_178a.c
+++ b/drivers/net/usb/ax88179_178a.c
@@ -1630,6 +1630,18 @@ static int ax88179_stop(struct usbnet *dev)
  return 0;
 }

+static int ax88179_reset_resume(struct usb_interface *intf)
+{
+ struct usbnet *dev = usb_get_intfdata(intf);
+ int ret;
+
+ ret = ax88179_reset(dev);
+ if (ret < 0)
+  return ret;
+
+ return  ax88179_resume(intf);
+}
+
 static const struct driver_info ax88179_info = {
  .description = "ASIX AX88179 USB 3.0 Gigabit Ethernet",
  .bind = ax88179_bind,
@@ -1744,7 +1756,7 @@ static struct usb_driver ax88179_178a_driver = {
  .probe = usbnet_probe,
  .suspend = ax88179_suspend,
  .resume = ax88179_resume,
- .reset_resume = ax88179_resume,
+ .reset_resume = ax88179_reset_resume,
  .disconnect = usbnet_disconnect,
  .supports_autosuspend = 1,
  .disable_hub_initiated_lpm = 1,
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [Patch v1] ax88179_178a: add reset functionality in reset_resume
@ 2015-06-21  6:11 Vivek Bhagat
  2015-06-23 13:41 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Vivek Bhagat @ 2015-06-21  6:11 UTC (permalink / raw)
  To: netdev-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA

>From d178065c9e3cfa8a45ef537fae7412775339beb0 Mon Sep 17 00:00:00 2001
From: Vivek Kumar Bhagat <vivek.bhagat-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Date: Thu, 11 Jun 2015 07:23:46 -0700
Subject: [PATCH] ax88179_178a: add reset functionality in reset_resume

Without reset functionality in reset_resume, iperf connection does not
establish after suspend/resume however ping works at the same time.
iperf connection fails with wrong checksum error shown by tcpdump.

reset function inside reset_resume solves above bug. We have verified
this issue on ASIX based ST Lab, Cadyce dongle.

Signed-off-by: Vivek Kumar Bhagat <vivek.bhagat-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Signed-off-by: Praveen Kumar <praveen.k09-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>

---
 drivers/net/usb/ax88179_178a.c |   14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c
index e6338c1..00928c0 100644
--- a/drivers/net/usb/ax88179_178a.c
+++ b/drivers/net/usb/ax88179_178a.c
@@ -1630,6 +1630,18 @@ static int ax88179_stop(struct usbnet *dev)
  return 0;
 }

+static int ax88179_reset_resume(struct usb_interface *intf)
+{
+ struct usbnet *dev = usb_get_intfdata(intf);
+ int ret;
+
+ ret = ax88179_reset(dev);
+ if (ret < 0)
+  return ret;
+
+ return  ax88179_resume(intf);
+}
+
 static const struct driver_info ax88179_info = {
  .description = "ASIX AX88179 USB 3.0 Gigabit Ethernet",
  .bind = ax88179_bind,
@@ -1744,7 +1756,7 @@ static struct usb_driver ax88179_178a_driver = {
  .probe = usbnet_probe,
  .suspend = ax88179_suspend,
  .resume = ax88179_resume,
- .reset_resume = ax88179_resume,
+ .reset_resume = ax88179_reset_resume,
  .disconnect = usbnet_disconnect,
  .supports_autosuspend = 1,
  .disable_hub_initiated_lpm = 1,
-- 
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-23 13:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-21  6:16 [Patch v1] ax88179_178a: add reset functionality in reset_resume Vivek Bhagat
     [not found] ` <CA+vmRF7nC2Ndzzt+QRj2YG7yQEtHw=3ZBuNBCqyM7nqErFoU-g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-22 10:33   ` Oliver Neukum
  -- strict thread matches above, loose matches on Subject: below --
2015-06-21  6:11 Vivek Bhagat
2015-06-23 13:41 ` 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).