summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2005-01-28 18:27:56 +0000
committerBrad Smith <brad@cvs.openbsd.org>2005-01-28 18:27:56 +0000
commit5ca8741541835fac1f183eecad5bdb7e8b6aa166 (patch)
treece32cc4bff59db745207b1fb0166f5f3f4f6da3d /sys
parented395be04ed325e1c638a0a6ce8120ea072595b7 (diff)
Get flags passed down to PHY drivers correctly. This was done on
an adhoc basis in a couple of PHY drivers, this fixes it more generally. From NetBSD Fixes panics with aue(4) NICs.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/mii/amphy.c4
-rw-r--r--sys/dev/mii/bmtphy.c4
-rw-r--r--sys/dev/mii/ciphy.c6
-rw-r--r--sys/dev/mii/dcphy.c5
-rw-r--r--sys/dev/mii/eephy.c4
-rw-r--r--sys/dev/mii/exphy.c7
-rw-r--r--sys/dev/mii/icsphy.c4
-rw-r--r--sys/dev/mii/inphy.c4
-rw-r--r--sys/dev/mii/iophy.c4
-rw-r--r--sys/dev/mii/lxtphy.c4
-rw-r--r--sys/dev/mii/mii.c4
-rw-r--r--sys/dev/mii/mtdphy.c4
-rw-r--r--sys/dev/mii/nsgphy.c4
-rw-r--r--sys/dev/mii/nsphy.c4
-rw-r--r--sys/dev/mii/nsphyter.c4
-rw-r--r--sys/dev/mii/qsphy.c4
-rw-r--r--sys/dev/mii/rgephy.c6
-rw-r--r--sys/dev/mii/rlphy.c4
-rw-r--r--sys/dev/mii/sqphy.c4
-rw-r--r--sys/dev/mii/tlphy.c4
-rw-r--r--sys/dev/mii/tqphy.c4
-rw-r--r--sys/dev/mii/txphy.c4
-rw-r--r--sys/dev/mii/ukphy.c4
-rw-r--r--sys/dev/mii/urlphy.c4
-rw-r--r--sys/dev/mii/xmphy.c6
25 files changed, 59 insertions, 51 deletions
diff --git a/sys/dev/mii/amphy.c b/sys/dev/mii/amphy.c
index 0d9170355f6..f4ab4555723 100644
--- a/sys/dev/mii/amphy.c
+++ b/sys/dev/mii/amphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: amphy.c,v 1.9 2004/10/04 13:02:33 deraadt Exp $ */
+/* $OpenBSD: amphy.c,v 1.10 2005/01/28 18:27:55 brad Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -118,7 +118,7 @@ amphyattach(struct device *parent, struct device *self, void *aux)
sc->mii_phy = ma->mii_phyno;
sc->mii_funcs = &amphy_funcs;
sc->mii_pdata = mii;
- sc->mii_flags = mii->mii_flags;
+ sc->mii_flags = ma->mii_flags;
sc->mii_flags |= MIIF_NOISOLATE;
diff --git a/sys/dev/mii/bmtphy.c b/sys/dev/mii/bmtphy.c
index 54b46e26524..e22621768aa 100644
--- a/sys/dev/mii/bmtphy.c
+++ b/sys/dev/mii/bmtphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bmtphy.c,v 1.10 2005/01/24 01:58:02 brad Exp $ */
+/* $OpenBSD: bmtphy.c,v 1.11 2005/01/28 18:27:55 brad Exp $ */
/* $NetBSD: nsphy.c,v 1.25 2000/02/02 23:34:57 thorpej Exp $ */
/*-
@@ -116,7 +116,7 @@ bmtphyattach(struct device *parent, struct device *self, void *aux)
sc->mii_phy = ma->mii_phyno;
sc->mii_funcs = &bmtphy_funcs;
sc->mii_pdata = mii;
- sc->mii_flags = mii->mii_flags;
+ sc->mii_flags = ma->mii_flags;
sc->mii_anegticks = 5;
PHY_RESET(sc);
diff --git a/sys/dev/mii/ciphy.c b/sys/dev/mii/ciphy.c
index b30f5b0fedf..60e7a0c7f0e 100644
--- a/sys/dev/mii/ciphy.c
+++ b/sys/dev/mii/ciphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ciphy.c,v 1.1 2004/12/01 00:24:38 pvalchev Exp $ */
+/* $OpenBSD: ciphy.c,v 1.2 2005/01/28 18:27:55 brad Exp $ */
/* $FreeBSD: ciphy.c,v 1.1 2004/09/10 20:57:45 wpaul Exp $ */
/*
* Copyright (c) 2004
@@ -140,10 +140,12 @@ ciphyattach(struct device *parent, struct device *self, void *aux)
sc->mii_model = MII_MODEL(ma->mii_id2);
sc->mii_rev = MII_REV(ma->mii_id2);
sc->mii_pdata = mii;
- sc->mii_flags = mii->mii_flags | MIIF_NOISOLATE;
+ sc->mii_flags = ma->mii_flags;
sc->mii_ticks = 0; /* XXX */
sc->mii_anegticks = 5;
+ sc->mii_flags |= MIIF_NOISOLATE;
+
PHY_RESET(sc);
sc->mii_capabilities =
diff --git a/sys/dev/mii/dcphy.c b/sys/dev/mii/dcphy.c
index 6bdf017a2a6..c311be884eb 100644
--- a/sys/dev/mii/dcphy.c
+++ b/sys/dev/mii/dcphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dcphy.c,v 1.12 2004/12/25 03:51:24 brad Exp $ */
+/* $OpenBSD: dcphy.c,v 1.13 2005/01/28 18:27:55 brad Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -135,9 +135,10 @@ dcphy_attach(struct device *parent, struct device *self, void *aux)
sc->mii_phy = ma->mii_phyno;
sc->mii_funcs = &dcphy_funcs;
sc->mii_pdata = mii;
- sc->mii_flags = mii->mii_flags;
+ sc->mii_flags = ma->mii_flags;
sc->mii_flags |= MIIF_NOISOLATE;
+
mii->mii_instance++;
dc_sc = mii->mii_ifp->if_softc;
diff --git a/sys/dev/mii/eephy.c b/sys/dev/mii/eephy.c
index e654911b7ed..b5d0222bd3f 100644
--- a/sys/dev/mii/eephy.c
+++ b/sys/dev/mii/eephy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: eephy.c,v 1.13 2004/12/29 01:30:45 brad Exp $ */
+/* $OpenBSD: eephy.c,v 1.14 2005/01/28 18:27:55 brad Exp $ */
/*
* Principal Author: Parag Patel
* Copyright (c) 2001
@@ -117,7 +117,7 @@ eephyattach(struct device *parent, struct device *self, void *aux)
sc->mii_phy = ma->mii_phyno;
sc->mii_funcs = &eephy_funcs;
sc->mii_pdata = mii;
- sc->mii_flags = mii->mii_flags;
+ sc->mii_flags = ma->mii_flags;
sc->mii_anegticks = 10;
if (MII_OUI(ma->mii_id1, ma->mii_id2) == MII_OUI_MARVELL &&
diff --git a/sys/dev/mii/exphy.c b/sys/dev/mii/exphy.c
index 541c5b17892..c641b207b65 100644
--- a/sys/dev/mii/exphy.c
+++ b/sys/dev/mii/exphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exphy.c,v 1.16 2004/09/28 01:13:32 brad Exp $ */
+/* $OpenBSD: exphy.c,v 1.17 2005/01/28 18:27:55 brad Exp $ */
/* $NetBSD: exphy.c,v 1.23 2000/02/02 23:34:56 thorpej Exp $ */
/*-
@@ -154,7 +154,9 @@ exphyattach(struct device *parent, struct device *self, void *aux)
sc->mii_phy = ma->mii_phyno;
sc->mii_funcs = &exphy_funcs;
sc->mii_pdata = mii;
- sc->mii_flags = mii->mii_flags;
+ sc->mii_flags = ma->mii_flags;
+
+ sc->mii_flags |= MIIF_NOISOLATE;
/*
* The 3Com PHY can never be isolated, so never allow non-zero
@@ -165,7 +167,6 @@ exphyattach(struct device *parent, struct device *self, void *aux)
sc->mii_dev.dv_xname);
return;
}
- sc->mii_flags |= MIIF_NOISOLATE;
PHY_RESET(sc);
diff --git a/sys/dev/mii/icsphy.c b/sys/dev/mii/icsphy.c
index 868c4a0e3e5..be6f994e3d7 100644
--- a/sys/dev/mii/icsphy.c
+++ b/sys/dev/mii/icsphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: icsphy.c,v 1.14 2004/09/27 18:25:48 brad Exp $ */
+/* $OpenBSD: icsphy.c,v 1.15 2005/01/28 18:27:55 brad Exp $ */
/* $NetBSD: icsphy.c,v 1.17 2000/02/02 23:34:56 thorpej Exp $ */
/*-
@@ -155,7 +155,7 @@ icsphyattach(struct device *parent, struct device *self, void *aux)
sc->mii_phy = ma->mii_phyno;
sc->mii_funcs = &icsphy_funcs;
sc->mii_pdata = mii;
- sc->mii_flags = mii->mii_flags;
+ sc->mii_flags = ma->mii_flags;
PHY_RESET(sc);
diff --git a/sys/dev/mii/inphy.c b/sys/dev/mii/inphy.c
index 4261a0e1dd9..4d5740f7708 100644
--- a/sys/dev/mii/inphy.c
+++ b/sys/dev/mii/inphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inphy.c,v 1.10 2004/09/26 00:59:58 brad Exp $ */
+/* $OpenBSD: inphy.c,v 1.11 2005/01/28 18:27:55 brad Exp $ */
/* $NetBSD: inphy.c,v 1.18 2000/02/02 23:34:56 thorpej Exp $ */
/*-
@@ -157,7 +157,7 @@ inphyattach(parent, self, aux)
sc->mii_phy = ma->mii_phyno;
sc->mii_funcs = &inphy_funcs;
sc->mii_pdata = mii;
- sc->mii_flags = mii->mii_flags;
+ sc->mii_flags = ma->mii_flags;
PHY_RESET(sc);
diff --git a/sys/dev/mii/iophy.c b/sys/dev/mii/iophy.c
index ab553e7079a..e2da3e23df8 100644
--- a/sys/dev/mii/iophy.c
+++ b/sys/dev/mii/iophy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iophy.c,v 1.9 2004/09/26 00:59:58 brad Exp $ */
+/* $OpenBSD: iophy.c,v 1.10 2005/01/28 18:27:55 brad Exp $ */
/* $NetBSD: iophy.c,v 1.8 2000/02/02 23:34:56 thorpej Exp $ */
/*
@@ -140,7 +140,7 @@ iophyattach(parent, self, aux)
sc->mii_phy = ma->mii_phyno;
sc->mii_funcs = &iophy_funcs;
sc->mii_pdata = mii;
- sc->mii_flags = mii->mii_flags;
+ sc->mii_flags = ma->mii_flags;
PHY_RESET(sc);
diff --git a/sys/dev/mii/lxtphy.c b/sys/dev/mii/lxtphy.c
index a3afb5fb6a3..8c9906ecaea 100644
--- a/sys/dev/mii/lxtphy.c
+++ b/sys/dev/mii/lxtphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lxtphy.c,v 1.11 2004/09/26 00:59:58 brad Exp $ */
+/* $OpenBSD: lxtphy.c,v 1.12 2005/01/28 18:27:55 brad Exp $ */
/* $NetBSD: lxtphy.c,v 1.19 2000/02/02 23:34:57 thorpej Exp $ */
/*-
@@ -156,7 +156,7 @@ lxtphyattach(parent, self, aux)
sc->mii_inst = mii->mii_instance;
sc->mii_phy = ma->mii_phyno;
sc->mii_pdata = mii;
- sc->mii_flags = mii->mii_flags;
+ sc->mii_flags = ma->mii_flags;
PHY_RESET(sc);
diff --git a/sys/dev/mii/mii.c b/sys/dev/mii/mii.c
index d7dc8920b58..97b80de859a 100644
--- a/sys/dev/mii/mii.c
+++ b/sys/dev/mii/mii.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mii.c,v 1.14 2004/09/27 18:25:48 brad Exp $ */
+/* $OpenBSD: mii.c,v 1.15 2005/01/28 18:27:55 brad Exp $ */
/* $NetBSD: mii.c,v 1.19 2000/02/02 17:09:44 thorpej Exp $ */
/*-
@@ -139,7 +139,7 @@ mii_attach(struct device *parent, struct mii_data *mii, int capmask,
ma.mii_data = mii;
ma.mii_capmask = capmask;
- ma.mii_flags = flags;
+ ma.mii_flags = flags | (mii->mii_flags & MIIF_INHERIT_MASK);
if ((child = (struct mii_softc *)config_found_sm(parent, &ma,
mii_print, mii_submatch)) != NULL) {
diff --git a/sys/dev/mii/mtdphy.c b/sys/dev/mii/mtdphy.c
index c4b9a9bb05f..dbcdfe8db99 100644
--- a/sys/dev/mii/mtdphy.c
+++ b/sys/dev/mii/mtdphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mtdphy.c,v 1.10 2004/09/27 18:25:48 brad Exp $ */
+/* $OpenBSD: mtdphy.c,v 1.11 2005/01/28 18:27:55 brad Exp $ */
/*
* Copyright (c) 1998, 1999 Jason L. Wright (jason@thought.net)
@@ -88,7 +88,7 @@ mtdphyattach(struct device *parent, struct device *self, void *aux)
sc->mii_phy = ma->mii_phyno;
sc->mii_funcs = &mtdphy_funcs;
sc->mii_pdata = mii;
- sc->mii_flags = mii->mii_flags;
+ sc->mii_flags = ma->mii_flags;
PHY_RESET(sc);
diff --git a/sys/dev/mii/nsgphy.c b/sys/dev/mii/nsgphy.c
index bb42ba66495..8707b97a7b9 100644
--- a/sys/dev/mii/nsgphy.c
+++ b/sys/dev/mii/nsgphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nsgphy.c,v 1.12 2004/09/27 18:25:48 brad Exp $ */
+/* $OpenBSD: nsgphy.c,v 1.13 2005/01/28 18:27:55 brad Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
* Copyright (c) 2001
@@ -120,7 +120,7 @@ nsgphyattach(struct device *parent, struct device *self, void *aux)
sc->mii_phy = ma->mii_phyno;
sc->mii_funcs = &nsgphy_funcs;
sc->mii_pdata = mii;
- sc->mii_flags = mii->mii_flags;
+ sc->mii_flags = ma->mii_flags;
sc->mii_anegticks = 10;
PHY_RESET(sc);
diff --git a/sys/dev/mii/nsphy.c b/sys/dev/mii/nsphy.c
index 466f3b26461..73dc68e1f30 100644
--- a/sys/dev/mii/nsphy.c
+++ b/sys/dev/mii/nsphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nsphy.c,v 1.16 2004/09/27 18:25:48 brad Exp $ */
+/* $OpenBSD: nsphy.c,v 1.17 2005/01/28 18:27:55 brad Exp $ */
/* $NetBSD: nsphy.c,v 1.25 2000/02/02 23:34:57 thorpej Exp $ */
/*-
@@ -134,7 +134,7 @@ nsphyattach(struct device *parent, struct device *self, void *aux)
sc->mii_phy = ma->mii_phyno;
sc->mii_funcs = &nsphy_funcs;
sc->mii_pdata = mii;
- sc->mii_flags = mii->mii_flags;
+ sc->mii_flags = ma->mii_flags;
sc->mii_anegticks = 5;
PHY_RESET(sc);
diff --git a/sys/dev/mii/nsphyter.c b/sys/dev/mii/nsphyter.c
index b6b52aa643f..e5cab70a76b 100644
--- a/sys/dev/mii/nsphyter.c
+++ b/sys/dev/mii/nsphyter.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nsphyter.c,v 1.8 2004/09/27 18:25:48 brad Exp $ */
+/* $OpenBSD: nsphyter.c,v 1.9 2005/01/28 18:27:55 brad Exp $ */
/* $NetBSD: nsphyter.c,v 1.5 2000/02/02 23:34:57 thorpej Exp $ */
/*-
@@ -140,7 +140,7 @@ nsphyterattach(struct device *parent, struct device *self, void *aux)
sc->mii_phy = ma->mii_phyno;
sc->mii_funcs = &nsphyter_funcs;
sc->mii_pdata = mii;
- sc->mii_flags = mii->mii_flags;
+ sc->mii_flags = ma->mii_flags;
PHY_RESET(sc);
diff --git a/sys/dev/mii/qsphy.c b/sys/dev/mii/qsphy.c
index cbfb37db40e..00706af0548 100644
--- a/sys/dev/mii/qsphy.c
+++ b/sys/dev/mii/qsphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: qsphy.c,v 1.11 2004/09/27 18:25:48 brad Exp $ */
+/* $OpenBSD: qsphy.c,v 1.12 2005/01/28 18:27:55 brad Exp $ */
/* $NetBSD: qsphy.c,v 1.19 2000/02/02 23:34:57 thorpej Exp $ */
/*-
@@ -133,7 +133,7 @@ qsphyattach(struct device *parent, struct device *self, void *aux)
sc->mii_phy = ma->mii_phyno;
sc->mii_funcs = &qsphy_funcs;
sc->mii_pdata = mii;
- sc->mii_flags = mii->mii_flags;
+ sc->mii_flags = ma->mii_flags;
PHY_RESET(sc);
diff --git a/sys/dev/mii/rgephy.c b/sys/dev/mii/rgephy.c
index 2fe2d3e8492..310f467efd2 100644
--- a/sys/dev/mii/rgephy.c
+++ b/sys/dev/mii/rgephy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rgephy.c,v 1.6 2004/10/29 01:52:35 pvalchev Exp $ */
+/* $OpenBSD: rgephy.c,v 1.7 2005/01/28 18:27:55 brad Exp $ */
/*
* Copyright (c) 2003
* Bill Paul <wpaul@windriver.com>. All rights reserved.
@@ -120,10 +120,12 @@ rgephyattach(struct device *parent, struct device *self, void *aux)
sc->mii_model = MII_MODEL(ma->mii_id2);
sc->mii_rev = MII_REV(ma->mii_id2);
sc->mii_pdata = mii;
- sc->mii_flags = mii->mii_flags | MIIF_NOISOLATE;
+ sc->mii_flags = ma->mii_flags;
sc->mii_ticks = 0; /* XXX */
sc->mii_anegticks = 5;
+ sc->mii_flags |= MIIF_NOISOLATE;
+
PHY_RESET(sc);
sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
diff --git a/sys/dev/mii/rlphy.c b/sys/dev/mii/rlphy.c
index 761f055de48..b062c2b78b3 100644
--- a/sys/dev/mii/rlphy.c
+++ b/sys/dev/mii/rlphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rlphy.c,v 1.16 2005/01/10 22:52:56 deraadt Exp $ */
+/* $OpenBSD: rlphy.c,v 1.17 2005/01/28 18:27:55 brad Exp $ */
/*
* Copyright (c) 1998, 1999 Jason L. Wright (jason@thought.net)
@@ -111,7 +111,7 @@ rlphyattach(struct device *parent, struct device *self, void *aux)
sc->mii_phy = ma->mii_phyno;
sc->mii_funcs = &rlphy_funcs;
sc->mii_pdata = mii;
- sc->mii_flags = mii->mii_flags;
+ sc->mii_flags = ma->mii_flags;
sc->mii_flags |= MIIF_NOISOLATE;
diff --git a/sys/dev/mii/sqphy.c b/sys/dev/mii/sqphy.c
index 275dc6d1e44..ba7ed265d0e 100644
--- a/sys/dev/mii/sqphy.c
+++ b/sys/dev/mii/sqphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sqphy.c,v 1.11 2004/09/27 18:25:48 brad Exp $ */
+/* $OpenBSD: sqphy.c,v 1.12 2005/01/28 18:27:55 brad Exp $ */
/* $NetBSD: sqphy.c,v 1.17 2000/02/02 23:34:57 thorpej Exp $ */
/*-
@@ -146,7 +146,7 @@ sqphyattach(struct device *parent, struct device *self, void *aux)
sc->mii_phy = ma->mii_phyno;
sc->mii_funcs = &sqphy_funcs;
sc->mii_pdata = mii;
- sc->mii_flags = mii->mii_flags;
+ sc->mii_flags = ma->mii_flags;
PHY_RESET(sc);
diff --git a/sys/dev/mii/tlphy.c b/sys/dev/mii/tlphy.c
index c8980910775..9458e8fc5d2 100644
--- a/sys/dev/mii/tlphy.c
+++ b/sys/dev/mii/tlphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tlphy.c,v 1.14 2004/10/09 04:10:52 brad Exp $ */
+/* $OpenBSD: tlphy.c,v 1.15 2005/01/28 18:27:55 brad Exp $ */
/* $NetBSD: tlphy.c,v 1.26 2000/07/04 03:29:00 thorpej Exp $ */
/*-
@@ -150,7 +150,7 @@ tlphyattach(struct device *parent, struct device *self, void *aux)
sc->sc_mii.mii_phy = ma->mii_phyno;
sc->sc_mii.mii_funcs = &tlphy_funcs;
sc->sc_mii.mii_pdata = mii;
- sc->sc_mii.mii_flags = mii->mii_flags;
+ sc->sc_mii.mii_flags = ma->mii_flags;
sc->sc_mii.mii_flags &= ~MIIF_NOISOLATE;
PHY_RESET(&sc->sc_mii);
diff --git a/sys/dev/mii/tqphy.c b/sys/dev/mii/tqphy.c
index 30920cdf407..f90e413c6b2 100644
--- a/sys/dev/mii/tqphy.c
+++ b/sys/dev/mii/tqphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tqphy.c,v 1.8 2004/09/27 18:25:48 brad Exp $ */
+/* $OpenBSD: tqphy.c,v 1.9 2005/01/28 18:27:55 brad Exp $ */
/* $NetBSD: tqphy.c,v 1.9 2000/02/02 23:34:57 thorpej Exp $ */
/*
@@ -137,7 +137,7 @@ tqphyattach(struct device *parent, struct device *self, void *aux)
sc->mii_phy = ma->mii_phyno;
sc->mii_funcs = &tqphy_funcs;
sc->mii_pdata = mii;
- sc->mii_flags = mii->mii_flags;
+ sc->mii_flags = ma->mii_flags;
/*
* Apparently, we can't do loopback on this PHY.
diff --git a/sys/dev/mii/txphy.c b/sys/dev/mii/txphy.c
index 86aa99d5b5d..c1c4b4a444a 100644
--- a/sys/dev/mii/txphy.c
+++ b/sys/dev/mii/txphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: txphy.c,v 1.8 2004/09/27 18:25:48 brad Exp $ */
+/* $OpenBSD: txphy.c,v 1.9 2005/01/28 18:27:55 brad Exp $ */
/*
* Copyright (c) 1999 Jason L. Wright (jason@thought.net)
@@ -87,7 +87,7 @@ txphyattach(struct device *parent, struct device *self, void *aux)
sc->mii_phy = ma->mii_phyno;
sc->mii_funcs = &txphy_funcs;
sc->mii_pdata = mii;
- sc->mii_flags = mii->mii_flags;
+ sc->mii_flags = ma->mii_flags;
PHY_RESET(sc);
diff --git a/sys/dev/mii/ukphy.c b/sys/dev/mii/ukphy.c
index 3eb1f67a919..085d084a38a 100644
--- a/sys/dev/mii/ukphy.c
+++ b/sys/dev/mii/ukphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ukphy.c,v 1.14 2004/09/28 01:13:32 brad Exp $ */
+/* $OpenBSD: ukphy.c,v 1.15 2005/01/28 18:27:55 brad Exp $ */
/* $NetBSD: ukphy.c,v 1.9 2000/02/02 23:34:57 thorpej Exp $ */
/*-
@@ -128,7 +128,7 @@ ukphyattach(struct device *parent, struct device *self, void *aux)
sc->mii_phy = ma->mii_phyno;
sc->mii_funcs = &ukphy_funcs;
sc->mii_pdata = mii;
- sc->mii_flags = mii->mii_flags;
+ sc->mii_flags = ma->mii_flags;
/*
* Don't do loopback on unknown PHYs. It might confuse some of them.
diff --git a/sys/dev/mii/urlphy.c b/sys/dev/mii/urlphy.c
index 74f4b04a539..fe755f2e469 100644
--- a/sys/dev/mii/urlphy.c
+++ b/sys/dev/mii/urlphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: urlphy.c,v 1.7 2004/10/17 23:01:12 deraadt Exp $ */
+/* $OpenBSD: urlphy.c,v 1.8 2005/01/28 18:27:55 brad Exp $ */
/* $NetBSD: urlphy.c,v 1.1 2002/03/28 21:07:53 ichiro Exp $ */
/*
* Copyright (c) 2001, 2002
@@ -117,7 +117,7 @@ urlphy_attach(struct device *parent, struct device *self, void *aux)
sc->mii_phy = ma->mii_phyno;
sc->mii_funcs = &urlphy_funcs;
sc->mii_pdata = mii;
- sc->mii_flags = mii->mii_flags;
+ sc->mii_flags = ma->mii_flags;
sc->mii_anegticks = 10;
/* Don't do loopback on this PHY. */
diff --git a/sys/dev/mii/xmphy.c b/sys/dev/mii/xmphy.c
index b29208067d6..76bcb10ea06 100644
--- a/sys/dev/mii/xmphy.c
+++ b/sys/dev/mii/xmphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xmphy.c,v 1.9 2004/09/27 18:25:48 brad Exp $ */
+/* $OpenBSD: xmphy.c,v 1.10 2005/01/28 18:27:55 brad Exp $ */
/*
* Copyright (c) 2000
@@ -102,9 +102,11 @@ xmphy_attach(struct device *parent, struct device *self, void *aux)
sc->mii_phy = ma->mii_phyno;
sc->mii_funcs = &xmphy_funcs;
sc->mii_pdata = mii;
- sc->mii_flags |= MIIF_NOISOLATE | mii->mii_flags;
+ sc->mii_flags = ma->mii_flags;
sc->mii_anegticks = 5;
+ sc->mii_flags |= MIIF_NOISOLATE;
+
#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL)
ADD(IFM_MAKEWORD(IFM_ETHER, IFM_NONE, 0, sc->mii_inst),