From: Michael Chan Date: Mon, 25 Apr 2005 22:14:32 +0000 (-0700) Subject: [TG3]: Refresh hw index in tg3_rx() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=52f6d697dc0f2c039e8413e780b0f45ddf8161fc;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git [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: Michael Chan Signed-off-by: David S. Miller --- diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index e53c1dc58d08..92b0e4975135 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -2802,6 +2802,12 @@ next_pkt: 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. */