-/* $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 $ */
/*
static int
-adv_alloc_ccbs(sc)
- ASC_SOFTC *sc;
+adv_alloc_ccbs(ASC_SOFTC *sc)
{
bus_dma_segment_t seg;
int error, rseg;
* 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;
* 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;
static void
-adv_reset_ccb(ccb)
- ADV_CCB *ccb;
+adv_reset_ccb(ADV_CCB *ccb)
{
ccb->flags = 0;
static int
-adv_init_ccb(sc, ccb)
- ASC_SOFTC *sc;
- ADV_CCB *ccb;
+adv_init_ccb(ASC_SOFTC *sc, ADV_CCB *ccb)
{
int error;
* Get a free ccb
*/
void *
-adv_ccb_alloc(xsc)
- void *xsc;
+adv_ccb_alloc(void *xsc)
{
ASC_SOFTC *sc = xsc;
ADV_CCB *ccb;
* 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);
static void
-adv_start_ccbs(sc)
- ASC_SOFTC *sc;
+adv_start_ccbs(ASC_SOFTC *sc)
{
ADV_CCB *ccb;
struct scsi_xfer *xs;
* 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;
int
-adv_init(sc)
- ASC_SOFTC *sc;
+adv_init(ASC_SOFTC *sc)
{
int warn;
void
-adv_attach(sc)
- ASC_SOFTC *sc;
+adv_attach(ASC_SOFTC *sc)
{
struct scsibus_attach_args saa;
int i, error;
* 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;
int
-adv_intr(arg)
- void *arg;
+adv_intr(void *arg)
{
ASC_SOFTC *sc = 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;
static void
-adv_timeout(arg)
- void *arg;
+adv_timeout(void *arg)
{
ADV_CCB *ccb = arg;
struct scsi_xfer *xs = ccb->xs;
static void
-adv_watchdog(arg)
- void *arg;
+adv_watchdog(void *arg)
{
ADV_CCB *ccb = arg;
struct scsi_xfer *xs = ccb->xs;
* 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;
-/* $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 $ */
/*
* 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 $
*/
}
static uint8_t
-read_brdctl(ahc)
- struct ahc_softc *ahc;
+read_brdctl(struct ahc_softc *ahc)
{
uint8_t brdctl;
uint8_t value;
-/* $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$ */
/*-
}
u_int32_t
-ax88190_mii_bitbang_read(self)
- struct device *self;
+ax88190_mii_bitbang_read(struct device *self)
{
struct ne2000_softc *sc = (void *)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;
}
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 */
}
-/* $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 $ */
/*
}
int
-cac_flush(sc)
- struct cac_softc *sc;
+cac_flush(struct cac_softc *sc)
{
u_int8_t buf[512];
* dequeue any waiting CCBs.
*/
int
-cac_intr(v)
- void *v;
+cac_intr(void *v)
{
struct cac_softc *sc = v;
struct cac_ccb *ccb;
}
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);
}
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;
}
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;
-/* $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.
}
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;
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);
* 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);
* 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);
* 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);
* return tty pointer
*/
struct tty *
-cytty(dev)
- dev_t dev;
+cytty(dev_t dev)
{
int card = CY_CARD(dev);
int port = CY_PORT(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);
* 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);
* 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);
* 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);
*
*/
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;
* hardware interrupt routine
*/
int
-cy_intr(arg)
- void *arg;
+cy_intr(void *arg)
{
struct cy_softc *sc = arg;
struct cy_port *cy;
* 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();
* 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 */
-/* $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 $ */
/*
};
int
-pcic_ident_ok(ident)
- int ident;
+pcic_ident_ok(int ident)
{
/* this is very empirical and heuristic */
}
int
-pcic_vendor(h)
- struct pcic_handle *h;
+pcic_vendor(struct pcic_handle *h)
{
int vendor, reg;
}
void
-pcic_attach(sc)
- struct pcic_softc *sc;
+pcic_attach(struct pcic_softc *sc)
{
int vendor, count, i, reg;
}
void
-pcic_attach_sockets(sc)
- struct pcic_softc *sc;
+pcic_attach_sockets(struct pcic_softc *sc)
{
int i;
}
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);
}
void
-pcic_create_event_thread(arg)
- void *arg;
+pcic_create_event_thread(void *arg)
{
struct pcic_handle *h = arg;
char name[MAXCOMLEN+1];
}
void
-pcic_event_thread(arg)
- void *arg;
+pcic_event_thread(void *arg)
{
struct pcic_handle *h = arg;
struct pcic_event *pe;
}
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;
}
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);
}
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;
}
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;
}
int
-pcic_intr(arg)
- void *arg;
+pcic_intr(void *arg)
{
struct pcic_softc *sc = arg;
int i, ret = 0;
}
void
-pcic_poll_intr(arg)
- void *arg;
+pcic_poll_intr(void *arg)
{
struct pcic_softc *sc = arg;
int i, s;
}
int
-pcic_intr_socket(h)
- struct pcic_handle *h;
+pcic_intr_socket(struct pcic_handle *h)
{
int cscreg;
}
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;
}
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");
}
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) {
}
void
-pcic_deactivate_card(h)
- struct pcic_handle *h;
+pcic_deactivate_card(struct pcic_handle *h)
{
struct device *dev = (struct device *)h->pcmcia;
* 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;
}
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;
}
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);
};
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;
}
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;
}
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;
}
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;
}
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;
};
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;
}
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;
}
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;
}
void
-pcic_wait_ready(h)
- struct pcic_handle *h;
+pcic_wait_ready(struct pcic_handle *h)
{
int i;
}
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;
}
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;
}
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,
}
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,
-/* $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>
* 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;
-/* $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 $ */
/*
* 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)
* 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;
* routine above.
*/
void
-ncr53c9x_reset(sc)
- struct ncr53c9x_softc *sc;
+ncr53c9x_reset(struct ncr53c9x_softc *sc)
{
/* reset DMA first */
* 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);
* 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;
* 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);
* 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;
}
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;
* 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;
* 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;
* 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;
* 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;
}
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;
* 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;
}
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];
}
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;
* 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));
* 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;
*/
int sdebug = 0;
int
-ncr53c9x_intr(arg)
- void *arg;
+ncr53c9x_intr(void *arg)
{
struct ncr53c9x_softc *sc = arg;
struct ncr53c9x_ecb *ecb;
}
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 */
}
void
-ncr53c9x_timeout(arg)
- void *arg;
+ncr53c9x_timeout(void *arg)
{
struct ncr53c9x_ecb *ecb = arg;
struct scsi_xfer *xs = ecb->xs;
-/* $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 $ */
/*-
#include <dev/ic/rtl80x9var.h>
int
-rtl80x9_mediachange(dsc)
- struct dp8390_softc *dsc;
+rtl80x9_mediachange(struct dp8390_softc *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 |
}
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;
}
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,
-/* $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 $ */
/*
#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;
}
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,
}
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,
}
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,
}
void
-siop_attach(sc)
- struct siop_softc *sc;
+siop_attach(struct siop_softc *sc)
{
struct scsibus_attach_args saa;
}
void
-siop_reset(sc)
- struct siop_softc *sc;
+siop_reset(struct siop_softc *sc)
{
int i, j, buswidth;
struct siop_lunsw *lunsw;
#endif
int
-siop_intr(v)
- void *v;
+siop_intr(void *v)
{
struct siop_softc *sc = v;
struct siop_target *siop_target;
}
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;
* 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;
* 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;
}
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;
}
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;
}
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;
#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) {
#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;
}
struct siop_lunsw *
-siop_get_lunsw(sc)
- struct siop_softc *sc;
+siop_get_lunsw(struct siop_softc *sc)
{
struct siop_lunsw *lunsw;
int i;
}
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;
}
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 */
}
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 =
bus_dmamap_destroy(sc->sc_c.sc_dmat, sdm->sdm_map);
free(sdm, M_DEVBUF, sizeof *sdm);
}
-
-/* $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 $ */
/*
#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;
}
void
-siop_common_reset(sc)
- struct siop_common_softc *sc;
+siop_common_reset(struct siop_common_softc *sc)
{
u_int32_t stest3;
/* 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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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 */
}
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);
}
int
-siop_modechange(sc)
- struct siop_common_softc *sc;
+siop_modechange(struct siop_common_softc *sc)
{
int retry;
int sist0, sist1, stest2;
}
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);
}
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;
-/* $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 $ */
/*-
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;
* Change media according to request.
*/
int
-smc91cxx_mediachange(ifp)
- struct ifnet *ifp;
+smc91cxx_mediachange(struct ifnet *ifp)
{
struct smc91cxx_softc *sc = ifp->if_softc;
}
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;
* 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;
* 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;
* 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;
* 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;
* 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;
* 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;
* Reset the interface.
*/
void
-smc91cxx_reset(sc)
- struct smc91cxx_softc *sc;
+smc91cxx_reset(struct smc91cxx_softc *sc)
{
int s;
* Watchdog timer.
*/
void
-smc91cxx_watchdog(ifp)
- struct ifnet *ifp;
+smc91cxx_watchdog(struct ifnet *ifp)
{
struct smc91cxx_softc *sc = ifp->if_softc;
* 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;
* 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) {
* 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);
}
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;
}
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;
}
u_int32_t
-smc91cxx_mii_bitbang_read(self)
- struct device *self;
+smc91cxx_mii_bitbang_read(struct device *self)
{
struct smc91cxx_softc *sc = (void *) 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;
}
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;
}
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;
}
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;
* 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;
-/* $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 $ */
/*
* 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;
-/* $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
* 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;
* 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;
* 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) {
}
char *
-tcic_chipid_to_string(id)
- int id;
+tcic_chipid_to_string(int id)
{
switch (id) {
case TCIC_CHIPID_DB86082_1:
* XXX should be table driven.
*/
int
-tcic_validirqs(chipid)
- int chipid;
+tcic_validirqs(int chipid)
{
switch (chipid) {
case TCIC_CHIPID_DB86082_1:
}
void
-tcic_attach(sc)
- struct tcic_softc *sc;
+tcic_attach(struct tcic_softc *sc)
{
int i, reg;
}
void
-tcic_attach_sockets(sc)
- struct tcic_softc *sc;
+tcic_attach_sockets(struct tcic_softc *sc)
{
int i;
}
void
-tcic_attach_socket(h)
- struct tcic_handle *h;
+tcic_attach_socket(struct tcic_handle *h)
{
struct pcmciabus_attach_args paa;
}
void
-tcic_create_event_thread(arg)
- void *arg;
+tcic_create_event_thread(void *arg)
{
struct tcic_handle *h = arg;
char name[MAXCOMLEN+1];
}
void
-tcic_event_thread(arg)
- void *arg;
+tcic_event_thread(void *arg)
{
struct tcic_handle *h = arg;
struct tcic_event *pe;
void
-tcic_init_socket(h)
- struct tcic_handle *h;
+tcic_init_socket(struct tcic_handle *h)
{
int reg;
}
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;
}
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;
}
int
-tcic_intr(arg)
- void *arg;
+tcic_intr(void *arg)
{
struct tcic_softc *sc = arg;
int i, ret = 0;
}
int
-tcic_intr_socket(h)
- struct tcic_handle *h;
+tcic_intr_socket(struct tcic_handle *h)
{
int icsr, rv;
}
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;
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"));
}
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"));
}
void
-tcic_deactivate_card(h)
- struct tcic_handle *h;
+tcic_deactivate_card(struct tcic_handle *h)
{
int val, reg;
/* 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;
/* 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;
}
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;
/* 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;
}
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;
}
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;
}
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;
{ 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;
}
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;
}
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;
}
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;
}
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;
* in the manual.
*/
int
-tcic_ns2wscnt(ns)
- int ns;
+tcic_ns2wscnt(int ns)
{
if (ns < 14) {
return 0;
}
int
-tcic_log2(val)
- u_int val;
+tcic_log2(u_int val)
{
int i, l2;
-/* $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 $ */
/*
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);
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);
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);
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);
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);
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;
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);
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);
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);
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);
-/* $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.
}
void
-twe_dispose(sc)
- struct twe_softc *sc;
+twe_dispose(struct twe_softc *sc)
{
register struct twe_ccb *ccb;
if (sc->sc_cmdmap != NULL) {
}
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 */
}
void
-twe_thread(v)
- void *v;
+twe_thread(void *v)
{
struct twe_softc *sc = v;
struct twe_ccb *ccb;
}
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;
}
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;
}
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;
}
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;
}
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;
}
int
-twe_intr(v)
- void *v;
+twe_intr(void *v)
{
struct twe_softc *sc = v;
struct twe_ccb *ccb;
-/* $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.
int uhaprint(void *, const char *);
int
-uhaprint(aux, name)
- void *aux;
- const char *name;
+uhaprint(void *aux, const char *name)
{
if (name != NULL)
* 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;
}
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;
* 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;
* 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;
* 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];
* 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;
* 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;
}
void
-uha_timeout(arg)
- void *arg;
+uha_timeout(void *arg)
{
struct uha_mscp *mscp = arg;
struct scsi_xfer *xs = mscp->xs;