summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/pcmcia/aic_pcmcia.c14
-rw-r--r--sys/dev/pcmcia/com_pcmcia.c30
-rw-r--r--sys/dev/pcmcia/if_ep_pcmcia.c37
-rw-r--r--sys/dev/pcmcia/if_ne_pcmcia.c38
-rw-r--r--sys/dev/pcmcia/if_sm_pcmcia.c36
-rw-r--r--sys/dev/pcmcia/if_xe.c107
-rw-r--r--sys/dev/pcmcia/pcmcia.c79
-rw-r--r--sys/dev/pcmcia/pcmcia_cis.c18
-rw-r--r--sys/dev/pcmcia/pcmcia_cis_quirks.c6
-rw-r--r--sys/dev/pcmcia/wdc_pcmcia.c29
10 files changed, 115 insertions, 279 deletions
diff --git a/sys/dev/pcmcia/aic_pcmcia.c b/sys/dev/pcmcia/aic_pcmcia.c
index 11c1dd70b95..33b87141a43 100644
--- a/sys/dev/pcmcia/aic_pcmcia.c
+++ b/sys/dev/pcmcia/aic_pcmcia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic_pcmcia.c,v 1.17 2015/03/14 03:38:49 jsg Exp $ */
+/* $OpenBSD: aic_pcmcia.c,v 1.18 2021/03/07 06:20:09 jsg Exp $ */
/* $NetBSD: aic_pcmcia.c,v 1.6 1998/07/19 17:28:15 christos Exp $ */
/*
@@ -82,9 +82,7 @@ struct aic_pcmcia_product {
};
int
-aic_pcmcia_match(parent, match, aux)
- struct device *parent;
- void *match, *aux;
+aic_pcmcia_match(struct device *parent, void *match, void *aux)
{
struct pcmcia_attach_args *pa = aux;
int i;
@@ -98,9 +96,7 @@ aic_pcmcia_match(parent, match, aux)
}
void
-aic_pcmcia_attach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+aic_pcmcia_attach(struct device *parent, struct device *self, void *aux)
{
struct aic_pcmcia_softc *psc = (void *)self;
struct aic_softc *sc = &psc->sc_aic;
@@ -173,9 +169,7 @@ aic_pcmcia_attach(parent, self, aux)
}
int
-aic_pcmcia_detach(self, flags)
- struct device *self;
- int flags;
+aic_pcmcia_detach(struct device *self, int flags)
{
struct aic_pcmcia_softc *sc= (void *)self;
int error;
diff --git a/sys/dev/pcmcia/com_pcmcia.c b/sys/dev/pcmcia/com_pcmcia.c
index 9a414e6c36d..c5e60a30ce8 100644
--- a/sys/dev/pcmcia/com_pcmcia.c
+++ b/sys/dev/pcmcia/com_pcmcia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com_pcmcia.c,v 1.57 2017/12/30 20:46:59 guenther Exp $ */
+/* $OpenBSD: com_pcmcia.c,v 1.58 2021/03/07 06:20:09 jsg Exp $ */
/* $NetBSD: com_pcmcia.c,v 1.15 1998/08/22 17:47:58 msaitoh Exp $ */
/*
@@ -150,9 +150,7 @@ struct cfattach com_pcmcia_ca = {
};
int
-com_pcmcia_match(parent, match, aux)
- struct device *parent;
- void *match, *aux;
+com_pcmcia_match(struct device *parent, void *match, void *aux)
{
struct pcmcia_attach_args *pa = aux;
struct pcmcia_config_entry *cfe;
@@ -200,9 +198,7 @@ com_pcmcia_match(parent, match, aux)
}
int
-com_pcmcia_activate(dev, act)
- struct device *dev;
- int act;
+com_pcmcia_activate(struct device *dev, int act)
{
struct com_pcmcia_softc *sc = (void *) dev;
@@ -230,9 +226,7 @@ com_pcmcia_activate(dev, act)
}
void
-com_pcmcia_attach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+com_pcmcia_attach(struct device *parent, struct device *self, void *aux)
{
struct com_pcmcia_softc *psc = (void *) self;
struct com_softc *sc = &psc->sc_com;
@@ -326,9 +320,7 @@ found:
}
int
-com_pcmcia_detach(dev, flags)
- struct device *dev;
- int flags;
+com_pcmcia_detach(struct device *dev, int flags)
{
struct com_pcmcia_softc *psc = (struct com_pcmcia_softc *)dev;
int error;
@@ -345,8 +337,7 @@ com_pcmcia_detach(dev, flags)
}
int
-com_pcmcia_enable(sc)
- struct com_softc *sc;
+com_pcmcia_enable(struct com_softc *sc)
{
struct com_pcmcia_softc *psc = (struct com_pcmcia_softc *) sc;
struct pcmcia_function *pf = psc->sc_pf;
@@ -363,8 +354,7 @@ com_pcmcia_enable(sc)
}
int
-com_pcmcia_enable1(sc)
- struct com_softc *sc;
+com_pcmcia_enable1(struct com_softc *sc)
{
struct com_pcmcia_softc *psc = (struct com_pcmcia_softc *) sc;
struct pcmcia_function *pf = psc->sc_pf;
@@ -391,8 +381,7 @@ com_pcmcia_enable1(sc)
}
void
-com_pcmcia_disable(sc)
- struct com_softc *sc;
+com_pcmcia_disable(struct com_softc *sc)
{
struct com_pcmcia_softc *psc = (struct com_pcmcia_softc *) sc;
@@ -401,8 +390,7 @@ com_pcmcia_disable(sc)
}
void
-com_pcmcia_disable1(sc)
- struct com_softc *sc;
+com_pcmcia_disable1(struct com_softc *sc)
{
struct com_pcmcia_softc *psc = (struct com_pcmcia_softc *) sc;
diff --git a/sys/dev/pcmcia/if_ep_pcmcia.c b/sys/dev/pcmcia/if_ep_pcmcia.c
index 71f8f2bb4ef..3b59b871078 100644
--- a/sys/dev/pcmcia/if_ep_pcmcia.c
+++ b/sys/dev/pcmcia/if_ep_pcmcia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ep_pcmcia.c,v 1.48 2015/11/25 11:20:38 mpi Exp $ */
+/* $OpenBSD: if_ep_pcmcia.c,v 1.49 2021/03/07 06:20:09 jsg Exp $ */
/* $NetBSD: if_ep_pcmcia.c,v 1.16 1998/08/17 23:20:40 thorpej Exp $ */
/*-
@@ -154,8 +154,7 @@ struct ep_pcmcia_product {
struct ep_pcmcia_product *ep_pcmcia_lookup(struct pcmcia_attach_args *);
struct ep_pcmcia_product *
-ep_pcmcia_lookup(pa)
- struct pcmcia_attach_args *pa;
+ep_pcmcia_lookup(struct pcmcia_attach_args *pa)
{
int i;
@@ -168,9 +167,7 @@ ep_pcmcia_lookup(pa)
}
int
-ep_pcmcia_match(parent, match, aux)
- struct device *parent;
- void *match, *aux;
+ep_pcmcia_match(struct device *parent, void *match, void *aux)
{
struct pcmcia_attach_args *pa = aux;
@@ -185,8 +182,7 @@ ep_pcmcia_match(parent, match, aux)
#ifdef notdef
int
-ep_pcmcia_enable(sc)
- struct ep_softc *sc;
+ep_pcmcia_enable(struct ep_softc *sc)
{
struct ep_pcmcia_softc *psc = (struct ep_pcmcia_softc *) sc;
struct pcmcia_function *pf = psc->sc_pf;
@@ -205,8 +201,7 @@ ep_pcmcia_enable(sc)
#endif
int
-ep_pcmcia_enable1(sc)
- struct ep_softc *sc;
+ep_pcmcia_enable1(struct ep_softc *sc)
{
struct ep_pcmcia_softc *psc = (struct ep_pcmcia_softc *) sc;
struct pcmcia_function *pf = psc->sc_pf;
@@ -235,8 +230,7 @@ ep_pcmcia_enable1(sc)
#ifdef notyet
void
-ep_pcmcia_disable(sc)
- struct ep_softc *sc;
+ep_pcmcia_disable(struct ep_softc *sc)
{
struct ep_pcmcia_softc *psc = (struct ep_pcmcia_softc *) sc;
@@ -245,8 +239,7 @@ ep_pcmcia_disable(sc)
}
void
-ep_pcmcia_disable1(sc)
- struct ep_softc *sc;
+ep_pcmcia_disable1(struct ep_softc *sc)
{
struct ep_pcmcia_softc *psc = (struct ep_pcmcia_softc *) sc;
@@ -255,9 +248,7 @@ ep_pcmcia_disable1(sc)
#endif
void
-ep_pcmcia_attach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+ep_pcmcia_attach(struct device *parent, struct device *self, void *aux)
{
struct ep_pcmcia_softc *psc = (void *) self;
struct ep_softc *sc = &psc->sc_ep;
@@ -375,9 +366,7 @@ ep_pcmcia_attach(parent, self, aux)
}
int
-ep_pcmcia_detach(dev, flags)
- struct device *dev;
- int flags;
+ep_pcmcia_detach(struct device *dev, int flags)
{
int rv;
struct ep_pcmcia_softc *psc = (struct ep_pcmcia_softc *)dev;
@@ -392,9 +381,7 @@ ep_pcmcia_detach(dev, flags)
}
int
-ep_pcmcia_activate(dev, act)
- struct device *dev;
- int act;
+ep_pcmcia_activate(struct device *dev, int act)
{
struct ep_pcmcia_softc *sc = (struct ep_pcmcia_softc *)dev;
struct ep_softc *esc = &sc->sc_ep;
@@ -428,9 +415,7 @@ ep_pcmcia_activate(dev, act)
}
int
-ep_pcmcia_get_enaddr(tuple, arg)
- struct pcmcia_tuple *tuple;
- void *arg;
+ep_pcmcia_get_enaddr(struct pcmcia_tuple *tuple, void *arg)
{
u_int8_t *myla = arg;
int i;
diff --git a/sys/dev/pcmcia/if_ne_pcmcia.c b/sys/dev/pcmcia/if_ne_pcmcia.c
index 50e8ada860b..f104002141c 100644
--- a/sys/dev/pcmcia/if_ne_pcmcia.c
+++ b/sys/dev/pcmcia/if_ne_pcmcia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ne_pcmcia.c,v 1.99 2015/11/24 13:33:18 mpi Exp $ */
+/* $OpenBSD: if_ne_pcmcia.c,v 1.100 2021/03/07 06:20:09 jsg Exp $ */
/* $NetBSD: if_ne_pcmcia.c,v 1.17 1998/08/15 19:00:04 thorpej Exp $ */
/*
@@ -590,9 +590,7 @@ const struct ne2000dev {
&ne2000devs[(n)]:NULL)
int
-ne_pcmcia_match(parent, match, aux)
- struct device *parent;
- void *match, *aux;
+ne_pcmcia_match(struct device *parent, void *match, void *aux)
{
struct pcmcia_attach_args *pa = aux;
int i;
@@ -606,9 +604,7 @@ ne_pcmcia_match(parent, match, aux)
}
void
-ne_pcmcia_attach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+ne_pcmcia_attach(struct device *parent, struct device *self, void *aux)
{
struct ne_pcmcia_softc *psc = (void *) self;
struct ne2000_softc *nsc = &psc->sc_ne2000;
@@ -834,9 +830,7 @@ fail_1:
}
int
-ne_pcmcia_detach(dev, flags)
- struct device *dev;
- int flags;
+ne_pcmcia_detach(struct device *dev, int flags)
{
struct ne_pcmcia_softc *psc = (struct ne_pcmcia_softc *)dev;
int error;
@@ -860,9 +854,7 @@ ne_pcmcia_detach(dev, flags)
}
int
-ne_pcmcia_activate(dev, act)
- struct device *dev;
- int act;
+ne_pcmcia_activate(struct device *dev, int act)
{
struct ne_pcmcia_softc *sc = (struct ne_pcmcia_softc *)dev;
struct dp8390_softc *esc = &sc->sc_ne2000.sc_dp8390;
@@ -905,8 +897,7 @@ ne_pcmcia_activate(dev, act)
#ifdef notyet
int
-ne_pcmcia_enable(dsc)
- struct dp8390_softc *dsc;
+ne_pcmcia_enable(struct dp8390_softc *dsc)
{
struct ne_pcmcia_softc *psc = (struct ne_pcmcia_softc *)dsc;
@@ -923,8 +914,7 @@ ne_pcmcia_enable(dsc)
}
void
-ne_pcmcia_disable(dsc)
- struct dp8390_softc *dsc;
+ne_pcmcia_disable(struct dp8390_softc *dsc)
{
struct ne_pcmcia_softc *psc = (struct ne_pcmcia_softc *)dsc;
@@ -934,10 +924,8 @@ ne_pcmcia_disable(dsc)
#endif
u_int8_t *
-ne_pcmcia_get_enaddr(psc, maddr, myea)
- struct ne_pcmcia_softc *psc;
- int maddr;
- u_int8_t myea[ETHER_ADDR_LEN];
+ne_pcmcia_get_enaddr(struct ne_pcmcia_softc *psc, int maddr,
+ u_int8_t myea[ETHER_ADDR_LEN])
{
struct ne2000_softc *nsc = &psc->sc_ne2000;
struct dp8390_softc *dsc = &nsc->sc_dp8390;
@@ -973,9 +961,8 @@ ne_pcmcia_get_enaddr(psc, maddr, myea)
}
u_int8_t *
-ne_pcmcia_dl10019_get_enaddr(psc, myea)
- struct ne_pcmcia_softc *psc;
- u_int8_t myea[ETHER_ADDR_LEN];
+ne_pcmcia_dl10019_get_enaddr(struct ne_pcmcia_softc *psc,
+ u_int8_t myea[ETHER_ADDR_LEN])
{
struct ne2000_softc *nsc = &psc->sc_ne2000;
u_int8_t sum;
@@ -1004,8 +991,7 @@ ne_pcmcia_dl10019_get_enaddr(psc, myea)
}
int
-ne_pcmcia_ax88190_set_iobase(psc)
- struct ne_pcmcia_softc *psc;
+ne_pcmcia_ax88190_set_iobase(struct ne_pcmcia_softc *psc)
{
struct ne2000_softc *nsc = &psc->sc_ne2000;
struct dp8390_softc *dsc = &nsc->sc_dp8390;
diff --git a/sys/dev/pcmcia/if_sm_pcmcia.c b/sys/dev/pcmcia/if_sm_pcmcia.c
index 04ac5709b91..c5a7fa25a6a 100644
--- a/sys/dev/pcmcia/if_sm_pcmcia.c
+++ b/sys/dev/pcmcia/if_sm_pcmcia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sm_pcmcia.c,v 1.37 2015/11/24 17:11:40 mpi Exp $ */
+/* $OpenBSD: if_sm_pcmcia.c,v 1.38 2021/03/07 06:20:09 jsg Exp $ */
/* $NetBSD: if_sm_pcmcia.c,v 1.11 1998/08/15 20:47:32 thorpej Exp $ */
/*-
@@ -112,9 +112,7 @@ struct sm_pcmcia_product {
};
int
-sm_pcmcia_match(parent, match, aux)
- struct device *parent;
- void *match, *aux;
+sm_pcmcia_match(struct device *parent, void *match, void *aux)
{
struct pcmcia_attach_args *pa = aux;
int i;
@@ -128,9 +126,7 @@ sm_pcmcia_match(parent, match, aux)
}
void
-sm_pcmcia_attach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+sm_pcmcia_attach(struct device *parent, struct device *self, void *aux)
{
struct sm_pcmcia_softc *psc = (struct sm_pcmcia_softc *)self;
struct smc91cxx_softc *sc = &psc->sc_smc;
@@ -219,9 +215,7 @@ sm_pcmcia_attach(parent, self, aux)
}
int
-sm_pcmcia_detach(dev, flags)
- struct device *dev;
- int flags;
+sm_pcmcia_detach(struct device *dev, int flags)
{
struct sm_pcmcia_softc *psc = (struct sm_pcmcia_softc *)dev;
struct ifnet *ifp = &psc->sc_smc.sc_arpcom.ac_if;
@@ -237,9 +231,7 @@ sm_pcmcia_detach(dev, flags)
}
int
-sm_pcmcia_activate(dev, act)
- struct device *dev;
- int act;
+sm_pcmcia_activate(struct device *dev, int act)
{
struct sm_pcmcia_softc *sc = (struct sm_pcmcia_softc *)dev;
struct ifnet *ifp = &sc->sc_smc.sc_arpcom.ac_if;
@@ -259,9 +251,7 @@ sm_pcmcia_activate(dev, act)
}
int
-sm_pcmcia_ascii_enaddr(cisstr, myla)
- const char *cisstr;
- u_int8_t *myla;
+sm_pcmcia_ascii_enaddr(const char *cisstr, u_int8_t *myla)
{
char enaddr_str[12];
int i, j;
@@ -302,18 +292,14 @@ sm_pcmcia_ascii_enaddr(cisstr, myla)
}
int
-sm_pcmcia_funce_enaddr(parent, myla)
- struct device *parent;
- u_int8_t *myla;
+sm_pcmcia_funce_enaddr(struct device *parent, u_int8_t *myla)
{
return (pcmcia_scan_cis(parent, sm_pcmcia_lannid_ciscallback, myla));
}
int
-sm_pcmcia_lannid_ciscallback(tuple, arg)
- struct pcmcia_tuple *tuple;
- void *arg;
+sm_pcmcia_lannid_ciscallback(struct pcmcia_tuple *tuple, void *arg)
{
u_int8_t *myla = arg;
int i;
@@ -337,8 +323,7 @@ sm_pcmcia_lannid_ciscallback(tuple, arg)
}
int
-sm_pcmcia_enable(sc)
- struct smc91cxx_softc *sc;
+sm_pcmcia_enable(struct smc91cxx_softc *sc)
{
struct sm_pcmcia_softc *psc = (struct sm_pcmcia_softc *)sc;
@@ -355,8 +340,7 @@ sm_pcmcia_enable(sc)
}
void
-sm_pcmcia_disable(sc)
- struct smc91cxx_softc *sc;
+sm_pcmcia_disable(struct smc91cxx_softc *sc)
{
struct sm_pcmcia_softc *psc = (struct sm_pcmcia_softc *)sc;
diff --git a/sys/dev/pcmcia/if_xe.c b/sys/dev/pcmcia/if_xe.c
index 609c1c50c5b..90f76a9d8a2 100644
--- a/sys/dev/pcmcia/if_xe.c
+++ b/sys/dev/pcmcia/if_xe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_xe.c,v 1.60 2020/07/10 13:26:40 patrick Exp $ */
+/* $OpenBSD: if_xe.c,v 1.61 2021/03/07 06:20:09 jsg Exp $ */
/*
* Copyright (c) 1999 Niklas Hallqvist, Brandon Creighton, Job de Haas
@@ -182,9 +182,7 @@ void xe_reg_dump(struct xe_softc *);
#endif /* XEDEBUG */
int
-xe_pcmcia_match(parent, match, aux)
- struct device *parent;
- void *match, *aux;
+xe_pcmcia_match(struct device *parent, void *match, void *aux)
{
struct pcmcia_attach_args *pa = aux;
@@ -207,9 +205,7 @@ xe_pcmcia_match(parent, match, aux)
}
void
-xe_pcmcia_attach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+xe_pcmcia_attach(struct device *parent, struct device *self, void *aux)
{
struct xe_pcmcia_softc *psc = (struct xe_pcmcia_softc *)self;
struct xe_softc *sc = &psc->sc_xe;
@@ -425,9 +421,7 @@ bad:
}
int
-xe_pcmcia_detach(dev, flags)
- struct device *dev;
- int flags;
+xe_pcmcia_detach(struct device *dev, int flags)
{
struct xe_pcmcia_softc *psc = (struct xe_pcmcia_softc *)dev;
struct xe_softc *sc = &psc->sc_xe;
@@ -447,9 +441,7 @@ xe_pcmcia_detach(dev, flags)
}
int
-xe_pcmcia_activate(dev, act)
- struct device *dev;
- int act;
+xe_pcmcia_activate(struct device *dev, int act)
{
struct xe_pcmcia_softc *sc = (struct xe_pcmcia_softc *)dev;
struct ifnet *ifp = &sc->sc_xe.sc_arpcom.ac_if;
@@ -490,18 +482,14 @@ xe_pcmcia_activate(dev, act)
* if_sm_pcmcia.c uses similar ones.
*/
int
-xe_pcmcia_funce_enaddr(parent, myla)
- struct device *parent;
- u_int8_t *myla;
+xe_pcmcia_funce_enaddr(struct device *parent, u_int8_t *myla)
{
/* XXX The Linux driver has more ways to do this in case of failure. */
return (pcmcia_scan_cis(parent, xe_pcmcia_lan_nid_ciscallback, myla));
}
int
-xe_pcmcia_lan_nid_ciscallback(tuple, arg)
- struct pcmcia_tuple *tuple;
- void *arg;
+xe_pcmcia_lan_nid_ciscallback(struct pcmcia_tuple *tuple, void *arg)
{
u_int8_t *myla = arg;
int i;
@@ -545,8 +533,7 @@ xe_pcmcia_lan_nid_ciscallback(tuple, arg)
}
u_int32_t
-xe_pcmcia_interpret_manfid (parent)
- struct device *parent;
+xe_pcmcia_interpret_manfid(struct device *parent)
{
u_int32_t flags = 0;
struct pcmcia_softc *psc = (struct pcmcia_softc *)parent;
@@ -568,9 +555,7 @@ xe_pcmcia_interpret_manfid (parent)
}
int
-xe_pcmcia_manfid_ciscallback(tuple, arg)
- struct pcmcia_tuple *tuple;
- void *arg;
+xe_pcmcia_manfid_ciscallback(struct pcmcia_tuple *tuple, void *arg)
{
u_int32_t *flagsp = arg;
u_int8_t media, product;
@@ -625,8 +610,7 @@ xe_pcmcia_manfid_ciscallback(tuple, arg)
}
int
-xe_intr(arg)
- void *arg;
+xe_intr(void *arg)
{
struct xe_softc *sc = arg;
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
@@ -743,8 +727,7 @@ end:
}
u_int16_t
-xe_get(sc)
- struct xe_softc *sc;
+xe_get(struct xe_softc *sc)
{
u_int8_t rsr;
struct mbuf *top, **mp, *m;
@@ -838,8 +821,7 @@ xe_get(sc)
/* Let the MII serial management be idle for one period. */
static INLINE void xe_mdi_idle(struct xe_softc *);
static INLINE void
-xe_mdi_idle(sc)
- struct xe_softc *sc;
+xe_mdi_idle(struct xe_softc *sc)
{
bus_space_tag_t bst = sc->sc_bst;
bus_space_handle_t bsh = sc->sc_bsh;
@@ -857,9 +839,7 @@ xe_mdi_idle(sc)
/* Pulse out one bit of data. */
static INLINE void xe_mdi_pulse(struct xe_softc *, int);
static INLINE void
-xe_mdi_pulse(sc, data)
- struct xe_softc *sc;
- int data;
+xe_mdi_pulse(struct xe_softc *sc, int data)
{
bus_space_tag_t bst = sc->sc_bst;
bus_space_handle_t bsh = sc->sc_bsh;
@@ -878,8 +858,7 @@ xe_mdi_pulse(sc, data)
/* Probe one bit of data. */
static INLINE int xe_mdi_probe(struct xe_softc *sc);
static INLINE int
-xe_mdi_probe(sc)
- struct xe_softc *sc;
+xe_mdi_probe(struct xe_softc *sc)
{
bus_space_tag_t bst = sc->sc_bst;
bus_space_handle_t bsh = sc->sc_bsh;
@@ -901,10 +880,7 @@ xe_mdi_probe(sc)
/* Pulse out a sequence of data bits. */
static INLINE void xe_mdi_pulse_bits(struct xe_softc *, u_int32_t, int);
static INLINE void
-xe_mdi_pulse_bits(sc, data, len)
- struct xe_softc *sc;
- u_int32_t data;
- int len;
+xe_mdi_pulse_bits(struct xe_softc *sc, u_int32_t data, int len)
{
u_int32_t mask;
@@ -914,10 +890,7 @@ xe_mdi_pulse_bits(sc, data, len)
/* Read a PHY register. */
int
-xe_mdi_read(self, phy, reg)
- struct device *self;
- int phy;
- int reg;
+xe_mdi_read(struct device *self, int phy, int reg)
{
struct xe_softc *sc = (struct xe_softc *)self;
int i;
@@ -945,11 +918,7 @@ xe_mdi_read(self, phy, reg)
/* Write a PHY register. */
void
-xe_mdi_write(self, phy, reg, value)
- struct device *self;
- int phy;
- int reg;
- int value;
+xe_mdi_write(struct device *self, int phy, int reg, int value)
{
struct xe_softc *sc = (struct xe_softc *)self;
int i;
@@ -969,8 +938,7 @@ xe_mdi_write(self, phy, reg, value)
}
void
-xe_statchg(self)
- struct device *self;
+xe_statchg(struct device *self)
{
}
@@ -978,8 +946,7 @@ xe_statchg(self)
* Change media according to request.
*/
int
-xe_mediachange(ifp)
- struct ifnet *ifp;
+xe_mediachange(struct ifnet *ifp)
{
if (ifp->if_flags & IFF_UP)
xe_init(ifp->if_softc);
@@ -990,9 +957,7 @@ xe_mediachange(ifp)
* Notify the world which media we're using.
*/
void
-xe_mediastatus(ifp, ifmr)
- struct ifnet *ifp;
- struct ifmediareq *ifmr;
+xe_mediastatus(struct ifnet *ifp, struct ifmediareq *ifmr)
{
struct xe_softc *sc = ifp->if_softc;
@@ -1002,8 +967,7 @@ xe_mediastatus(ifp, ifmr)
}
void
-xe_reset(sc)
- struct xe_softc *sc;
+xe_reset(struct xe_softc *sc)
{
int s;
@@ -1015,8 +979,7 @@ xe_reset(sc)
}
void
-xe_watchdog(ifp)
- struct ifnet *ifp;
+xe_watchdog(struct ifnet *ifp)
{
struct xe_softc *sc = ifp->if_softc;
@@ -1027,8 +990,7 @@ xe_watchdog(ifp)
}
void
-xe_stop(sc)
- register struct xe_softc *sc;
+xe_stop(struct xe_softc *sc)
{
/* Disable interrupts. */
PAGE(sc, 0);
@@ -1047,8 +1009,7 @@ xe_stop(sc)
}
void
-xe_init(sc)
- struct xe_softc *sc;
+xe_init(struct xe_softc *sc)
{
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
int s;
@@ -1072,8 +1033,7 @@ xe_init(sc)
* Always called as splnet().
*/
void
-xe_start(ifp)
- struct ifnet *ifp;
+xe_start(struct ifnet *ifp)
{
struct xe_softc *sc = ifp->if_softc;
bus_space_tag_t bst = sc->sc_bst;
@@ -1152,10 +1112,7 @@ xe_start(ifp)
}
int
-xe_ioctl(ifp, command, data)
- struct ifnet *ifp;
- u_long command;
- caddr_t data;
+xe_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
{
struct xe_softc *sc = ifp->if_softc;
struct ifreq *ifr = (struct ifreq *)data;
@@ -1237,8 +1194,7 @@ xe_ioctl(ifp, command, data)
}
void
-xe_set_address(sc)
- struct xe_softc *sc;
+xe_set_address(struct xe_softc *sc)
{
bus_space_tag_t bst = sc->sc_bst;
bus_space_handle_t bsh = sc->sc_bsh;
@@ -1289,8 +1245,7 @@ xe_set_address(sc)
}
void
-xe_cycle_power(sc)
- struct xe_softc *sc;
+xe_cycle_power(struct xe_softc *sc)
{
bus_space_tag_t bst = sc->sc_bst;
bus_space_handle_t bsh = sc->sc_bsh;
@@ -1309,8 +1264,7 @@ xe_cycle_power(sc)
}
void
-xe_full_reset(sc)
- struct xe_softc *sc;
+xe_full_reset(struct xe_softc *sc)
{
bus_space_tag_t bst = sc->sc_bst;
bus_space_handle_t bsh = sc->sc_bsh;
@@ -1461,8 +1415,7 @@ xe_full_reset(sc)
#ifdef XEDEBUG
void
-xe_reg_dump(sc)
- struct xe_softc *sc;
+xe_reg_dump(struct xe_softc *sc)
{
int page, i;
bus_space_tag_t bst = sc->sc_bst;
diff --git a/sys/dev/pcmcia/pcmcia.c b/sys/dev/pcmcia/pcmcia.c
index c0f6fe1c8ca..6b4582f4d3b 100644
--- a/sys/dev/pcmcia/pcmcia.c
+++ b/sys/dev/pcmcia/pcmcia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcmcia.c,v 1.48 2017/09/08 05:36:52 deraadt Exp $ */
+/* $OpenBSD: pcmcia.c,v 1.49 2021/03/07 06:20:09 jsg Exp $ */
/* $NetBSD: pcmcia.c,v 1.9 1998/08/13 02:10:55 eeh Exp $ */
/*
@@ -69,9 +69,7 @@ struct cfattach pcmcia_ca = {
};
int
-pcmcia_ccr_read(pf, ccr)
- struct pcmcia_function *pf;
- int ccr;
+pcmcia_ccr_read(struct pcmcia_function *pf, int ccr)
{
return (bus_space_read_1(pf->pf_ccrt, pf->pf_ccrh,
@@ -79,10 +77,7 @@ pcmcia_ccr_read(pf, ccr)
}
void
-pcmcia_ccr_write(pf, ccr, val)
- struct pcmcia_function *pf;
- int ccr;
- int val;
+pcmcia_ccr_write(struct pcmcia_function *pf, int ccr, int val)
{
if ((pf->ccr_mask) & (1 << (ccr / 2))) {
@@ -92,9 +87,7 @@ pcmcia_ccr_write(pf, ccr, val)
}
int
-pcmcia_match(parent, match, aux)
- struct device *parent;
- void *match, *aux;
+pcmcia_match(struct device *parent, void *match, void *aux)
{
struct cfdata *cf = match;
struct pcmciabus_attach_args *paa = aux;
@@ -107,9 +100,7 @@ pcmcia_match(parent, match, aux)
}
void
-pcmcia_attach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+pcmcia_attach(struct device *parent, struct device *self, void *aux)
{
struct pcmciabus_attach_args *paa = aux;
struct pcmcia_softc *sc = (struct pcmcia_softc *) self;
@@ -157,8 +148,7 @@ pcmcia_activate(struct device *self, int act)
}
int
-pcmcia_card_attach(dev)
- struct device *dev;
+pcmcia_card_attach(struct device *dev)
{
struct pcmcia_softc *sc = (struct pcmcia_softc *) dev;
struct pcmcia_function *pf;
@@ -252,9 +242,7 @@ pcmcia_card_attach(dev)
}
void
-pcmcia_card_detach(dev, flags)
- struct device *dev;
- int flags; /* DETACH_* flags */
+pcmcia_card_detach(struct device *dev, int flags)
{
struct pcmcia_softc *sc = (struct pcmcia_softc *) dev;
struct pcmcia_function *pf;
@@ -282,8 +270,7 @@ pcmcia_card_detach(dev, flags)
}
void
-pcmcia_card_deactivate(dev)
- struct device *dev;
+pcmcia_card_deactivate(struct device *dev)
{
struct pcmcia_softc *sc = (struct pcmcia_softc *) dev;
struct pcmcia_function *pf;
@@ -305,9 +292,7 @@ pcmcia_card_deactivate(dev)
}
int
-pcmcia_submatch(parent, match, aux)
- struct device *parent;
- void *match, *aux;
+pcmcia_submatch(struct device *parent, void *match, void *aux)
{
struct cfdata *cf = match;
struct pcmcia_attach_args *paa = aux;
@@ -321,9 +306,7 @@ pcmcia_submatch(parent, match, aux)
}
int
-pcmcia_print(arg, pnp)
- void *arg;
- const char *pnp;
+pcmcia_print(void *arg, const char *pnp)
{
struct pcmcia_attach_args *pa = arg;
struct pcmcia_softc *sc = pa->pf->sc;
@@ -368,8 +351,7 @@ pcmcia_print(arg, pnp)
}
int
-pcmcia_card_gettype(dev)
- struct device *dev;
+pcmcia_card_gettype(struct device *dev)
{
struct pcmcia_softc *sc = (struct pcmcia_softc *)dev;
struct pcmcia_function *pf;
@@ -393,9 +375,8 @@ pcmcia_card_gettype(dev)
* disabled.
*/
void
-pcmcia_function_init(pf, cfe)
- struct pcmcia_function *pf;
- struct pcmcia_config_entry *cfe;
+pcmcia_function_init(struct pcmcia_function *pf,
+ struct pcmcia_config_entry *cfe)
{
if (pf->pf_flags & PFF_ENABLED)
panic("pcmcia_function_init: function is enabled");
@@ -406,8 +387,7 @@ pcmcia_function_init(pf, cfe)
/* Enable a PCMCIA function */
int
-pcmcia_function_enable(pf)
- struct pcmcia_function *pf;
+pcmcia_function_enable(struct pcmcia_function *pf)
{
struct pcmcia_function *tmp;
int reg;
@@ -551,8 +531,7 @@ pcmcia_function_enable(pf)
/* Disable PCMCIA function. */
void
-pcmcia_function_disable(pf)
- struct pcmcia_function *pf;
+pcmcia_function_disable(struct pcmcia_function *pf)
{
struct pcmcia_function *tmp;
@@ -604,13 +583,8 @@ pcmcia_function_disable(pf)
}
int
-pcmcia_io_map(pf, width, offset, size, pcihp, windowp)
- struct pcmcia_function *pf;
- int width;
- bus_addr_t offset;
- bus_size_t size;
- struct pcmcia_io_handle *pcihp;
- int *windowp;
+pcmcia_io_map(struct pcmcia_function *pf, int width, bus_addr_t offset,
+ bus_size_t size, struct pcmcia_io_handle *pcihp, int *windowp)
{
int reg;
@@ -658,12 +632,8 @@ pcmcia_io_map(pf, width, offset, size, pcihp, windowp)
}
void *
-pcmcia_intr_establish(pf, ipl, ih_fct, ih_arg, xname)
- struct pcmcia_function *pf;
- int ipl;
- int (*ih_fct)(void *);
- void *ih_arg;
- char *xname;
+pcmcia_intr_establish(struct pcmcia_function *pf, int ipl,
+ int (*ih_fct)(void *), void *ih_arg, char *xname)
{
void *ret;
int s, ihcnt, hiipl, reg;
@@ -764,9 +734,7 @@ pcmcia_intr_establish(pf, ipl, ih_fct, ih_arg, xname)
}
void
-pcmcia_intr_disestablish(pf, ih)
- struct pcmcia_function *pf;
- void *ih;
+pcmcia_intr_disestablish(struct pcmcia_function *pf, void *ih)
{
int s, reg, ihcnt, hiipl;
struct pcmcia_function *pf2;
@@ -848,16 +816,13 @@ pcmcia_intr_disestablish(pf, ih)
}
const char *
-pcmcia_intr_string(pf, ih)
- struct pcmcia_function *pf;
- void *ih;
+pcmcia_intr_string(struct pcmcia_function *pf, void *ih)
{
return pcmcia_chip_intr_string(pf->sc->pct, pf->sc->pch, ih);
}
int
-pcmcia_card_intr(arg)
- void *arg;
+pcmcia_card_intr(void *arg)
{
struct pcmcia_softc *sc = arg;
struct pcmcia_function *pf;
diff --git a/sys/dev/pcmcia/pcmcia_cis.c b/sys/dev/pcmcia/pcmcia_cis.c
index 7baf0ff7dc1..cfff07afe3d 100644
--- a/sys/dev/pcmcia/pcmcia_cis.c
+++ b/sys/dev/pcmcia/pcmcia_cis.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcmcia_cis.c,v 1.21 2017/09/08 05:36:52 deraadt Exp $ */
+/* $OpenBSD: pcmcia_cis.c,v 1.22 2021/03/07 06:20:09 jsg Exp $ */
/* $NetBSD: pcmcia_cis.c,v 1.9 1998/08/22 23:41:48 msaitoh Exp $ */
/*
@@ -81,8 +81,7 @@ pcmcia_cis_read_1(struct pcmcia_tuple *tuple, bus_size_t idx)
}
void
-pcmcia_read_cis(sc)
- struct pcmcia_softc *sc;
+pcmcia_read_cis(struct pcmcia_softc *sc)
{
struct cis_state state;
@@ -109,10 +108,8 @@ pcmcia_read_cis(sc)
}
int
-pcmcia_scan_cis(dev, fct, arg)
- struct device *dev;
- int (*fct)(struct pcmcia_tuple *, void *);
- void *arg;
+pcmcia_scan_cis(struct device *dev, int (*fct)(struct pcmcia_tuple *, void *),
+ void *arg)
{
struct pcmcia_softc *sc = (struct pcmcia_softc *) dev;
pcmcia_chipset_tag_t pct;
@@ -528,8 +525,7 @@ done:
/* XXX this is incredibly verbose. Not sure what trt is */
void
-pcmcia_print_cis(sc)
- struct pcmcia_softc *sc;
+pcmcia_print_cis(struct pcmcia_softc *sc)
{
struct pcmcia_card *card = &sc->card;
struct pcmcia_function *pf;
@@ -693,9 +689,7 @@ pcmcia_print_cis(sc)
}
int
-pcmcia_parse_cis_tuple(tuple, arg)
- struct pcmcia_tuple *tuple;
- void *arg;
+pcmcia_parse_cis_tuple(struct pcmcia_tuple *tuple, void *arg)
{
/* most of these are educated guesses */
static struct pcmcia_config_entry init_cfe = {
diff --git a/sys/dev/pcmcia/pcmcia_cis_quirks.c b/sys/dev/pcmcia/pcmcia_cis_quirks.c
index 1d8961e9a7d..38aa709bd2d 100644
--- a/sys/dev/pcmcia/pcmcia_cis_quirks.c
+++ b/sys/dev/pcmcia/pcmcia_cis_quirks.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcmcia_cis_quirks.c,v 1.14 2017/09/08 05:36:52 deraadt Exp $ */
+/* $OpenBSD: pcmcia_cis_quirks.c,v 1.15 2021/03/07 06:20:09 jsg Exp $ */
/* $NetBSD: pcmcia_cis_quirks.c,v 1.3 1998/12/29 09:00:28 marc Exp $ */
/*
@@ -206,8 +206,8 @@ static struct pcmcia_cis_quirk pcmcia_cis_quirks[] = {
&pcmcia_sveclancard_func0, &pcmcia_sveclancard_func0_cfe0 },
};
-void pcmcia_check_cis_quirks(sc)
- struct pcmcia_softc *sc;
+void
+pcmcia_check_cis_quirks(struct pcmcia_softc *sc)
{
int wiped = 0;
int i, j;
diff --git a/sys/dev/pcmcia/wdc_pcmcia.c b/sys/dev/pcmcia/wdc_pcmcia.c
index a72db74d1de..19d95644cb9 100644
--- a/sys/dev/pcmcia/wdc_pcmcia.c
+++ b/sys/dev/pcmcia/wdc_pcmcia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wdc_pcmcia.c,v 1.32 2017/12/30 20:46:59 guenther Exp $ */
+/* $OpenBSD: wdc_pcmcia.c,v 1.33 2021/03/07 06:20:09 jsg Exp $ */
/* $NetBSD: wdc_pcmcia.c,v 1.19 1999/02/19 21:49:43 abs Exp $ */
/*-
@@ -135,9 +135,7 @@ struct wdc_pcmcia_product *
wdc_pcmcia_lookup(struct pcmcia_attach_args *);
int
-wdc_pcmcia_disk_device_interface_callback(tuple, arg)
- struct pcmcia_tuple *tuple;
- void *arg;
+wdc_pcmcia_disk_device_interface_callback(struct pcmcia_tuple *tuple, void *arg)
{
struct wdc_pcmcia_disk_device_interface_args *ddi = arg;
@@ -166,8 +164,7 @@ wdc_pcmcia_disk_device_interface_callback(tuple, arg)
}
int
-wdc_pcmcia_disk_device_interface(pf)
- struct pcmcia_function *pf;
+wdc_pcmcia_disk_device_interface(struct pcmcia_function *pf)
{
struct wdc_pcmcia_disk_device_interface_args ddi;
@@ -181,8 +178,7 @@ wdc_pcmcia_disk_device_interface(pf)
}
struct wdc_pcmcia_product *
-wdc_pcmcia_lookup(pa)
- struct pcmcia_attach_args *pa;
+wdc_pcmcia_lookup(struct pcmcia_attach_args *pa)
{
struct wdc_pcmcia_product *wpp;
int i, cis_match;
@@ -210,9 +206,7 @@ wdc_pcmcia_lookup(pa)
}
static int
-wdc_pcmcia_match(parent, match, aux)
- struct device *parent;
- void *match, *aux;
+wdc_pcmcia_match(struct device *parent, void *match, void *aux)
{
struct pcmcia_attach_args *pa = aux;
struct pcmcia_softc *sc;
@@ -236,10 +230,7 @@ wdc_pcmcia_match(parent, match, aux)
}
static void
-wdc_pcmcia_attach(parent, self, aux)
- struct device *parent;
- struct device *self;
- void *aux;
+wdc_pcmcia_attach(struct device *parent, struct device *self, void *aux)
{
struct wdc_pcmcia_softc *sc = (void *)self;
struct pcmcia_attach_args *pa = aux;
@@ -386,9 +377,7 @@ wdc_pcmcia_attach(parent, self, aux)
}
int
-wdc_pcmcia_detach(self, flags)
- struct device *self;
- int flags;
+wdc_pcmcia_detach(struct device *self, int flags)
{
struct wdc_pcmcia_softc *sc = (struct wdc_pcmcia_softc *)self;
int error;
@@ -415,9 +404,7 @@ wdc_pcmcia_detach(self, flags)
}
int
-wdc_pcmcia_activate(self, act)
- struct device *self;
- int act;
+wdc_pcmcia_activate(struct device *self, int act)
{
struct wdc_pcmcia_softc *sc = (struct wdc_pcmcia_softc *)self;
int rv = 0;