Date: Mon, 9 Feb 2009 10:27:35 -0800 From: "Zhang, Helen" <helen.zhang@bluecoat.com> To: <freebsd-net@freebsd.org> Subject: Anyone working on the FreeBSD driver for broadcom 5784M Gige chip? Message-ID: <9CFA8139F7106843B28F9E6FB1FF4BBE0D0117@bcs-mail04.internal.cacheflow.com>
next in thread | raw e-mail | index | archive | help
Hi, there:
I'm new to FreeBSD community and this is my first email to the mailing
group.
Recently I'm working on Broadcom 5784M Gige driver. My code base is
close to FreeBSD,
but FreeBSD bge driver doesn't support the chip yet. The linux driver
supports the chip.
I'm wondering whether anyone is working or plans to work on to port the
linux code to
FreeBSD base. If so, I hope we can share some information together.
Thanks.
Another thing, I found one dead loop in current src/sys/dev/bge/if_bge.c
(both 216/217
revisions): around line 2682, if mii_phy_probe( ) fails, the code will
go back to again (4 lines
back). Variable trys will reset to 0 every time, so the (trys++<4)
condition is forever false.
I don't know how to report the bug to freebsd Community yet. So I just
attach the related
code below. The fix is simple: just move "trys=0" line before again:
Thanks and best wishes to everyone!
-Helen
===========
src/sys/dev/bge/if_bge.c: around line 2676
BGE_CLRBIT(sc, BGE_MODE_CTL, BGE_MODECTL_STACKUP);
again:
bge_asf_driver_up(sc);
trys = 0;
if (mii_phy_probe(dev, &sc->bge_miibus, <<<<<< line
2682
bge_ifmedia_upd, bge_ifmedia_sts)) {
if (trys++ < 4) {
device_printf(sc->bge_dev, "Try
again\n");
bge_miibus_writereg(sc->bge_dev, 1,
MII_BMCR,
BMCR_RESET);
goto again;
}
device_printf(sc->bge_dev, "MII without any
PHY!\n");
error = ENXIO;
goto fail;
}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9CFA8139F7106843B28F9E6FB1FF4BBE0D0117>
