Ganbold,

On Wed, Aug 30, 2006 at 12:23:20PM +0900, Ganbold wrote:
G> Thanks a lot for your patch. Your patch fixes panic, however I still see
G> bge0: firmware handshake timed out
G> bge0: link state changed to DOWN
G> messages.

And yesterday delphij@ have sent me patch against "firmware handshake timed 
out".
It is attached. Can you please test it?

-- 
Totus tuus, Glebius.
GLEBIUS-RIPN GLEB-RIPE
--- Begin Message ---
Hi,

A colleague of mine has found that BCM 5752 A02 would get "firmware
handshake timeout" problem during the ifconfig stage.  After some
investigation and comparing to the Linux driver I have the attached
patch make the problem disappear.  Unfortunately I do not have
specification documentation from Broadcom so I can not say if that is a
"real fix" :-(

The patch was tested on Dell Latitude D820.  The only problem remains is
that the -CURRENT kernel crashes if I did not explicitly set the media
and do a "ifconfig bge0 up", with "panic: invalid ife->ifm_data (0xa) in
mii_phy_setmedia".  Backtrace is available upon request.

Cheers,
-- 
Xin LI <[EMAIL PROTECTED]>      http://www.delphij.net/
FreeBSD - The Power to Serve!
Index: if_bge.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/bge/if_bge.c,v
retrieving revision 1.140
diff -u -r1.140 if_bge.c
--- if_bge.c    24 Aug 2006 14:41:16 -0000      1.140
+++ if_bge.c    29 Aug 2006 06:20:44 -0000
@@ -2313,6 +2313,13 @@
            BGE_PCIMISCCTL_INDIRECT_ACCESS|BGE_PCIMISCCTL_MASK_PCI_INTR|
        BGE_HIF_SWAP_OPTIONS|BGE_PCIMISCCTL_PCISTATE_RW, 4);
 
+       /* XXX: Broadcom Linux driver. */
+       if (sc->bge_asicrev == BGE_ASICREV_BCM5752 ||
+           sc->bge_asicrev == BGE_ASICREV_BCM5755 ||
+           sc->bge_asicrev == BGE_ASICREV_BCM5787) {
+               CSR_WRITE_4(sc, BGE_FASTBOOT_PC, 0x0);
+       }
+
        reset = BGE_MISCCFG_RESET_CORE_CLOCKS|(65<<1);
 
        /* XXX: Broadcom Linux driver. */
Index: if_bgereg.h
===================================================================
RCS file: /home/ncvs/src/sys/dev/bge/if_bgereg.h,v
retrieving revision 1.52
diff -u -r1.52 if_bgereg.h
--- if_bgereg.h 23 Aug 2006 11:32:54 -0000      1.52
+++ if_bgereg.h 29 Aug 2006 06:32:31 -0000
@@ -1656,6 +1656,7 @@
 #define BGE_EE_CTL                     0x6840
 #define BGE_MDI_CTL                    0x6844
 #define BGE_EE_DELAY                   0x6848
+#define BGE_FASTBOOT_PC                        0x6894
 
 /* Mode control register */
 #define BGE_MODECTL_INT_SNDCOAL_ONLY   0x00000001

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---
_______________________________________________
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to