Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Aug 2006 11:59:08 -0700
From:      "David Christensen" <davidch@broadcom.com>
To:        "LI Xin" <delphij@delphij.net>, freebsd-current@freebsd.org
Subject:   RE: bge(4) on BCM 5752 A02 panic due to media autoselect
Message-ID:  <09BFF2FA5EAB4A45B6655E151BBDD90301E2F1CF@NT-IRVA-0750.brcm.ad.broadcom.com>
In-Reply-To: <44F5C5A9.30605@delphij.net>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.

------_=_NextPart_001_01C6CC66.600813B8
Content-Type: text/plain;
 charset=us-ascii
Content-Transfer-Encoding: quoted-printable

> Recently one of my colleagues found that BCM 5752 A02 on Dell Latitude
> D820 would get "panic: invalid ife->ifm_data (0xa) in=20
> mii_phy_setmedia".
>  After some investigation I have found that removing BCMR_ANEG from
> mii_capabilities in ukphy.c would work around the problem,=20
> and it turns
> out that without explicitly specifying media type, the code=20
> will finally
> get to pass the "intentionally invalid index" to mii_phy_setmedia and
> trigger an assertion fail.
>=20
> I have not tested the situation in -STABLE yet, but it was=20
> said to work
> there, though.  Is there anyone can shed some light to me about how to
> debug the issue?  Thanks in advance!
>=20
> PS. During the debugging I have found that the attached patch can make
> "bge0: firmware handshake timeout" issue disappear from the said chip.
> Because I do not have Broadcom specification at hand I would=20
> like to see
> if there is someone to give appropriate review for it.

Try the attached patch instead and let me know if it works.  When
FastBoot
is enabled on supported Broadcom controllers it allows the controller to
skip rereading firmware after a reset, allowing the driver to complete=20
its initialization more quickly.  The Linux driver specifically disables
FastBoot because it performs some read/write tests to controller memory,
potentially corrupting the firmware, so FastBoot is disabled to insure
an
error free firmware reload.  We don't do the same test so the same
change
isn't necessary.  The patch happens to work because the bge driver
doesn't
perform firmware synchronization correctly, and the firmware initializes
too fast for the driver.

Dave

------_=_NextPart_001_01C6CC66.600813B8
Content-Type: text/plain;
 name=fastboot_patch.txt
Content-Transfer-Encoding: base64
Content-Description: fastboot_patch.txt
Content-Disposition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ZnJvbSBydW5uaW5n
LgorICogVGhpcyBtYWdpYyBudW1iZXIgaXMgd3JpdHRlbiB0byB0aGUgZmlybXdhcmUgbWFpbGJv
eCBhdCAweGI1MAorICogYmVmb3JlIGEgc29mdHdhcmUgcmVzZXQgaXMgaXNzdWVkLiAgQWZ0ZXIg
dGhlIGludGVybmFsIGZpcm13YXJlCisgKiBoYXMgY29tcGxldGVkIGl0cyBpbml0aWFsaXphdGlv
biBpdCB3aWxsIHdyaXRlIHRoZSBvcHBvc2l0ZSBvZiAKKyAqIHRoaXMgdmFsdWUsIH5CR0VfTUFH
SUNfTlVNQkVSLCB0byB0aGUgc2FtZSBsb2NhdGlvbiwgYWxsb3dpbmcgdGhlCisgKiBkcml2ZXIg
dG8gc3luY2hyb25pemUgd2l0aCB0aGUgZmlybXdhcmUuCiAgKi8KICNkZWZpbmUgQkdFX01BR0lD
X05VTUJFUiAgICAgICAgICAgICAgICAweDRCNjU3NjU0CiAK

------_=_NextPart_001_01C6CC66.600813B8--




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