netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [TG3]: Increase 5906 firmware poll time.
@ 2006-11-14 22:42 Michael Chan
  2006-11-14 23:05 ` Jeff Garzik
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Chan @ 2006-11-14 22:42 UTC (permalink / raw)
  To: davem; +Cc: zambrano, netdev

[TG3]: Increase 5906 firmware poll time.
From: Gary Zambrano <zambrano@broadcom.com>

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

Signed-off-by: Gary Zambrano <zambrano@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>

diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 8f059b7..d4b211c 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -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;
 	}



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [TG3]: Increase 5906 firmware poll time.
  2006-11-14 22:42 [TG3]: Increase 5906 firmware poll time Michael Chan
@ 2006-11-14 23:05 ` Jeff Garzik
  2006-11-15  0:05   ` Michael Chan
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Garzik @ 2006-11-14 23:05 UTC (permalink / raw)
  To: Michael Chan; +Cc: davem, zambrano, netdev

Michael Chan wrote:
> [TG3]: Increase 5906 firmware poll time.
> From: Gary Zambrano <zambrano@broadcom.com>
> 
> Newer 5906 bootcode needs about 7ms to finish resetting so the poll
> firmware loop was changed to maximum 20ms.
> 
> Signed-off-by: Gary Zambrano <zambrano@broadcom.com>
> Signed-off-by: Michael Chan <mchan@broadcom.com>

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [TG3]: Increase 5906 firmware poll time.
  2006-11-14 23:05 ` Jeff Garzik
@ 2006-11-15  0:05   ` Michael Chan
  2006-11-15  0:34     ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Chan @ 2006-11-15  0:05 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: davem, zambrano, netdev

On Tue, 2006-11-14 at 18:05 -0500, Jeff Garzik wrote:

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [TG3]: Increase 5906 firmware poll time.
  2006-11-15  0:05   ` Michael Chan
@ 2006-11-15  0:34     ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2006-11-15  0:34 UTC (permalink / raw)
  To: mchan; +Cc: jeff, zambrano, netdev

From: "Michael Chan" <mchan@broadcom.com>
Date: Tue, 14 Nov 2006 16:05:50 -0800

> On Tue, 2006-11-14 at 18:05 -0500, Jeff Garzik wrote:
> 
> > 
> > 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.

Great.

I applied this patch, thanks everyone.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-11-15  0:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-14 22:42 [TG3]: Increase 5906 firmware poll time Michael Chan
2006-11-14 23:05 ` Jeff Garzik
2006-11-15  0:05   ` Michael Chan
2006-11-15  0:34     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).