heads up - ar71xx changes

Patrick Kelsey kelsey at ieee.org
Fri May 4 15:31:49 UTC 2012


On Wed, May 2, 2012 at 5:37 PM, Adrian Chadd <adrian at freebsd.org> wrote:

> Hi,
>
> there's been a few ar71xx changes in the last few days. I'd appreciate
> it if it got decent testing.
>

Hi Adrian,

I've finally gotten back to doing a bit of testing with an RB450G (AR71XX +
AR8316), and I found that I needed to use the following diff to get arg1 to
initialize properly on that platform:

Index: sys/mips/atheros/if_arge.c
===================================================================
--- sys/mips/atheros/if_arge.c    (revision 234999)
+++ sys/mips/atheros/if_arge.c    (working copy)
@@ -600,7 +605,8 @@
                 &sc->arge_miibus, sc->arge_ifp,
                 arge_ifmedia_upd, arge_ifmedia_sts,
                 BMSR_DEFCAPMASK, i, MII_OFFSET_ANY, 0);
-            if (error != 0) {
+            if ((error != 0) &&
+                (sc->arge_miibus != NULL)) {
                 device_printf(sc->arge_dev, "unable to attach"
                     " PHY %d: %d\n", i, error);
                 goto fail;


Without the above diff, things wind up at goto fail on arge1 (which has no
miibus and a phymask of 0xf) instead of in the multiphy logic that follows.

-Patrick


More information about the freebsd-mips mailing list