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

Kevin Tran ktran at broadcom.com
Tue Aug 14 19:05:15 BST 2012

Hi Cody,
A few months ago, we have made a lot of fixes in tg3 driver.    There are a lot of flaw in the initialization sequences. The issues you found are *just* some of them.   We have done a lot of testing with a lot of NICs (BCM5719, BCM5720, BCM5764, etc...).  We could install OS with iSCSI boot path and boot from it.  We also installed OS with PXE as well.   We are planning to submit all of these changes shortly.


-----Original Message-----
From: ipxe-devel-bounces at lists.ipxe.org [mailto:ipxe-devel-bounces at lists.ipxe.org] On Behalf Of Cody Cutler
Sent: Tuesday, August 14, 2012 10:56 AM
To: ipxe-devel at lists.ipxe.org
Cc: Cody Cutler
Subject: [ipxe-devel] [PATCH 3/3] [tg3] Use PCI writes instead of writel() in tg3_transmit()

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,
 	tp->tx_prod = entry;

ipxe-devel mailing list
ipxe-devel at lists.ipxe.org

More information about the ipxe-devel mailing list