summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorWoojung.Huh@microchip.com <Woojung.Huh@microchip.com>2016-01-27 22:57:54 +0000
committerDavid S. Miller <davem@davemloft.net>2016-01-28 22:51:43 -0800
commit4b2a4a965331a8ce7303b43039ce43651ef80fb0 (patch)
tree355753a73c47b72e9da93a9a3a72f14f2597b365 /drivers/net
parenta0db7d10b76e98df0cb5d4ee1ec5b8e5fbe2038c (diff)
downloadlinux-4b2a4a965331a8ce7303b43039ce43651ef80fb0.tar.bz2
lan78xx: throttle TX path at slower than SuperSpeed USB
Throttle TX path only at slower than SuperSpeed USB. SuperSpeed USB has enough bandwidth to maintain GigE. Signed-off-by: Woojung Huh <woojung.huh@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/usb/lan78xx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
index 650e71604d86..1c299b8a162d 100644
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -2263,7 +2263,9 @@ netdev_tx_t lan78xx_start_xmit(struct sk_buff *skb, struct net_device *net)
if (skb2) {
skb_queue_tail(&dev->txq_pend, skb2);
- if (skb_queue_len(&dev->txq_pend) > 10)
+ /* throttle TX patch at slower than SUPER SPEED USB */
+ if ((dev->udev->speed < USB_SPEED_SUPER) &&
+ (skb_queue_len(&dev->txq_pend) > 10))
netif_stop_queue(net);
} else {
netif_dbg(dev, tx_err, dev->net,