Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Dec 2006 16:00:39 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Jung-uk Kim <jkim@freebsd.org>
Cc:        cvs-src@freebsd.org, src-committers@freebsd.org, Scott Long <scottl@freebsd.org>, cvs-all@freebsd.org
Subject:   Re: cvs commit: src/sys/dev/bge if_bge.c
Message-ID:  <20061214152805.D2109@besplex.bde.org>
In-Reply-To: <200612131846.33252.jkim@FreeBSD.org>
References:  <200612132051.kBDKppS4058663@repoman.freebsd.org> <200612131846.33252.jkim@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 13 Dec 2006, Jung-uk Kim wrote:

> On Wednesday 13 December 2006 03:51 pm, Scott Long wrote:
>> scottl      2006-12-13 20:51:51 UTC
>>
>>   FreeBSD src repository
>>
>>   Modified files:
>>     sys/dev/bge          if_bge.c
>>   Log:
>>   Remove a redundant write of the firmware reset magic number.  It
>> ...
> I am still getting firmware handshake timeouts and/or watchdog
> timeouts.  Most importantly it panics or get witness warnings (lots
> of 'memory modified after free').  Panic goes like this (while
> kldunload if_bge with dhclient enabled):
>
> brgphy0: detached
> miibus0: detached
> bge0: firmware handshake timed out, found 0x4b657654
> bge0: firmware handshake timed out, found 0x4b657654

I have seen these for debugging the redundant-write problem (not for
detach but for bringing up the interface for the first time).  My 5701
just hangs if there is any redundant write (2 where the first one was
in bge_reset(), or 2 separate, or 2 where the second one was).  My
5705 survives two separate sets of 256 repeated writes; however, then
the firmware handshake times out; however2, everything works normally
after ignoring the the timeout except for printing the message.  I
just noticed that this error wasn't ignored until recently -- I noticed
the return statement being removed but not that it was in a critical
area.

I also tested waiting for the handshake immediately after the write
in some cases (only for 2 separate writes on the 5701).  This didn't
help.  I didn't check exactly where the hang occurred or if some of
the handshakes completed successfully.

Throughout this, bge_reset()s done before reaching single mode all
completed successfully.  There were 2 per boot.  The first 2 seem
to do just enough initialization to make the link flap.

I just noticed that the code is much clearer and less surprising in old
versions.  In rev.1.84, there is only 1 write and it is immediately
followed by the handshake loop.  Now there is a lot of code in between.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061214152805.D2109>