public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [Patch] ax88179_178a: add reset functionality in reset_resume
@ 2015-06-20 17:54 Vivek Bhagat
  0 siblings, 0 replies; 5+ messages in thread
From: Vivek Bhagat @ 2015-06-20 17:54 UTC (permalink / raw)
  To: netdev-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 295 bytes --]

 Dear All,

Attached patch fix iperf connection problem after reset resume of
ethernet to usb dongle.

Without reset functionality, i see ping works after reset resume but
iperf connection fails with wrong checksum error message shown by
tcpdump.

Attached patch fix above issue.

Thanks,
Vivek

[-- Attachment #2: 0001-ax88179_178a-add-reset-function-in-reset_resume.patch --]
[-- Type: application/octet-stream, Size: 1661 bytes --]

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

without reset functionality in reset_resume, iperf connection
does not establish after suspend/resume however ping works at
the same time.

reset function inside reset_resume solves above bug. We have verified
it 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] 5+ messages in thread

* [PATCH] ax88179_178a: add reset functionality in reset_resume
@ 2015-07-01  4:14 Vivek Kumar Bhagat
  0 siblings, 0 replies; 5+ messages in thread
From: Vivek Kumar Bhagat @ 2015-07-01  4:14 UTC (permalink / raw)
  To: netdev; +Cc: hemanshu.s

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

reset function inside reset_resume solves above bug.
We have verified it 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] 5+ messages in thread

* Re: [PATCH] ax88179_178a: add reset functionality in reset_resume
@ 2015-07-01 11:33 Vivek Kumar Bhagat
  2015-07-01 16:45 ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Vivek Kumar Bhagat @ 2015-07-01 11:33 UTC (permalink / raw)
  To: davem; +Cc: netdev, hemanshu.s

Hello David,

I configured my email client and below patch does not have indentation
issue of converting tabs into spaces. I hope it should be accepted.

Thanks,
Vivek

------- Original Message -------
Sender : Vivek Kumar Bhagat<vivek.bhagat@samsung.com> Chief Engineer/SRI-Delhi-System S/W 1 Team/Samsung Electronics
Date : Jul 01, 2015 09:44 (GMT+05:30)
Title : [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 by giving checksum error
in tcpdump.

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

Signed-off-by: Vivek Kumar Bhagat 
Signed-off-by: Praveen Kumar 

---
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] 5+ messages in thread

* Re: [PATCH] ax88179_178a: add reset functionality in reset_resume
  2015-07-01 11:33 Vivek Kumar Bhagat
@ 2015-07-01 16:45 ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2015-07-01 16:45 UTC (permalink / raw)
  To: vivek.bhagat; +Cc: netdev, hemanshu.s

From: Vivek Kumar Bhagat <vivek.bhagat@samsung.com>
Date: Wed, 01 Jul 2015 11:33:58 +0000 (GMT)

> I configured my email client and below patch does not have indentation
> issue of converting tabs into spaces. I hope it should be accepted.

Patchwork is not recognizing your postings as a patch submission,
therefore it's not ending up in my queue of patches to handle.

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

* Re: [PATCH] ax88179_178a: add reset functionality in reset_resume
       [not found] <C0.47.27612.33CB4955@epcpsbgx1.samsung.com>
@ 2015-07-02  6:47 ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2015-07-02  6:47 UTC (permalink / raw)
  To: vivek.bhagat; +Cc: netdev, hemanshu.s


Emails encoded in HTML will not make it to the mailing list, and also
will not be read by me.

You have some serious email posting issues, that you will need to
sort out on your own before contributing changes.  Meanwhile perhaps
you can find a colleague who can submit patches properly to the list.

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

end of thread, other threads:[~2015-07-02  6:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-01  4:14 [PATCH] ax88179_178a: add reset functionality in reset_resume Vivek Kumar Bhagat
     [not found] <C0.47.27612.33CB4955@epcpsbgx1.samsung.com>
2015-07-02  6:47 ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2015-07-01 11:33 Vivek Kumar Bhagat
2015-07-01 16:45 ` David Miller
2015-06-20 17:54 [Patch] " Vivek Bhagat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox