linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] r8152: fix the rx doesn't work
@ 2017-01-20  6:07 Hayes Wang
  2017-01-20  6:30 ` Hayes Wang
  2017-01-20  6:33 ` [PATCH net] r8152: fix rtl8152_post_reset function Hayes Wang
  0 siblings, 2 replies; 4+ messages in thread
From: Hayes Wang @ 2017-01-20  6:07 UTC (permalink / raw)
  To: netdev; +Cc: nic_swsd, linux-kernel, linux-usb, Hayes Wang

The rtl8152_post_reset() doesn't submit the rx urb, so the rx wouldn't work.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
---
 drivers/net/usb/r8152.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index f3b48ad..e8f4f88 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -3545,6 +3545,7 @@ static int rtl8152_post_reset(struct usb_interface *intf)
 	if (netif_carrier_ok(netdev)) {
 		mutex_lock(&tp->control);
 		tp->rtl_ops.enable(tp);
+		rtl_start_rx(tp);
 		rtl8152_set_rx_mode(netdev);
 		mutex_unlock(&tp->control);
 		netif_wake_queue(netdev);
-- 
2.7.4

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

* RE: [PATCH net] r8152: fix the rx doesn't work
  2017-01-20  6:07 [PATCH net] r8152: fix the rx doesn't work Hayes Wang
@ 2017-01-20  6:30 ` Hayes Wang
  2017-01-20  6:33 ` [PATCH net] r8152: fix rtl8152_post_reset function Hayes Wang
  1 sibling, 0 replies; 4+ messages in thread
From: Hayes Wang @ 2017-01-20  6:30 UTC (permalink / raw)
  To: netdev; +Cc: nic_swsd, linux-kernel, linux-usb

> Subject: [PATCH net] r8152: fix the rx doesn't work
> 
> The rtl8152_post_reset() doesn't submit the rx urb, so the rx wouldn't work.
> 
> Signed-off-by: Hayes Wang <hayeswang@realtek.com>

Excuse me. Please ignore this patch. I would submit another one.

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

* [PATCH net] r8152: fix rtl8152_post_reset function
  2017-01-20  6:07 [PATCH net] r8152: fix the rx doesn't work Hayes Wang
  2017-01-20  6:30 ` Hayes Wang
@ 2017-01-20  6:33 ` Hayes Wang
  2017-01-20 16:06   ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Hayes Wang @ 2017-01-20  6:33 UTC (permalink / raw)
  To: netdev; +Cc: nic_swsd, linux-kernel, linux-usb, Hayes Wang

The rtl8152_post_reset() should sumbit rx urb and interrupt transfer,
otherwise the rx wouldn't work and the linking change couldn't be
detected.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
---
 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 f3b48ad..0e99af0 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -3545,12 +3545,14 @@ static int rtl8152_post_reset(struct usb_interface *intf)
 	if (netif_carrier_ok(netdev)) {
 		mutex_lock(&tp->control);
 		tp->rtl_ops.enable(tp);
+		rtl_start_rx(tp);
 		rtl8152_set_rx_mode(netdev);
 		mutex_unlock(&tp->control);
 		netif_wake_queue(netdev);
 	}
 
 	napi_enable(&tp->napi);
+	usb_submit_urb(tp->intr_urb, GFP_KERNEL);
 
 	return 0;
 }
-- 
2.7.4

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

* Re: [PATCH net] r8152: fix rtl8152_post_reset function
  2017-01-20  6:33 ` [PATCH net] r8152: fix rtl8152_post_reset function Hayes Wang
@ 2017-01-20 16:06   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-01-20 16:06 UTC (permalink / raw)
  To: hayeswang; +Cc: netdev, nic_swsd, linux-kernel, linux-usb

From: Hayes Wang <hayeswang@realtek.com>
Date: Fri, 20 Jan 2017 14:33:55 +0800

> The rtl8152_post_reset() should sumbit rx urb and interrupt transfer,
> otherwise the rx wouldn't work and the linking change couldn't be
> detected.
> 
> Signed-off-by: Hayes Wang <hayeswang@realtek.com>

Applied, thank you.

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

end of thread, other threads:[~2017-01-20 16:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-20  6:07 [PATCH net] r8152: fix the rx doesn't work Hayes Wang
2017-01-20  6:30 ` Hayes Wang
2017-01-20  6:33 ` [PATCH net] r8152: fix rtl8152_post_reset function Hayes Wang
2017-01-20 16:06   ` 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).