diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2000-08-29 19:00:37 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2000-08-29 19:00:37 +0000 |
commit | ba23dd44acc382a9f09e20743d14299e3583246c (patch) | |
tree | bdd017c622ae17c8bbca82472c819555e8ae679e | |
parent | 8317616cf910c380ceab3e5cc7b65630423737ef (diff) |
openbsdisms
-rw-r--r-- | sys/dev/mii/brgphy.c | 5 | ||||
-rw-r--r-- | sys/dev/mii/xmphy.c | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/sys/dev/mii/brgphy.c b/sys/dev/mii/brgphy.c index c7c31a96958..956450b5822 100644 --- a/sys/dev/mii/brgphy.c +++ b/sys/dev/mii/brgphy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: brgphy.c,v 1.1 2000/08/28 05:22:25 jason Exp $ */ +/* $OpenBSD: brgphy.c,v 1.2 2000/08/29 19:00:36 jason Exp $ */ /* * Copyright (c) 2000 @@ -127,6 +127,9 @@ brgphy_service(sc, mii, cmd) struct ifmedia_entry *ife = mii->mii_media.ifm_cur; int reg; + if ((sc->mii_dev.dv_flags & DVF_ACTIVE) == 0) + return (ENXIO); + switch (cmd) { case MII_POLLSTAT: /* diff --git a/sys/dev/mii/xmphy.c b/sys/dev/mii/xmphy.c index 264dd48956c..e71e5cff455 100644 --- a/sys/dev/mii/xmphy.c +++ b/sys/dev/mii/xmphy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xmphy.c,v 1.1 2000/08/28 13:40:23 jason Exp $ */ +/* $OpenBSD: xmphy.c,v 1.2 2000/08/29 19:00:36 jason Exp $ */ /* * Copyright (c) 2000 @@ -104,7 +104,7 @@ xmphy_attach(parent, self, aux) sc->mii_service = xmphy_service; sc->mii_status = xmphy_status; sc->mii_pdata = mii; - sc->mii_flags |= MIIF_NOISOLATE; + sc->mii_flags |= MIIF_NOISOLATE | mii->mii_flags; #define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL) @@ -130,6 +130,9 @@ xmphy_service(sc, mii, cmd) struct ifmedia_entry *ife = mii->mii_media.ifm_cur; int reg; + if ((sc->mii_dev.dv_flags & DVF_ACTIVE) == 0) + return (ENXIO); + switch (cmd) { case MII_POLLSTAT: /* |