diff options
author | hayeswang <hayeswang@realtek.com> | 2015-02-05 22:30:45 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-02-08 01:46:24 -0500 |
commit | e1a2ca92727500ea8d25326216d700bed6176117 (patch) | |
tree | 833f5aa698ed5e18a986d1d4e8de9d76ccc762a2 /drivers/net/usb | |
parent | d0a47d32724bf0765b8768086ef1a7a6d074a7a0 (diff) |
r8152: adjust rx_bottom
If a error occurs when submitting rx, skip the remaining submissions
and try to submit them again next time.
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/r8152.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index b74a272243ae..41a1cbc6cc7f 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c | |||
@@ -1643,7 +1643,7 @@ static int rx_bottom(struct r8152 *tp, int budget) | |||
1643 | { | 1643 | { |
1644 | unsigned long flags; | 1644 | unsigned long flags; |
1645 | struct list_head *cursor, *next, rx_queue; | 1645 | struct list_head *cursor, *next, rx_queue; |
1646 | int work_done = 0; | 1646 | int ret = 0, work_done = 0; |
1647 | 1647 | ||
1648 | if (!skb_queue_empty(&tp->rx_queue)) { | 1648 | if (!skb_queue_empty(&tp->rx_queue)) { |
1649 | while (work_done < budget) { | 1649 | while (work_done < budget) { |
@@ -1734,7 +1734,18 @@ find_next_rx: | |||
1734 | } | 1734 | } |
1735 | 1735 | ||
1736 | submit: | 1736 | submit: |
1737 | r8152_submit_rx(tp, agg, GFP_ATOMIC); | 1737 | if (!ret) { |
1738 | ret = r8152_submit_rx(tp, agg, GFP_ATOMIC); | ||
1739 | } else { | ||
1740 | urb->actual_length = 0; | ||
1741 | list_add_tail(&agg->list, next); | ||
1742 | } | ||
1743 | } | ||
1744 | |||
1745 | if (!list_empty(&rx_queue)) { | ||
1746 | spin_lock_irqsave(&tp->rx_lock, flags); | ||
1747 | list_splice_tail(&rx_queue, &tp->rx_done); | ||
1748 | spin_unlock_irqrestore(&tp->rx_lock, flags); | ||
1738 | } | 1749 | } |
1739 | 1750 | ||
1740 | out1: | 1751 | out1: |