[PATCH 4.4 38/46] r8152: fix rtl8152_post_reset function

From: Greg Kroah-Hartman
Date: Thu Jun 15 2017 - 14:28:33 EST


4.4-stable review patch. If anyone has any objections, please let me know.

------------------

From: hayeswang <hayeswang@xxxxxxxxxxx>


[ Upstream commit 2c561b2b728ca4013e76d6439bde2c137503745e ]

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@xxxxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Sasha Levin <alexander.levin@xxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
drivers/net/usb/r8152.c | 2 ++
1 file changed, 2 insertions(+)

--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -3418,12 +3418,14 @@ static int rtl8152_post_reset(struct usb
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;
}