Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1a2ca92 authored by hayeswang's avatar hayeswang Committed by David S. Miller
Browse files

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: default avatarHayes Wang <hayeswang@realtek.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d0a47d32
Loading
Loading
Loading
Loading
+13 −2
Original line number Original line Diff line number Diff line
@@ -1643,7 +1643,7 @@ static int rx_bottom(struct r8152 *tp, int budget)
{
{
	unsigned long flags;
	unsigned long flags;
	struct list_head *cursor, *next, rx_queue;
	struct list_head *cursor, *next, rx_queue;
	int work_done = 0;
	int ret = 0, work_done = 0;


	if (!skb_queue_empty(&tp->rx_queue)) {
	if (!skb_queue_empty(&tp->rx_queue)) {
		while (work_done < budget) {
		while (work_done < budget) {
@@ -1734,7 +1734,18 @@ static int rx_bottom(struct r8152 *tp, int budget)
		}
		}


submit:
submit:
		r8152_submit_rx(tp, agg, GFP_ATOMIC);
		if (!ret) {
			ret = r8152_submit_rx(tp, agg, GFP_ATOMIC);
		} else {
			urb->actual_length = 0;
			list_add_tail(&agg->list, next);
		}
	}

	if (!list_empty(&rx_queue)) {
		spin_lock_irqsave(&tp->rx_lock, flags);
		list_splice_tail(&rx_queue, &tp->rx_done);
		spin_unlock_irqrestore(&tp->rx_lock, flags);
	}
	}


out1:
out1: