[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: UltraSPARC IIIi enabled install images



On Mon, 4 Aug 2003 01:50:37 -0400
Ben Collins <bcollins@debian.org> wrote:

> A thing to note is that there is one known bug remaining. There's a PCI
> error reported when the broadcom (tg3) ethernet devs are brought up, but
> other than that things seem to be running smoothly.
> 
> With my luck, Dave will have that PCI error fixed just after I send out
> this email :)

Yeah, this patch should do it :-)  I'll test it out tomorrow.

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.1033  -> 1.1034 
#	   drivers/net/tg3.c	1.67    -> 1.68   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/08/03	davem@nuts.ninka.net	1.1034
# [TG3]: Only call tg3_init_rings() after hardware has been reset.
# 
# In tg3_init_rings() we might write out to the NIC SRAM area,
# thus we should only run it when the chip is in a known state.
# Also, fix comments above tg3_init_rings() wrt. locking state.
# --------------------------------------------
#
diff -Nru a/drivers/net/tg3.c b/drivers/net/tg3.c
--- a/drivers/net/tg3.c	Mon Aug  4 00:38:19 2003
+++ b/drivers/net/tg3.c	Mon Aug  4 00:38:19 2003
@@ -52,8 +52,8 @@
 
 #define DRV_MODULE_NAME		"tg3"
 #define PFX DRV_MODULE_NAME	": "
-#define DRV_MODULE_VERSION	"1.8"
-#define DRV_MODULE_RELDATE	"August 1, 2003"
+#define DRV_MODULE_VERSION	"1.9"
+#define DRV_MODULE_RELDATE	"August 3, 2003"
 
 #define TG3_DEF_MAC_MODE	0
 #define TG3_DEF_RX_MODE		0
@@ -2186,7 +2186,6 @@
 	spin_unlock_irqrestore(&tp->lock, flags);
 }
 
-static void tg3_init_rings(struct tg3 *);
 static int tg3_init_hw(struct tg3 *);
 static int tg3_halt(struct tg3 *);
 
@@ -2204,7 +2203,6 @@
 	tp->tg3_flags2 &= ~TG3_FLG2_RESTART_TIMER;
 
 	tg3_halt(tp);
-	tg3_init_rings(tp);
 	tg3_init_hw(tp);
 
 	spin_unlock(&tp->tx_lock);
@@ -2680,7 +2678,6 @@
 
 	tg3_set_mtu(dev, tp, new_mtu);
 
-	tg3_init_rings(tp);
 	tg3_init_hw(tp);
 
 	spin_unlock(&tp->tx_lock);
@@ -2766,8 +2763,8 @@
  *
  * The chip has been shut down and the driver detached from
  * the networking, so no interrupts or new tx packets will
- * end up in the driver.  tp->{tx,}lock is not held and we are not
- * in an interrupt context and thus may sleep.
+ * end up in the driver.  tp->{tx,}lock are held and thus
+ * we may not sleep.
  */
 static void tg3_init_rings(struct tg3 *tp)
 {
@@ -3946,6 +3943,13 @@
 		tw32(TG3PCI_PCISTATE, val);
 	}
 
+	/* Descriptor ring init may make accesses to the
+	 * NIC SRAM area to setup the TX descriptors, so we
+	 * can only do this after the hardware has been
+	 * successfully reset.
+	 */
+	tg3_init_rings(tp);
+
 	/* Clear statistics/status block in chip, and status block in ram. */
 	for (i = NIC_SRAM_STATS_BLK;
 	     i < NIC_SRAM_STATUS_BLK + TG3_HW_STATUS_SIZE;
@@ -4505,8 +4509,6 @@
 	spin_lock_irq(&tp->lock);
 	spin_lock(&tp->tx_lock);
 
-	tg3_init_rings(tp);
-
 	err = tg3_init_hw(tp);
 	if (err) {
 		tg3_halt(tp);
@@ -5318,7 +5320,6 @@
 		tp->tx_pending = ering.tx_pending;
 
 		tg3_halt(tp);
-		tg3_init_rings(tp);
 		tg3_init_hw(tp);
 		netif_wake_queue(tp->dev);
 		spin_unlock(&tp->tx_lock);
@@ -5362,7 +5363,6 @@
 		else
 			tp->tg3_flags &= ~TG3_FLAG_PAUSE_TX;
 		tg3_halt(tp);
-		tg3_init_rings(tp);
 		tg3_init_hw(tp);
 		spin_unlock(&tp->tx_lock);
 		spin_unlock_irq(&tp->lock);
@@ -6963,7 +6963,6 @@
 		spin_lock_irq(&tp->lock);
 		spin_lock(&tp->tx_lock);
 
-		tg3_init_rings(tp);
 		tg3_init_hw(tp);
 
 		spin_unlock(&tp->tx_lock);
@@ -6994,7 +6993,6 @@
 	spin_lock_irq(&tp->lock);
 	spin_lock(&tp->tx_lock);
 
-	tg3_init_rings(tp);
 	tg3_init_hw(tp);
 	tg3_enable_ints(tp);
 



Reply to: