Commit 1c70d2de authored by Phil Elwell's avatar Phil Elwell
Browse files

lan78xx: Fix link status notifications

The patch to allow packet reception before the first transmission broke
the notification and handling of link status changes. Move the new call
to tasklet_schedule into lan78xx_link_reset to fix it.

See: https://github.com/raspberrypi/linux/issues/2617



Fixes: d407fc22 ("net: lan78xx: fix rx handling before first packet is send")
Suggested-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: default avatarPhil Elwell <phil@raspberrypi.org>
parent 8fcf78e1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1227,6 +1227,8 @@ static int lan78xx_link_reset(struct lan78xx_net *dev)
			mod_timer(&dev->stat_monitor,
				  jiffies + STAT_UPDATE_TIMER);
		}

		tasklet_schedule(&dev->bh);
	}

	return ret;
@@ -2606,8 +2608,6 @@ static int lan78xx_open(struct net_device *net)

	dev->link_on = false;

	tasklet_schedule(&dev->bh);

	lan78xx_defer_kevent(dev, EVENT_LINK_RESET);
done:
	usb_autopm_put_interface(dev->intf);