panic: invalid ife->ifm_data (0xa) in mii_phy_setmedia

Ganbold ganbold at micom.mng.net
Wed Aug 30 08:22:49 UTC 2006


Gleb, Pyun,

Gleb Smirnoff wrote:
>   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?
>   

Applied delphij@'s patch and now "bge0: firmware handshake timed out" 
message is gone. Previously there was applied Pyun's brgphy(4) patch.

Ganbold

>   
>
> ------------------------------------------------------------------------
>
> Subject:
> [PATCH FOR REVIEW] Broadcom BCM 5752 A02 "firmware handshake timeout"
> From:
> LI Xin <delphij at delphij.net>
> Date:
> Tue, 29 Aug 2006 14:39:31 +0800
> To:
> oleg at FreeBSD.org, glebius at FreeBSD.org
>
> To:
> oleg at FreeBSD.org, glebius at FreeBSD.org
>
>
> 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,
>   
> ------------------------------------------------------------------------
>
> 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
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> freebsd-stable at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org"



More information about the freebsd-stable mailing list