summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2005-05-27 08:04:16 +0000
committerBrad Smith <brad@cvs.openbsd.org>2005-05-27 08:04:16 +0000
commit01b5e624bc03f48e6b93c9542088caa94ee45e8d (patch)
treecd0971f7c4c02bd64e62dbecd46614f63385fae3 /sys
parent692db2b3e2c1d155b62e206549a3c99348aec670 (diff)
some cleanup
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/mii/amphy.c6
-rw-r--r--sys/dev/mii/ciphy.c5
-rw-r--r--sys/dev/mii/dcphy.c12
-rw-r--r--sys/dev/mii/rgephy.c9
-rw-r--r--sys/dev/mii/rlphy.c4
-rw-r--r--sys/dev/mii/urlphy.c4
6 files changed, 16 insertions, 24 deletions
diff --git a/sys/dev/mii/amphy.c b/sys/dev/mii/amphy.c
index c6cbd7588fc..de748004287 100644
--- a/sys/dev/mii/amphy.c
+++ b/sys/dev/mii/amphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: amphy.c,v 1.12 2005/02/05 22:30:52 brad Exp $ */
+/* $OpenBSD: amphy.c,v 1.13 2005/05/27 08:04:15 brad Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -96,9 +96,9 @@ amphymatch(struct device *parent, void *match, void *aux)
struct mii_attach_args *ma = aux;
if (mii_phy_match(ma, amphys) != NULL)
- return(10);
+ return (10);
- return(0);
+ return (0);
}
void
diff --git a/sys/dev/mii/ciphy.c b/sys/dev/mii/ciphy.c
index ac8d19c2261..59959794d8b 100644
--- a/sys/dev/mii/ciphy.c
+++ b/sys/dev/mii/ciphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ciphy.c,v 1.6 2005/03/28 03:11:06 krw Exp $ */
+/* $OpenBSD: ciphy.c,v 1.7 2005/05/27 08:04:15 brad Exp $ */
/* $FreeBSD: ciphy.c,v 1.1 2004/09/10 20:57:45 wpaul Exp $ */
/*
* Copyright (c) 2004
@@ -121,10 +121,7 @@ ciphyattach(struct device *parent, struct device *self, void *aux)
sc->mii_inst = mii->mii_instance;
sc->mii_phy = ma->mii_phyno;
- //sc->mii_service = ciphy_service;
sc->mii_funcs = &ciphy_funcs;
- sc->mii_model = MII_MODEL(ma->mii_id2);
- sc->mii_rev = MII_REV(ma->mii_id2);
sc->mii_pdata = mii;
sc->mii_flags = ma->mii_flags;
sc->mii_anegticks = MII_ANEGTICKS;
diff --git a/sys/dev/mii/dcphy.c b/sys/dev/mii/dcphy.c
index e944dd6e243..9cd25cd39f5 100644
--- a/sys/dev/mii/dcphy.c
+++ b/sys/dev/mii/dcphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dcphy.c,v 1.14 2005/03/26 04:40:09 krw Exp $ */
+/* $OpenBSD: dcphy.c,v 1.15 2005/05/27 08:04:15 brad Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -140,8 +140,6 @@ dcphy_attach(struct device *parent, struct device *self, void *aux)
sc->mii_flags |= MIIF_NOISOLATE;
- mii->mii_instance++;
-
dc_sc = mii->mii_ifp->if_softc;
CSR_WRITE_4(dc_sc, DC_10BTSTAT, 0);
CSR_WRITE_4(dc_sc, DC_10BTCTRL, 0);
@@ -261,7 +259,7 @@ dcphy_service(struct mii_softc *sc, struct mii_data *mii, int cmd)
CSR_WRITE_4(dc_sc, DC_NETCFG, mode);
break;
default:
- return(EINVAL);
+ return (EINVAL);
}
break;
@@ -425,7 +423,7 @@ dcphy_mii_phy_auto(struct mii_softc *mii, int waitfor)
for (i = 0; i < 500; i++) {
if ((CSR_READ_4(sc, DC_10BTSTAT) & DC_TSTAT_ANEGSTAT)
== DC_ASTAT_AUTONEGCMP)
- return(0);
+ return (0);
DELAY(1000);
}
/*
@@ -433,7 +431,7 @@ dcphy_mii_phy_auto(struct mii_softc *mii, int waitfor)
* If that's set, a timeout is pending, and it will
* clear the flag.
*/
- return(EIO);
+ return (EIO);
}
/*
@@ -444,7 +442,7 @@ dcphy_mii_phy_auto(struct mii_softc *mii, int waitfor)
if ((mii->mii_flags & MIIF_DOINGAUTO) == 0)
mii->mii_flags |= MIIF_DOINGAUTO;
- return(EJUSTRETURN);
+ return (EJUSTRETURN);
}
void
diff --git a/sys/dev/mii/rgephy.c b/sys/dev/mii/rgephy.c
index e1d60ca36fe..fb032a0e387 100644
--- a/sys/dev/mii/rgephy.c
+++ b/sys/dev/mii/rgephy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rgephy.c,v 1.9 2005/03/26 04:40:09 krw Exp $ */
+/* $OpenBSD: rgephy.c,v 1.10 2005/05/27 08:04:15 brad Exp $ */
/*
* Copyright (c) 2003
* Bill Paul <wpaul@windriver.com>. All rights reserved.
@@ -85,7 +85,6 @@ int rgephy_mii_phy_auto(struct mii_softc *);
void rgephy_reset(struct mii_softc *);
void rgephy_loop(struct mii_softc *);
void rgephy_load_dspcode(struct mii_softc *);
-int rgephy_mii_model;
const struct mii_phy_funcs rgephy_funcs = {
rgephy_service, rgephy_status, rgephy_reset,
@@ -105,9 +104,9 @@ rgephymatch(struct device *parent, void *match, void *aux)
struct mii_attach_args *ma = aux;
if (mii_phy_match(ma, rgephys) != NULL)
- return(10);
+ return (10);
- return(0);
+ return (0);
}
void
@@ -124,8 +123,6 @@ rgephyattach(struct device *parent, struct device *self, void *aux)
sc->mii_inst = mii->mii_instance;
sc->mii_phy = ma->mii_phyno;
sc->mii_funcs = &rgephy_funcs;
- sc->mii_model = MII_MODEL(ma->mii_id2);
- sc->mii_rev = MII_REV(ma->mii_id2);
sc->mii_pdata = mii;
sc->mii_flags = ma->mii_flags;
sc->mii_anegticks = MII_ANEGTICKS;
diff --git a/sys/dev/mii/rlphy.c b/sys/dev/mii/rlphy.c
index b062c2b78b3..d3f6cc1412b 100644
--- a/sys/dev/mii/rlphy.c
+++ b/sys/dev/mii/rlphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rlphy.c,v 1.17 2005/01/28 18:27:55 brad Exp $ */
+/* $OpenBSD: rlphy.c,v 1.18 2005/05/27 08:04:15 brad Exp $ */
/*
* Copyright (c) 1998, 1999 Jason L. Wright (jason@thought.net)
@@ -77,7 +77,7 @@ rlphymatch(struct device *parent, void *match, void *aux)
/* Test for RealTek 8201L PHY */
if (MII_OUI(ma->mii_id1, ma->mii_id2) == MII_OUI_REALTEK &&
MII_MODEL(ma->mii_id2) == MII_MODEL_REALTEK_RTL8201L) {
- return(10);
+ return (10);
}
if (MII_OUI(ma->mii_id1, ma->mii_id2) != 0 ||
diff --git a/sys/dev/mii/urlphy.c b/sys/dev/mii/urlphy.c
index 2b74e85e671..21e2a620268 100644
--- a/sys/dev/mii/urlphy.c
+++ b/sys/dev/mii/urlphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: urlphy.c,v 1.10 2005/03/26 04:40:09 krw Exp $ */
+/* $OpenBSD: urlphy.c,v 1.11 2005/05/27 08:04:15 brad Exp $ */
/* $NetBSD: urlphy.c,v 1.1 2002/03/28 21:07:53 ichiro Exp $ */
/*
* Copyright (c) 2001, 2002
@@ -93,7 +93,7 @@ urlphy_match(struct device *parent, void *match, void *aux)
* Make sure the parent is an 'url' device.
*/
if (strcmp(parent->dv_cfdata->cf_driver->cd_name, "url") != 0)
- return(0);
+ return (0);
return (10);
}