All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: lan78xx: fix rx handling before first packet is send
@ 2018-07-28  7:52 ` Stefan Wahren
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Wahren @ 2018-07-28  7:52 UTC (permalink / raw)
  To: Woojung Huh, UNGLinuxDriver, David S. Miller
  Cc: Greg Kroah-Hartman, Dave Stevenson, netdev, linux-usb, Stefan Wahren

As long the bh tasklet isn't scheduled once, no packet from the rx path
will be handled. Since the tx path also schedule the same tasklet
this situation only persits until the first packet transmission.
So fix this issue by scheduling the tasklet after link reset.

Link: https://github.com/raspberrypi/linux/issues/2617
Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet")
Suggested-by: Floris Bos <bos@je-eigen-domein.nl>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 drivers/net/usb/lan78xx.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
index ed10d49..aeca484 100644
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -1242,6 +1242,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;
-- 
2.7.4

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

* net: lan78xx: fix rx handling before first packet is send
@ 2018-07-28  7:52 ` Stefan Wahren
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Wahren @ 2018-07-28  7:52 UTC (permalink / raw)
  To: Woojung Huh, UNGLinuxDriver, David S. Miller
  Cc: Greg Kroah-Hartman, Dave Stevenson, netdev, linux-usb, Stefan Wahren

As long the bh tasklet isn't scheduled once, no packet from the rx path
will be handled. Since the tx path also schedule the same tasklet
this situation only persits until the first packet transmission.
So fix this issue by scheduling the tasklet after link reset.

Link: https://github.com/raspberrypi/linux/issues/2617
Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet")
Suggested-by: Floris Bos <bos@je-eigen-domein.nl>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 drivers/net/usb/lan78xx.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
index ed10d49..aeca484 100644
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -1242,6 +1242,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;

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

* Re: [PATCH] net: lan78xx: fix rx handling before first packet is send
@ 2018-07-28 21:30   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-07-28 21:30 UTC (permalink / raw)
  To: stefan.wahren
  Cc: woojung.huh, UNGLinuxDriver, gregkh, dave.stevenson, netdev, linux-usb

From: Stefan Wahren <stefan.wahren@i2se.com>
Date: Sat, 28 Jul 2018 09:52:10 +0200

> As long the bh tasklet isn't scheduled once, no packet from the rx path
> will be handled. Since the tx path also schedule the same tasklet
> this situation only persits until the first packet transmission.
> So fix this issue by scheduling the tasklet after link reset.
> 
> Link: https://github.com/raspberrypi/linux/issues/2617
> Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet")
> Suggested-by: Floris Bos <bos@je-eigen-domein.nl>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>

Applied and queued up for -stable, thanks.

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

* net: lan78xx: fix rx handling before first packet is send
@ 2018-07-28 21:30   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-07-28 21:30 UTC (permalink / raw)
  To: stefan.wahren
  Cc: woojung.huh, UNGLinuxDriver, gregkh, dave.stevenson, netdev, linux-usb

From: Stefan Wahren <stefan.wahren@i2se.com>
Date: Sat, 28 Jul 2018 09:52:10 +0200

> As long the bh tasklet isn't scheduled once, no packet from the rx path
> will be handled. Since the tx path also schedule the same tasklet
> this situation only persits until the first packet transmission.
> So fix this issue by scheduling the tasklet after link reset.
> 
> Link: https://github.com/raspberrypi/linux/issues/2617
> Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet")
> Suggested-by: Floris Bos <bos@je-eigen-domein.nl>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>

Applied and queued up for -stable, thanks.
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2018-07-28 22:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-28  7:52 [PATCH] net: lan78xx: fix rx handling before first packet is send Stefan Wahren
2018-07-28  7:52 ` Stefan Wahren
2018-07-28 21:30 ` [PATCH] " David Miller
2018-07-28 21:30   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.