Messages in this thread Patch in this message | | | From | Jesse Barnes <> | Subject | [PATCH] use mmiowb in tg3.c | Date | Thu, 21 Oct 2004 16:28:06 -0700 |
| |
This patch originally from Greg Banks. Some parts of the tg3 driver depend on PIO writes arriving in order. This patch ensures that in two key places using the new mmiowb macro. This not only prevents bugs (the queues can be corrupted), but is much faster than ensuring ordering using PIO reads (which involve a few round trips to the target bus on some platforms).
Arthur has another patch that uses mmiowb in tg3 that he posted earlier as well.
Signed-off-by: Greg Banks <gnb@sgi.com> Signed-off-by: Jesse Barnes <jbarnes@sgi.com
Thanks, Jesse ===== drivers/net/tg3.c 1.210 vs edited ===== --- 1.210/drivers/net/tg3.c 2004-10-06 09:42:56 -07:00 +++ edited/drivers/net/tg3.c 2004-10-21 16:06:37 -07:00 @@ -2729,6 +2729,7 @@ tw32_rx_mbox(MAILBOX_RCV_JUMBO_PROD_IDX + TG3_64BIT_REG_LOW, sw_idx); } + mmiowb(); return received; } @@ -3176,6 +3177,7 @@ netif_stop_queue(dev); out_unlock: + mmiowb(); spin_unlock_irqrestore(&tp->tx_lock, flags); dev->trans_start = jiffies; | |