summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/adv.c63
-rw-r--r--sys/dev/ic/aic7xxx_seeprom.c7
-rw-r--r--sys/dev/ic/ax88190.c20
-rw-r--r--sys/dev/ic/cac.c18
-rw-r--r--sys/dev/ic/cy.c61
-rw-r--r--sys/dev/ic/i82365.c141
-rw-r--r--sys/dev/ic/mtd8xx.c5
-rw-r--r--sys/dev/ic/ncr53c9x.c80
-rw-r--r--sys/dev/ic/rtl80x9.c15
-rw-r--r--sys/dev/ic/siop.c70
-rw-r--r--sys/dev/ic/siop_common.c62
-rw-r--r--sys/dev/ic/smc91cxx.c78
-rw-r--r--sys/dev/ic/smc93cx6.c9
-rw-r--r--sys/dev/ic/tcic2.c137
-rw-r--r--sys/dev/ic/tcic2var.h67
-rw-r--r--sys/dev/ic/twe.c32
-rw-r--r--sys/dev/ic/uha.c33
17 files changed, 262 insertions, 636 deletions
diff --git a/sys/dev/ic/adv.c b/sys/dev/ic/adv.c
index 1f0e29f76ee..3ee97dfee35 100644
--- a/sys/dev/ic/adv.c
+++ b/sys/dev/ic/adv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adv.c,v 1.51 2020/09/22 19:32:52 krw Exp $ */
+/* $OpenBSD: adv.c,v 1.52 2021/03/07 06:21:38 jsg Exp $ */
/* $NetBSD: adv.c,v 1.6 1998/10/28 20:39:45 dante Exp $ */
/*
@@ -96,8 +96,7 @@ struct scsi_adapter adv_switch = {
static int
-adv_alloc_ccbs(sc)
- ASC_SOFTC *sc;
+adv_alloc_ccbs(ASC_SOFTC *sc)
{
bus_dma_segment_t seg;
int error, rseg;
@@ -146,10 +145,7 @@ adv_alloc_ccbs(sc)
* CCB data is already zeroed on allocation.
*/
static int
-adv_create_ccbs(sc, ccbstore, count)
- ASC_SOFTC *sc;
- ADV_CCB *ccbstore;
- int count;
+adv_create_ccbs(ASC_SOFTC *sc, ADV_CCB *ccbstore, int count)
{
ADV_CCB *ccb;
int i, error;
@@ -172,8 +168,7 @@ adv_create_ccbs(sc, ccbstore, count)
* A ccb is put onto the free list.
*/
void
-adv_ccb_free(xsc, xccb)
- void *xsc, *xccb;
+adv_ccb_free(void *xsc, void *xccb)
{
ASC_SOFTC *sc = xsc;
ADV_CCB *ccb = xccb;
@@ -187,8 +182,7 @@ adv_ccb_free(xsc, xccb)
static void
-adv_reset_ccb(ccb)
- ADV_CCB *ccb;
+adv_reset_ccb(ADV_CCB *ccb)
{
ccb->flags = 0;
@@ -196,9 +190,7 @@ adv_reset_ccb(ccb)
static int
-adv_init_ccb(sc, ccb)
- ASC_SOFTC *sc;
- ADV_CCB *ccb;
+adv_init_ccb(ASC_SOFTC *sc, ADV_CCB *ccb)
{
int error;
@@ -223,8 +215,7 @@ adv_init_ccb(sc, ccb)
* Get a free ccb
*/
void *
-adv_ccb_alloc(xsc)
- void *xsc;
+adv_ccb_alloc(void *xsc)
{
ASC_SOFTC *sc = xsc;
ADV_CCB *ccb;
@@ -244,9 +235,7 @@ adv_ccb_alloc(xsc)
* Queue a CCB to be sent to the controller, and send it if possible.
*/
static void
-adv_queue_ccb(sc, ccb)
- ASC_SOFTC *sc;
- ADV_CCB *ccb;
+adv_queue_ccb(ASC_SOFTC *sc, ADV_CCB *ccb)
{
timeout_set(&ccb->xs->stimeout, adv_timeout, ccb);
@@ -257,8 +246,7 @@ adv_queue_ccb(sc, ccb)
static void
-adv_start_ccbs(sc)
- ASC_SOFTC *sc;
+adv_start_ccbs(ASC_SOFTC *sc)
{
ADV_CCB *ccb;
struct scsi_xfer *xs;
@@ -294,10 +282,8 @@ adv_start_ccbs(sc)
* Allocate a DMA able memory for overrun_buffer.
* This memory can be safely shared among all the AdvanSys boards.
*/
-u_int8_t *
-adv_alloc_overrunbuf(dvname, dmat)
- char *dvname;
- bus_dma_tag_t dmat;
+u_int8_t *
+adv_alloc_overrunbuf(char *dvname, bus_dma_tag_t dmat)
{
static u_int8_t *overrunbuf = NULL;
@@ -357,8 +343,7 @@ adv_alloc_overrunbuf(dvname, dmat)
int
-adv_init(sc)
- ASC_SOFTC *sc;
+adv_init(ASC_SOFTC *sc)
{
int warn;
@@ -440,8 +425,7 @@ adv_init(sc)
void
-adv_attach(sc)
- ASC_SOFTC *sc;
+adv_attach(ASC_SOFTC *sc)
{
struct scsibus_attach_args saa;
int i, error;
@@ -518,8 +502,7 @@ adv_attach(sc)
* the unit, target and lu.
*/
static void
-adv_scsi_cmd(xs)
- struct scsi_xfer *xs;
+adv_scsi_cmd(struct scsi_xfer *xs)
{
struct scsi_link *sc_link = xs->sc_link;
ASC_SOFTC *sc = sc_link->bus->sb_adapter_softc;
@@ -650,8 +633,7 @@ adv_scsi_cmd(xs)
int
-adv_intr(arg)
- void *arg;
+adv_intr(void *arg)
{
ASC_SOFTC *sc = arg;
@@ -678,10 +660,7 @@ adv_intr(arg)
* Poll a particular unit, looking for a particular xs
*/
static int
-adv_poll(sc, xs, count)
- ASC_SOFTC *sc;
- struct scsi_xfer *xs;
- int count;
+adv_poll(ASC_SOFTC *sc, struct scsi_xfer *xs, int count)
{
int s;
@@ -700,8 +679,7 @@ adv_poll(sc, xs, count)
static void
-adv_timeout(arg)
- void *arg;
+adv_timeout(void *arg)
{
ADV_CCB *ccb = arg;
struct scsi_xfer *xs = ccb->xs;
@@ -741,8 +719,7 @@ adv_timeout(arg)
static void
-adv_watchdog(arg)
- void *arg;
+adv_watchdog(void *arg)
{
ADV_CCB *ccb = arg;
struct scsi_xfer *xs = ccb->xs;
@@ -770,9 +747,7 @@ adv_watchdog(arg)
* Interrupt callback function for the Narrow SCSI Asc Library.
*/
static void
-adv_narrow_isr_callback(sc, qdonep)
- ASC_SOFTC *sc;
- ASC_QDONE_INFO *qdonep;
+adv_narrow_isr_callback(ASC_SOFTC *sc, ASC_QDONE_INFO *qdonep)
{
bus_dma_tag_t dmat = sc->sc_dmat;
ADV_CCB *ccb = (ADV_CCB *) qdonep->d2.ccb_ptr;
diff --git a/sys/dev/ic/aic7xxx_seeprom.c b/sys/dev/ic/aic7xxx_seeprom.c
index 5370ca3075a..832f98b406b 100644
--- a/sys/dev/ic/aic7xxx_seeprom.c
+++ b/sys/dev/ic/aic7xxx_seeprom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic7xxx_seeprom.c,v 1.8 2019/05/14 15:19:06 jan Exp $ */
+/* $OpenBSD: aic7xxx_seeprom.c,v 1.9 2021/03/07 06:21:38 jsg Exp $ */
/* $NetBSD: aic7xxx_seeprom.c,v 1.8 2003/05/02 19:12:19 dyoung Exp $ */
/*
@@ -47,7 +47,7 @@
* from the FreeBSD source file aic7xxx_pci.c by Frank van der Linden
* <fvdl@netbsd.org>
*
- * $Id: aic7xxx_seeprom.c,v 1.8 2019/05/14 15:19:06 jan Exp $
+ * $Id: aic7xxx_seeprom.c,v 1.9 2021/03/07 06:21:38 jsg Exp $
*
* $FreeBSD: src/sys/dev/aic7xxx/aic7xxx_pci.c,v 1.22 2003/01/20 20:44:55 gibbs Exp $
*/
@@ -728,8 +728,7 @@ write_brdctl(struct ahc_softc *ahc, uint8_t value)
}
static uint8_t
-read_brdctl(ahc)
- struct ahc_softc *ahc;
+read_brdctl(struct ahc_softc *ahc)
{
uint8_t brdctl;
uint8_t value;
diff --git a/sys/dev/ic/ax88190.c b/sys/dev/ic/ax88190.c
index 117000a833f..9cc37c9d809 100644
--- a/sys/dev/ic/ax88190.c
+++ b/sys/dev/ic/ax88190.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ax88190.c,v 1.8 2015/11/24 17:11:39 mpi Exp $ */
+/* $OpenBSD: ax88190.c,v 1.9 2021/03/07 06:21:38 jsg Exp $ */
/* $NetBSD$ */
/*-
@@ -134,8 +134,7 @@ ax88190_stop_card(struct dp8390_softc *sc)
}
u_int32_t
-ax88190_mii_bitbang_read(self)
- struct device *self;
+ax88190_mii_bitbang_read(struct device *self)
{
struct ne2000_softc *sc = (void *)self;
@@ -143,9 +142,7 @@ ax88190_mii_bitbang_read(self)
}
void
-ax88190_mii_bitbang_write(self, val)
- struct device *self;
- u_int32_t val;
+ax88190_mii_bitbang_write(struct device *self, u_int32_t val)
{
struct ne2000_softc *sc = (void *)self;
@@ -153,24 +150,19 @@ ax88190_mii_bitbang_write(self, val)
}
int
-ax88190_mii_readreg(self, phy, reg)
- struct device *self;
- int phy, reg;
+ax88190_mii_readreg(struct device *self, int phy, int reg)
{
return (mii_bitbang_readreg(self, &ax88190_mii_bitbang_ops, phy, reg));
}
void
-ax88190_mii_writereg(self, phy, reg, val)
- struct device *self;
- int phy, reg, val;
+ax88190_mii_writereg(struct device *self, int phy, int reg, int val)
{
mii_bitbang_writereg(self, &ax88190_mii_bitbang_ops, phy, reg, val);
}
void
-ax88190_mii_statchg(self)
- struct device *self;
+ax88190_mii_statchg(struct device *self)
{
/* XXX */
}
diff --git a/sys/dev/ic/cac.c b/sys/dev/ic/cac.c
index 7441be92ae9..d370b4430ef 100644
--- a/sys/dev/ic/cac.c
+++ b/sys/dev/ic/cac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cac.c,v 1.73 2020/10/15 00:01:24 krw Exp $ */
+/* $OpenBSD: cac.c,v 1.74 2021/03/07 06:21:38 jsg Exp $ */
/* $NetBSD: cac.c,v 1.15 2000/11/08 19:20:35 ad Exp $ */
/*
@@ -270,8 +270,7 @@ cac_init(struct cac_softc *sc, int startfw)
}
int
-cac_flush(sc)
- struct cac_softc *sc;
+cac_flush(struct cac_softc *sc)
{
u_int8_t buf[512];
@@ -286,8 +285,7 @@ cac_flush(sc)
* dequeue any waiting CCBs.
*/
int
-cac_intr(v)
- void *v;
+cac_intr(void *v)
{
struct cac_softc *sc = v;
struct cac_ccb *ccb;
@@ -543,9 +541,7 @@ cac_ccb_free(void *xsc, void *xccb)
}
int
-cac_get_dinfo(sc, target)
- struct cac_softc *sc;
- int target;
+cac_get_dinfo(struct cac_softc *sc, int target)
{
if (sc->sc_dinfos[target].ncylinders)
return (0);
@@ -561,8 +557,7 @@ cac_get_dinfo(sc, target)
}
void
-cac_scsi_cmd(xs)
- struct scsi_xfer *xs;
+cac_scsi_cmd(struct scsi_xfer *xs)
{
struct scsi_link *link = xs->sc_link;
struct cac_softc *sc = link->bus->sb_adapter_softc;
@@ -739,8 +734,7 @@ cac_l0_submit(struct cac_softc *sc, struct cac_ccb *ccb)
}
struct cac_ccb *
-cac_l0_completed(sc)
- struct cac_softc *sc;
+cac_l0_completed(struct cac_softc *sc)
{
struct cac_ccb *ccb;
paddr_t off, orig_off;
diff --git a/sys/dev/ic/cy.c b/sys/dev/ic/cy.c
index 4ca50c214ba..2b9d4111f34 100644
--- a/sys/dev/ic/cy.c
+++ b/sys/dev/ic/cy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cy.c,v 1.39 2019/07/19 00:17:15 cheloha Exp $ */
+/* $OpenBSD: cy.c,v 1.40 2021/03/07 06:21:38 jsg Exp $ */
/*
* Copyright (c) 1996 Timo Rossi.
* All rights reserved.
@@ -183,8 +183,7 @@ cy_probe_common(bus_space_tag_t memt, bus_space_handle_t memh, int bustype)
}
void
-cy_attach(parent, self)
- struct device *parent, *self;
+cy_attach(struct device *parent, struct device *self)
{
int card, port, cy_chip, num_chips, cdu, chip_offs, cy_clock;
struct cy_softc *sc = (void *)self;
@@ -257,10 +256,7 @@ int cyioctl(dev_t, u_long, caddr_t, int, struct proc *);
int cystop(struct tty *, int flag);
int
-cyopen(dev, flag, mode, p)
- dev_t dev;
- int flag, mode;
- struct proc *p;
+cyopen(dev_t dev, int flag, int mode, struct proc *p)
{
int card = CY_CARD(dev);
int port = CY_PORT(dev);
@@ -390,10 +386,7 @@ cyopen(dev, flag, mode, p)
* close routine. returns zero if successful, else error code
*/
int
-cyclose(dev, flag, mode, p)
- dev_t dev;
- int flag, mode;
- struct proc *p;
+cyclose(dev_t dev, int flag, int mode, struct proc *p)
{
int card = CY_CARD(dev);
int port = CY_PORT(dev);
@@ -433,10 +426,7 @@ cyclose(dev, flag, mode, p)
* Read routine
*/
int
-cyread(dev, uio, flag)
- dev_t dev;
- struct uio *uio;
- int flag;
+cyread(dev_t dev, struct uio *uio, int flag)
{
int card = CY_CARD(dev);
int port = CY_PORT(dev);
@@ -456,10 +446,7 @@ cyread(dev, uio, flag)
* Write routine
*/
int
-cywrite(dev, uio, flag)
- dev_t dev;
- struct uio *uio;
- int flag;
+cywrite(dev_t dev, struct uio *uio, int flag)
{
int card = CY_CARD(dev);
int port = CY_PORT(dev);
@@ -479,8 +466,7 @@ cywrite(dev, uio, flag)
* return tty pointer
*/
struct tty *
-cytty(dev)
- dev_t dev;
+cytty(dev_t dev)
{
int card = CY_CARD(dev);
int port = CY_PORT(dev);
@@ -495,12 +481,7 @@ cytty(dev)
* ioctl routine
*/
int
-cyioctl(dev, cmd, data, flag, p)
- dev_t dev;
- u_long cmd;
- caddr_t data;
- int flag;
- struct proc *p;
+cyioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
{
int card = CY_CARD(dev);
int port = CY_PORT(dev);
@@ -585,8 +566,7 @@ cyioctl(dev, cmd, data, flag, p)
* start output
*/
void
-cystart(tp)
- struct tty *tp;
+cystart(struct tty *tp)
{
int card = CY_CARD(tp->t_dev);
int port = CY_PORT(tp->t_dev);
@@ -621,9 +601,7 @@ out:
* stop output
*/
int
-cystop(tp, flag)
- struct tty *tp;
- int flag;
+cystop(struct tty *tp, int flag)
{
int card = CY_CARD(tp->t_dev);
int port = CY_PORT(tp->t_dev);
@@ -657,9 +635,7 @@ cystop(tp, flag)
* returns 0 if successful, else returns error code
*/
int
-cyparam(tp, t)
- struct tty *tp;
- struct termios *t;
+cyparam(struct tty *tp, struct termios *t)
{
int card = CY_CARD(tp->t_dev);
int port = CY_PORT(tp->t_dev);
@@ -807,10 +783,7 @@ cyparam(tp, t)
*
*/
int
-cy_modem_control(cy, bits, howto)
- struct cy_port *cy;
- int bits;
- int howto;
+cy_modem_control(struct cy_port *cy, int bits, int howto)
{
int s, msvr;
@@ -1075,8 +1048,7 @@ out:
* hardware interrupt routine
*/
int
-cy_intr(arg)
- void *arg;
+cy_intr(void *arg)
{
struct cy_softc *sc = arg;
struct cy_port *cy;
@@ -1340,8 +1312,7 @@ txdone:
* subroutine to enable CD1400 transmitter
*/
void
-cy_enable_transmitter(cy)
- struct cy_port *cy;
+cy_enable_transmitter(struct cy_port *cy)
{
int s;
s = spltty();
@@ -1355,9 +1326,7 @@ cy_enable_transmitter(cy)
* Execute a CD1400 channel command
*/
void
-cd1400_channel_cmd(cy, cmd)
- struct cy_port *cy;
- int cmd;
+cd1400_channel_cmd(struct cy_port *cy, int cmd)
{
u_int waitcnt = 5 * 8 * 1024; /* approx 5 ms */
diff --git a/sys/dev/ic/i82365.c b/sys/dev/ic/i82365.c
index 976ba22419c..285b3ea628b 100644
--- a/sys/dev/ic/i82365.c
+++ b/sys/dev/ic/i82365.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i82365.c,v 1.39 2020/03/04 23:19:58 cheloha Exp $ */
+/* $OpenBSD: i82365.c,v 1.40 2021/03/07 06:21:38 jsg Exp $ */
/* $NetBSD: i82365.c,v 1.10 1998/06/09 07:36:55 thorpej Exp $ */
/*
@@ -109,8 +109,7 @@ struct cfdriver pcic_cd = {
};
int
-pcic_ident_ok(ident)
- int ident;
+pcic_ident_ok(int ident)
{
/* this is very empirical and heuristic */
@@ -128,8 +127,7 @@ pcic_ident_ok(ident)
}
int
-pcic_vendor(h)
- struct pcic_handle *h;
+pcic_vendor(struct pcic_handle *h)
{
int vendor, reg;
@@ -193,8 +191,7 @@ pcic_vendor(h)
}
void
-pcic_attach(sc)
- struct pcic_softc *sc;
+pcic_attach(struct pcic_softc *sc)
{
int vendor, count, i, reg;
@@ -335,8 +332,7 @@ pcic_attach(sc)
}
void
-pcic_attach_sockets(sc)
- struct pcic_softc *sc;
+pcic_attach_sockets(struct pcic_softc *sc)
{
int i;
@@ -346,8 +342,7 @@ pcic_attach_sockets(sc)
}
void
-pcic_attach_socket(h)
- struct pcic_handle *h;
+pcic_attach_socket(struct pcic_handle *h)
{
struct pcmciabus_attach_args paa;
struct pcic_softc *sc = (struct pcic_softc *)(h->ph_parent);
@@ -379,8 +374,7 @@ pcic_attach_socket(h)
}
void
-pcic_create_event_thread(arg)
- void *arg;
+pcic_create_event_thread(void *arg)
{
struct pcic_handle *h = arg;
char name[MAXCOMLEN+1];
@@ -412,8 +406,7 @@ pcic_create_event_thread(arg)
}
void
-pcic_event_thread(arg)
- void *arg;
+pcic_event_thread(void *arg)
{
struct pcic_handle *h = arg;
struct pcic_event *pe;
@@ -444,9 +437,7 @@ pcic_event_thread(arg)
}
void
-pcic_event_process(h, pe)
- struct pcic_handle *h;
- struct pcic_event *pe;
+pcic_event_process(struct pcic_handle *h, struct pcic_event *pe)
{
int s;
@@ -510,8 +501,7 @@ pcic_event_process(h, pe)
}
void
-pcic_init_socket(h)
- struct pcic_handle *h;
+pcic_init_socket(struct pcic_handle *h)
{
int reg;
struct pcic_softc *sc = (struct pcic_softc *)(h->ph_parent);
@@ -557,9 +547,7 @@ pcic_init_socket(h)
}
int
-pcic_submatch(parent, match, aux)
- struct device *parent;
- void *match, *aux;
+pcic_submatch(struct device *parent, void *match, void *aux)
{
struct cfdata *cf = match;
struct pcmciabus_attach_args *paa = aux;
@@ -618,9 +606,7 @@ pcic_submatch(parent, match, aux)
}
int
-pcic_print(arg, pnp)
- void *arg;
- const char *pnp;
+pcic_print(void *arg, const char *pnp)
{
struct pcmciabus_attach_args *paa = arg;
struct pcic_handle *h = (struct pcic_handle *) paa->pch;
@@ -650,8 +636,7 @@ pcic_print(arg, pnp)
}
int
-pcic_intr(arg)
- void *arg;
+pcic_intr(void *arg)
{
struct pcic_softc *sc = arg;
int i, ret = 0;
@@ -666,8 +651,7 @@ pcic_intr(arg)
}
void
-pcic_poll_intr(arg)
- void *arg;
+pcic_poll_intr(void *arg)
{
struct pcic_softc *sc = arg;
int i, s;
@@ -688,8 +672,7 @@ pcic_poll_intr(arg)
}
int
-pcic_intr_socket(h)
- struct pcic_handle *h;
+pcic_intr_socket(struct pcic_handle *h)
{
int cscreg;
@@ -752,9 +735,7 @@ pcic_intr_socket(h)
}
void
-pcic_queue_event(h, event)
- struct pcic_handle *h;
- int event;
+pcic_queue_event(struct pcic_handle *h, int event)
{
struct pcic_event *pe;
int s;
@@ -771,8 +752,7 @@ pcic_queue_event(h, event)
}
void
-pcic_attach_card(h)
- struct pcic_handle *h;
+pcic_attach_card(struct pcic_handle *h)
{
if (h->flags & PCIC_FLAG_CARDP)
panic("pcic_attach_card: already attached");
@@ -784,9 +764,7 @@ pcic_attach_card(h)
}
void
-pcic_detach_card(h, flags)
- struct pcic_handle *h;
- int flags; /* DETACH_* */
+pcic_detach_card(struct pcic_handle *h, int flags)
{
if (h->flags & PCIC_FLAG_CARDP) {
@@ -800,8 +778,7 @@ pcic_detach_card(h, flags)
}
void
-pcic_deactivate_card(h)
- struct pcic_handle *h;
+pcic_deactivate_card(struct pcic_handle *h)
{
struct device *dev = (struct device *)h->pcmcia;
@@ -827,9 +804,7 @@ pcic_deactivate_card(h)
* activate a card that isn't there is bad news.
*/
void
-pcic_power(why, arg)
- int why;
- void *arg;
+pcic_power(int why, void *arg)
{
struct pcic_handle *h = (struct pcic_handle *)arg;
struct pcic_softc *sc = (struct pcic_softc *)h->ph_parent;
@@ -850,10 +825,8 @@ pcic_power(why, arg)
}
int
-pcic_chip_mem_alloc(pch, size, pcmhp)
- pcmcia_chipset_handle_t pch;
- bus_size_t size;
- struct pcmcia_mem_handle *pcmhp;
+pcic_chip_mem_alloc(pcmcia_chipset_handle_t pch, bus_size_t size,
+ struct pcmcia_mem_handle *pcmhp)
{
struct pcic_handle *h = (struct pcic_handle *) pch;
bus_space_handle_t memh;
@@ -901,9 +874,7 @@ pcic_chip_mem_alloc(pch, size, pcmhp)
}
void
-pcic_chip_mem_free(pch, pcmhp)
- pcmcia_chipset_handle_t pch;
- struct pcmcia_mem_handle *pcmhp;
+pcic_chip_mem_free(pcmcia_chipset_handle_t pch, struct pcmcia_mem_handle *pcmhp)
{
struct pcic_handle *h = (struct pcic_handle *) pch;
struct pcic_softc *sc = (struct pcic_softc *)(h->ph_parent);
@@ -968,9 +939,7 @@ static struct mem_map_index_st {
};
void
-pcic_chip_do_mem_map(h, win)
- struct pcic_handle *h;
- int win;
+pcic_chip_do_mem_map(struct pcic_handle *h, int win)
{
int reg;
int kind = h->mem[win].kind & ~PCMCIA_WIDTH_MEM_MASK;
@@ -1024,14 +993,9 @@ pcic_chip_do_mem_map(h, win)
}
int
-pcic_chip_mem_map(pch, kind, card_addr, size, pcmhp, offsetp, windowp)
- pcmcia_chipset_handle_t pch;
- int kind;
- bus_addr_t card_addr;
- bus_size_t size;
- struct pcmcia_mem_handle *pcmhp;
- bus_size_t *offsetp;
- int *windowp;
+pcic_chip_mem_map(pcmcia_chipset_handle_t pch, int kind, bus_addr_t card_addr,
+ bus_size_t size, struct pcmcia_mem_handle *pcmhp, bus_size_t *offsetp,
+ int *windowp)
{
struct pcic_handle *h = (struct pcic_handle *) pch;
bus_addr_t busaddr;
@@ -1094,9 +1058,7 @@ pcic_chip_mem_map(pch, kind, card_addr, size, pcmhp, offsetp, windowp)
}
void
-pcic_chip_mem_unmap(pch, window)
- pcmcia_chipset_handle_t pch;
- int window;
+pcic_chip_mem_unmap(pcmcia_chipset_handle_t pch, int window)
{
struct pcic_handle *h = (struct pcic_handle *) pch;
int reg;
@@ -1112,12 +1074,8 @@ pcic_chip_mem_unmap(pch, window)
}
int
-pcic_chip_io_alloc(pch, start, size, align, pcihp)
- pcmcia_chipset_handle_t pch;
- bus_addr_t start;
- bus_size_t size;
- bus_size_t align;
- struct pcmcia_io_handle *pcihp;
+pcic_chip_io_alloc(pcmcia_chipset_handle_t pch, bus_addr_t start,
+ bus_size_t size, bus_size_t align, struct pcmcia_io_handle *pcihp)
{
struct pcic_handle *h = (struct pcic_handle *) pch;
bus_space_tag_t iot;
@@ -1201,9 +1159,7 @@ pcic_chip_io_alloc(pch, start, size, align, pcihp)
}
void
-pcic_chip_io_free(pch, pcihp)
- pcmcia_chipset_handle_t pch;
- struct pcmcia_io_handle *pcihp;
+pcic_chip_io_free(pcmcia_chipset_handle_t pch, struct pcmcia_io_handle *pcihp)
{
bus_space_tag_t iot = pcihp->iot;
bus_space_handle_t ioh = pcihp->ioh;
@@ -1260,9 +1216,7 @@ static struct io_map_index_st {
};
void
-pcic_chip_do_io_map(h, win)
- struct pcic_handle *h;
- int win;
+pcic_chip_do_io_map(struct pcic_handle *h, int win)
{
int reg;
@@ -1290,13 +1244,8 @@ pcic_chip_do_io_map(h, win)
}
int
-pcic_chip_io_map(pch, width, offset, size, pcihp, windowp)
- pcmcia_chipset_handle_t pch;
- int width;
- bus_addr_t offset;
- bus_size_t size;
- struct pcmcia_io_handle *pcihp;
- int *windowp;
+pcic_chip_io_map(pcmcia_chipset_handle_t pch, int width, bus_addr_t offset,
+ bus_size_t size, struct pcmcia_io_handle *pcihp, int *windowp)
{
struct pcic_handle *h = (struct pcic_handle *) pch;
bus_addr_t ioaddr = pcihp->addr + offset;
@@ -1340,9 +1289,7 @@ pcic_chip_io_map(pch, width, offset, size, pcihp, windowp)
}
void
-pcic_chip_io_unmap(pch, window)
- pcmcia_chipset_handle_t pch;
- int window;
+pcic_chip_io_unmap(pcmcia_chipset_handle_t pch, int window)
{
struct pcic_handle *h = (struct pcic_handle *) pch;
int reg;
@@ -1358,8 +1305,7 @@ pcic_chip_io_unmap(pch, window)
}
void
-pcic_wait_ready(h)
- struct pcic_handle *h;
+pcic_wait_ready(struct pcic_handle *h)
{
int i;
@@ -1380,8 +1326,7 @@ pcic_wait_ready(h)
}
void
-pcic_chip_socket_enable(pch)
- pcmcia_chipset_handle_t pch;
+pcic_chip_socket_enable(pcmcia_chipset_handle_t pch)
{
struct pcic_handle *h = (struct pcic_handle *) pch;
int cardtype, reg, win;
@@ -1478,8 +1423,7 @@ pcic_chip_socket_enable(pch)
}
void
-pcic_chip_socket_disable(pch)
- pcmcia_chipset_handle_t pch;
+pcic_chip_socket_disable(pcmcia_chipset_handle_t pch)
{
struct pcic_handle *h = (struct pcic_handle *) pch;
@@ -1496,9 +1440,7 @@ pcic_chip_socket_disable(pch)
}
u_int8_t
-st_pcic_read(h, idx)
- struct pcic_handle *h;
- int idx;
+st_pcic_read(struct pcic_handle *h, int idx)
{
if (idx != -1)
bus_space_write_1(h->ph_bus_t, h->ph_bus_h, PCIC_REG_INDEX,
@@ -1507,10 +1449,7 @@ st_pcic_read(h, idx)
}
void
-st_pcic_write(h, idx, data)
- struct pcic_handle *h;
- int idx;
- int data;
+st_pcic_write(struct pcic_handle *h, int idx, int data)
{
if (idx != -1)
bus_space_write_1(h->ph_bus_t, h->ph_bus_h, PCIC_REG_INDEX,
diff --git a/sys/dev/ic/mtd8xx.c b/sys/dev/ic/mtd8xx.c
index 1392815ab4c..f6b03ff1bde 100644
--- a/sys/dev/ic/mtd8xx.c
+++ b/sys/dev/ic/mtd8xx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mtd8xx.c,v 1.33 2020/07/10 13:26:37 patrick Exp $ */
+/* $OpenBSD: mtd8xx.c,v 1.34 2021/03/07 06:21:38 jsg Exp $ */
/*
* Copyright (c) 2003 Oleg Safiullin <form@pdp11.org.ru>
@@ -948,8 +948,7 @@ mtd_rxeof(struct mtd_softc *sc)
* for new packets in the RX ring, so we should catch up eventually.
*/
static int
-mtd_rx_resync(sc)
- struct mtd_softc *sc;
+mtd_rx_resync(struct mtd_softc *sc)
{
int i, pos;
struct mtd_rx_desc *cur_rx;
diff --git a/sys/dev/ic/ncr53c9x.c b/sys/dev/ic/ncr53c9x.c
index 6fbb124c373..d40a7c08087 100644
--- a/sys/dev/ic/ncr53c9x.c
+++ b/sys/dev/ic/ncr53c9x.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ncr53c9x.c,v 1.77 2020/09/22 19:32:52 krw Exp $ */
+/* $OpenBSD: ncr53c9x.c,v 1.78 2021/03/07 06:21:38 jsg Exp $ */
/* $NetBSD: ncr53c9x.c,v 1.56 2000/11/30 14:41:46 thorpej Exp $ */
/*
@@ -175,9 +175,7 @@ const char *ncr53c9x_variant_names[] = {
* Search linked list for LUN info by LUN id.
*/
static struct ncr53c9x_linfo *
-ncr53c9x_lunsearch(ti, lun)
- struct ncr53c9x_tinfo *ti;
- int64_t lun;
+ncr53c9x_lunsearch(struct ncr53c9x_tinfo *ti, int64_t lun)
{
struct ncr53c9x_linfo *li;
LIST_FOREACH(li, &ti->luns, link)
@@ -190,8 +188,7 @@ ncr53c9x_lunsearch(ti, lun)
* Attach this instance, and then all the sub-devices
*/
void
-ncr53c9x_attach(sc)
- struct ncr53c9x_softc *sc;
+ncr53c9x_attach(struct ncr53c9x_softc *sc)
{
struct scsibus_attach_args saa;
@@ -283,8 +280,7 @@ ncr53c9x_attach(sc)
* routine above.
*/
void
-ncr53c9x_reset(sc)
- struct ncr53c9x_softc *sc;
+ncr53c9x_reset(struct ncr53c9x_softc *sc)
{
/* reset DMA first */
@@ -356,8 +352,7 @@ ncr53c9x_reset(sc)
* Reset the SCSI bus, but not the chip
*/
void
-ncr53c9x_scsi_reset(sc)
- struct ncr53c9x_softc *sc;
+ncr53c9x_scsi_reset(struct ncr53c9x_softc *sc)
{
(*sc->sc_glue->gl_dma_stop)(sc);
@@ -370,9 +365,7 @@ ncr53c9x_scsi_reset(sc)
* Initialize ncr53c9x state machine
*/
void
-ncr53c9x_init(sc, doreset)
- struct ncr53c9x_softc *sc;
- int doreset;
+ncr53c9x_init(struct ncr53c9x_softc *sc, int doreset)
{
struct ncr53c9x_ecb *ecb;
struct ncr53c9x_linfo *li;
@@ -486,8 +479,7 @@ ncr53c9x_init(sc, doreset)
* if an interrupt is pending.
*/
__inline__ void
-ncr53c9x_readregs(sc)
- struct ncr53c9x_softc *sc;
+ncr53c9x_readregs(struct ncr53c9x_softc *sc)
{
sc->sc_espstat = NCR_READ_REG(sc, NCR_STAT);
@@ -519,9 +511,7 @@ ncr53c9x_readregs(sc)
* Convert Synchronous Transfer Period to chip register Clock Per Byte value.
*/
static inline int
-ncr53c9x_stp2cpb(sc, period)
- struct ncr53c9x_softc *sc;
- int period;
+ncr53c9x_stp2cpb(struct ncr53c9x_softc *sc, int period)
{
int v;
v = (sc->sc_freq * period) / 250;
@@ -532,9 +522,7 @@ ncr53c9x_stp2cpb(sc, period)
}
static inline void
-ncr53c9x_setsync(sc, ti)
- struct ncr53c9x_softc *sc;
- struct ncr53c9x_tinfo *ti;
+ncr53c9x_setsync(struct ncr53c9x_softc *sc, struct ncr53c9x_tinfo *ti)
{
u_char syncoff, synctp;
u_char cfg3 = sc->sc_cfg3 | ti->cfg3;
@@ -586,9 +574,7 @@ ncr53c9x_setsync(sc, ti)
* by DMA instead of programmed I/O soon.
*/
void
-ncr53c9x_select(sc, ecb)
- struct ncr53c9x_softc *sc;
- struct ncr53c9x_ecb *ecb;
+ncr53c9x_select(struct ncr53c9x_softc *sc, struct ncr53c9x_ecb *ecb)
{
struct scsi_link *sc_link = ecb->xs->sc_link;
int target = sc_link->target;
@@ -820,8 +806,7 @@ ncr53c9x_scsi_free(struct scsi_link *sc_link)
* SCSI-commands.
*/
void
-ncr53c9x_scsi_cmd(xs)
- struct scsi_xfer *xs;
+ncr53c9x_scsi_cmd(struct scsi_xfer *xs)
{
struct scsi_link *sc_link = xs->sc_link;
struct ncr53c9x_softc *sc = sc_link->bus->sb_adapter_softc;
@@ -895,10 +880,7 @@ ncr53c9x_scsi_cmd(xs)
* Used when interrupt driven I/O isn't allowed, e.g. during boot.
*/
int
-ncr53c9x_poll(sc, xs, count)
- struct ncr53c9x_softc *sc;
- struct scsi_xfer *xs;
- int count;
+ncr53c9x_poll(struct ncr53c9x_softc *sc, struct scsi_xfer *xs, int count)
{
int s;
@@ -942,8 +924,7 @@ ncr53c9x_poll(sc, xs, count)
* Should only be called when state == NCR_IDLE and at bio pl.
*/
void
-ncr53c9x_sched(sc)
- struct ncr53c9x_softc *sc;
+ncr53c9x_sched(struct ncr53c9x_softc *sc)
{
struct ncr53c9x_ecb *ecb;
struct scsi_link *sc_link;
@@ -1070,9 +1051,7 @@ ncr53c9x_sched(sc)
}
void
-ncr53c9x_sense(sc, ecb)
- struct ncr53c9x_softc *sc;
- struct ncr53c9x_ecb *ecb;
+ncr53c9x_sense(struct ncr53c9x_softc *sc, struct ncr53c9x_ecb *ecb)
{
struct scsi_xfer *xs = ecb->xs;
struct scsi_link *sc_link = xs->sc_link;
@@ -1112,9 +1091,7 @@ ncr53c9x_sense(sc, ecb)
* POST PROCESSING OF SCSI_CMD (usually current)
*/
void
-ncr53c9x_done(sc, ecb)
- struct ncr53c9x_softc *sc;
- struct ncr53c9x_ecb *ecb;
+ncr53c9x_done(struct ncr53c9x_softc *sc, struct ncr53c9x_ecb *ecb)
{
struct scsi_xfer *xs = ecb->xs;
struct scsi_link *sc_link = xs->sc_link;
@@ -1188,9 +1165,7 @@ ncr53c9x_done(sc, ecb)
}
void
-ncr53c9x_dequeue(sc, ecb)
- struct ncr53c9x_softc *sc;
- struct ncr53c9x_ecb *ecb;
+ncr53c9x_dequeue(struct ncr53c9x_softc *sc, struct ncr53c9x_ecb *ecb)
{
struct ncr53c9x_tinfo *ti =
&sc->sc_tinfo[ecb->xs->sc_link->target];
@@ -1341,11 +1316,8 @@ ncr53c9x_wrfifo(struct ncr53c9x_softc *sc, u_char *p, int len)
}
int
-ncr53c9x_reselect(sc, message, tagtype, tagid)
- struct ncr53c9x_softc *sc;
- int message;
- int tagtype;
- int tagid;
+ncr53c9x_reselect(struct ncr53c9x_softc *sc, int message, int tagtype,
+ int tagid)
{
u_char selid, target, lun;
struct ncr53c9x_ecb *ecb = NULL;
@@ -1448,8 +1420,7 @@ __verify_msg_format(u_char *p, int len)
* byte in the FIFO
*/
void
-ncr53c9x_msgin(sc)
- struct ncr53c9x_softc *sc;
+ncr53c9x_msgin(struct ncr53c9x_softc *sc)
{
NCR_TRACE(("[ncr53c9x_msgin(curmsglen:%ld)] ", (long)sc->sc_imlen));
@@ -1795,8 +1766,7 @@ gotit:
* Send the highest priority, scheduled message
*/
void
-ncr53c9x_msgout(sc)
- struct ncr53c9x_softc *sc;
+ncr53c9x_msgout(struct ncr53c9x_softc *sc)
{
struct ncr53c9x_tinfo *ti;
struct ncr53c9x_ecb *ecb;
@@ -1964,8 +1934,7 @@ ncr53c9x_msgout(sc)
*/
int sdebug = 0;
int
-ncr53c9x_intr(arg)
- void *arg;
+ncr53c9x_intr(void *arg)
{
struct ncr53c9x_softc *sc = arg;
struct ncr53c9x_ecb *ecb;
@@ -2720,9 +2689,7 @@ shortcut:
}
void
-ncr53c9x_abort(sc, ecb)
- struct ncr53c9x_softc *sc;
- struct ncr53c9x_ecb *ecb;
+ncr53c9x_abort(struct ncr53c9x_softc *sc, struct ncr53c9x_ecb *ecb)
{
/* 2 secs for the abort */
@@ -2759,8 +2726,7 @@ ncr53c9x_abort(sc, ecb)
}
void
-ncr53c9x_timeout(arg)
- void *arg;
+ncr53c9x_timeout(void *arg)
{
struct ncr53c9x_ecb *ecb = arg;
struct scsi_xfer *xs = ecb->xs;
diff --git a/sys/dev/ic/rtl80x9.c b/sys/dev/ic/rtl80x9.c
index 91b297fd26a..96d920e6932 100644
--- a/sys/dev/ic/rtl80x9.c
+++ b/sys/dev/ic/rtl80x9.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtl80x9.c,v 1.11 2015/09/11 13:02:28 stsp Exp $ */
+/* $OpenBSD: rtl80x9.c,v 1.12 2021/03/07 06:21:38 jsg Exp $ */
/* $NetBSD: rtl80x9.c,v 1.1 1998/10/31 00:44:33 thorpej Exp $ */
/*-
@@ -57,8 +57,7 @@
#include <dev/ic/rtl80x9var.h>
int
-rtl80x9_mediachange(dsc)
- struct dp8390_softc *dsc;
+rtl80x9_mediachange(struct dp8390_softc *dsc)
{
/*
@@ -71,9 +70,7 @@ rtl80x9_mediachange(dsc)
}
void
-rtl80x9_mediastatus(sc, ifmr)
- struct dp8390_softc *sc;
- struct ifmediareq *ifmr;
+rtl80x9_mediastatus(struct dp8390_softc *sc, struct ifmediareq *ifmr)
{
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
u_int8_t cr_proto = sc->cr_proto |
@@ -102,8 +99,7 @@ rtl80x9_mediastatus(sc, ifmr)
}
void
-rtl80x9_init_card(sc)
- struct dp8390_softc *sc;
+rtl80x9_init_card(struct dp8390_softc *sc)
{
struct ifmedia *ifm = &sc->sc_media;
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
@@ -156,8 +152,7 @@ rtl80x9_init_card(sc)
}
void
-rtl80x9_media_init(sc)
- struct dp8390_softc *sc;
+rtl80x9_media_init(struct dp8390_softc *sc)
{
static uint64_t rtl80x9_media[] = {
IFM_ETHER|IFM_AUTO,
diff --git a/sys/dev/ic/siop.c b/sys/dev/ic/siop.c
index eabaa40e589..0c59eb84b02 100644
--- a/sys/dev/ic/siop.c
+++ b/sys/dev/ic/siop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: siop.c,v 1.86 2020/09/22 19:32:52 krw Exp $ */
+/* $OpenBSD: siop.c,v 1.87 2021/03/07 06:21:38 jsg Exp $ */
/* $NetBSD: siop.c,v 1.79 2005/11/18 23:10:32 bouyer Exp $ */
/*
@@ -122,9 +122,7 @@ void siop_printstats(void);
#endif
void
-siop_table_sync(siop_cmd, ops)
- struct siop_cmd *siop_cmd;
- int ops;
+siop_table_sync(struct siop_cmd *siop_cmd, int ops)
{
struct siop_common_softc *sc = siop_cmd->cmd_c.siop_sc;
bus_addr_t offset;
@@ -137,9 +135,7 @@ siop_table_sync(siop_cmd, ops)
}
void
-siop_script_sync(sc, ops)
- struct siop_softc *sc;
- int ops;
+siop_script_sync(struct siop_softc *sc, int ops)
{
if ((sc->sc_c.features & SF_CHIP_RAM) == 0)
bus_dmamap_sync(sc->sc_c.sc_dmat, sc->sc_c.sc_scriptdma, 0,
@@ -147,9 +143,7 @@ siop_script_sync(sc, ops)
}
u_int32_t
-siop_script_read(sc, offset)
- struct siop_softc *sc;
- u_int offset;
+siop_script_read(struct siop_softc *sc, u_int offset)
{
if (sc->sc_c.features & SF_CHIP_RAM) {
return bus_space_read_4(sc->sc_c.sc_ramt, sc->sc_c.sc_ramh,
@@ -160,10 +154,7 @@ siop_script_read(sc, offset)
}
void
-siop_script_write(sc, offset, val)
- struct siop_softc *sc;
- u_int offset;
- u_int32_t val;
+siop_script_write(struct siop_softc *sc, u_int offset, u_int32_t val)
{
if (sc->sc_c.features & SF_CHIP_RAM) {
bus_space_write_4(sc->sc_c.sc_ramt, sc->sc_c.sc_ramh,
@@ -174,8 +165,7 @@ siop_script_write(sc, offset, val)
}
void
-siop_attach(sc)
- struct siop_softc *sc;
+siop_attach(struct siop_softc *sc)
{
struct scsibus_attach_args saa;
@@ -223,8 +213,7 @@ siop_attach(sc)
}
void
-siop_reset(sc)
- struct siop_softc *sc;
+siop_reset(struct siop_softc *sc)
{
int i, j, buswidth;
struct siop_lunsw *lunsw;
@@ -345,8 +334,7 @@ bus_space_write_4(sc->sc_c.sc_rt, sc->sc_c.sc_rh, SIOP_DSP, sc->sc_c.sc_scriptad
#endif
int
-siop_intr(v)
- void *v;
+siop_intr(void *v)
{
struct siop_softc *sc = v;
struct siop_target *siop_target;
@@ -1082,8 +1070,7 @@ end:
}
void
-siop_scsicmd_end(siop_cmd)
- struct siop_cmd *siop_cmd;
+siop_scsicmd_end(struct siop_cmd *siop_cmd)
{
struct scsi_xfer *xs = siop_cmd->cmd_c.xs;
struct siop_softc *sc = (struct siop_softc *)siop_cmd->cmd_c.siop_sc;
@@ -1212,8 +1199,7 @@ out:
* has to adjust the reselect script.
*/
int
-siop_handle_qtag_reject(siop_cmd)
- struct siop_cmd *siop_cmd;
+siop_handle_qtag_reject(struct siop_cmd *siop_cmd)
{
struct siop_softc *sc = (struct siop_softc *)siop_cmd->cmd_c.siop_sc;
int target = siop_cmd->cmd_c.xs->sc_link->target;
@@ -1257,8 +1243,7 @@ siop_handle_qtag_reject(siop_cmd)
* all active commands in a temporary queue.
*/
void
-siop_handle_reset(sc)
- struct siop_softc *sc;
+siop_handle_reset(struct siop_softc *sc)
{
struct cmd_list reset_list;
struct siop_cmd *siop_cmd, *next_siop_cmd;
@@ -1454,8 +1439,7 @@ siop_scsiprobe(struct scsi_link *link)
}
void
-siop_scsicmd(xs)
- struct scsi_xfer *xs;
+siop_scsicmd(struct scsi_xfer *xs)
{
struct siop_softc *sc = xs->sc_link->bus->sb_adapter_softc;
struct siop_cmd *siop_cmd;
@@ -1576,8 +1560,7 @@ siop_scsicmd(xs)
}
void
-siop_start(sc)
- struct siop_softc *sc;
+siop_start(struct siop_softc *sc)
{
struct siop_cmd *siop_cmd, *next_siop_cmd;
struct siop_lun *siop_lun;
@@ -1767,8 +1750,7 @@ end:
}
void
-siop_timeout(v)
- void *v;
+siop_timeout(void *v)
{
struct siop_cmd *siop_cmd = v;
struct siop_softc *sc = (struct siop_softc *)siop_cmd->cmd_c.siop_sc;
@@ -1791,8 +1773,7 @@ siop_timeout(v)
#ifdef DUMP_SCRIPT
void
-siop_dump_script(sc)
- struct siop_softc *sc;
+siop_dump_script(struct siop_softc *sc)
{
int i;
for (i = 0; i < PAGE_SIZE / 4; i += 2) {
@@ -1811,8 +1792,7 @@ siop_dump_script(sc)
#endif
void
-siop_morecbd(sc)
- struct siop_softc *sc;
+siop_morecbd(struct siop_softc *sc)
{
int error, off, i, j, s;
struct siop_cbd *newcbd;
@@ -1955,8 +1935,7 @@ bad3:
}
struct siop_lunsw *
-siop_get_lunsw(sc)
- struct siop_softc *sc;
+siop_get_lunsw(struct siop_softc *sc)
{
struct siop_lunsw *lunsw;
int i;
@@ -2004,9 +1983,7 @@ siop_get_lunsw(sc)
}
void
-siop_add_reselsw(sc, target)
- struct siop_softc *sc;
- int target;
+siop_add_reselsw(struct siop_softc *sc, int target)
{
int i,j;
struct siop_target *siop_target;
@@ -2055,9 +2032,8 @@ siop_add_reselsw(sc, target)
}
void
-siop_update_scntl3(sc, _siop_target)
- struct siop_softc *sc;
- struct siop_common_target *_siop_target;
+siop_update_scntl3(struct siop_softc *sc,
+ struct siop_common_target *_siop_target)
{
struct siop_target *siop_target = (struct siop_target *)_siop_target;
/* MOVE target->id >> 24 TO SCNTL3 */
@@ -2072,10 +2048,7 @@ siop_update_scntl3(sc, _siop_target)
}
void
-siop_add_dev(sc, target, lun)
- struct siop_softc *sc;
- int target;
- int lun;
+siop_add_dev(struct siop_softc *sc, int target, int lun)
{
struct siop_lunsw *lunsw;
struct siop_target *siop_target =
@@ -2276,4 +2249,3 @@ siop_dmamem_free(struct siop_softc *sc, struct siop_dmamem *sdm)
bus_dmamap_destroy(sc->sc_c.sc_dmat, sdm->sdm_map);
free(sdm, M_DEVBUF, sizeof *sdm);
}
-
diff --git a/sys/dev/ic/siop_common.c b/sys/dev/ic/siop_common.c
index be891210285..53c5ed45a04 100644
--- a/sys/dev/ic/siop_common.c
+++ b/sys/dev/ic/siop_common.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: siop_common.c,v 1.42 2020/07/11 15:51:36 krw Exp $ */
+/* $OpenBSD: siop_common.c,v 1.43 2021/03/07 06:21:38 jsg Exp $ */
/* $NetBSD: siop_common.c,v 1.37 2005/02/27 00:27:02 perry Exp $ */
/*
@@ -53,8 +53,7 @@
#undef DEBUG_NEG
int
-siop_common_attach(sc)
- struct siop_common_softc *sc;
+siop_common_attach(struct siop_common_softc *sc)
{
int error, i, buswidth;
bus_dma_segment_t seg;
@@ -140,8 +139,7 @@ siop_common_attach(sc)
}
void
-siop_common_reset(sc)
- struct siop_common_softc *sc;
+siop_common_reset(struct siop_common_softc *sc)
{
u_int32_t stest3;
@@ -226,8 +224,7 @@ siop_common_reset(sc)
/* prepare tables before sending a cmd */
void
-siop_setuptables(siop_cmd)
- struct siop_common_cmd *siop_cmd;
+siop_setuptables(struct siop_common_cmd *siop_cmd)
{
int i;
struct siop_common_softc *sc = siop_cmd->siop_sc;
@@ -322,8 +319,7 @@ siop_setuptables(siop_cmd)
}
int
-siop_wdtr_neg(siop_cmd)
- struct siop_common_cmd *siop_cmd;
+siop_wdtr_neg(struct siop_common_cmd *siop_cmd)
{
struct siop_common_softc *sc = siop_cmd->siop_sc;
struct siop_common_target *siop_target = siop_cmd->siop_target;
@@ -402,8 +398,7 @@ siop_wdtr_neg(siop_cmd)
}
int
-siop_ppr_neg(siop_cmd)
- struct siop_common_cmd *siop_cmd;
+siop_ppr_neg(struct siop_common_cmd *siop_cmd)
{
struct siop_common_softc *sc = siop_cmd->siop_sc;
struct siop_common_target *siop_target = siop_cmd->siop_target;
@@ -516,8 +511,7 @@ reject:
}
int
-siop_sdtr_neg(siop_cmd)
- struct siop_common_cmd *siop_cmd;
+siop_sdtr_neg(struct siop_common_cmd *siop_cmd)
{
struct siop_common_softc *sc = siop_cmd->siop_sc;
struct siop_common_target *siop_target = siop_cmd->siop_target;
@@ -650,10 +644,7 @@ end:
}
void
-siop_sdtr_msg(siop_cmd, offset, ssync, soff)
- struct siop_common_cmd *siop_cmd;
- int offset;
- int ssync, soff;
+siop_sdtr_msg(struct siop_common_cmd *siop_cmd, int offset, int ssync, int soff)
{
siop_cmd->siop_tables->msg_out[offset + 0] = MSG_EXTENDED;
siop_cmd->siop_tables->msg_out[offset + 1] = MSG_EXT_SDTR_LEN;
@@ -665,10 +656,7 @@ siop_sdtr_msg(siop_cmd, offset, ssync, soff)
}
void
-siop_wdtr_msg(siop_cmd, offset, wide)
- struct siop_common_cmd *siop_cmd;
- int offset;
- int wide;
+siop_wdtr_msg(struct siop_common_cmd *siop_cmd, int offset, int wide)
{
siop_cmd->siop_tables->msg_out[offset + 0] = MSG_EXTENDED;
siop_cmd->siop_tables->msg_out[offset + 1] = MSG_EXT_WDTR_LEN;
@@ -679,10 +667,7 @@ siop_wdtr_msg(siop_cmd, offset, wide)
}
void
-siop_ppr_msg(siop_cmd, offset, ssync, soff)
- struct siop_common_cmd *siop_cmd;
- int offset;
- int ssync, soff;
+siop_ppr_msg(struct siop_common_cmd *siop_cmd, int offset, int ssync, int soff)
{
siop_cmd->siop_tables->msg_out[offset + 0] = MSG_EXTENDED;
siop_cmd->siop_tables->msg_out[offset + 1] = MSG_EXT_PPR_LEN;
@@ -697,8 +682,7 @@ siop_ppr_msg(siop_cmd, offset, ssync, soff)
}
void
-siop_ma(siop_cmd)
- struct siop_common_cmd *siop_cmd;
+siop_ma(struct siop_common_cmd *siop_cmd)
{
int offset, dbc, sstat;
struct siop_common_softc *sc = siop_cmd->siop_sc;
@@ -764,9 +748,7 @@ siop_ma(siop_cmd)
}
void
-siop_sdp(siop_cmd, offset)
- struct siop_common_cmd *siop_cmd;
- int offset;
+siop_sdp(struct siop_common_cmd *siop_cmd, int offset)
{
struct siop_common_softc *sc = siop_cmd->siop_sc;
scr_table_t *table;
@@ -825,9 +807,7 @@ siop_sdp(siop_cmd, offset)
}
void
-siop_update_resid(siop_cmd, offset)
- struct siop_common_cmd *siop_cmd;
- int offset;
+siop_update_resid(struct siop_common_cmd *siop_cmd, int offset)
{
struct siop_common_softc *sc = siop_cmd->siop_sc;
scr_table_t *table;
@@ -857,8 +837,7 @@ siop_update_resid(siop_cmd, offset)
}
int
-siop_iwr(siop_cmd)
- struct siop_common_cmd *siop_cmd;
+siop_iwr(struct siop_common_cmd *siop_cmd)
{
int offset;
scr_table_t *table; /* table with IWR */
@@ -910,8 +889,7 @@ siop_iwr(siop_cmd)
}
void
-siop_clearfifo(sc)
- struct siop_common_softc *sc;
+siop_clearfifo(struct siop_common_softc *sc)
{
int timeout = 0;
int ctest3 = bus_space_read_1(sc->sc_rt, sc->sc_rh, SIOP_CTEST3);
@@ -935,8 +913,7 @@ siop_clearfifo(sc)
}
int
-siop_modechange(sc)
- struct siop_common_softc *sc;
+siop_modechange(struct siop_common_softc *sc)
{
int retry;
int sist0, sist1, stest2;
@@ -987,8 +964,7 @@ siop_modechange(sc)
}
void
-siop_resetbus(sc)
- struct siop_common_softc *sc;
+siop_resetbus(struct siop_common_softc *sc)
{
int scntl1;
scntl1 = bus_space_read_1(sc->sc_rt, sc->sc_rh, SIOP_SCNTL1);
@@ -1000,9 +976,7 @@ siop_resetbus(sc)
}
void
-siop_update_xfer_mode(sc, target)
- struct siop_common_softc *sc;
- int target;
+siop_update_xfer_mode(struct siop_common_softc *sc, int target)
{
struct siop_common_target *siop_target;
diff --git a/sys/dev/ic/smc91cxx.c b/sys/dev/ic/smc91cxx.c
index cf9820e095c..b0eefd1a058 100644
--- a/sys/dev/ic/smc91cxx.c
+++ b/sys/dev/ic/smc91cxx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smc91cxx.c,v 1.49 2017/01/22 10:17:38 dlg Exp $ */
+/* $OpenBSD: smc91cxx.c,v 1.50 2021/03/07 06:21:38 jsg Exp $ */
/* $NetBSD: smc91cxx.c,v 1.11 1998/08/08 23:51:41 mycroft Exp $ */
/*-
@@ -182,9 +182,7 @@ void smc91cxx_watchdog(struct ifnet *);
int smc91cxx_ioctl(struct ifnet *, u_long, caddr_t);
void
-smc91cxx_attach(sc, myea)
- struct smc91cxx_softc *sc;
- u_int8_t *myea;
+smc91cxx_attach(struct smc91cxx_softc *sc, u_int8_t *myea)
{
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
bus_space_tag_t bst = sc->sc_bst;
@@ -306,8 +304,7 @@ smc91cxx_attach(sc, myea)
* Change media according to request.
*/
int
-smc91cxx_mediachange(ifp)
- struct ifnet *ifp;
+smc91cxx_mediachange(struct ifnet *ifp)
{
struct smc91cxx_softc *sc = ifp->if_softc;
@@ -315,9 +312,7 @@ smc91cxx_mediachange(ifp)
}
int
-smc91cxx_set_media(sc, media)
- struct smc91cxx_softc *sc;
- uint64_t media;
+smc91cxx_set_media(struct smc91cxx_softc *sc, uint64_t media)
{
bus_space_tag_t bst = sc->sc_bst;
bus_space_handle_t bsh = sc->sc_bsh;
@@ -361,9 +356,7 @@ smc91cxx_set_media(sc, media)
* Notify the world which media we're using.
*/
void
-smc91cxx_mediastatus(ifp, ifmr)
- struct ifnet *ifp;
- struct ifmediareq *ifmr;
+smc91cxx_mediastatus(struct ifnet *ifp, struct ifmediareq *ifmr)
{
struct smc91cxx_softc *sc = ifp->if_softc;
bus_space_tag_t bst = sc->sc_bst;
@@ -396,8 +389,7 @@ smc91cxx_mediastatus(ifp, ifmr)
* Reset and initialize the chip.
*/
void
-smc91cxx_init(sc)
- struct smc91cxx_softc *sc;
+smc91cxx_init(struct smc91cxx_softc *sc)
{
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
bus_space_tag_t bst = sc->sc_bst;
@@ -516,8 +508,7 @@ smc91cxx_init(sc)
* Must be called at splnet or interrupt level.
*/
void
-smc91cxx_start(ifp)
- struct ifnet *ifp;
+smc91cxx_start(struct ifnet *ifp)
{
struct smc91cxx_softc *sc = ifp->if_softc;
bus_space_tag_t bst = sc->sc_bst;
@@ -701,8 +692,7 @@ smc91cxx_start(ifp)
* Interrupt service routine.
*/
int
-smc91cxx_intr(arg)
- void *arg;
+smc91cxx_intr(void *arg)
{
struct smc91cxx_softc *sc = arg;
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
@@ -893,8 +883,7 @@ out:
* NOTE! WE EXPECT TO BE IN REGISTER WINDOW 2!
*/
void
-smc91cxx_read(sc)
- struct smc91cxx_softc *sc;
+smc91cxx_read(struct smc91cxx_softc *sc)
{
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
bus_space_tag_t bst = sc->sc_bst;
@@ -1002,10 +991,7 @@ smc91cxx_read(sc)
* Process an ioctl request.
*/
int
-smc91cxx_ioctl(ifp, cmd, data)
- struct ifnet *ifp;
- u_long cmd;
- caddr_t data;
+smc91cxx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
{
struct smc91cxx_softc *sc = ifp->if_softc;
struct ifreq *ifr = (struct ifreq *)data;
@@ -1072,8 +1058,7 @@ smc91cxx_ioctl(ifp, cmd, data)
* Reset the interface.
*/
void
-smc91cxx_reset(sc)
- struct smc91cxx_softc *sc;
+smc91cxx_reset(struct smc91cxx_softc *sc)
{
int s;
@@ -1087,8 +1072,7 @@ smc91cxx_reset(sc)
* Watchdog timer.
*/
void
-smc91cxx_watchdog(ifp)
- struct ifnet *ifp;
+smc91cxx_watchdog(struct ifnet *ifp)
{
struct smc91cxx_softc *sc = ifp->if_softc;
@@ -1102,8 +1086,7 @@ smc91cxx_watchdog(ifp)
* Stop output on the interface.
*/
void
-smc91cxx_stop(sc)
- struct smc91cxx_softc *sc;
+smc91cxx_stop(struct smc91cxx_softc *sc)
{
bus_space_tag_t bst = sc->sc_bst;
bus_space_handle_t bsh = sc->sc_bsh;
@@ -1131,8 +1114,7 @@ smc91cxx_stop(sc)
* Enable power on the interface.
*/
int
-smc91cxx_enable(sc)
- struct smc91cxx_softc *sc;
+smc91cxx_enable(struct smc91cxx_softc *sc)
{
if ((sc->sc_flags & SMC_FLAGS_ENABLED) == 0 && sc->sc_enable != NULL) {
if ((*sc->sc_enable)(sc) != 0) {
@@ -1150,8 +1132,7 @@ smc91cxx_enable(sc)
* Disable power on the interface.
*/
void
-smc91cxx_disable(sc)
- struct smc91cxx_softc *sc;
+smc91cxx_disable(struct smc91cxx_softc *sc)
{
if ((sc->sc_flags & SMC_FLAGS_ENABLED) != 0 && sc->sc_disable != NULL) {
(*sc->sc_disable)(sc);
@@ -1160,9 +1141,7 @@ smc91cxx_disable(sc)
}
int
-smc91cxx_activate(self, act)
- struct device *self;
- int act;
+smc91cxx_activate(struct device *self, int act)
{
#if 0
struct smc91cxx_softc *sc = (struct smc91cxx_softc *)self;
@@ -1182,9 +1161,7 @@ smc91cxx_activate(self, act)
}
int
-smc91cxx_detach(self, flags)
- struct device *self;
- int flags;
+smc91cxx_detach(struct device *self, int flags)
{
struct smc91cxx_softc *sc = (struct smc91cxx_softc *)self;
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
@@ -1208,8 +1185,7 @@ smc91cxx_detach(self, flags)
}
u_int32_t
-smc91cxx_mii_bitbang_read(self)
- struct device *self;
+smc91cxx_mii_bitbang_read(struct device *self)
{
struct smc91cxx_softc *sc = (void *) self;
@@ -1218,9 +1194,7 @@ smc91cxx_mii_bitbang_read(self)
}
void
-smc91cxx_mii_bitbang_write(self, val)
- struct device *self;
- u_int32_t val;
+smc91cxx_mii_bitbang_write(struct device *self, u_int32_t val)
{
struct smc91cxx_softc *sc = (void *) self;
@@ -1229,9 +1203,7 @@ smc91cxx_mii_bitbang_write(self, val)
}
int
-smc91cxx_mii_readreg(self, phy, reg)
- struct device *self;
- int phy, reg;
+smc91cxx_mii_readreg(struct device *self, int phy, int reg)
{
struct smc91cxx_softc *sc = (void *) self;
int val;
@@ -1246,9 +1218,7 @@ smc91cxx_mii_readreg(self, phy, reg)
}
void
-smc91cxx_mii_writereg(self, phy, reg, val)
- struct device *self;
- int phy, reg, val;
+smc91cxx_mii_writereg(struct device *self, int phy, int reg, int val)
{
struct smc91cxx_softc *sc = (void *) self;
@@ -1260,8 +1230,7 @@ smc91cxx_mii_writereg(self, phy, reg, val)
}
void
-smc91cxx_statchg(self)
- struct device *self;
+smc91cxx_statchg(struct device *self)
{
struct smc91cxx_softc *sc = (struct smc91cxx_softc *)self;
bus_space_tag_t bst = sc->sc_bst;
@@ -1282,8 +1251,7 @@ smc91cxx_statchg(self)
* One second timer, used to tick the MII.
*/
void
-smc91cxx_tick(arg)
- void *arg;
+smc91cxx_tick(void *arg)
{
struct smc91cxx_softc *sc = arg;
int s;
diff --git a/sys/dev/ic/smc93cx6.c b/sys/dev/ic/smc93cx6.c
index 0a4a3fe5623..789e83773ed 100644
--- a/sys/dev/ic/smc93cx6.c
+++ b/sys/dev/ic/smc93cx6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smc93cx6.c,v 1.18 2012/03/24 20:19:05 miod Exp $ */
+/* $OpenBSD: smc93cx6.c,v 1.19 2021/03/07 06:21:38 jsg Exp $ */
/* $NetBSD: smc93cx6.c,v 1.10 2003/05/02 19:12:19 dyoung Exp $ */
/*
@@ -92,11 +92,8 @@ static struct seeprom_cmd {
* not successful.
*/
int
-read_seeprom(sd, buf, start_addr, count)
- struct seeprom_descriptor *sd;
- u_int16_t *buf;
- bus_size_t start_addr;
- bus_size_t count;
+read_seeprom(struct seeprom_descriptor *sd, u_int16_t *buf,
+ bus_size_t start_addr, bus_size_t count)
{
int i = 0;
u_int k = 0;
diff --git a/sys/dev/ic/tcic2.c b/sys/dev/ic/tcic2.c
index 0548e39659b..11dc78c8be7 100644
--- a/sys/dev/ic/tcic2.c
+++ b/sys/dev/ic/tcic2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcic2.c,v 1.13 2019/12/31 10:05:32 mpi Exp $ */
+/* $OpenBSD: tcic2.c,v 1.14 2021/03/07 06:21:38 jsg Exp $ */
/* $NetBSD: tcic2.c,v 1.3 2000/01/13 09:38:17 joda Exp $ */
#undef TCICDEBUG
@@ -104,9 +104,7 @@ int tcic_io_speed = 165; /* io access time in nanoseconds */
* Check various reserved and otherwise in their value restricted bits.
*/
int
-tcic_check_reserved_bits(iot, ioh)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
+tcic_check_reserved_bits(bus_space_tag_t iot, bus_space_handle_t ioh)
{
int val, auxreg;
@@ -220,9 +218,7 @@ tcic_check_reserved_bits(iot, ioh)
* Read chip ID from AR_ILOCK in test mode.
*/
int
-tcic_chipid(iot, ioh)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
+tcic_chipid(bus_space_tag_t iot, bus_space_handle_t ioh)
{
unsigned id, otest;
@@ -243,8 +239,7 @@ tcic_chipid(iot, ioh)
* Indicate whether the driver can handle the chip.
*/
int
-tcic_chipid_known(id)
- int id;
+tcic_chipid_known(int id)
{
/* XXX only know how to handle DB86082 -chb */
switch (id) {
@@ -264,8 +259,7 @@ tcic_chipid_known(id)
}
char *
-tcic_chipid_to_string(id)
- int id;
+tcic_chipid_to_string(int id)
{
switch (id) {
case TCIC_CHIPID_DB86082_1:
@@ -295,8 +289,7 @@ tcic_chipid_to_string(id)
* XXX should be table driven.
*/
int
-tcic_validirqs(chipid)
- int chipid;
+tcic_validirqs(int chipid)
{
switch (chipid) {
case TCIC_CHIPID_DB86082_1:
@@ -314,8 +307,7 @@ tcic_validirqs(chipid)
}
void
-tcic_attach(sc)
- struct tcic_softc *sc;
+tcic_attach(struct tcic_softc *sc)
{
int i, reg;
@@ -396,8 +388,7 @@ tcic_attach(sc)
}
void
-tcic_attach_sockets(sc)
- struct tcic_softc *sc;
+tcic_attach_sockets(struct tcic_softc *sc)
{
int i;
@@ -407,8 +398,7 @@ tcic_attach_sockets(sc)
}
void
-tcic_attach_socket(h)
- struct tcic_handle *h;
+tcic_attach_socket(struct tcic_handle *h)
{
struct pcmciabus_attach_args paa;
@@ -439,8 +429,7 @@ tcic_attach_socket(h)
}
void
-tcic_create_event_thread(arg)
- void *arg;
+tcic_create_event_thread(void *arg)
{
struct tcic_handle *h = arg;
char name[MAXCOMLEN+1];
@@ -466,8 +455,7 @@ tcic_create_event_thread(arg)
}
void
-tcic_event_thread(arg)
- void *arg;
+tcic_event_thread(void *arg)
{
struct tcic_handle *h = arg;
struct tcic_event *pe;
@@ -511,8 +499,7 @@ tcic_event_thread(arg)
void
-tcic_init_socket(h)
- struct tcic_handle *h;
+tcic_init_socket(struct tcic_handle *h)
{
int reg;
@@ -534,10 +521,7 @@ tcic_init_socket(h)
}
int
-tcic_submatch(parent, match, aux)
- struct device *parent;
- void *match;
- void *aux;
+tcic_submatch(struct device *parent, void *match, void *aux)
{
struct cfdata *cf = match;
@@ -575,9 +559,7 @@ tcic_submatch(parent, match, aux)
}
int
-tcic_print(arg, pnp)
- void *arg;
- const char *pnp;
+tcic_print(void *arg, const char *pnp)
{
struct pcmciabus_attach_args *paa = arg;
struct tcic_handle *h = (struct tcic_handle *) paa->pch;
@@ -600,8 +582,7 @@ tcic_print(arg, pnp)
}
int
-tcic_intr(arg)
- void *arg;
+tcic_intr(void *arg)
{
struct tcic_softc *sc = arg;
int i, ret = 0;
@@ -616,8 +597,7 @@ tcic_intr(arg)
}
int
-tcic_intr_socket(h)
- struct tcic_handle *h;
+tcic_intr_socket(struct tcic_handle *h)
{
int icsr, rv;
@@ -698,9 +678,7 @@ tcic_intr_socket(h)
}
void
-tcic_queue_event(h, event)
- struct tcic_handle *h;
- int event;
+tcic_queue_event(struct tcic_handle *h, int event)
{
struct tcic_event *pe;
int s;
@@ -715,9 +693,9 @@ tcic_queue_event(h, event)
splx(s);
wakeup(&h->events);
}
+
void
-tcic_attach_card(h)
- struct tcic_handle *h;
+tcic_attach_card(struct tcic_handle *h)
{
DPRINTF(("tcic_attach_card\n"));
@@ -732,9 +710,7 @@ tcic_attach_card(h)
}
void
-tcic_detach_card(h, flags)
- struct tcic_handle *h;
- int flags; /* DETACH_* */
+tcic_detach_card(struct tcic_handle *h, int flags)
{
DPRINTF(("tcic_detach_card\n"));
@@ -750,8 +726,7 @@ tcic_detach_card(h, flags)
}
void
-tcic_deactivate_card(h)
- struct tcic_handle *h;
+tcic_deactivate_card(struct tcic_handle *h)
{
int val, reg;
@@ -783,10 +758,8 @@ tcic_deactivate_card(h)
/* XXX the following routine may need to be rewritten. -chb */
int
-tcic_chip_mem_alloc(pch, size, pcmhp)
- pcmcia_chipset_handle_t pch;
- bus_size_t size;
- struct pcmcia_mem_handle *pcmhp;
+tcic_chip_mem_alloc(pcmcia_chipset_handle_t pch, bus_size_t size,
+ struct pcmcia_mem_handle *pcmhp)
{
struct tcic_handle *h = (struct tcic_handle *) pch;
bus_space_handle_t memh;
@@ -848,9 +821,7 @@ tcic_chip_mem_alloc(pch, size, pcmhp)
/* XXX the following routine may need to be rewritten. -chb */
void
-tcic_chip_mem_free(pch, pcmhp)
- pcmcia_chipset_handle_t pch;
- struct pcmcia_mem_handle *pcmhp;
+tcic_chip_mem_free(pcmcia_chipset_handle_t pch, struct pcmcia_mem_handle *pcmhp)
{
struct tcic_handle *h = (struct tcic_handle *) pch;
@@ -858,9 +829,7 @@ tcic_chip_mem_free(pch, pcmhp)
}
void
-tcic_chip_do_mem_map(h, win)
- struct tcic_handle *h;
- int win;
+tcic_chip_do_mem_map(struct tcic_handle *h, int win)
{
int reg, hwwin, wscnt;
@@ -939,14 +908,9 @@ tcic_chip_do_mem_map(h, win)
/* XXX needs work */
int
-tcic_chip_mem_map(pch, kind, card_addr, size, pcmhp, offsetp, windowp)
- pcmcia_chipset_handle_t pch;
- int kind;
- bus_addr_t card_addr;
- bus_size_t size;
- struct pcmcia_mem_handle *pcmhp;
- bus_size_t *offsetp;
- int *windowp;
+tcic_chip_mem_map(pcmcia_chipset_handle_t pch, int kind, bus_addr_t card_addr,
+ bus_size_t size, struct pcmcia_mem_handle *pcmhp, bus_size_t *offsetp,
+ int *windowp)
{
struct tcic_handle *h = (struct tcic_handle *) pch;
bus_addr_t busaddr;
@@ -1012,9 +976,7 @@ tcic_chip_mem_map(pch, kind, card_addr, size, pcmhp, offsetp, windowp)
}
void
-tcic_chip_mem_unmap(pch, window)
- pcmcia_chipset_handle_t pch;
- int window;
+tcic_chip_mem_unmap(pcmcia_chipset_handle_t pch, int window)
{
struct tcic_handle *h = (struct tcic_handle *) pch;
int reg, hwwin;
@@ -1031,12 +993,8 @@ tcic_chip_mem_unmap(pch, window)
}
int
-tcic_chip_io_alloc(pch, start, size, align, pcihp)
- pcmcia_chipset_handle_t pch;
- bus_addr_t start;
- bus_size_t size;
- bus_size_t align;
- struct pcmcia_io_handle *pcihp;
+tcic_chip_io_alloc(pcmcia_chipset_handle_t pch, bus_addr_t start,
+ bus_size_t size, bus_size_t align, struct pcmcia_io_handle *pcihp)
{
struct tcic_handle *h = (struct tcic_handle *) pch;
bus_space_tag_t iot;
@@ -1097,9 +1055,7 @@ tcic_chip_io_alloc(pch, start, size, align, pcihp)
}
void
-tcic_chip_io_free(pch, pcihp)
- pcmcia_chipset_handle_t pch;
- struct pcmcia_io_handle *pcihp;
+tcic_chip_io_free(pcmcia_chipset_handle_t pch, struct pcmcia_io_handle *pcihp)
{
bus_space_tag_t iot = pcihp->iot;
bus_space_handle_t ioh = pcihp->ioh;
@@ -1115,9 +1071,7 @@ static int tcic_iowidth_map[] =
{ TCIC_ICTL_AUTOSZ, TCIC_ICTL_B8, TCIC_ICTL_B16 };
void
-tcic_chip_do_io_map(h, win)
- struct tcic_handle *h;
- int win;
+tcic_chip_do_io_map(struct tcic_handle *h, int win)
{
int reg, size2, iotiny, wbase, hwwin, wscnt;
@@ -1173,13 +1127,8 @@ tcic_chip_do_io_map(h, win)
}
int
-tcic_chip_io_map(pch, width, offset, size, pcihp, windowp)
- pcmcia_chipset_handle_t pch;
- int width;
- bus_addr_t offset;
- bus_size_t size;
- struct pcmcia_io_handle *pcihp;
- int *windowp;
+tcic_chip_io_map(pcmcia_chipset_handle_t pch, int width, bus_addr_t offset,
+ bus_size_t size, struct pcmcia_io_handle *pcihp, int *windowp)
{
struct tcic_handle *h = (struct tcic_handle *) pch;
bus_addr_t ioaddr = pcihp->addr + offset;
@@ -1228,9 +1177,7 @@ tcic_chip_io_map(pch, width, offset, size, pcihp, windowp)
}
void
-tcic_chip_io_unmap(pch, window)
- pcmcia_chipset_handle_t pch;
- int window;
+tcic_chip_io_unmap(pcmcia_chipset_handle_t pch, int window)
{
struct tcic_handle *h = (struct tcic_handle *) pch;
int reg, hwwin;
@@ -1247,8 +1194,7 @@ tcic_chip_io_unmap(pch, window)
}
void
-tcic_chip_socket_enable(pch)
- pcmcia_chipset_handle_t pch;
+tcic_chip_socket_enable(pcmcia_chipset_handle_t pch)
{
struct tcic_handle *h = (struct tcic_handle *) pch;
int cardtype, reg, win;
@@ -1342,8 +1288,7 @@ tcic_chip_socket_enable(pch)
}
void
-tcic_chip_socket_disable(pch)
- pcmcia_chipset_handle_t pch;
+tcic_chip_socket_disable(pcmcia_chipset_handle_t pch)
{
struct tcic_handle *h = (struct tcic_handle *) pch;
int val;
@@ -1372,8 +1317,7 @@ tcic_chip_socket_disable(pch)
* in the manual.
*/
int
-tcic_ns2wscnt(ns)
- int ns;
+tcic_ns2wscnt(int ns)
{
if (ns < 14) {
return 0;
@@ -1383,8 +1327,7 @@ tcic_ns2wscnt(ns)
}
int
-tcic_log2(val)
- u_int val;
+tcic_log2(u_int val)
{
int i, l2;
diff --git a/sys/dev/ic/tcic2var.h b/sys/dev/ic/tcic2var.h
index 705d33e4208..72b3fcd22c2 100644
--- a/sys/dev/ic/tcic2var.h
+++ b/sys/dev/ic/tcic2var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcic2var.h,v 1.4 2005/11/23 11:39:37 mickey Exp $ */
+/* $OpenBSD: tcic2var.h,v 1.5 2021/03/07 06:21:38 jsg Exp $ */
/* $NetBSD: tcic2var.h,v 1.1 1999/03/23 20:04:14 bad Exp $ */
/*
@@ -185,27 +185,21 @@ void tcic_chip_socket_disable(pcmcia_chipset_handle_t);
static __inline__ int tcic_read_1(struct tcic_handle *, int);
static __inline__ int
-tcic_read_1(h, reg)
- struct tcic_handle *h;
- int reg;
+tcic_read_1(struct tcic_handle *h, int reg)
{
return (bus_space_read_1(h->sc->iot, h->sc->ioh, reg));
}
static __inline__ int tcic_read_2(struct tcic_handle *, int);
static __inline__ int
-tcic_read_2(h, reg)
- struct tcic_handle *h;
- int reg;
+tcic_read_2(struct tcic_handle *h, int reg)
{
return (bus_space_read_2(h->sc->iot, h->sc->ioh, reg));
}
static __inline__ int tcic_read_4(struct tcic_handle *, int);
static __inline__ int
-tcic_read_4(h, reg)
- struct tcic_handle *h;
- int reg;
+tcic_read_4(struct tcic_handle *h, int reg)
{
int val;
val = bus_space_read_2(h->sc->iot, h->sc->ioh, reg);
@@ -215,30 +209,21 @@ tcic_read_4(h, reg)
static __inline__ void tcic_write_1(struct tcic_handle *, int, int);
static __inline__ void
-tcic_write_1(h, reg, data)
- struct tcic_handle *h;
- int reg;
- int data;
+tcic_write_1(struct tcic_handle *h, int reg, int data)
{
bus_space_write_1(h->sc->iot, h->sc->ioh, reg, (data));
}
static __inline__ void tcic_write_2(struct tcic_handle *, int, int);
static __inline__ void
-tcic_write_2(h, reg, data)
- struct tcic_handle *h;
- int reg;
- int data;
+tcic_write_2(struct tcic_handle *h, int reg, int data)
{
bus_space_write_2(h->sc->iot, h->sc->ioh, reg, (data));
}
static __inline__ void tcic_write_4(struct tcic_handle *, int, int);
static __inline__ void
-tcic_write_4(h, reg, data)
- struct tcic_handle *h;
- int reg;
- int data;
+tcic_write_4(struct tcic_handle *h, int reg, int data)
{
bus_space_write_2(h->sc->iot, h->sc->ioh, reg, (data));
bus_space_write_2(h->sc->iot, h->sc->ioh, reg+2, (data)>>16);
@@ -246,9 +231,7 @@ tcic_write_4(h, reg, data)
static __inline__ int tcic_read_ind_2(struct tcic_handle *, int);
static __inline__ int
-tcic_read_ind_2(h, reg)
- struct tcic_handle *h;
- int reg;
+tcic_read_ind_2(struct tcic_handle *h, int reg)
{
int r_addr, val;
r_addr = tcic_read_4(h, TCIC_R_ADDR);
@@ -260,10 +243,7 @@ tcic_read_ind_2(h, reg)
static __inline__ void tcic_write_ind_2(struct tcic_handle *, int, int);
static __inline__ void
-tcic_write_ind_2(h, reg, data)
- struct tcic_handle *h;
- int reg;
- int data;
+tcic_write_ind_2(struct tcic_handle *h, int reg, int data)
{
int r_addr;
r_addr = tcic_read_4(h, TCIC_R_ADDR);
@@ -274,8 +254,7 @@ tcic_write_ind_2(h, reg, data)
static __inline__ void tcic_sel_sock(struct tcic_handle *);
static __inline__ void
-tcic_sel_sock(h)
- struct tcic_handle *h;
+tcic_sel_sock(struct tcic_handle *h)
{
int r_addr;
r_addr = tcic_read_2(h, TCIC_R_ADDR2);
@@ -285,8 +264,7 @@ tcic_sel_sock(h)
static __inline__ void tcic_wait_ready(struct tcic_handle *);
static __inline__ void
-tcic_wait_ready(h)
- struct tcic_handle *h;
+tcic_wait_ready(struct tcic_handle *h)
{
int i;
@@ -304,10 +282,8 @@ tcic_wait_ready(h)
static __inline__ int tcic_read_aux_1(bus_space_tag_t, bus_space_handle_t, int, int);
static __inline__ int
-tcic_read_aux_1(iot, ioh, auxreg, reg)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- int auxreg, reg;
+tcic_read_aux_1(bus_space_tag_t iot, bus_space_handle_t ioh, int auxreg,
+ int reg)
{
int mode, val;
mode = bus_space_read_1(iot, ioh, TCIC_R_MODE);
@@ -318,10 +294,7 @@ tcic_read_aux_1(iot, ioh, auxreg, reg)
static __inline__ int tcic_read_aux_2(bus_space_tag_t, bus_space_handle_t, int);
static __inline__ int
-tcic_read_aux_2(iot, ioh, auxreg)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- int auxreg;
+tcic_read_aux_2(bus_space_tag_t iot, bus_space_handle_t ioh, int auxreg)
{
int mode, val;
mode = bus_space_read_1(iot, ioh, TCIC_R_MODE);
@@ -332,10 +305,8 @@ tcic_read_aux_2(iot, ioh, auxreg)
static __inline__ void tcic_write_aux_1(bus_space_tag_t, bus_space_handle_t, int, int, int);
static __inline__ void
-tcic_write_aux_1(iot, ioh, auxreg, reg, val)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- int auxreg, reg, val;
+tcic_write_aux_1(bus_space_tag_t iot, bus_space_handle_t ioh, int auxreg,
+ int reg, int val)
{
int mode;
mode = bus_space_read_1(iot, ioh, TCIC_R_MODE);
@@ -345,10 +316,8 @@ tcic_write_aux_1(iot, ioh, auxreg, reg, val)
static __inline__ void tcic_write_aux_2(bus_space_tag_t, bus_space_handle_t, int, int);
static __inline__ void
-tcic_write_aux_2(iot, ioh, auxreg, val)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- int auxreg, val;
+tcic_write_aux_2(bus_space_tag_t iot, bus_space_handle_t ioh, int auxreg,
+ int val)
{
int mode;
mode = bus_space_read_1(iot, ioh, TCIC_R_MODE);
diff --git a/sys/dev/ic/twe.c b/sys/dev/ic/twe.c
index baf65f9eaac..f541a0b0faa 100644
--- a/sys/dev/ic/twe.c
+++ b/sys/dev/ic/twe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: twe.c,v 1.64 2020/10/15 00:01:24 krw Exp $ */
+/* $OpenBSD: twe.c,v 1.65 2021/03/07 06:21:38 jsg Exp $ */
/*
* Copyright (c) 2000-2002 Michael Shalayeff. All rights reserved.
@@ -107,8 +107,7 @@ twe_put_ccb(void *xsc, void *xccb)
}
void
-twe_dispose(sc)
- struct twe_softc *sc;
+twe_dispose(struct twe_softc *sc)
{
register struct twe_ccb *ccb;
if (sc->sc_cmdmap != NULL) {
@@ -124,8 +123,7 @@ twe_dispose(sc)
}
int
-twe_attach(sc)
- struct twe_softc *sc;
+twe_attach(struct twe_softc *sc)
{
struct scsibus_attach_args saa;
/* this includes a buffer for drive config req, and a capacity req */
@@ -441,8 +439,7 @@ twe_thread_create(void *v)
}
void
-twe_thread(v)
- void *v;
+twe_thread(void *v)
{
struct twe_softc *sc = v;
struct twe_ccb *ccb;
@@ -491,9 +488,7 @@ twe_thread(v)
}
int
-twe_cmd(ccb, flags, wait)
- struct twe_ccb *ccb;
- int flags, wait;
+twe_cmd(struct twe_ccb *ccb, int flags, int wait)
{
struct twe_softc *sc = ccb->ccb_sc;
bus_dmamap_t dmap;
@@ -600,9 +595,7 @@ twe_cmd(ccb, flags, wait)
}
int
-twe_start(ccb, wait)
- struct twe_ccb *ccb;
- int wait;
+twe_start(struct twe_ccb *ccb, int wait)
{
struct twe_softc*sc = ccb->ccb_sc;
struct twe_cmd *cmd = ccb->ccb_cmd;
@@ -648,8 +641,7 @@ twe_start(ccb, wait)
}
int
-twe_complete(ccb)
- struct twe_ccb *ccb;
+twe_complete(struct twe_ccb *ccb)
{
struct twe_softc *sc = ccb->ccb_sc;
struct scsi_xfer *xs = ccb->ccb_xs;
@@ -688,9 +680,7 @@ twe_complete(ccb)
}
int
-twe_done(sc, ccb)
- struct twe_softc *sc;
- struct twe_ccb *ccb;
+twe_done(struct twe_softc *sc, struct twe_ccb *ccb)
{
struct twe_cmd *cmd = ccb->ccb_cmd;
struct scsi_xfer *xs = ccb->ccb_xs;
@@ -752,8 +742,7 @@ twe_done(sc, ccb)
}
void
-twe_scsi_cmd(xs)
- struct scsi_xfer *xs;
+twe_scsi_cmd(struct scsi_xfer *xs)
{
struct scsi_link *link = xs->sc_link;
struct twe_softc *sc = link->bus->sb_adapter_softc;
@@ -914,8 +903,7 @@ twe_scsi_cmd(xs)
}
int
-twe_intr(v)
- void *v;
+twe_intr(void *v)
{
struct twe_softc *sc = v;
struct twe_ccb *ccb;
diff --git a/sys/dev/ic/uha.c b/sys/dev/ic/uha.c
index 2278bef9385..b1508a045a8 100644
--- a/sys/dev/ic/uha.c
+++ b/sys/dev/ic/uha.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uha.c,v 1.39 2020/09/22 19:32:53 krw Exp $ */
+/* $OpenBSD: uha.c,v 1.40 2021/03/07 06:21:38 jsg Exp $ */
/* $NetBSD: uha.c,v 1.3 1996/10/13 01:37:29 christos Exp $ */
/*
* Copyright (c) 1994, 1996 Charles M. Hannum. All rights reserved.
@@ -91,9 +91,7 @@ struct cfdriver uha_cd = {
int uhaprint(void *, const char *);
int
-uhaprint(aux, name)
- void *aux;
- const char *name;
+uhaprint(void *aux, const char *name)
{
if (name != NULL)
@@ -106,8 +104,7 @@ uhaprint(aux, name)
* Attach all the sub-devices we can find
*/
void
-uha_attach(sc)
- struct uha_softc *sc;
+uha_attach(struct uha_softc *sc)
{
struct scsibus_attach_args saa;
@@ -130,9 +127,7 @@ uha_attach(sc)
}
void
-uha_reset_mscp(sc, mscp)
- struct uha_softc *sc;
- struct uha_mscp *mscp;
+uha_reset_mscp(struct uha_softc *sc, struct uha_mscp *mscp)
{
mscp->flags = 0;
@@ -142,8 +137,7 @@ uha_reset_mscp(sc, mscp)
* A mscp (and hence a mbx-out) is put onto the free list.
*/
void
-uha_mscp_free(xsc, xmscp)
- void *xsc, *xmscp;
+uha_mscp_free(void *xsc, void *xmscp)
{
struct uha_softc *sc = xsc;
struct uha_mscp *mscp = xmscp;
@@ -159,8 +153,7 @@ uha_mscp_free(xsc, xmscp)
* Get a free mscp
*/
void *
-uha_mscp_alloc(xsc)
- void *xsc;
+uha_mscp_alloc(void *xsc)
{
struct uha_softc *sc = xsc;
struct uha_mscp *mscp;
@@ -180,9 +173,7 @@ uha_mscp_alloc(xsc)
* given a physical address, find the mscp that it corresponds to.
*/
struct uha_mscp *
-uha_mscp_phys_kv(sc, mscp_phys)
- struct uha_softc *sc;
- u_long mscp_phys;
+uha_mscp_phys_kv(struct uha_softc *sc, u_long mscp_phys)
{
int hashnum = MSCP_HASH(mscp_phys);
struct uha_mscp *mscp = sc->sc_mscphash[hashnum];
@@ -200,9 +191,7 @@ uha_mscp_phys_kv(sc, mscp_phys)
* how the operation went.
*/
void
-uha_done(sc, mscp)
- struct uha_softc *sc;
- struct uha_mscp *mscp;
+uha_done(struct uha_softc *sc, struct uha_mscp *mscp)
{
struct scsi_sense_data *s1, *s2;
struct scsi_xfer *xs = mscp->xs;
@@ -258,8 +247,7 @@ uha_done(sc, mscp)
* needs the unit, target and lu.
*/
void
-uha_scsi_cmd(xs)
- struct scsi_xfer *xs;
+uha_scsi_cmd(struct scsi_xfer *xs)
{
struct scsi_link *sc_link = xs->sc_link;
struct uha_softc *sc = sc_link->bus->sb_adapter_softc;
@@ -416,8 +404,7 @@ bad:
}
void
-uha_timeout(arg)
- void *arg;
+uha_timeout(void *arg)
{
struct uha_mscp *mscp = arg;
struct scsi_xfer *xs = mscp->xs;