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

Commit 52f6d697 authored by Michael Chan's avatar Michael Chan Committed by David S. Miller
Browse files

[TG3]: Refresh hw index in tg3_rx()



This patch refreshes the hw rx producer in tg3_rx() so that additional
work posted by the hardware can be processed.

Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 483ba50b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2802,6 +2802,12 @@ static int tg3_rx(struct tg3 *tp, int budget)
next_pkt_nopost:
		sw_idx++;
		sw_idx %= TG3_RX_RCB_RING_SIZE(tp);

		/* Refresh hw_idx to see if there is new work */
		if (sw_idx == hw_idx) {
			hw_idx = tp->hw_status->idx[0].rx_producer;
			rmb();
		}
	}

	/* ACK the status ring. */