summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2000-08-29 19:00:37 +0000
committerJason Wright <jason@cvs.openbsd.org>2000-08-29 19:00:37 +0000
commitba23dd44acc382a9f09e20743d14299e3583246c (patch)
treebdd017c622ae17c8bbca82472c819555e8ae679e
parent8317616cf910c380ceab3e5cc7b65630423737ef (diff)
openbsdisms
-rw-r--r--sys/dev/mii/brgphy.c5
-rw-r--r--sys/dev/mii/xmphy.c7
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:
/*