Skip to contentSkip to conversation

use mmiowb in tg3.c

PATCH Applied [email protected] 2 participants 2 messages Oct 28, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/9 use mmiowb in tg3.c

From: Jesse Barnes <[email protected]>

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.

---

 25-akpm/drivers/net/tg3.c |    2 ++
 1 files changed, 2 insertions(+)
drivers/net/tg3.c renamed from drivers/net/tg3.c~use-mmiowb-in-tg3c +2 -0
diff -puN drivers/net/tg3.c~use-mmiowb-in-tg3c drivers/net/tg3.c
@@ -2730,6 +2730,7 @@ next_pkt_nopost:
 		tw32_rx_mbox(MAILBOX_RCV_JUMBO_PROD_IDX + TG3_64BIT_REG_LOW,
 			     sw_idx);
 	}
+	mmiowb();
 
 	return received;
 }
@@ -3177,6 +3178,7 @@ static int tg3_start_xmit(struct sk_buff
 		netif_stop_queue(dev);
 
 out_unlock:
+    	mmiowb();
 	spin_unlock_irqrestore(&tp->tx_lock, flags);
 
 	dev->trans_start = jiffies;

_

maintainer
#1 lore raw
Quoted 8 lines · On Thu, 28 Oct 2004 00:19:40 -0700 [email protected] wrote:

From: Jesse Barnes <[email protected]>

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).

Quoted 6 lines

Arthur has another patch that uses mmiowb in tg3 that he posted earlier as well.

Ok, applied.