Skip to contentSkip to conversation

: Increase 5906 firmware poll time.

TG3 Applied Michael Chan 3 participants 4 messages Nov 14, 2006 – Nov 15, 2006

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

[TG3]: Increase 5906 firmware poll time.
From: Gary Zambrano <[email protected]>

Newer 5906 bootcode needs about 7ms to finish resetting so the poll firmware loop was changed to maximum 20ms.

drivers/net/tg3.c +3 -2
index 8f059b7..d4b211c 100644
@@ -4728,10 +4728,11 @@ static int tg3_poll_fw(struct tg3 *tp)
 	u32 val;
 
 	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) {
-		for (i = 0; i < 400; i++) {
+		/* Wait up to 20ms for init done. */
+		for (i = 0; i < 200; i++) {
 			if (tr32(VCPU_STATUS) & VCPU_STATUS_INIT_DONE)
 				return 0;
-			udelay(10);
+			udelay(100);
 		}
 		return -ENODEV;
 	}
#1 lore raw
Quoted 8 lines · Michael Chan

[TG3]: Increase 5906 firmware poll time.
From: Gary Zambrano <[email protected]>

Newer 5906 bootcode needs about 7ms to finish resetting so the poll firmware loop was changed to maximum 20ms.

ACK, of course, but this brings up something else: what's the status of moving chip reset outside of a spinlock?

Currently a reset during operation can trigger the CPU lockup detector and other doo-dads, because you can easily spend a second or two with a spinlock held (a loooooong time, to hold a spinlock)

Jeff

#2 lore raw
Quoted 8 lines · Jeff Garzik

ACK, of course, but this brings up something else: what's the status of moving chip reset outside of a spinlock?

Currently a reset during operation can trigger the CPU lockup detector and other doo-dads, because you can easily spend a second or two with a spinlock held (a loooooong time, to hold a spinlock)

Yeah, I will put this in my queue. I have done some of that in the PHY routines and will continue to do more, as those are even worse.

maintainer Applied
#3 lore raw

From: "Michael Chan" <[email protected]>
Date: Tue, 14 Nov 2006 16:05:50 -0800

Quoted 6 lines · Jeff Garzik
Quoted 5 lines

ACK, of course, but this brings up something else: what's the status of moving chip reset outside of a spinlock?

Quoted 7 lines
Quoted 4 lines

Currently a reset during operation can trigger the CPU lockup detector and other doo-dads, because you can easily spend a second or two with a spinlock held (a loooooong time, to hold a spinlock)

Yeah, I will put this in my queue. I have done some of that in the PHY routines and will continue to do more, as those are even worse.

Great.

I applied this patch, thanks everyone.