brcm2708: update to latest patches from the RPi foundation
[openwrt/openwrt.git] / target / linux / brcm2708 / patches-4.14 / 950-0359-net-lan78xx-fix-rx-handling-before-first-packet-is-s.patch
1 From 213fa517424f4d1c83e7cf486c0f113bd874c32c Mon Sep 17 00:00:00 2001
2 From: Stefan Wahren <stefan.wahren@i2se.com>
3 Date: Mon, 16 Jul 2018 21:33:40 +0200
4 Subject: [PATCH 359/454] net: lan78xx: fix rx handling before first packet is
5 send
6
7 As long the bh tasklet isn't scheduled once, no packet from the rx path
8 will be handled. Since the tx path also schedule the same tasklet
9 this situation only persits until the first packet transmission.
10 So fix this issue by scheduling the tasklet during ndo_open like in usbnet.
11
12 Link: https://github.com/raspberrypi/linux/issues/2617
13 Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet")
14 Suggested-by: Floris Bos <bos@je-eigen-domein.nl>
15 Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
16 ---
17 drivers/net/usb/lan78xx.c | 2 ++
18 1 file changed, 2 insertions(+)
19
20 --- a/drivers/net/usb/lan78xx.c
21 +++ b/drivers/net/usb/lan78xx.c
22 @@ -2589,6 +2589,8 @@ static int lan78xx_open(struct net_devic
23
24 dev->link_on = false;
25
26 + tasklet_schedule(&dev->bh);
27 +
28 lan78xx_defer_kevent(dev, EVENT_LINK_RESET);
29 done:
30 usb_autopm_put_interface(dev->intf);