浏览代码

[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 <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan 20 年之前
父节点
当前提交
52f6d697dc
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      drivers/net/tg3.c

+ 6 - 0
drivers/net/tg3.c

@@ -2802,6 +2802,12 @@ next_pkt:
 next_pkt_nopost:
 next_pkt_nopost:
 		sw_idx++;
 		sw_idx++;
 		sw_idx %= TG3_RX_RCB_RING_SIZE(tp);
 		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. */
 	/* ACK the status ring. */