[ipxe-devel] [PATCH 3/3] [tg3] Use PCI writes instead of writel() in tg3_transmit()

Cody Cutler ccutler at cs.utah.edu
Tue Aug 14 18:56:13 BST 2012


Our Dell R820s reboot with a PCI bus error when they hit the writel().
They survive and even transmit packets if the writel() is replaced with
pci_write_config().

Tested on BCM5720 and BCM5754
---
 src/drivers/net/tg3/tg3.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/drivers/net/tg3/tg3.c b/src/drivers/net/tg3/tg3.c
index b2cba72..d182404 100644
--- a/src/drivers/net/tg3/tg3.c
+++ b/src/drivers/net/tg3/tg3.c
@@ -323,7 +323,9 @@ static int tg3_transmit(struct net_device *dev, struct io_buffer *iob)
 	/* Packets are ready, update Tx producer idx local and on card. */
 	tw32_tx_mbox(tp->prodmbox, entry);
 
-	writel(entry, tp->regs + MAILBOX_SNDHOST_PROD_IDX_0 + TG3_64BIT_REG_LOW);
+	//writel(entry, tp->regs + MAILBOX_SNDHOST_PROD_IDX_0 + TG3_64BIT_REG_LOW);
+	tg3_write_indirect_reg32(tp,
+	    MAILBOX_SNDHOST_PROD_IDX_0 + TG3_64BIT_REG_LOW, entry);
 
 	tp->tx_prod = entry;
 
-- 
1.7.6



More information about the ipxe-devel mailing list