summaryrefslogtreecommitdiff
path: root/sys/dev/sbus
diff options
context:
space:
mode:
authormsaitoh <msaitoh@NetBSD.org>2013-06-09 09:15:51 +0000
committermsaitoh <msaitoh@NetBSD.org>2013-06-09 09:15:51 +0000
commitbb7eb98ca117b1e11bc9803ed1cf1fde5f049a55 (patch)
treec18e17b1554b8ce7dcc9b4ad2160d55905412ef8 /sys/dev/sbus
parentdb1c5629120e8bb85fa177373e1cf938f65de79a (diff)
Don't "return" but "break" in MII_TICK when the interface isn't doing
autonegotiaton or the link is up to update the status.
Diffstat (limited to 'sys/dev/sbus')
-rw-r--r--sys/dev/sbus/be.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/sbus/be.c b/sys/dev/sbus/be.c
index d680558fce6..eea6fa26d14 100644
--- a/sys/dev/sbus/be.c
+++ b/sys/dev/sbus/be.c
@@ -1,4 +1,4 @@
-/* $NetBSD: be.c,v 1.79 2012/07/22 14:33:05 matt Exp $ */
+/* $NetBSD: be.c,v 1.80 2013/06/09 09:23:35 msaitoh Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: be.c,v 1.79 2012/07/22 14:33:05 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: be.c,v 1.80 2013/06/09 09:23:35 msaitoh Exp $");
#include "opt_ddb.h"
#include "opt_inet.h"
@@ -1516,14 +1516,14 @@ be_intphy_service(struct be_softc *sc, struct mii_data *mii, int cmd)
if (IFM_INST(ife->ifm_media) != sc->sc_mii_inst)
return 0;
- /* Only used for automatic media selection */
- if (IFM_SUBTYPE(ife->ifm_media) != IFM_AUTO)
- return 0;
-
/* Is the interface even up? */
if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
return 0;
+ /* Only used for automatic media selection */
+ if (IFM_SUBTYPE(ife->ifm_media) != IFM_AUTO)
+ break;
+
/*
* Check link status; if we don't have a link, try another
* speed. We can't detect duplex mode, so half-duplex is
@@ -1555,7 +1555,7 @@ be_intphy_service(struct be_softc *sc, struct mii_data *mii, int cmd)
device_xname(self),
(bmcr & BMCR_S100) ? "100" : "10");
}
- return 0;
+ break;
}
if ((sc->sc_mii_flags & MIIF_DOINGAUTO) == 0) {