diff options
| author | thorpej <thorpej@NetBSD.org> | 2004-01-03 01:50:52 +0000 |
|---|---|---|
| committer | thorpej <thorpej@NetBSD.org> | 2004-01-03 01:50:52 +0000 |
| commit | 5bd80d837309f8e51c05e9db4cd93e293ee49ced (patch) | |
| tree | 821ef08ec922dd23b7a0f442d2d6a8fb7ad99b43 /sys/dev | |
| parent | f61ad169ec8a42254d91bf1a27da59dffb2c1b0d (diff) | |
Rename "struct channel_softc" to "struct wdc_channel".
Diffstat (limited to 'sys/dev')
30 files changed, 228 insertions, 228 deletions
diff --git a/sys/dev/ata/ata.c b/sys/dev/ata/ata.c index 9d18ecacd9f..3687bde6c63 100644 --- a/sys/dev/ata/ata.c +++ b/sys/dev/ata/ata.c @@ -1,4 +1,4 @@ -/* $NetBSD: ata.c,v 1.24 2004/01/01 17:18:54 thorpej Exp $ */ +/* $NetBSD: ata.c,v 1.25 2004/01/03 01:50:53 thorpej Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.24 2004/01/01 17:18:54 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.25 2004/01/03 01:50:53 thorpej Exp $"); #ifndef WDCDEBUG #define WDCDEBUG @@ -83,7 +83,7 @@ extern int wdcdebug_mask; /* init'ed in wdc.c */ int atabusprint(void *aux, const char *pnp) { - struct channel_softc *chan = aux; + struct wdc_channel *chan = aux; if (pnp) aprint_normal("atabus at %s", pnp); @@ -118,7 +118,7 @@ static void atabus_thread(void *arg) { struct atabus_softc *sc = arg; - struct channel_softc *chp = sc->sc_chan; + struct wdc_channel *chp = sc->sc_chan; struct ata_xfer *xfer; int s; @@ -178,7 +178,7 @@ static void atabus_create_thread(void *arg) { struct atabus_softc *sc = arg; - struct channel_softc *chp = sc->sc_chan; + struct wdc_channel *chp = sc->sc_chan; int error; if ((error = kthread_create1(atabus_thread, sc, &chp->thread, @@ -195,7 +195,7 @@ atabus_create_thread(void *arg) static int atabus_match(struct device *parent, struct cfdata *cf, void *aux) { - struct channel_softc *chp = aux; + struct wdc_channel *chp = aux; if (chp == NULL) return (0); @@ -216,7 +216,7 @@ static void atabus_attach(struct device *parent, struct device *self, void *aux) { struct atabus_softc *sc = (void *) self; - struct channel_softc *chp = aux; + struct wdc_channel *chp = aux; struct atabus_initq *initq; sc->sc_chan = chp; @@ -240,7 +240,7 @@ static int atabus_activate(struct device *self, enum devact act) { struct atabus_softc *sc = (void *) self; - struct channel_softc *chp = sc->sc_chan; + struct wdc_channel *chp = sc->sc_chan; struct device *dev = NULL; int s, i, error = 0; @@ -298,7 +298,7 @@ static int atabus_detach(struct device *self, int flags) { struct atabus_softc *sc = (void *) self; - struct channel_softc *chp = sc->sc_chan; + struct wdc_channel *chp = sc->sc_chan; struct device *dev = NULL; int i, error = 0; diff --git a/sys/dev/ata/ata_wdc.c b/sys/dev/ata/ata_wdc.c index 99f4478227f..c0f8eaa9bee 100644 --- a/sys/dev/ata/ata_wdc.c +++ b/sys/dev/ata/ata_wdc.c @@ -1,4 +1,4 @@ -/* $NetBSD: ata_wdc.c,v 1.49 2004/01/01 20:25:22 thorpej Exp $ */ +/* $NetBSD: ata_wdc.c,v 1.50 2004/01/03 01:50:53 thorpej Exp $ */ /* * Copyright (c) 1998, 2001, 2003 Manuel Bouyer. @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ata_wdc.c,v 1.49 2004/01/01 20:25:22 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ata_wdc.c,v 1.50 2004/01/03 01:50:53 thorpej Exp $"); #ifndef WDCDEBUG #define WDCDEBUG @@ -115,12 +115,12 @@ extern int wdcdebug_wd_mask; /* inited in wd.c */ #define ATA_DELAY 10000 /* 10s for a drive I/O */ static int wdc_ata_bio(struct ata_drive_datas*, struct ata_bio*); -static void wdc_ata_bio_start(struct channel_softc *,struct ata_xfer *); -static void _wdc_ata_bio_start(struct channel_softc *,struct ata_xfer *); -static int wdc_ata_bio_intr(struct channel_softc *, struct ata_xfer *, +static void wdc_ata_bio_start(struct wdc_channel *,struct ata_xfer *); +static void _wdc_ata_bio_start(struct wdc_channel *,struct ata_xfer *); +static int wdc_ata_bio_intr(struct wdc_channel *, struct ata_xfer *, int); -static void wdc_ata_bio_kill_xfer(struct channel_softc *,struct ata_xfer *); -static void wdc_ata_bio_done(struct channel_softc *, struct ata_xfer *); +static void wdc_ata_bio_kill_xfer(struct wdc_channel *,struct ata_xfer *); +static void wdc_ata_bio_done(struct wdc_channel *, struct ata_xfer *); static int wdc_ata_err(struct ata_drive_datas *, struct ata_bio *); #define WDC_ATA_NOERR 0x00 /* Drive doesn't report an error */ #define WDC_ATA_RECOV 0x01 /* There was a recovered error */ @@ -173,7 +173,7 @@ static int wdc_ata_bio(struct ata_drive_datas *drvp, struct ata_bio *ata_bio) { struct ata_xfer *xfer; - struct channel_softc *chp = drvp->chnl_softc; + struct wdc_channel *chp = drvp->chnl_softc; xfer = wdc_get_xfer(WDC_NOSLEEP); if (xfer == NULL) @@ -197,7 +197,7 @@ wdc_ata_bio(struct ata_drive_datas *drvp, struct ata_bio *ata_bio) } static void -wdc_ata_bio_start(struct channel_softc *chp, struct ata_xfer *xfer) +wdc_ata_bio_start(struct wdc_channel *chp, struct ata_xfer *xfer) { struct ata_bio *ata_bio = xfer->c_cmd; struct ata_drive_datas *drvp = &chp->ch_drive[xfer->c_drive]; @@ -329,7 +329,7 @@ ctrldone: } static void -_wdc_ata_bio_start(struct channel_softc *chp, struct ata_xfer *xfer) +_wdc_ata_bio_start(struct wdc_channel *chp, struct ata_xfer *xfer) { int wait_flags = (xfer->c_flags & C_POLL) ? AT_POLL : 0; struct ata_bio *ata_bio = xfer->c_cmd; @@ -570,7 +570,7 @@ timeout: } static int -wdc_ata_bio_intr(struct channel_softc *chp, struct ata_xfer *xfer, int irq) +wdc_ata_bio_intr(struct wdc_channel *chp, struct ata_xfer *xfer, int irq) { struct ata_bio *ata_bio = xfer->c_cmd; struct ata_drive_datas *drvp = &chp->ch_drive[xfer->c_drive]; @@ -730,13 +730,13 @@ end: static void wdc_ata_kill_pending(struct ata_drive_datas *drvp) { - struct channel_softc *chp = drvp->chnl_softc; + struct wdc_channel *chp = drvp->chnl_softc; wdc_kill_pending(chp); } static void -wdc_ata_bio_kill_xfer(struct channel_softc *chp, struct ata_xfer *xfer) +wdc_ata_bio_kill_xfer(struct wdc_channel *chp, struct ata_xfer *xfer) { struct ata_bio *ata_bio = xfer->c_cmd; int drive = xfer->c_drive; @@ -753,7 +753,7 @@ wdc_ata_bio_kill_xfer(struct channel_softc *chp, struct ata_xfer *xfer) } static void -wdc_ata_bio_done(struct channel_softc *chp, struct ata_xfer *xfer) +wdc_ata_bio_done(struct wdc_channel *chp, struct ata_xfer *xfer) { struct ata_bio *ata_bio = xfer->c_cmd; int drive = xfer->c_drive; @@ -782,7 +782,7 @@ wdc_ata_bio_done(struct channel_softc *chp, struct ata_xfer *xfer) static int wdc_ata_err(struct ata_drive_datas *drvp, struct ata_bio *ata_bio) { - struct channel_softc *chp = drvp->chnl_softc; + struct wdc_channel *chp = drvp->chnl_softc; ata_bio->error = 0; if (chp->ch_status & WDCS_BSY) { ata_bio->error = TIMEOUT; @@ -819,7 +819,7 @@ wdc_ata_err(struct ata_drive_datas *drvp, struct ata_bio *ata_bio) static int wdc_ata_addref(struct ata_drive_datas *drvp) { - struct channel_softc *chp = drvp->chnl_softc; + struct wdc_channel *chp = drvp->chnl_softc; return (wdc_addref(chp)); } @@ -827,7 +827,7 @@ wdc_ata_addref(struct ata_drive_datas *drvp) static void wdc_ata_delref(struct ata_drive_datas *drvp) { - struct channel_softc *chp = drvp->chnl_softc; + struct wdc_channel *chp = drvp->chnl_softc; wdc_delref(chp); } diff --git a/sys/dev/ata/atavar.h b/sys/dev/ata/atavar.h index 11be268d734..4837915b0bf 100644 --- a/sys/dev/ata/atavar.h +++ b/sys/dev/ata/atavar.h @@ -1,4 +1,4 @@ -/* $NetBSD: atavar.h,v 1.39 2004/01/01 17:18:54 thorpej Exp $ */ +/* $NetBSD: atavar.h,v 1.40 2004/01/03 01:50:53 thorpej Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. @@ -43,7 +43,7 @@ struct ata_xfer { __volatile u_int c_flags; /* command state flags */ /* Channel and drive that are to process the request. */ - struct channel_softc *c_chp; + struct wdc_channel *c_chp; int c_drive; void *c_cmd; /* private request structure pointer */ @@ -56,9 +56,9 @@ struct ata_xfer { TAILQ_ENTRY(ata_xfer) c_xferchain; /* Low-level protocol handlers. */ - void (*c_start)(struct channel_softc *, struct ata_xfer *); - int (*c_intr)(struct channel_softc *, struct ata_xfer *, int); - void (*c_kill_xfer)(struct channel_softc *, struct ata_xfer *); + void (*c_start)(struct wdc_channel *, struct ata_xfer *); + int (*c_intr)(struct wdc_channel *, struct ata_xfer *, int); + void (*c_kill_xfer)(struct wdc_channel *, struct ata_xfer *); }; #define C_ATAPI 0x0001 /* xfer is ATAPI request */ @@ -75,7 +75,7 @@ struct ata_queue { /* ATA bus instance state information. */ struct atabus_softc { struct device sc_dev; - struct channel_softc *sc_chan; /* XXXwdc */ + struct wdc_channel *sc_chan; /* XXXwdc */ }; /* diff --git a/sys/dev/ic/wdc.c b/sys/dev/ic/wdc.c index c410e0accc9..9b6c46fcbcc 100644 --- a/sys/dev/ic/wdc.c +++ b/sys/dev/ic/wdc.c @@ -1,4 +1,4 @@ -/* $NetBSD: wdc.c,v 1.167 2004/01/01 21:18:28 thorpej Exp $ */ +/* $NetBSD: wdc.c,v 1.168 2004/01/03 01:50:53 thorpej Exp $ */ /* * Copyright (c) 1998, 2001, 2003 Manuel Bouyer. All rights reserved. @@ -70,7 +70,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.167 2004/01/01 21:18:28 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.168 2004/01/03 01:50:53 thorpej Exp $"); #ifndef WDCDEBUG #define WDCDEBUG @@ -143,14 +143,14 @@ const struct ata_bustype wdc_ata_bustype = { }; #endif -static int wdcprobe1(struct channel_softc*, int); -static void __wdcerror(struct channel_softc*, char *); -static int __wdcwait_reset(struct channel_softc *, int, int); -static void __wdccommand_done(struct channel_softc *, struct ata_xfer *); -static void __wdccommand_start(struct channel_softc *, struct ata_xfer *); -static int __wdccommand_intr(struct channel_softc *, struct ata_xfer *, +static int wdcprobe1(struct wdc_channel*, int); +static void __wdcerror(struct wdc_channel*, char *); +static int __wdcwait_reset(struct wdc_channel *, int, int); +static void __wdccommand_done(struct wdc_channel *, struct ata_xfer *); +static void __wdccommand_start(struct wdc_channel *, struct ata_xfer *); +static int __wdccommand_intr(struct wdc_channel *, struct ata_xfer *, int); -static int __wdcwait(struct channel_softc *, int, int, int); +static int __wdcwait(struct wdc_channel *, int, int, int); #define DEBUG_INTR 0x01 #define DEBUG_XFERS 0x02 @@ -190,7 +190,7 @@ struct simplelock atabus_interlock = SIMPLELOCK_INITIALIZER; */ static void -wdc_drvprobe(struct channel_softc *chp) +wdc_drvprobe(struct wdc_channel *chp) { struct ataparams params; u_int8_t st0 = 0, st1 = 0; @@ -339,7 +339,7 @@ wdc_drvprobe(struct channel_softc *chp) void atabusconfig(struct atabus_softc *atabus_sc) { - struct channel_softc *chp = atabus_sc->sc_chan; + struct wdc_channel *chp = atabus_sc->sc_chan; int i, error, need_delref = 0; struct atabus_initq *atabus_initq = NULL; @@ -464,14 +464,14 @@ atabusconfig(struct atabus_softc *atabus_sc) } int -wdcprobe(struct channel_softc *chp) +wdcprobe(struct wdc_channel *chp) { return (wdcprobe1(chp, 1)); } static int -wdcprobe1(struct channel_softc *chp, int poll) +wdcprobe1(struct wdc_channel *chp, int poll) { u_int8_t st0, st1, sc, sn, cl, ch; u_int8_t ret_value = 0x03; @@ -648,7 +648,7 @@ wdcprobe1(struct channel_softc *chp, int poll) } void -wdcattach(struct channel_softc *chp) +wdcattach(struct wdc_channel *chp) { static int inited = 0; @@ -699,7 +699,7 @@ int wdcdetach(struct device *self, int flags) { struct wdc_softc *wdc = (struct wdc_softc *)self; - struct channel_softc *chp; + struct wdc_channel *chp; int i, error = 0; for (i = 0; i < wdc->nchannels; i++) { @@ -719,7 +719,7 @@ wdcdetach(struct device *self, int flags) * are shared. */ void -wdcstart(struct channel_softc *chp) +wdcstart(struct wdc_channel *chp) { struct ata_xfer *xfer; @@ -773,7 +773,7 @@ wdcstart(struct channel_softc *chp) void wdcrestart(void *v) { - struct channel_softc *chp = v; + struct wdc_channel *chp = v; int s; s = splbio(); @@ -791,7 +791,7 @@ wdcrestart(void *v) int wdcintr(void *arg) { - struct channel_softc *chp = arg; + struct wdc_channel *chp = arg; struct ata_xfer *xfer; int ret; @@ -831,7 +831,7 @@ wdcintr(void *arg) void wdc_reset_channel(struct ata_drive_datas *drvp, int flags) { - struct channel_softc *chp = drvp->chnl_softc; + struct wdc_channel *chp = drvp->chnl_softc; int drive; WDCDEBUG_PRINT(("ata_reset_channel %s:%d for drive %d\n", @@ -854,7 +854,7 @@ wdc_reset_channel(struct ata_drive_datas *drvp, int flags) } int -wdcreset(struct channel_softc *chp, int poll) +wdcreset(struct wdc_channel *chp, int poll) { int drv_mask1, drv_mask2; int s = 0; @@ -897,7 +897,7 @@ wdcreset(struct channel_softc *chp, int poll) } static int -__wdcwait_reset(struct channel_softc *chp, int drv_mask, int poll) +__wdcwait_reset(struct wdc_channel *chp, int drv_mask, int poll) { int timeout, nloop; u_int8_t st0 = 0, st1 = 0; @@ -997,7 +997,7 @@ end: * return -1 for a timeout after "timeout" ms. */ static int -__wdcwait(struct channel_softc *chp, int mask, int bits, int timeout) +__wdcwait(struct wdc_channel *chp, int mask, int bits, int timeout) { u_char status; int time = 0; @@ -1054,7 +1054,7 @@ __wdcwait(struct channel_softc *chp, int mask, int bits, int timeout) * thread if possible */ int -wdcwait(struct channel_softc *chp, int mask, int bits, int timeout, int flags) +wdcwait(struct wdc_channel *chp, int mask, int bits, int timeout, int flags) { int error, i, timeout_hz = mstohz(timeout); @@ -1101,7 +1101,7 @@ wdcwait(struct channel_softc *chp, int mask, int bits, int timeout, int flags) * Busy-wait for DMA to complete */ int -wdc_dmawait(struct channel_softc *chp, struct ata_xfer *xfer, int timeout) +wdc_dmawait(struct wdc_channel *chp, struct ata_xfer *xfer, int timeout) { int time; for (time = 0; time < timeout * 1000 / WDCDELAY; time++) { @@ -1121,7 +1121,7 @@ wdc_dmawait(struct channel_softc *chp, struct ata_xfer *xfer, int timeout) void wdctimeout(void *arg) { - struct channel_softc *chp = (struct channel_softc *)arg; + struct wdc_channel *chp = (struct wdc_channel *)arg; struct ata_xfer *xfer = TAILQ_FIRST(&chp->ch_queue->queue_xfer); int s; @@ -1166,7 +1166,7 @@ void wdc_probe_caps(struct ata_drive_datas *drvp) { struct ataparams params, params2; - struct channel_softc *chp = drvp->chnl_softc; + struct wdc_channel *chp = drvp->chnl_softc; struct device *drv_dev = drvp->drv_softc; struct wdc_softc *wdc = chp->wdc; int i, printed; @@ -1382,7 +1382,7 @@ wdc_probe_caps(struct ata_drive_datas *drvp) int wdc_downgrade_mode(struct ata_drive_datas *drvp, int flags) { - struct channel_softc *chp = drvp->chnl_softc; + struct wdc_channel *chp = drvp->chnl_softc; struct device *drv_dev = drvp->drv_softc; struct wdc_softc *wdc = chp->wdc; int cf_flags = drv_dev->dv_cfdata->cf_flags; @@ -1440,7 +1440,7 @@ wdc_downgrade_mode(struct ata_drive_datas *drvp, int flags) int wdc_exec_command(struct ata_drive_datas *drvp, struct wdc_command *wdc_c) { - struct channel_softc *chp = drvp->chnl_softc; + struct wdc_channel *chp = drvp->chnl_softc; struct ata_xfer *xfer; int s, ret; @@ -1491,7 +1491,7 @@ wdc_exec_command(struct ata_drive_datas *drvp, struct wdc_command *wdc_c) } static void -__wdccommand_start(struct channel_softc *chp, struct ata_xfer *xfer) +__wdccommand_start(struct wdc_channel *chp, struct ata_xfer *xfer) { int drive = xfer->c_drive; struct wdc_command *wdc_c = xfer->c_cmd; @@ -1538,7 +1538,7 @@ __wdccommand_start(struct channel_softc *chp, struct ata_xfer *xfer) } static int -__wdccommand_intr(struct channel_softc *chp, struct ata_xfer *xfer, int irq) +__wdccommand_intr(struct wdc_channel *chp, struct ata_xfer *xfer, int irq) { struct wdc_command *wdc_c = xfer->c_cmd; int bcount = wdc_c->bcount; @@ -1636,7 +1636,7 @@ __wdccommand_intr(struct channel_softc *chp, struct ata_xfer *xfer, int irq) } static void -__wdccommand_done(struct channel_softc *chp, struct ata_xfer *xfer) +__wdccommand_done(struct wdc_channel *chp, struct ata_xfer *xfer) { struct wdc_command *wdc_c = xfer->c_cmd; @@ -1691,7 +1691,7 @@ __wdccommand_done(struct channel_softc *chp, struct ata_xfer *xfer) * Assumes interrupts are blocked. */ void -wdccommand(struct channel_softc *chp, u_int8_t drive, u_int8_t command, +wdccommand(struct wdc_channel *chp, u_int8_t drive, u_int8_t command, u_int16_t cylin, u_int8_t head, u_int8_t sector, u_int8_t count, u_int8_t precomp) { @@ -1726,7 +1726,7 @@ wdccommand(struct channel_softc *chp, u_int8_t drive, u_int8_t command, * Assumes interrupts are blocked. */ void -wdccommandext(struct channel_softc *chp, u_int8_t drive, u_int8_t command, +wdccommandext(struct wdc_channel *chp, u_int8_t drive, u_int8_t command, u_int64_t blkno, u_int16_t count) { @@ -1772,7 +1772,7 @@ wdccommandext(struct channel_softc *chp, u_int8_t drive, u_int8_t command, * tested by the caller. */ void -wdccommandshort(struct channel_softc *chp, int drive, int command) +wdccommandshort(struct wdc_channel *chp, int drive, int command) { WDCDEBUG_PRINT(("wdccommandshort %s:%d:%d command 0x%x\n", @@ -1791,7 +1791,7 @@ wdccommandshort(struct channel_softc *chp, int drive, int command) /* Add a command to the queue and start controller. Must be called at splbio */ void -wdc_exec_xfer(struct channel_softc *chp, struct ata_xfer *xfer) +wdc_exec_xfer(struct wdc_channel *chp, struct ata_xfer *xfer) { WDCDEBUG_PRINT(("wdc_exec_xfer %p channel %d drive %d\n", xfer, @@ -1833,7 +1833,7 @@ wdc_get_xfer(int flags) } void -wdc_free_xfer(struct channel_softc *chp, struct ata_xfer *xfer) +wdc_free_xfer(struct wdc_channel *chp, struct ata_xfer *xfer) { struct wdc_softc *wdc = chp->wdc; int s; @@ -1848,12 +1848,12 @@ wdc_free_xfer(struct channel_softc *chp, struct ata_xfer *xfer) } /* - * Kill off all pending xfers for a channel_softc. + * Kill off all pending xfers for a wdc_channel. * * Must be called at splbio(). */ void -wdc_kill_pending(struct channel_softc *chp) +wdc_kill_pending(struct wdc_channel *chp) { struct ata_xfer *xfer; @@ -1864,7 +1864,7 @@ wdc_kill_pending(struct channel_softc *chp) } static void -__wdcerror(struct channel_softc *chp, char *msg) +__wdcerror(struct wdc_channel *chp, char *msg) { struct ata_xfer *xfer = TAILQ_FIRST(&chp->ch_queue->queue_xfer); @@ -1880,7 +1880,7 @@ __wdcerror(struct channel_softc *chp, char *msg) * the bit bucket */ void -wdcbit_bucket(struct channel_softc *chp, int size) +wdcbit_bucket(struct wdc_channel *chp, int size) { for (; size >= 2; size -= 2) @@ -1890,7 +1890,7 @@ wdcbit_bucket(struct channel_softc *chp, int size) } int -wdc_addref(struct channel_softc *chp) +wdc_addref(struct wdc_channel *chp) { struct wdc_softc *wdc = chp->wdc; struct scsipi_adapter *adapt = &wdc->sc_atapi_adapter._generic; @@ -1908,7 +1908,7 @@ wdc_addref(struct channel_softc *chp) } void -wdc_delref(struct channel_softc *chp) +wdc_delref(struct wdc_channel *chp) { struct wdc_softc *wdc = chp->wdc; struct scsipi_adapter *adapt = &wdc->sc_atapi_adapter._generic; @@ -1922,7 +1922,7 @@ wdc_delref(struct channel_softc *chp) } void -wdc_print_modes(struct channel_softc *chp) +wdc_print_modes(struct wdc_channel *chp) { int drive; struct ata_drive_datas *drvp; diff --git a/sys/dev/ic/wdc_upc.c b/sys/dev/ic/wdc_upc.c index 72620e420d0..d415ea3ffee 100644 --- a/sys/dev/ic/wdc_upc.c +++ b/sys/dev/ic/wdc_upc.c @@ -1,4 +1,4 @@ -/* $NetBSD: wdc_upc.c,v 1.13 2004/01/01 17:18:53 thorpej Exp $ */ +/* $NetBSD: wdc_upc.c,v 1.14 2004/01/03 01:50:53 thorpej Exp $ */ /*- * Copyright (c) 2000 Ben Harris * All rights reserved. @@ -28,7 +28,7 @@ /* This file is part of NetBSD/arm26 -- a port of NetBSD to ARM2/3 machines. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wdc_upc.c,v 1.13 2004/01/01 17:18:53 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wdc_upc.c,v 1.14 2004/01/03 01:50:53 thorpej Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -49,8 +49,8 @@ static void wdc_upc_attach(struct device *, struct device *, void *); struct wdc_upc_softc { struct wdc_softc sc_wdc; - struct channel_softc *sc_chanlist[1]; - struct channel_softc sc_channel; + struct wdc_channel *sc_chanlist[1]; + struct wdc_channel sc_channel; struct ata_queue sc_chqueue; }; diff --git a/sys/dev/ic/wdcvar.h b/sys/dev/ic/wdcvar.h index 33dc35ba5f7..d5bfb270ab4 100644 --- a/sys/dev/ic/wdcvar.h +++ b/sys/dev/ic/wdcvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: wdcvar.h,v 1.51 2004/01/01 20:25:22 thorpej Exp $ */ +/* $NetBSD: wdcvar.h,v 1.52 2004/01/03 01:50:53 thorpej Exp $ */ /*- * Copyright (c) 1998, 2003 The NetBSD Foundation, Inc. @@ -50,7 +50,7 @@ #define WDC_NREG 8 /* number of command registers */ -struct channel_softc { /* Per channel data */ +struct wdc_channel { /* Per channel data */ /* Our timeout callout */ struct callout ch_callout; /* Our location */ @@ -119,7 +119,7 @@ struct wdc_softc { /* Per controller state */ u_int8_t DMA_cap; /* highest DMA mode supported */ u_int8_t UDMA_cap; /* highest UDMA mode supported */ int nchannels; /* Number of channels on this controller */ - struct channel_softc **channels; /* channels-specific datas (array) */ + struct wdc_channel **channels; /* channels-specific datas (array) */ /* * The reference count here is used for both IDE and ATAPI devices. @@ -127,7 +127,7 @@ struct wdc_softc { /* Per controller state */ struct atapi_adapter sc_atapi_adapter; /* Function used to probe for drives. */ - void (*drv_probe)(struct channel_softc *); + void (*drv_probe)(struct wdc_channel *); /* if WDC_CAPABILITY_DMA set in 'cap' */ void *dma_arg; @@ -149,13 +149,13 @@ struct wdc_softc { /* Per controller state */ void (*free_hw)(void *); /* if WDC_CAPABILITY_MODE set in 'cap' */ - void (*set_modes)(struct channel_softc *); + void (*set_modes)(struct wdc_channel *); /* if WDC_CAPABILITY_SELECT set in 'cap' */ - void (*select)(struct channel_softc *,int); + void (*select)(struct wdc_channel *,int); /* if WDC_CAPABILITY_IRQACK set in 'cap' */ - void (*irqack)(struct channel_softc *); + void (*irqack)(struct wdc_channel *); }; /* @@ -163,37 +163,37 @@ struct wdc_softc { /* Per controller state */ * or bus-specific backends. */ -int wdcprobe(struct channel_softc *); -void wdcattach(struct channel_softc *); +int wdcprobe(struct wdc_channel *); +void wdcattach(struct wdc_channel *); int wdcdetach(struct device *, int); int wdcactivate(struct device *, enum devact); int wdcintr(void *); -void wdc_exec_xfer(struct channel_softc *, struct ata_xfer *); +void wdc_exec_xfer(struct wdc_channel *, struct ata_xfer *); struct ata_xfer *wdc_get_xfer(int); /* int = WDC_NOSLEEP/CANSLEEP */ #define WDC_CANSLEEP 0x00 #define WDC_NOSLEEP 0x01 -void wdc_free_xfer (struct channel_softc *, struct ata_xfer *); -void wdcstart(struct channel_softc *); +void wdc_free_xfer (struct wdc_channel *, struct ata_xfer *); +void wdcstart(struct wdc_channel *); void wdcrestart(void*); -int wdcreset(struct channel_softc *, int); +int wdcreset(struct wdc_channel *, int); #define RESET_POLL 1 #define RESET_SLEEP 0 /* wdcreset will use tsleep() */ -int wdcwait(struct channel_softc *, int, int, int, int); +int wdcwait(struct wdc_channel *, int, int, int, int); #define WDCWAIT_OK 0 /* we have what we asked */ #define WDCWAIT_TOUT -1 /* timed out */ #define WDCWAIT_THR 1 /* return, the kernel thread has been awakened */ -int wdc_dmawait(struct channel_softc *, struct ata_xfer *, int); -void wdcbit_bucket( struct channel_softc *, int); -void wdccommand(struct channel_softc *, u_int8_t, u_int8_t, u_int16_t, +int wdc_dmawait(struct wdc_channel *, struct ata_xfer *, int); +void wdcbit_bucket( struct wdc_channel *, int); +void wdccommand(struct wdc_channel *, u_int8_t, u_int8_t, u_int16_t, u_int8_t, u_int8_t, u_int8_t, u_int8_t); -void wdccommandext(struct channel_softc *, u_int8_t, u_int8_t, u_int64_t, +void wdccommandext(struct wdc_channel *, u_int8_t, u_int8_t, u_int64_t, u_int16_t); -void wdccommandshort(struct channel_softc *, int, int); +void wdccommandshort(struct wdc_channel *, int, int); void wdctimeout(void *arg); void wdc_reset_channel(struct ata_drive_datas *, int); @@ -202,11 +202,11 @@ int wdc_exec_command(struct ata_drive_datas *, struct wdc_command*); #define WDC_QUEUED 0x02 #define WDC_TRY_AGAIN 0x03 -int wdc_addref(struct channel_softc *); -void wdc_delref(struct channel_softc *); -void wdc_kill_pending(struct channel_softc *); +int wdc_addref(struct wdc_channel *); +void wdc_delref(struct wdc_channel *); +void wdc_kill_pending(struct wdc_channel *); -void wdc_print_modes (struct channel_softc *); +void wdc_print_modes (struct wdc_channel *); void wdc_probe_caps(struct ata_drive_datas*); /* diff --git a/sys/dev/isa/wdc_isa.c b/sys/dev/isa/wdc_isa.c index 8ac6f06836e..9d94f6f2f09 100644 --- a/sys/dev/isa/wdc_isa.c +++ b/sys/dev/isa/wdc_isa.c @@ -1,4 +1,4 @@ -/* $NetBSD: wdc_isa.c,v 1.38 2004/01/01 17:18:53 thorpej Exp $ */ +/* $NetBSD: wdc_isa.c,v 1.39 2004/01/03 01:50:53 thorpej Exp $ */ /*- * Copyright (c) 1998, 2003 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wdc_isa.c,v 1.38 2004/01/01 17:18:53 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wdc_isa.c,v 1.39 2004/01/03 01:50:53 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -65,8 +65,8 @@ __KERNEL_RCSID(0, "$NetBSD: wdc_isa.c,v 1.38 2004/01/01 17:18:53 thorpej Exp $") struct wdc_isa_softc { struct wdc_softc sc_wdcdev; - struct channel_softc *wdc_chanlist[1]; - struct channel_softc wdc_channel; + struct wdc_channel *wdc_chanlist[1]; + struct wdc_channel wdc_channel; struct ata_queue wdc_chqueue; isa_chipset_tag_t sc_ic; void *sc_ih; @@ -92,7 +92,7 @@ wdc_isa_probe(parent, match, aux) struct cfdata *match; void *aux; { - struct channel_softc ch; + struct wdc_channel ch; struct isa_attach_args *ia = aux; int result = 0, i; diff --git a/sys/dev/isapnp/wdc_isapnp.c b/sys/dev/isapnp/wdc_isapnp.c index 17cb9f2e954..47cb91126ae 100644 --- a/sys/dev/isapnp/wdc_isapnp.c +++ b/sys/dev/isapnp/wdc_isapnp.c @@ -1,4 +1,4 @@ -/* $NetBSD: wdc_isapnp.c,v 1.24 2004/01/01 17:18:53 thorpej Exp $ */ +/* $NetBSD: wdc_isapnp.c,v 1.25 2004/01/03 01:50:53 thorpej Exp $ */ /*- * Copyright (c) 1998, 2003 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wdc_isapnp.c,v 1.24 2004/01/01 17:18:53 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wdc_isapnp.c,v 1.25 2004/01/03 01:50:53 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -60,8 +60,8 @@ __KERNEL_RCSID(0, "$NetBSD: wdc_isapnp.c,v 1.24 2004/01/01 17:18:53 thorpej Exp struct wdc_isapnp_softc { struct wdc_softc sc_wdcdev; - struct channel_softc *wdc_chanlist[1]; - struct channel_softc wdc_channel; + struct wdc_channel *wdc_chanlist[1]; + struct wdc_channel wdc_channel; struct ata_queue wdc_chqueue; isa_chipset_tag_t sc_ic; void *sc_ih; diff --git a/sys/dev/ofisa/wdc_ofisa.c b/sys/dev/ofisa/wdc_ofisa.c index 3d4d27a8241..56de6054c40 100644 --- a/sys/dev/ofisa/wdc_ofisa.c +++ b/sys/dev/ofisa/wdc_ofisa.c @@ -1,4 +1,4 @@ -/* $NetBSD: wdc_ofisa.c,v 1.17 2004/01/01 17:18:53 thorpej Exp $ */ +/* $NetBSD: wdc_ofisa.c,v 1.18 2004/01/03 01:50:53 thorpej Exp $ */ /* * Copyright 1997, 1998 @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wdc_ofisa.c,v 1.17 2004/01/01 17:18:53 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wdc_ofisa.c,v 1.18 2004/01/03 01:50:53 thorpej Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -59,8 +59,8 @@ __KERNEL_RCSID(0, "$NetBSD: wdc_ofisa.c,v 1.17 2004/01/01 17:18:53 thorpej Exp $ struct wdc_ofisa_softc { struct wdc_softc sc_wdcdev; - struct channel_softc *wdc_chanlist[1]; - struct channel_softc wdc_channel; + struct wdc_channel *wdc_chanlist[1]; + struct wdc_channel wdc_channel; struct ata_queue wdc_chqueue; void *sc_ih; }; diff --git a/sys/dev/pci/acardide.c b/sys/dev/pci/acardide.c index 2ef2048f666..03acbb699fe 100644 --- a/sys/dev/pci/acardide.c +++ b/sys/dev/pci/acardide.c @@ -1,4 +1,4 @@ -/* $NetBSD: acardide.c,v 1.6 2003/11/27 23:02:40 fvdl Exp $ */ +/* $NetBSD: acardide.c,v 1.7 2004/01/03 01:50:53 thorpej Exp $ */ /* * Copyright (c) 2001 Izumi Tsutsui. @@ -36,7 +36,7 @@ #include <dev/pci/pciide_acard_reg.h> static void acard_chip_map(struct pciide_softc*, struct pci_attach_args*); -static void acard_setup_channel(struct channel_softc*); +static void acard_setup_channel(struct wdc_channel*); #if 0 /* XXX !! */ static int acard_pci_intr(void *); #endif @@ -176,7 +176,7 @@ acard_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa) } static void -acard_setup_channel(struct channel_softc *chp) +acard_setup_channel(struct wdc_channel *chp) { struct ata_drive_datas *drvp; struct pciide_channel *cp = (struct pciide_channel*)chp; @@ -292,7 +292,7 @@ acard_pci_intr(void *arg) { struct pciide_softc *sc = arg; struct pciide_channel *cp; - struct channel_softc *wdc_cp; + struct wdc_channel *wdc_cp; int rv = 0; int dmastat, i, crv; diff --git a/sys/dev/pci/aceride.c b/sys/dev/pci/aceride.c index 8b5a47a7bb6..f49aae30c6d 100644 --- a/sys/dev/pci/aceride.c +++ b/sys/dev/pci/aceride.c @@ -1,4 +1,4 @@ -/* $NetBSD: aceride.c,v 1.4 2003/11/27 23:02:40 fvdl Exp $ */ +/* $NetBSD: aceride.c,v 1.5 2004/01/03 01:50:53 thorpej Exp $ */ /* * Copyright (c) 1999, 2000, 2001 Manuel Bouyer. @@ -39,7 +39,7 @@ #include <dev/pci/pciide_acer_reg.h> static void acer_chip_map(struct pciide_softc*, struct pci_attach_args*); -static void acer_setup_channel(struct channel_softc*); +static void acer_setup_channel(struct wdc_channel*); static int acer_pci_intr(void *); static int aceride_match(struct device *, struct cfdata *, void *); @@ -169,7 +169,7 @@ acer_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa) } static void -acer_setup_channel(struct channel_softc *chp) +acer_setup_channel(struct wdc_channel *chp) { struct ata_drive_datas *drvp; int drive; @@ -267,7 +267,7 @@ acer_pci_intr(void *arg) { struct pciide_softc *sc = arg; struct pciide_channel *cp; - struct channel_softc *wdc_cp; + struct wdc_channel *wdc_cp; int i, rv, crv; u_int32_t chids; diff --git a/sys/dev/pci/cmdide.c b/sys/dev/pci/cmdide.c index 24a71ae4498..c7d6613c37c 100644 --- a/sys/dev/pci/cmdide.c +++ b/sys/dev/pci/cmdide.c @@ -1,4 +1,4 @@ -/* $NetBSD: cmdide.c,v 1.8 2004/01/01 17:18:53 thorpej Exp $ */ +/* $NetBSD: cmdide.c,v 1.9 2004/01/03 01:50:53 thorpej Exp $ */ /* * Copyright (c) 1999, 2000, 2001 Manuel Bouyer. @@ -48,13 +48,13 @@ CFATTACH_DECL(cmdide, sizeof(struct pciide_softc), static void cmd_chip_map(struct pciide_softc*, struct pci_attach_args*); static void cmd0643_9_chip_map(struct pciide_softc*, struct pci_attach_args*); -static void cmd0643_9_setup_channel(struct channel_softc*); +static void cmd0643_9_setup_channel(struct wdc_channel*); static void cmd_channel_map(struct pci_attach_args *, struct pciide_softc *, int); static int cmd_pci_intr(void *); -static void cmd646_9_irqack(struct channel_softc *); +static void cmd646_9_irqack(struct wdc_channel *); static void cmd680_chip_map(struct pciide_softc*, struct pci_attach_args*); -static void cmd680_setup_channel(struct channel_softc*); +static void cmd680_setup_channel(struct wdc_channel*); static void cmd680_channel_map(struct pci_attach_args *, struct pciide_softc *, int); @@ -201,7 +201,7 @@ cmd_pci_intr(void *arg) { struct pciide_softc *sc = arg; struct pciide_channel *cp; - struct channel_softc *wdc_cp; + struct wdc_channel *wdc_cp; int i, rv, crv; u_int32_t priirq, secirq; @@ -353,7 +353,7 @@ cmd0643_9_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa) } static void -cmd0643_9_setup_channel(struct channel_softc *chp) +cmd0643_9_setup_channel(struct wdc_channel *chp) { struct ata_drive_datas *drvp; u_int8_t tim; @@ -431,7 +431,7 @@ cmd0643_9_setup_channel(struct channel_softc *chp) } static void -cmd646_9_irqack(struct channel_softc *chp) +cmd646_9_irqack(struct wdc_channel *chp) { u_int32_t priirq, secirq; struct pciide_channel *cp = (struct pciide_channel*)chp; @@ -532,7 +532,7 @@ cmd680_channel_map(struct pci_attach_args *pa, struct pciide_softc *sc, } static void -cmd680_setup_channel(struct channel_softc *chp) +cmd680_setup_channel(struct wdc_channel *chp) { struct ata_drive_datas *drvp; u_int8_t mode, off, scsc; diff --git a/sys/dev/pci/cypide.c b/sys/dev/pci/cypide.c index 0d9e2b2b1e1..a7e61bc3273 100644 --- a/sys/dev/pci/cypide.c +++ b/sys/dev/pci/cypide.c @@ -1,4 +1,4 @@ -/* $NetBSD: cypide.c,v 1.5 2004/01/01 17:18:53 thorpej Exp $ */ +/* $NetBSD: cypide.c,v 1.6 2004/01/03 01:50:53 thorpej Exp $ */ /* * Copyright (c) 1999, 2000, 2001 Manuel Bouyer. @@ -42,7 +42,7 @@ #include <dev/pci/cy82c693var.h> static void cy693_chip_map(struct pciide_softc*, struct pci_attach_args*); -static void cy693_setup_channel(struct channel_softc*); +static void cy693_setup_channel(struct wdc_channel*); static int cypide_match(struct device *, struct cfdata *, void *); static void cypide_attach(struct device *, struct device *, void *); @@ -174,7 +174,7 @@ cy693_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa) } static void -cy693_setup_channel(struct channel_softc *chp) +cy693_setup_channel(struct wdc_channel *chp) { struct ata_drive_datas *drvp; int drive; diff --git a/sys/dev/pci/hptide.c b/sys/dev/pci/hptide.c index fc43d254f76..167c0bccfb0 100644 --- a/sys/dev/pci/hptide.c +++ b/sys/dev/pci/hptide.c @@ -1,4 +1,4 @@ -/* $NetBSD: hptide.c,v 1.7 2003/11/28 20:08:29 chs Exp $ */ +/* $NetBSD: hptide.c,v 1.8 2004/01/03 01:50:53 thorpej Exp $ */ /* * Copyright (c) 1999, 2000, 2001 Manuel Bouyer. @@ -39,7 +39,7 @@ #include <dev/pci/pciide_hpt_reg.h> static void hpt_chip_map(struct pciide_softc*, struct pci_attach_args*); -static void hpt_setup_channel(struct channel_softc*); +static void hpt_setup_channel(struct wdc_channel*); static int hpt_pci_intr(void *); static int hptide_match(struct device *, struct cfdata *, void *); @@ -268,7 +268,7 @@ hpt_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa) } static void -hpt_setup_channel(struct channel_softc *chp) +hpt_setup_channel(struct wdc_channel *chp) { struct ata_drive_datas *drvp; int drive; @@ -377,7 +377,7 @@ hpt_pci_intr(void *arg) { struct pciide_softc *sc = arg; struct pciide_channel *cp; - struct channel_softc *wdc_cp; + struct wdc_channel *wdc_cp; int rv = 0; int dmastat, i, crv; diff --git a/sys/dev/pci/optiide.c b/sys/dev/pci/optiide.c index 71f52c2fbef..2ee33a9ee3c 100644 --- a/sys/dev/pci/optiide.c +++ b/sys/dev/pci/optiide.c @@ -1,4 +1,4 @@ -/* $NetBSD: optiide.c,v 1.3 2003/10/24 00:24:15 mycroft Exp $ */ +/* $NetBSD: optiide.c,v 1.4 2004/01/03 01:50:53 thorpej Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -46,7 +46,7 @@ #include <dev/pci/pciide_opti_reg.h> static void opti_chip_map(struct pciide_softc*, struct pci_attach_args*); -static void opti_setup_channel(struct channel_softc*); +static void opti_setup_channel(struct wdc_channel*); static int optiide_match(struct device *, struct cfdata *, void *); static void optiide_attach(struct device *, struct device *, void *); @@ -168,7 +168,7 @@ opti_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa) } static void -opti_setup_channel(struct channel_softc *chp) +opti_setup_channel(struct wdc_channel *chp) { struct ata_drive_datas *drvp; struct pciide_channel *cp = (struct pciide_channel*)chp; diff --git a/sys/dev/pci/pciide_common.c b/sys/dev/pci/pciide_common.c index 4e09d9348ad..906b2e5bc71 100644 --- a/sys/dev/pci/pciide_common.c +++ b/sys/dev/pci/pciide_common.c @@ -1,4 +1,4 @@ -/* $NetBSD: pciide_common.c,v 1.6 2004/01/01 17:18:53 thorpej Exp $ */ +/* $NetBSD: pciide_common.c,v 1.7 2004/01/03 01:50:53 thorpej Exp $ */ /* @@ -76,7 +76,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pciide_common.c,v 1.6 2004/01/01 17:18:53 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pciide_common.c,v 1.7 2004/01/03 01:50:53 thorpej Exp $"); #include <sys/param.h> #include <sys/malloc.h> @@ -202,7 +202,7 @@ pciide_mapregs_compat(pa, cp, compatchan, cmdsizep, ctlsizep) bus_size_t *cmdsizep, *ctlsizep; { struct pciide_softc *sc = (struct pciide_softc *)cp->wdc_channel.wdc; - struct channel_softc *wdc_cp = &cp->wdc_channel; + struct wdc_channel *wdc_cp = &cp->wdc_channel; int i; cp->compat = 1; @@ -254,7 +254,7 @@ pciide_mapregs_native(pa, cp, cmdsizep, ctlsizep, pci_intr) int (*pci_intr) __P((void *)); { struct pciide_softc *sc = (struct pciide_softc *)cp->wdc_channel.wdc; - struct channel_softc *wdc_cp = &cp->wdc_channel; + struct wdc_channel *wdc_cp = &cp->wdc_channel; const char *intrstr; pci_intr_handle_t intrhandle; int i; @@ -455,7 +455,7 @@ pciide_pci_intr(arg) { struct pciide_softc *sc = arg; struct pciide_channel *cp; - struct channel_softc *wdc_cp; + struct wdc_channel *wdc_cp; int i, rv, crv; rv = 0; @@ -726,7 +726,7 @@ pciide_dma_finish(v, channel, drive, force) void pciide_irqack(chp) - struct channel_softc *chp; + struct wdc_channel *chp; { struct pciide_channel *cp = (struct pciide_channel*)chp; struct pciide_softc *sc = (struct pciide_softc *)cp->wdc_channel.wdc; @@ -774,7 +774,7 @@ pciide_mapchan(pa, cp, interface, cmdsizep, ctlsizep, pci_intr) bus_size_t *cmdsizep, *ctlsizep; int (*pci_intr) __P((void *)); { - struct channel_softc *wdc_cp = &cp->wdc_channel; + struct wdc_channel *wdc_cp = &cp->wdc_channel; if (interface & PCIIDE_INTERFACE_PCI(wdc_cp->channel)) pciide_mapregs_native(pa, cp, cmdsizep, ctlsizep, pci_intr); @@ -946,7 +946,7 @@ next: void sata_setup_channel(chp) - struct channel_softc *chp; + struct wdc_channel *chp; { struct ata_drive_datas *drvp; int drive; diff --git a/sys/dev/pci/pciide_opti_reg.h b/sys/dev/pci/pciide_opti_reg.h index e659c9fc01e..1fdad2f969b 100644 --- a/sys/dev/pci/pciide_opti_reg.h +++ b/sys/dev/pci/pciide_opti_reg.h @@ -1,4 +1,4 @@ -/* $NetBSD: pciide_opti_reg.h,v 1.4 2003/11/27 23:02:40 fvdl Exp $ */ +/* $NetBSD: pciide_opti_reg.h,v 1.5 2004/01/03 01:50:53 thorpej Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -113,7 +113,7 @@ * by an interrupt routine while this magic sequence is executing. */ static __inline__ u_int8_t __attribute__((__unused__)) -opti_read_config(struct channel_softc *chp, int reg) +opti_read_config(struct wdc_channel *chp, int reg) { u_int8_t rv; int s = splhigh(); @@ -137,7 +137,7 @@ opti_read_config(struct channel_softc *chp, int reg) } static __inline__ void __attribute__((__unused__)) -opti_write_config(struct channel_softc *chp, int reg, u_int8_t val) +opti_write_config(struct wdc_channel *chp, int reg, u_int8_t val) { int s = splhigh(); diff --git a/sys/dev/pci/pciidevar.h b/sys/dev/pci/pciidevar.h index 872d7dcac46..9ed455a785b 100644 --- a/sys/dev/pci/pciidevar.h +++ b/sys/dev/pci/pciidevar.h @@ -1,4 +1,4 @@ -/* $NetBSD: pciidevar.h,v 1.19 2003/12/19 19:29:10 thorpej Exp $ */ +/* $NetBSD: pciidevar.h,v 1.20 2004/01/03 01:50:53 thorpej Exp $ */ /* * Copyright (c) 1998 Christopher G. Demetriou. All rights reserved. @@ -115,10 +115,10 @@ struct pciide_softc { /* Chip description */ const struct pciide_product_desc *sc_pp; /* common definitions */ - struct channel_softc *wdc_chanarray[PCIIDE_MAX_CHANNELS]; + struct wdc_channel *wdc_chanarray[PCIIDE_MAX_CHANNELS]; /* internal bookkeeping */ struct pciide_channel { /* per-channel data */ - struct channel_softc wdc_channel; /* generic part */ + struct wdc_channel wdc_channel; /* generic part */ const char *name; int compat; /* is it compat? */ void *ih; /* compat or pci handle */ @@ -186,14 +186,14 @@ pciide_pci_write(pc, pa, reg, val) } void default_chip_map __P((struct pciide_softc*, struct pci_attach_args*)); -void sata_setup_channel __P((struct channel_softc*)); +void sata_setup_channel __P((struct wdc_channel*)); void pciide_channel_dma_setup __P((struct pciide_channel *)); int pciide_dma_table_setup __P((struct pciide_softc*, int, int)); int pciide_dma_init __P((void*, int, int, void *, size_t, int)); void pciide_dma_start __P((void*, int, int)); int pciide_dma_finish __P((void*, int, int, int)); -void pciide_irqack __P((struct channel_softc *)); +void pciide_irqack __P((struct wdc_channel *)); /* * Functions defined by machine-dependent code. diff --git a/sys/dev/pci/pdcide.c b/sys/dev/pci/pdcide.c index 5ef079177f1..1fb765a6ddb 100644 --- a/sys/dev/pci/pdcide.c +++ b/sys/dev/pci/pdcide.c @@ -1,4 +1,4 @@ -/* $NetBSD: pdcide.c,v 1.9 2003/11/27 23:02:40 fvdl Exp $ */ +/* $NetBSD: pdcide.c,v 1.10 2004/01/03 01:50:53 thorpej Exp $ */ /* * Copyright (c) 1999, 2000, 2001 Manuel Bouyer. @@ -39,8 +39,8 @@ #include <dev/pci/pciide_pdc202xx_reg.h> static void pdc202xx_chip_map(struct pciide_softc *, struct pci_attach_args *); -static void pdc202xx_setup_channel(struct channel_softc *); -static void pdc20268_setup_channel(struct channel_softc *); +static void pdc202xx_setup_channel(struct wdc_channel *); +static void pdc20268_setup_channel(struct wdc_channel *); static int pdc202xx_pci_intr(void *); static int pdc20265_pci_intr(void *); static void pdc20262_dma_start(void *, int, int); @@ -323,7 +323,7 @@ pdc202xx_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa) } static void -pdc202xx_setup_channel(struct channel_softc *chp) +pdc202xx_setup_channel(struct wdc_channel *chp) { struct ata_drive_datas *drvp; int drive; @@ -438,7 +438,7 @@ pdc202xx_setup_channel(struct channel_softc *chp) } static void -pdc20268_setup_channel(struct channel_softc *chp) +pdc20268_setup_channel(struct wdc_channel *chp) { struct ata_drive_datas *drvp; int drive; @@ -491,7 +491,7 @@ pdc202xx_pci_intr(void *arg) { struct pciide_softc *sc = arg; struct pciide_channel *cp; - struct channel_softc *wdc_cp; + struct wdc_channel *wdc_cp; int i, rv, crv; u_int32_t scr; @@ -520,7 +520,7 @@ pdc20265_pci_intr(void *arg) { struct pciide_softc *sc = arg; struct pciide_channel *cp; - struct channel_softc *wdc_cp; + struct wdc_channel *wdc_cp; int i, rv, crv; u_int32_t dmastat; @@ -581,7 +581,7 @@ pdc20262_dma_finish(void *v, int channel, int drive, int force) struct pciide_softc *sc = v; struct pciide_dma_maps *dma_maps = &sc->pciide_channels[channel].dma_maps[drive]; - struct channel_softc *chp; + struct wdc_channel *chp; int atapi, error; error = pciide_dma_finish(v, channel, drive, force); diff --git a/sys/dev/pci/piixide.c b/sys/dev/pci/piixide.c index e489c3450f2..0623e74855b 100644 --- a/sys/dev/pci/piixide.c +++ b/sys/dev/pci/piixide.c @@ -1,4 +1,4 @@ -/* $NetBSD: piixide.c,v 1.6 2003/12/14 01:32:02 thorpej Exp $ */ +/* $NetBSD: piixide.c,v 1.7 2004/01/03 01:50:53 thorpej Exp $ */ /* * Copyright (c) 1999, 2000, 2001 Manuel Bouyer. @@ -39,8 +39,8 @@ #include <dev/pci/pciide_piix_reg.h> static void piix_chip_map(struct pciide_softc*, struct pci_attach_args *); -static void piix_setup_channel(struct channel_softc *); -static void piix3_4_setup_channel(struct channel_softc *); +static void piix_setup_channel(struct wdc_channel *); +static void piix3_4_setup_channel(struct wdc_channel *); static u_int32_t piix_setup_idetim_timings(u_int8_t, u_int8_t, u_int8_t); static u_int32_t piix_setup_idetim_drvs(struct ata_drive_datas *); static u_int32_t piix_setup_sidetim_timings(u_int8_t, u_int8_t, u_int8_t); @@ -311,7 +311,7 @@ piix_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa) } static void -piix_setup_channel(struct channel_softc *chp) +piix_setup_channel(struct wdc_channel *chp) { u_int8_t mode[2], drive; u_int32_t oidetim, idetim, idedma_ctl; @@ -417,7 +417,7 @@ end: /* } static void -piix3_4_setup_channel(struct channel_softc *chp) +piix3_4_setup_channel(struct wdc_channel *chp) { struct ata_drive_datas *drvp; u_int32_t oidetim, idetim, sidetim, udmareg, ideconf, idedma_ctl; @@ -569,7 +569,7 @@ piix_setup_idetim_drvs(drvp) struct ata_drive_datas *drvp; { u_int32_t ret = 0; - struct channel_softc *chp = drvp->chnl_softc; + struct wdc_channel *chp = drvp->chnl_softc; u_int8_t channel = chp->channel; u_int8_t drive = drvp->drive; diff --git a/sys/dev/pci/rccide.c b/sys/dev/pci/rccide.c index 897d58fd806..e218d850d96 100644 --- a/sys/dev/pci/rccide.c +++ b/sys/dev/pci/rccide.c @@ -1,4 +1,4 @@ -/* $NetBSD: rccide.c,v 1.5 2003/12/14 00:17:05 thorpej Exp $ */ +/* $NetBSD: rccide.c,v 1.6 2004/01/03 01:50:53 thorpej Exp $ */ /* * Copyright (c) 2003 By Noon Software, Inc. All rights reserved. @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rccide.c,v 1.5 2003/12/14 00:17:05 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rccide.c,v 1.6 2004/01/03 01:50:53 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -39,7 +39,7 @@ __KERNEL_RCSID(0, "$NetBSD: rccide.c,v 1.5 2003/12/14 00:17:05 thorpej Exp $"); static void serverworks_chip_map(struct pciide_softc *, struct pci_attach_args *); -static void serverworks_setup_channel(struct channel_softc *); +static void serverworks_setup_channel(struct wdc_channel *); static int serverworks_pci_intr(void *); static int serverworkscsb6_pci_intr(void *); @@ -170,7 +170,7 @@ serverworks_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa) } static void -serverworks_setup_channel(struct channel_softc *chp) +serverworks_setup_channel(struct wdc_channel *chp) { struct ata_drive_datas *drvp; struct pciide_channel *cp = (struct pciide_channel*)chp; @@ -251,7 +251,7 @@ serverworks_pci_intr(arg) { struct pciide_softc *sc = arg; struct pciide_channel *cp; - struct channel_softc *wdc_cp; + struct wdc_channel *wdc_cp; int rv = 0; int dmastat, i, crv; @@ -281,7 +281,7 @@ serverworkscsb6_pci_intr(arg) { struct pciide_softc *sc = arg; struct pciide_channel *cp; - struct channel_softc *wdc_cp; + struct wdc_channel *wdc_cp; int rv = 0; int i, crv; diff --git a/sys/dev/pci/satalink.c b/sys/dev/pci/satalink.c index 9158a0a96fa..995b728348f 100644 --- a/sys/dev/pci/satalink.c +++ b/sys/dev/pci/satalink.c @@ -1,4 +1,4 @@ -/* $NetBSD: satalink.c,v 1.9 2004/01/01 17:18:53 thorpej Exp $ */ +/* $NetBSD: satalink.c,v 1.10 2004/01/03 01:50:53 thorpej Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -267,8 +267,8 @@ CFATTACH_DECL(satalink, sizeof(struct pciide_softc), static void sii3112_chip_map(struct pciide_softc*, struct pci_attach_args*); static void sii3114_chip_map(struct pciide_softc*, struct pci_attach_args*); -static void sii3112_drv_probe(struct channel_softc*); -static void sii3112_setup_channel(struct channel_softc*); +static void sii3112_drv_probe(struct wdc_channel*); +static void sii3112_setup_channel(struct wdc_channel*); static const struct pciide_product_desc pciide_satalink_products[] = { { PCI_PRODUCT_CMDTECH_3112, @@ -556,7 +556,7 @@ static void sii3114_mapchan(struct pciide_channel *cp) { struct pciide_softc *sc = (struct pciide_softc *)cp->wdc_channel.wdc; - struct channel_softc *wdc_cp = &cp->wdc_channel; + struct wdc_channel *wdc_cp = &cp->wdc_channel; int i; cp->compat = 0; @@ -736,7 +736,7 @@ static const char *sata_speed[] = { }; static void -sii3112_drv_probe(struct channel_softc *chp) +sii3112_drv_probe(struct wdc_channel *chp) { struct pciide_channel *cp = (struct pciide_channel *)chp; struct pciide_softc *sc = (struct pciide_softc *)cp->wdc_channel.wdc; @@ -836,7 +836,7 @@ sii3112_drv_probe(struct channel_softc *chp) } static void -sii3112_setup_channel(struct channel_softc *chp) +sii3112_setup_channel(struct wdc_channel *chp) { struct ata_drive_datas *drvp; int drive; diff --git a/sys/dev/pci/siside.c b/sys/dev/pci/siside.c index 2a3f827f93f..fb69eac0042 100644 --- a/sys/dev/pci/siside.c +++ b/sys/dev/pci/siside.c @@ -1,4 +1,4 @@ -/* $NetBSD: siside.c,v 1.3 2003/11/27 23:02:40 fvdl Exp $ */ +/* $NetBSD: siside.c,v 1.4 2004/01/03 01:50:53 thorpej Exp $ */ /* * Copyright (c) 1999, 2000, 2001 Manuel Bouyer. @@ -39,8 +39,8 @@ #include <dev/pci/pciide_sis_reg.h> static void sis_chip_map(struct pciide_softc *, struct pci_attach_args *); -static void sis_setup_channel(struct channel_softc *); -static void sis96x_setup_channel(struct channel_softc *); +static void sis_setup_channel(struct wdc_channel *); +static void sis96x_setup_channel(struct wdc_channel *); static int sis_hostbr_match(struct pci_attach_args *); static int sis_south_match(struct pci_attach_args *); @@ -292,7 +292,7 @@ sis_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa) } static void -sis96x_setup_channel(struct channel_softc *chp) +sis96x_setup_channel(struct wdc_channel *chp) { struct ata_drive_datas *drvp; int drive; @@ -356,7 +356,7 @@ sis96x_setup_channel(struct channel_softc *chp) } static void -sis_setup_channel(struct channel_softc *chp) +sis_setup_channel(struct wdc_channel *chp) { struct ata_drive_datas *drvp; int drive; diff --git a/sys/dev/pci/slide.c b/sys/dev/pci/slide.c index 3efd65cbdc3..36f7f7ca823 100644 --- a/sys/dev/pci/slide.c +++ b/sys/dev/pci/slide.c @@ -1,4 +1,4 @@ -/* $NetBSD: slide.c,v 1.2 2003/10/11 17:40:15 thorpej Exp $ */ +/* $NetBSD: slide.c,v 1.3 2004/01/03 01:50:53 thorpej Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -46,7 +46,7 @@ #include <dev/pci/pciide_sl82c105_reg.h> static void sl82c105_chip_map(struct pciide_softc*, struct pci_attach_args*); -static void sl82c105_setup_channel(struct channel_softc*); +static void sl82c105_setup_channel(struct wdc_channel*); static int slide_match(struct device *, struct cfdata *, void *); static void slide_attach(struct device *, struct device *, void *); @@ -183,7 +183,7 @@ sl82c105_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa) } static void -sl82c105_setup_channel(struct channel_softc *chp) +sl82c105_setup_channel(struct wdc_channel *chp) { struct ata_drive_datas *drvp; struct pciide_channel *cp = (struct pciide_channel*)chp; diff --git a/sys/dev/pci/stpcide.c b/sys/dev/pci/stpcide.c index c63c29b232b..9943ba539f3 100644 --- a/sys/dev/pci/stpcide.c +++ b/sys/dev/pci/stpcide.c @@ -1,4 +1,4 @@ -/* $NetBSD: stpcide.c,v 1.2 2003/11/27 23:02:40 fvdl Exp $ */ +/* $NetBSD: stpcide.c,v 1.3 2004/01/03 01:50:53 thorpej Exp $ */ /* * Copyright (c) 2003 Toru Nishimura @@ -38,7 +38,7 @@ #include <dev/pci/pciidevar.h> static void stpc_chip_map(struct pciide_softc *, struct pci_attach_args *); -static void stpc_setup_channel(struct channel_softc *); +static void stpc_setup_channel(struct wdc_channel *); static int stpcide_match(struct device *, struct cfdata *, void *); static void stpcide_attach(struct device *, struct device *, void *); @@ -132,7 +132,7 @@ static const u_int16_t dmatbl[] = { 0x7C00, 0x1800, 0x0800 }; static const u_int16_t piotbl[] = { 0x03C0, 0x0230, 0x01A0, 0x0110, 0x0010 }; static void -stpc_setup_channel(struct channel_softc *chp) +stpc_setup_channel(struct wdc_channel *chp) { struct pciide_channel *cp = (struct pciide_channel *)chp; struct pciide_softc *sc = (struct pciide_softc *)cp->wdc_channel.wdc; diff --git a/sys/dev/pci/viaide.c b/sys/dev/pci/viaide.c index 224cf9f115d..d66569f2bfa 100644 --- a/sys/dev/pci/viaide.c +++ b/sys/dev/pci/viaide.c @@ -1,4 +1,4 @@ -/* $NetBSD: viaide.c,v 1.7 2003/11/27 23:02:40 fvdl Exp $ */ +/* $NetBSD: viaide.c,v 1.8 2004/01/03 01:50:53 thorpej Exp $ */ /* * Copyright (c) 1999, 2000, 2001 Manuel Bouyer. @@ -43,7 +43,7 @@ static int via_pcib_match(struct pci_attach_args *); static void via_chip_map(struct pciide_softc *, struct pci_attach_args *); static void via_sata_chip_map(struct pciide_softc *, struct pci_attach_args *); -static void via_setup_channel(struct channel_softc *); +static void via_setup_channel(struct wdc_channel *); static int viaide_match(struct device *, struct cfdata *, void *); static void viaide_attach(struct device *, struct device *, void *); @@ -330,7 +330,7 @@ unknown: } static void -via_setup_channel(struct channel_softc *chp) +via_setup_channel(struct wdc_channel *chp) { u_int32_t udmatim_reg, datatim_reg; u_int8_t idedma_ctl; diff --git a/sys/dev/pcmcia/wdc_pcmcia.c b/sys/dev/pcmcia/wdc_pcmcia.c index f1c878d5e41..b44940e6326 100644 --- a/sys/dev/pcmcia/wdc_pcmcia.c +++ b/sys/dev/pcmcia/wdc_pcmcia.c @@ -1,4 +1,4 @@ -/* $NetBSD: wdc_pcmcia.c,v 1.65 2004/01/01 17:18:53 thorpej Exp $ */ +/* $NetBSD: wdc_pcmcia.c,v 1.66 2004/01/03 01:50:53 thorpej Exp $ */ /*- * Copyright (c) 1998, 2003 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wdc_pcmcia.c,v 1.65 2004/01/01 17:18:53 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wdc_pcmcia.c,v 1.66 2004/01/03 01:50:53 thorpej Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -61,8 +61,8 @@ __KERNEL_RCSID(0, "$NetBSD: wdc_pcmcia.c,v 1.65 2004/01/01 17:18:53 thorpej Exp struct wdc_pcmcia_softc { struct wdc_softc sc_wdcdev; - struct channel_softc *wdc_chanlist[1]; - struct channel_softc wdc_channel; + struct wdc_channel *wdc_chanlist[1]; + struct wdc_channel wdc_channel; struct ata_queue wdc_chqueue; struct pcmcia_io_handle sc_pioh; struct pcmcia_io_handle sc_auxpioh; diff --git a/sys/dev/podulebus/dtide.c b/sys/dev/podulebus/dtide.c index e573f5cf1df..8e1916c2bda 100644 --- a/sys/dev/podulebus/dtide.c +++ b/sys/dev/podulebus/dtide.c @@ -1,4 +1,4 @@ -/* $NetBSD: dtide.c,v 1.13 2004/01/01 17:18:54 thorpej Exp $ */ +/* $NetBSD: dtide.c,v 1.14 2004/01/03 01:50:53 thorpej Exp $ */ /*- * Copyright (c) 2000, 2001 Ben Harris @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dtide.c,v 1.13 2004/01/01 17:18:54 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dtide.c,v 1.14 2004/01/03 01:50:53 thorpej Exp $"); #include <sys/param.h> @@ -51,8 +51,8 @@ __KERNEL_RCSID(0, "$NetBSD: dtide.c,v 1.13 2004/01/01 17:18:54 thorpej Exp $"); struct dtide_softc { struct wdc_softc sc_wdc; - struct channel_softc *sc_chp[DTIDE_NCHANNELS];/* pointers to sc_chan */ - struct channel_softc sc_chan[DTIDE_NCHANNELS]; + struct wdc_channel *sc_chp[DTIDE_NCHANNELS];/* pointers to sc_chan */ + struct wdc_channel sc_chan[DTIDE_NCHANNELS]; struct ata_queue sc_chq[DTIDE_NCHANNELS]; bus_space_tag_t sc_magict; bus_space_handle_t sc_magich; @@ -80,7 +80,7 @@ dtide_attach(struct device *parent, struct device *self, void *aux) { struct podulebus_attach_args *pa = aux; struct dtide_softc *sc = (void *)self; - struct channel_softc *ch; + struct wdc_channel *ch; int i, j; bus_space_tag_t bst; diff --git a/sys/dev/podulebus/hcide.c b/sys/dev/podulebus/hcide.c index f2dc8ed20af..883031df05e 100644 --- a/sys/dev/podulebus/hcide.c +++ b/sys/dev/podulebus/hcide.c @@ -1,4 +1,4 @@ -/* $NetBSD: hcide.c,v 1.10 2004/01/01 17:18:54 thorpej Exp $ */ +/* $NetBSD: hcide.c,v 1.11 2004/01/03 01:50:53 thorpej Exp $ */ /*- * Copyright (c) 2000, 2001 Ben Harris @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hcide.c,v 1.10 2004/01/01 17:18:54 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hcide.c,v 1.11 2004/01/03 01:50:53 thorpej Exp $"); #include <sys/param.h> @@ -50,8 +50,8 @@ __KERNEL_RCSID(0, "$NetBSD: hcide.c,v 1.10 2004/01/01 17:18:54 thorpej Exp $"); struct hcide_softc { struct wdc_softc sc_wdc; - struct channel_softc *sc_chp[HCIDE_NCHANNELS];/* pointers to sc_chan */ - struct channel_softc sc_chan[HCIDE_NCHANNELS]; + struct wdc_channel *sc_chp[HCIDE_NCHANNELS];/* pointers to sc_chan */ + struct wdc_channel sc_chan[HCIDE_NCHANNELS]; struct ata_queue sc_chq[HCIDE_NCHANNELS]; }; @@ -80,7 +80,7 @@ hcide_attach(struct device *parent, struct device *self, void *aux) { struct hcide_softc *sc = (void *)self; struct podulebus_attach_args *pa = aux; - struct channel_softc *ch; + struct wdc_channel *ch; int i, j; sc->sc_wdc.cap = WDC_CAPABILITY_DATA16 | WDC_CAPABILITY_NOIRQ; diff --git a/sys/dev/scsipi/atapi_wdc.c b/sys/dev/scsipi/atapi_wdc.c index 54d328ab24b..eef3ecdbd33 100644 --- a/sys/dev/scsipi/atapi_wdc.c +++ b/sys/dev/scsipi/atapi_wdc.c @@ -1,4 +1,4 @@ -/* $NetBSD: atapi_wdc.c,v 1.65 2004/01/01 21:57:42 thorpej Exp $ */ +/* $NetBSD: atapi_wdc.c,v 1.66 2004/01/03 01:50:53 thorpej Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: atapi_wdc.c,v 1.65 2004/01/01 21:57:42 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: atapi_wdc.c,v 1.66 2004/01/03 01:50:53 thorpej Exp $"); #ifndef WDCDEBUG #define WDCDEBUG @@ -86,12 +86,12 @@ static int wdc_atapi_get_params(struct scsipi_channel *, int, struct ataparams *); static void wdc_atapi_probe_device(struct atapibus_softc *, int); static void wdc_atapi_minphys (struct buf *bp); -static void wdc_atapi_start(struct channel_softc *,struct ata_xfer *); -static int wdc_atapi_intr(struct channel_softc *, struct ata_xfer *, int); -static void wdc_atapi_kill_xfer(struct channel_softc *, struct ata_xfer *); +static void wdc_atapi_start(struct wdc_channel *,struct ata_xfer *); +static int wdc_atapi_intr(struct wdc_channel *, struct ata_xfer *, int); +static void wdc_atapi_kill_xfer(struct wdc_channel *, struct ata_xfer *); static void wdc_atapi_phase_complete(struct ata_xfer *); -static void wdc_atapi_done(struct channel_softc *, struct ata_xfer *); -static void wdc_atapi_reset(struct channel_softc *, struct ata_xfer *); +static void wdc_atapi_done(struct wdc_channel *, struct ata_xfer *); +static void wdc_atapi_reset(struct wdc_channel *, struct ata_xfer *); static void wdc_atapi_scsipi_request(struct scsipi_channel *, scsipi_adapter_req_t, void *); static void wdc_atapi_kill_pending(struct scsipi_periph *); @@ -110,7 +110,7 @@ static const struct scsipi_bustype wdc_atapi_bustype = { void wdc_atapibus_attach(struct atabus_softc *ata_sc) { - struct channel_softc *chp = ata_sc->sc_chan; + struct wdc_channel *chp = ata_sc->sc_chan; struct wdc_softc *wdc = chp->wdc; struct scsipi_adapter *adapt = &wdc->sc_atapi_adapter._generic; struct scsipi_channel *chan = &chp->ch_atapi_channel; @@ -161,14 +161,14 @@ wdc_atapi_kill_pending(struct scsipi_periph *periph) { struct wdc_softc *wdc = (void *)periph->periph_channel->chan_adapter->adapt_dev; - struct channel_softc *chp = + struct wdc_channel *chp = wdc->channels[periph->periph_channel->chan_channel]; wdc_kill_pending(chp); } static void -wdc_atapi_kill_xfer(struct channel_softc *chp, struct ata_xfer *xfer) +wdc_atapi_kill_xfer(struct wdc_channel *chp, struct ata_xfer *xfer) { struct scsipi_xfer *sc_xfer = xfer->c_cmd; @@ -184,7 +184,7 @@ wdc_atapi_get_params(struct scsipi_channel *chan, int drive, struct ataparams *id) { struct wdc_softc *wdc = (void *)chan->chan_adapter->adapt_dev; - struct channel_softc *chp = wdc->channels[chan->chan_channel]; + struct wdc_channel *chp = wdc->channels[chan->chan_channel]; struct wdc_command wdc_c; /* if no ATAPI device detected at wdc attach time, skip */ @@ -237,7 +237,7 @@ wdc_atapi_probe_device(struct atapibus_softc *sc, int target) struct ataparams ids; struct ataparams *id = &ids; struct wdc_softc *wdc = (void *)chan->chan_adapter->adapt_dev; - struct channel_softc *chp = wdc->channels[chan->chan_channel]; + struct wdc_channel *chp = wdc->channels[chan->chan_channel]; struct ata_drive_datas *drvp = &chp->ch_drive[target]; struct scsipibus_attach_args sa; char serial_number[21], model[41], firmware_revision[9]; @@ -390,7 +390,7 @@ wdc_atapi_scsipi_request(struct scsipi_channel *chan, scsipi_adapter_req_t req, } static void -wdc_atapi_start(struct channel_softc *chp, struct ata_xfer *xfer) +wdc_atapi_start(struct wdc_channel *chp, struct ata_xfer *xfer) { struct scsipi_xfer *sc_xfer = xfer->c_cmd; struct ata_drive_datas *drvp = &chp->ch_drive[xfer->c_drive]; @@ -554,7 +554,7 @@ error: } static int -wdc_atapi_intr(struct channel_softc *chp, struct ata_xfer *xfer, int irq) +wdc_atapi_intr(struct wdc_channel *chp, struct ata_xfer *xfer, int irq) { struct scsipi_xfer *sc_xfer = xfer->c_cmd; struct ata_drive_datas *drvp = &chp->ch_drive[xfer->c_drive]; @@ -872,7 +872,7 @@ again: static void wdc_atapi_phase_complete(struct ata_xfer *xfer) { - struct channel_softc *chp = xfer->c_chp; + struct wdc_channel *chp = xfer->c_chp; struct scsipi_xfer *sc_xfer = xfer->c_cmd; struct ata_drive_datas *drvp = &chp->ch_drive[xfer->c_drive]; @@ -947,7 +947,7 @@ wdc_atapi_phase_complete(struct ata_xfer *xfer) } static void -wdc_atapi_done(struct channel_softc *chp, struct ata_xfer *xfer) +wdc_atapi_done(struct wdc_channel *chp, struct ata_xfer *xfer) { struct scsipi_xfer *sc_xfer = xfer->c_cmd; @@ -966,7 +966,7 @@ wdc_atapi_done(struct channel_softc *chp, struct ata_xfer *xfer) } static void -wdc_atapi_reset(struct channel_softc *chp, struct ata_xfer *xfer) +wdc_atapi_reset(struct wdc_channel *chp, struct ata_xfer *xfer) { struct ata_drive_datas *drvp = &chp->ch_drive[xfer->c_drive]; struct scsipi_xfer *sc_xfer = xfer->c_cmd; |
