diff options
| author | cgd <cgd@NetBSD.org> | 1994-05-05 05:35:42 +0000 |
|---|---|---|
| committer | cgd <cgd@NetBSD.org> | 1994-05-05 05:35:42 +0000 |
| commit | a0a7429482099a77efd9ccbd414b351f56f5e89e (patch) | |
| tree | 72836c65320a98a2592cec05cdec24c668f38c14 /sys/dev | |
| parent | c859ba3b1c6e4590f5a25fa60f67d5305e60058c (diff) | |
lots of changes: prototype migration, move lots of variables, definitions,
and structure elements around. kill some unnecessary type and macro
definitions. standardize clock handling. More changes than you'd want.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ata/wd.c | 20 | ||||
| -rw-r--r-- | sys/dev/eisa/aha1742.c | 16 | ||||
| -rw-r--r-- | sys/dev/ic/aic6360.c | 24 | ||||
| -rw-r--r-- | sys/dev/ic/lpt.c | 12 | ||||
| -rw-r--r-- | sys/dev/ic/lptvar.h | 12 | ||||
| -rw-r--r-- | sys/dev/isa/aha1542.c | 16 | ||||
| -rw-r--r-- | sys/dev/isa/aic6360.c | 24 | ||||
| -rw-r--r-- | sys/dev/isa/bt742a.c | 16 | ||||
| -rw-r--r-- | sys/dev/isa/isa.c | 4 | ||||
| -rw-r--r-- | sys/dev/isa/lpt.c | 12 | ||||
| -rw-r--r-- | sys/dev/isa/lpt_isa.c | 12 | ||||
| -rw-r--r-- | sys/dev/isa/mcd.c | 41 | ||||
| -rw-r--r-- | sys/dev/isa/ultra14f.c | 14 | ||||
| -rw-r--r-- | sys/dev/isa/wd.c | 20 | ||||
| -rw-r--r-- | sys/dev/isa/wt.c | 11 |
15 files changed, 139 insertions, 115 deletions
diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c index a13538ba0a8..46810335e71 100644 --- a/sys/dev/ata/wd.c +++ b/sys/dev/ata/wd.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)wd.c 7.2 (Berkeley) 5/9/91 - * $Id: wd.c,v 1.80 1994/04/25 03:16:03 mycroft Exp $ + * $Id: wd.c,v 1.81 1994/05/05 05:37:05 cgd Exp $ */ #define INSTRUMENT /* instrumentation stuff by Brad Parker */ @@ -165,9 +165,9 @@ static int wdsetctlr __P((struct wd_softc *)); static int wdgetctlr __P((struct wd_softc *)); static void bad144intern __P((struct wd_softc *)); static int wdcreset __P((struct wdc_softc *)); -static void wdcrestart __P((struct wdc_softc *)); +static void wdcrestart __P((void *arg)); static void wdcunwedge __P((struct wdc_softc *)); -static void wdctimeout __P((struct wdc_softc *)); +static void wdctimeout __P((void *arg)); void wddisksort __P((struct buf *, struct buf *)); static void wderror __P((void *, struct buf *, char *)); int wdcwait __P((struct wdc_softc *, int)); @@ -1484,9 +1484,10 @@ wdcreset(wdc) } static void -wdcrestart(wdc) - struct wdc_softc *wdc; +wdcrestart(arg) + void *arg; { + struct wdc_softc *wdc = (struct wdc_softc *)arg; int s = splbio(); wdcstart(wdc); @@ -1522,7 +1523,7 @@ wdcunwedge(wdc) ++wdc->sc_errors; /* Wake up in a little bit and restart the operation. */ - timeout((timeout_t)wdcrestart, (caddr_t)wdc, RECOVERYTIME); + timeout(wdcrestart, (caddr_t)wdc, RECOVERYTIME); } int @@ -1553,16 +1554,17 @@ wdcwait(wdc, mask) } static void -wdctimeout(wdc) - struct wdc_softc *wdc; +wdctimeout(arg) + void *arg; { + struct wdc_softc *wdc = (struct wdc_softc *)arg; int s = splbio(); if (wdc->sc_timeout && --wdc->sc_timeout == 0) { wderror(wdc, NULL, "lost interrupt"); wdcunwedge(wdc); } - timeout((timeout_t)wdctimeout, (caddr_t)wdc, hz); + timeout(wdctimeout, (caddr_t)wdc, hz); splx(s); } diff --git a/sys/dev/eisa/aha1742.c b/sys/dev/eisa/aha1742.c index d2c07948fd8..7c083ff4e90 100644 --- a/sys/dev/eisa/aha1742.c +++ b/sys/dev/eisa/aha1742.c @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: aha1742.c,v 1.30 1994/04/29 23:15:54 cgd Exp $ + * $Id: aha1742.c,v 1.31 1994/05/05 05:36:23 cgd Exp $ */ /* @@ -303,7 +303,7 @@ int ahb_find __P((struct ahb_softc *)); void ahb_init __P((struct ahb_softc *)); void ahbminphys __P((struct buf *)); int ahb_scsi_cmd __P((struct scsi_xfer *)); -void ahb_timeout __P((caddr_t)); +void ahb_timeout __P((void *)); void ahb_print_ecb __P((struct ecb *)); void ahb_print_active_ecb __P((struct ahb_softc *)); @@ -667,7 +667,7 @@ ahbintr(ahb) if ((ahb_debug & AHB_SHOWECBS) && ecb) printf("<int ecb(%x)>", ecb); #endif /*AHBDEBUG */ - untimeout((timeout_t)ahb_timeout, (caddr_t)ecb); + untimeout(ahb_timeout, (caddr_t)ecb); ahb_done(ahb, ecb, stat != AHB_ECB_OK); } } while (inb(port + G2STAT) & G2STAT_INT_PEND); @@ -1028,7 +1028,7 @@ ahb_scsi_cmd(xs) if (!(flags & SCSI_NOMASK)) { s = splbio(); ahb_send_immed(ahb, sc_link->target, AHB_TARG_RESET); - timeout((timeout_t)ahb_timeout, ecb, + timeout(ahb_timeout, ecb, (xs->timeout * hz) / 1000); splx(s); return SUCCESSFULLY_QUEUED; @@ -1165,7 +1165,7 @@ ahb_scsi_cmd(xs) if (!(flags & SCSI_NOMASK)) { s = splbio(); ahb_send_mbox(ahb, OP_START_ECB, sc_link->target, ecb); - timeout((timeout_t)ahb_timeout, ecb, (xs->timeout * hz) / 1000); + timeout(ahb_timeout, ecb, (xs->timeout * hz) / 1000); splx(s); SC_DEBUG(sc_link, SDEV_DB3, ("cmd_sent\n")); return SUCCESSFULLY_QUEUED; @@ -1197,10 +1197,10 @@ ahb_scsi_cmd(xs) void ahb_timeout(arg) - caddr_t arg; + void *arg; { int s = splbio(); - struct ecb *ecb = (void *)arg; + struct ecb *ecb = (struct ecb *)arg; struct ahb_softc *ahb = ecb->xs->sc_link->adapter_softc; sc_print_addr(ecb->xs->sc_link); @@ -1235,7 +1235,7 @@ ahb_timeout(arg) } else { /* abort the operation that has timed out */ printf("\n"); ahb_send_mbox(ahb, OP_ABORT_ECB, ecb->xs->sc_link->target, ecb); - timeout((timeout_t)ahb_timeout, ecb, 2 * hz); + timeout(ahb_timeout, ecb, 2 * hz); ecb->flags = ECB_ABORTED; } splx(s); diff --git a/sys/dev/ic/aic6360.c b/sys/dev/ic/aic6360.c index 968e3f5cec4..65e3f87438c 100644 --- a/sys/dev/ic/aic6360.c +++ b/sys/dev/ic/aic6360.c @@ -30,7 +30,7 @@ */ /* - * $Id: aic6360.c,v 1.4 1994/05/03 08:20:43 mycroft Exp $ + * $Id: aic6360.c,v 1.5 1994/05/05 05:36:25 cgd Exp $ * * Acknowledgements: Many of the algorithms used in this driver are * inspired by the work of Julian Elischer (julian@tfs.com) and @@ -643,7 +643,7 @@ int aic_scsi_cmd __P((struct scsi_xfer *)); int aic_poll __P((struct aic_softc *, struct acb *)); void aic_add_timeout __P((struct acb *, int)); void aic_remove_timeout __P((struct acb *)); -void aic_timeout __P((caddr_t)); +void aic_timeout __P((void *arg)); int aic_find __P((struct aic_softc *)); void aic_sched __P((struct aic_softc *)); void aic_scsi_reset __P((struct aic_softc *)); @@ -902,13 +902,13 @@ aic_init(aic) aic->state = AIC_CLEANING; if (aic->nexus != NULL) { aic->nexus->xs->error = XS_DRIVER_STUFFUP; - untimeout((timeout_t)aic_timeout, aic->nexus); + untimeout(aic_timeout, aic->nexus); aic_done(aic->nexus); } aic->nexus = NULL; while (acb = aic->nexus_list.tqh_first) { acb->xs->error = XS_DRIVER_STUFFUP; - untimeout((timeout_t)aic_timeout, acb); + untimeout(aic_timeout, acb); aic_done(acb); } } @@ -1006,7 +1006,7 @@ aic_scsi_cmd(xs) s = splbio(); TAILQ_INSERT_TAIL(&aic->ready_list, acb, chain); - timeout((timeout_t)aic_timeout, acb, (xs->timeout*hz)/1000); + timeout(aic_timeout, acb, (xs->timeout*hz)/1000); if (aic->state == AIC_IDLE) aic_sched(aic); @@ -1429,7 +1429,7 @@ aic_msgin(aic) } acb->xs->resid = acb->dleft = aic->dleft; aic->flags |= AIC_BUSFREE_OK; - untimeout((timeout_t)aic_timeout, acb); + untimeout(aic_timeout, acb); aic_done(acb); break; case MSG_MESSAGE_REJECT: @@ -2070,7 +2070,7 @@ aicintr(aic) */ printf("aic: unexpected busfree\n"); xs->error = XS_DRIVER_STUFFUP; - untimeout((timeout_t)aic_timeout, acb); + untimeout(aic_timeout, acb); aic_done(acb); } LOGLINE(aic); @@ -2091,7 +2091,7 @@ aicintr(aic) outb(CLRSINT1, CLRSELTIMO); aic->state = AIC_IDLE; acb->xs->error = XS_TIMEOUT; - untimeout((timeout_t)aic_timeout, acb); + untimeout(aic_timeout, acb); aic_done(acb); LOGLINE(aic); outb(DMACNTRL0, INTEN); @@ -2169,7 +2169,7 @@ aicintr(aic) __LINE__); Debugger(); acb->xs->error = XS_DRIVER_STUFFUP; - untimeout((timeout_t)aic_timeout, acb); + untimeout(aic_timeout, acb); aic_done(acb); aic_init(aic); return 1; @@ -2186,7 +2186,7 @@ aicintr(aic) __LINE__); Debugger(); acb->xs->error = XS_DRIVER_STUFFUP; - untimeout((timeout_t)aic_timeout, acb); + untimeout(aic_timeout, acb); aic_done(acb); aic_init(aic); return 1; @@ -2258,10 +2258,10 @@ aicintr(aic) void aic_timeout(arg) - caddr_t arg; + void *arg; { int s = splbio(); - struct acb *acb = (void *)arg; + struct acb *acb = (struct acb *)arg; struct aic_softc *aic; aic = acb->xs->sc_link->adapter_softc; diff --git a/sys/dev/ic/lpt.c b/sys/dev/ic/lpt.c index ed9b1fee427..be4d28e72b0 100644 --- a/sys/dev/ic/lpt.c +++ b/sys/dev/ic/lpt.c @@ -46,7 +46,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: lpt.c,v 1.17 1994/04/22 23:02:40 mycroft Exp $ + * $Id: lpt.c,v 1.18 1994/05/05 05:36:39 cgd Exp $ */ /* @@ -124,7 +124,7 @@ struct cfdriver lptcd = { static int notready __P((u_char, struct lpt_softc *)); #endif -static void lptout __P((struct lpt_softc *)); +static void lptout __P((void *arg)); static int pushbytes __P((struct lpt_softc *)); /* @@ -357,11 +357,13 @@ notready(status, sc) #endif void -lptout(sc) - struct lpt_softc *sc; +lptout(arg) + void *arg; { + struct lpt_softc *sc; int s; + sc = (struct lpt_softc *)arg; if (sc->sc_flags & LPT_NOINTR) return; @@ -369,7 +371,7 @@ lptout(sc) lptintr(sc); splx(s); - timeout((timeout_t)lptout, (caddr_t)sc, STEP); + timeout(lptout, (caddr_t)sc, STEP); } /* diff --git a/sys/dev/ic/lptvar.h b/sys/dev/ic/lptvar.h index 218c62cbb36..e058d539ec9 100644 --- a/sys/dev/ic/lptvar.h +++ b/sys/dev/ic/lptvar.h @@ -46,7 +46,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: lptvar.h,v 1.17 1994/04/22 23:02:40 mycroft Exp $ + * $Id: lptvar.h,v 1.18 1994/05/05 05:36:39 cgd Exp $ */ /* @@ -124,7 +124,7 @@ struct cfdriver lptcd = { static int notready __P((u_char, struct lpt_softc *)); #endif -static void lptout __P((struct lpt_softc *)); +static void lptout __P((void *arg)); static int pushbytes __P((struct lpt_softc *)); /* @@ -357,11 +357,13 @@ notready(status, sc) #endif void -lptout(sc) - struct lpt_softc *sc; +lptout(arg) + void *arg; { + struct lpt_softc *sc; int s; + sc = (struct lpt_softc *)arg; if (sc->sc_flags & LPT_NOINTR) return; @@ -369,7 +371,7 @@ lptout(sc) lptintr(sc); splx(s); - timeout((timeout_t)lptout, (caddr_t)sc, STEP); + timeout(lptout, (caddr_t)sc, STEP); } /* diff --git a/sys/dev/isa/aha1542.c b/sys/dev/isa/aha1542.c index e28763af336..be1646cb94e 100644 --- a/sys/dev/isa/aha1542.c +++ b/sys/dev/isa/aha1542.c @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: aha1542.c,v 1.29 1994/05/03 20:53:54 mycroft Exp $ + * $Id: aha1542.c,v 1.30 1994/05/05 05:36:20 cgd Exp $ */ /* @@ -335,7 +335,7 @@ int aha_scsi_cmd __P((struct scsi_xfer *)); int aha_poll __P((struct aha_softc *, struct scsi_xfer *, struct aha_ccb *)); int aha_set_bus_speed __P((struct aha_softc *)); int aha_bus_speed_check __P((struct aha_softc *, int)); -void aha_timeout __P((caddr_t)); +void aha_timeout __P((void *arg)); struct scsi_adapter aha_switch = { aha_scsi_cmd, @@ -703,7 +703,7 @@ ahaintr(aha) #endif /*AHADEBUG */ } if (ccb) { - untimeout((timeout_t)aha_timeout, ccb); + untimeout(aha_timeout, ccb); aha_done(aha, ccb); } aha->aha_mbx.mbi[i].stat = AHA_MBI_FREE; @@ -1207,7 +1207,7 @@ aha_scsi_cmd(xs) bcopy(xs->cmd, &ccb->scsi_cmd, ccb->scsi_cmd_length); if (!(flags & SCSI_NOMASK)) { s = splbio(); /* stop instant timeouts */ - timeout((timeout_t)aha_timeout, ccb, (xs->timeout * hz) / 1000); + timeout(aha_timeout, ccb, (xs->timeout * hz) / 1000); aha_startmbx(ccb->mbx); /* * Usually return SUCCESSFULLY QUEUED @@ -1264,7 +1264,7 @@ aha_poll(aha, xs, ccb) * because we are polling, take out the timeout entry * aha_timeout made */ - untimeout((timeout_t)aha_timeout, ccb); + untimeout(aha_timeout, ccb); count = 2000; while (count) { /* @@ -1404,10 +1404,10 @@ aha_bus_speed_check(aha, speed) void aha_timeout(arg) - caddr_t arg; + void *arg; { int s = splbio(); - struct aha_ccb *ccb = (void *)arg; + struct aha_ccb *ccb = (struct aha_ccb *)arg; struct aha_softc *aha; aha = ccb->xfer->sc_link->adapter_softc; @@ -1439,7 +1439,7 @@ aha_timeout(arg) printf("\n"); aha_abortmbx(ccb->mbx); /* 4 secs for the abort */ - timeout((timeout_t)aha_timeout, ccb, 2 * hz); + timeout(aha_timeout, ccb, 2 * hz); ccb->flags = CCB_ABORTED; } splx(s); diff --git a/sys/dev/isa/aic6360.c b/sys/dev/isa/aic6360.c index 968e3f5cec4..65e3f87438c 100644 --- a/sys/dev/isa/aic6360.c +++ b/sys/dev/isa/aic6360.c @@ -30,7 +30,7 @@ */ /* - * $Id: aic6360.c,v 1.4 1994/05/03 08:20:43 mycroft Exp $ + * $Id: aic6360.c,v 1.5 1994/05/05 05:36:25 cgd Exp $ * * Acknowledgements: Many of the algorithms used in this driver are * inspired by the work of Julian Elischer (julian@tfs.com) and @@ -643,7 +643,7 @@ int aic_scsi_cmd __P((struct scsi_xfer *)); int aic_poll __P((struct aic_softc *, struct acb *)); void aic_add_timeout __P((struct acb *, int)); void aic_remove_timeout __P((struct acb *)); -void aic_timeout __P((caddr_t)); +void aic_timeout __P((void *arg)); int aic_find __P((struct aic_softc *)); void aic_sched __P((struct aic_softc *)); void aic_scsi_reset __P((struct aic_softc *)); @@ -902,13 +902,13 @@ aic_init(aic) aic->state = AIC_CLEANING; if (aic->nexus != NULL) { aic->nexus->xs->error = XS_DRIVER_STUFFUP; - untimeout((timeout_t)aic_timeout, aic->nexus); + untimeout(aic_timeout, aic->nexus); aic_done(aic->nexus); } aic->nexus = NULL; while (acb = aic->nexus_list.tqh_first) { acb->xs->error = XS_DRIVER_STUFFUP; - untimeout((timeout_t)aic_timeout, acb); + untimeout(aic_timeout, acb); aic_done(acb); } } @@ -1006,7 +1006,7 @@ aic_scsi_cmd(xs) s = splbio(); TAILQ_INSERT_TAIL(&aic->ready_list, acb, chain); - timeout((timeout_t)aic_timeout, acb, (xs->timeout*hz)/1000); + timeout(aic_timeout, acb, (xs->timeout*hz)/1000); if (aic->state == AIC_IDLE) aic_sched(aic); @@ -1429,7 +1429,7 @@ aic_msgin(aic) } acb->xs->resid = acb->dleft = aic->dleft; aic->flags |= AIC_BUSFREE_OK; - untimeout((timeout_t)aic_timeout, acb); + untimeout(aic_timeout, acb); aic_done(acb); break; case MSG_MESSAGE_REJECT: @@ -2070,7 +2070,7 @@ aicintr(aic) */ printf("aic: unexpected busfree\n"); xs->error = XS_DRIVER_STUFFUP; - untimeout((timeout_t)aic_timeout, acb); + untimeout(aic_timeout, acb); aic_done(acb); } LOGLINE(aic); @@ -2091,7 +2091,7 @@ aicintr(aic) outb(CLRSINT1, CLRSELTIMO); aic->state = AIC_IDLE; acb->xs->error = XS_TIMEOUT; - untimeout((timeout_t)aic_timeout, acb); + untimeout(aic_timeout, acb); aic_done(acb); LOGLINE(aic); outb(DMACNTRL0, INTEN); @@ -2169,7 +2169,7 @@ aicintr(aic) __LINE__); Debugger(); acb->xs->error = XS_DRIVER_STUFFUP; - untimeout((timeout_t)aic_timeout, acb); + untimeout(aic_timeout, acb); aic_done(acb); aic_init(aic); return 1; @@ -2186,7 +2186,7 @@ aicintr(aic) __LINE__); Debugger(); acb->xs->error = XS_DRIVER_STUFFUP; - untimeout((timeout_t)aic_timeout, acb); + untimeout(aic_timeout, acb); aic_done(acb); aic_init(aic); return 1; @@ -2258,10 +2258,10 @@ aicintr(aic) void aic_timeout(arg) - caddr_t arg; + void *arg; { int s = splbio(); - struct acb *acb = (void *)arg; + struct acb *acb = (struct acb *)arg; struct aic_softc *aic; aic = acb->xs->sc_link->adapter_softc; diff --git a/sys/dev/isa/bt742a.c b/sys/dev/isa/bt742a.c index 40cddccac88..424ece2b776 100644 --- a/sys/dev/isa/bt742a.c +++ b/sys/dev/isa/bt742a.c @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: bt742a.c,v 1.25 1994/04/29 23:16:00 cgd Exp $ + * $Id: bt742a.c,v 1.26 1994/05/05 05:36:28 cgd Exp $ */ /* @@ -370,7 +370,7 @@ void bt_inquire_setup_information __P((struct bt_softc *)); void btminphys __P((struct buf *)); int bt_scsi_cmd __P((struct scsi_xfer *)); int bt_poll __P((struct bt_softc *, struct scsi_xfer *, struct bt_ccb *)); -void bt_timeout __P((caddr_t)); +void bt_timeout __P((void *arg)); #ifdef UTEST void bt_print_ccb __P((struct bt_ccb *)); void bt_print_active_ccbs __P((struct bt_softc *)); @@ -746,7 +746,7 @@ btintr(bt) } wmbi->stat = BT_MBI_FREE; if (ccb) { - untimeout((timeout_t)bt_timeout, ccb); + untimeout(bt_timeout, ccb); bt_done(bt, ccb); } /* Set the IN mail Box pointer for next */ bt_nextmbx(wmbi, wmbx, mbi); @@ -1363,7 +1363,7 @@ bt_scsi_cmd(xs) */ SC_DEBUG(sc_link, SDEV_DB3, ("cmd_sent\n")); if (!(flags & SCSI_NOMASK)) { - timeout((timeout_t)bt_timeout, ccb, (xs->timeout * hz) / 1000); + timeout(bt_timeout, ccb, (xs->timeout * hz) / 1000); return SUCCESSFULLY_QUEUED; } @@ -1412,7 +1412,7 @@ bt_poll(bt, xs, ccb) * because we are polling, take out the timeout entry * bt_timeout made */ - untimeout((timeout_t)bt_timeout, ccb); + untimeout(bt_timeout, ccb); count = 2000; while (count) { /* @@ -1441,10 +1441,10 @@ bt_poll(bt, xs, ccb) void bt_timeout(arg) - caddr_t arg; + void *arg; { int s = splbio(); - struct bt_ccb *ccb = (void *)arg; + struct bt_ccb *ccb = (struct bt_ccb *)arg; struct bt_softc *bt; bt = ccb->xfer->sc_link->adapter_softc; @@ -1479,7 +1479,7 @@ bt_timeout(arg) printf("\n"); bt_send_mbo(bt, ~SCSI_NOMASK, BT_MBO_ABORT, ccb); /* 2 secs for the abort */ - timeout((timeout_t)bt_timeout, ccb, 2 * hz); + timeout(bt_timeout, ccb, 2 * hz); ccb->flags = CCB_ABORTED; } splx(s); diff --git a/sys/dev/isa/isa.c b/sys/dev/isa/isa.c index 9d50dbf9796..2b879033132 100644 --- a/sys/dev/isa/isa.c +++ b/sys/dev/isa/isa.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)isa.c 7.2 (Berkeley) 5/13/91 - * $Id: isa.c,v 1.54 1994/05/03 20:32:22 mycroft Exp $ + * $Id: isa.c,v 1.55 1994/05/05 05:36:35 cgd Exp $ */ /* @@ -259,6 +259,8 @@ void isa_configure() { + startrtclock(); + while (config_search(isasubmatch, NULL, NULL)); printf("biomask %x netmask %x ttymask %x\n", diff --git a/sys/dev/isa/lpt.c b/sys/dev/isa/lpt.c index ed9b1fee427..be4d28e72b0 100644 --- a/sys/dev/isa/lpt.c +++ b/sys/dev/isa/lpt.c @@ -46,7 +46,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: lpt.c,v 1.17 1994/04/22 23:02:40 mycroft Exp $ + * $Id: lpt.c,v 1.18 1994/05/05 05:36:39 cgd Exp $ */ /* @@ -124,7 +124,7 @@ struct cfdriver lptcd = { static int notready __P((u_char, struct lpt_softc *)); #endif -static void lptout __P((struct lpt_softc *)); +static void lptout __P((void *arg)); static int pushbytes __P((struct lpt_softc *)); /* @@ -357,11 +357,13 @@ notready(status, sc) #endif void -lptout(sc) - struct lpt_softc *sc; +lptout(arg) + void *arg; { + struct lpt_softc *sc; int s; + sc = (struct lpt_softc *)arg; if (sc->sc_flags & LPT_NOINTR) return; @@ -369,7 +371,7 @@ lptout(sc) lptintr(sc); splx(s); - timeout((timeout_t)lptout, (caddr_t)sc, STEP); + timeout(lptout, (caddr_t)sc, STEP); } /* diff --git a/sys/dev/isa/lpt_isa.c b/sys/dev/isa/lpt_isa.c index 9c088b66f8f..c265c948562 100644 --- a/sys/dev/isa/lpt_isa.c +++ b/sys/dev/isa/lpt_isa.c @@ -46,7 +46,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: lpt_isa.c,v 1.17 1994/04/22 23:02:40 mycroft Exp $ + * $Id: lpt_isa.c,v 1.18 1994/05/05 05:36:39 cgd Exp $ */ /* @@ -124,7 +124,7 @@ struct cfdriver lptcd = { static int notready __P((u_char, struct lpt_softc *)); #endif -static void lptout __P((struct lpt_softc *)); +static void lptout __P((void *arg)); static int pushbytes __P((struct lpt_softc *)); /* @@ -357,11 +357,13 @@ notready(status, sc) #endif void -lptout(sc) - struct lpt_softc *sc; +lptout(arg) + void *arg; { + struct lpt_softc *sc; int s; + sc = (struct lpt_softc *)arg; if (sc->sc_flags & LPT_NOINTR) return; @@ -369,7 +371,7 @@ lptout(sc) lptintr(sc); splx(s); - timeout((timeout_t)lptout, (caddr_t)sc, STEP); + timeout(lptout, (caddr_t)sc, STEP); } /* diff --git a/sys/dev/isa/mcd.c b/sys/dev/isa/mcd.c index 4624157418c..581df41a9bb 100644 --- a/sys/dev/isa/mcd.c +++ b/sys/dev/isa/mcd.c @@ -35,7 +35,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: mcd.c,v 1.12 1994/04/22 23:02:42 mycroft Exp $ + * $Id: mcd.c,v 1.13 1994/05/05 05:36:42 cgd Exp $ */ /*static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";*/ @@ -148,8 +148,9 @@ void hsg2msf __P((int, bcd_t *)); int msf2hsg __P((bcd_t *)); int mcd_volinfo __P((struct mcd_softc *)); int mcdintr __P((struct mcd_softc *)); -void mcd_doread __P((int, struct mcd_mbx *)); int mcd_setmode __P((struct mcd_softc *, int)); +void mcd_doread __P((int, struct mcd_mbx *)); +void mcd_doreadtimeout __P((void *arg)); int mcd_toc_header __P((struct mcd_softc *, struct ioc_toc_header *)); int mcd_read_toc __P((struct mcd_softc *)); int mcd_toc_entry __P((struct mcd_softc *, struct ioc_read_toc_entry *)); @@ -840,6 +841,15 @@ mcdintr(sc) struct mcd_mbx *mbxsave; void +mcd_doreadtimeout(arg) + void *arg; +{ + int state = (long)arg; + + mcd_doread(state, NULL); +} + +void mcd_doread(state, mbxin) int state; struct mcd_mbx *mbxin; @@ -863,16 +873,16 @@ loop: /* Get status. */ outb(iobase + mcd_command, MCD_CMDGETSTAT); mbx->count = RDELAY_WAITSTAT; - timeout((timeout_t) mcd_doread, (caddr_t) MCD_S_WAITSTAT, + timeout(mcd_doreadtimeout, (caddr_t)MCD_S_WAITSTAT, hz/100); return; case MCD_S_WAITSTAT: - untimeout((timeout_t) mcd_doread, (caddr_t) MCD_S_WAITSTAT); + untimeout(mcd_doreadtimeout, (caddr_t)MCD_S_WAITSTAT); if (mbx->count-- >= 0) { if (inb(iobase + mcd_xfer) & MCD_ST_BUSY) { - timeout((timeout_t) mcd_doread, - (caddr_t) MCD_S_WAITSTAT, hz/100); + timeout(mcd_doreadtimeout, + (caddr_t)MCD_S_WAITSTAT, hz/100); return; } mcd_setflags(sc); @@ -898,8 +908,8 @@ loop: mcd_put(iobase + mcd_command, MCD_CMDSETMODE); mcd_put(iobase + mcd_command, rm); - timeout((timeout_t) mcd_doread, - (caddr_t) MCD_S_WAITMODE, hz/100); + timeout(mcd_doreadtimeout, (caddr_t)MCD_S_WAITMODE, + hz/100); return; } else { printf("%s: timeout getting status\n", @@ -908,15 +918,15 @@ loop: } case MCD_S_WAITMODE: - untimeout((timeout_t) mcd_doread, (caddr_t) MCD_S_WAITMODE); + untimeout(mcd_doreadtimeout, (caddr_t)MCD_S_WAITMODE); if (mbx->count-- < 0) { printf("%s: timeout setting mode\n", sc->sc_dev.dv_xname); goto readerr; } if (inb(iobase + mcd_xfer) & MCD_ST_BUSY) { - timeout((timeout_t) mcd_doread, - (caddr_t) MCD_S_WAITMODE, hz/100); + timeout(mcd_doreadtimeout, (caddr_t)MCD_S_WAITMODE, + hz/100); return; } mcd_setflags(sc); @@ -945,12 +955,11 @@ nextblock: mcd_put(iobase + mcd_command, 0); mcd_put(iobase + mcd_command, 1); mbx->count = RDELAY_WAITREAD; - timeout((timeout_t) mcd_doread, (caddr_t) MCD_S_WAITREAD, - hz/100); + timeout(mcd_doreadtimeout, (caddr_t)MCD_S_WAITREAD, hz/100); return; case MCD_S_WAITREAD: - untimeout((timeout_t) mcd_doread, (caddr_t) MCD_S_WAITREAD); + untimeout(mcd_doreadtimeout, (caddr_t)MCD_S_WAITREAD); if (mbx->count-- > 0) { k = inb(iobase + mcd_xfer); if ((k & 2) == 0) { /* XXX MCD_ST_AUDIOBSY? */ @@ -978,8 +987,8 @@ nextblock: } if ((k & MCD_ST_BUSY) == 0) mcd_getstat(sc, 0); - timeout((timeout_t) mcd_doread, - (caddr_t) MCD_S_WAITREAD, hz/100); + timeout(mcd_doreadtimeout, (caddr_t)MCD_S_WAITREAD, + hz/100); return; } else { printf("%s: timeout reading data\n", diff --git a/sys/dev/isa/ultra14f.c b/sys/dev/isa/ultra14f.c index a7ad2b0ac68..607eb1896b2 100644 --- a/sys/dev/isa/ultra14f.c +++ b/sys/dev/isa/ultra14f.c @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: ultra14f.c,v 1.27 1994/04/29 23:16:02 cgd Exp $ + * $Id: ultra14f.c,v 1.28 1994/05/05 05:36:58 cgd Exp $ */ /* @@ -267,7 +267,7 @@ int uha_find __P((struct uha_softc *)); void uha_init __P((struct uha_softc *)); void uhaminphys __P((struct buf *)); int uha_scsi_cmd __P((struct scsi_xfer *)); -void uha_timeout __P((caddr_t)); +void uha_timeout __P((void *arg)); #ifdef UHADEBUG void uha_print_mscp __P((struct mscp *)); void uha_print_active_mscp __P((struct uha_softc *)); @@ -559,7 +559,7 @@ uhaintr(uha) printf("uha: BAD MSCP RETURNED\n"); return 0; /* whatever it was, it'll timeout */ } - untimeout((timeout_t)uha_timeout, mscp); + untimeout(uha_timeout, mscp); uha_done(uha, mscp); } while (inb(iobase + UHA_SINT) & UHA_SINTP); @@ -1057,7 +1057,7 @@ uha_scsi_cmd(xs) if (!(flags & SCSI_NOMASK)) { s = splbio(); uha_send_mbox(uha, mscp); - timeout((timeout_t)uha_timeout, mscp, + timeout(uha_timeout, mscp, (xs->timeout * hz) / 1000); splx(s); SC_DEBUG(sc_link, SDEV_DB3, ("cmd_sent\n")); @@ -1089,10 +1089,10 @@ uha_scsi_cmd(xs) void uha_timeout(arg) - caddr_t arg; + void *arg; { int s = splbio(); - struct mscp *mscp = (void *)arg; + struct mscp *mscp = (struct mscp *)arg; struct uha_softc *uha = mscp->xs->sc_link->adapter_softc; sc_print_addr(mscp->xs->sc_link); @@ -1108,7 +1108,7 @@ uha_timeout(arg) uha_done(uha, mscp); } else { /* abort the operation that has timed out */ printf("\n"); - timeout((timeout_t)uha_timeout, mscp, 2 * hz); + timeout(uha_timeout, mscp, 2 * hz); mscp->flags = MSCP_ABORTED; } splx(s); diff --git a/sys/dev/isa/wd.c b/sys/dev/isa/wd.c index a13538ba0a8..46810335e71 100644 --- a/sys/dev/isa/wd.c +++ b/sys/dev/isa/wd.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)wd.c 7.2 (Berkeley) 5/9/91 - * $Id: wd.c,v 1.80 1994/04/25 03:16:03 mycroft Exp $ + * $Id: wd.c,v 1.81 1994/05/05 05:37:05 cgd Exp $ */ #define INSTRUMENT /* instrumentation stuff by Brad Parker */ @@ -165,9 +165,9 @@ static int wdsetctlr __P((struct wd_softc *)); static int wdgetctlr __P((struct wd_softc *)); static void bad144intern __P((struct wd_softc *)); static int wdcreset __P((struct wdc_softc *)); -static void wdcrestart __P((struct wdc_softc *)); +static void wdcrestart __P((void *arg)); static void wdcunwedge __P((struct wdc_softc *)); -static void wdctimeout __P((struct wdc_softc *)); +static void wdctimeout __P((void *arg)); void wddisksort __P((struct buf *, struct buf *)); static void wderror __P((void *, struct buf *, char *)); int wdcwait __P((struct wdc_softc *, int)); @@ -1484,9 +1484,10 @@ wdcreset(wdc) } static void -wdcrestart(wdc) - struct wdc_softc *wdc; +wdcrestart(arg) + void *arg; { + struct wdc_softc *wdc = (struct wdc_softc *)arg; int s = splbio(); wdcstart(wdc); @@ -1522,7 +1523,7 @@ wdcunwedge(wdc) ++wdc->sc_errors; /* Wake up in a little bit and restart the operation. */ - timeout((timeout_t)wdcrestart, (caddr_t)wdc, RECOVERYTIME); + timeout(wdcrestart, (caddr_t)wdc, RECOVERYTIME); } int @@ -1553,16 +1554,17 @@ wdcwait(wdc, mask) } static void -wdctimeout(wdc) - struct wdc_softc *wdc; +wdctimeout(arg) + void *arg; { + struct wdc_softc *wdc = (struct wdc_softc *)arg; int s = splbio(); if (wdc->sc_timeout && --wdc->sc_timeout == 0) { wderror(wdc, NULL, "lost interrupt"); wdcunwedge(wdc); } - timeout((timeout_t)wdctimeout, (caddr_t)wdc, hz); + timeout(wdctimeout, (caddr_t)wdc, hz); splx(s); } diff --git a/sys/dev/isa/wt.c b/sys/dev/isa/wt.c index 3d485eb14dc..335491d34b1 100644 --- a/sys/dev/isa/wt.c +++ b/sys/dev/isa/wt.c @@ -16,7 +16,7 @@ * This driver is derived from the old 386bsd Wangtek streamer tape driver, * made by Robert Baron at CMU, based on Intel sources. * - * $Id: wt.c,v 1.13 1994/04/22 22:59:02 mycroft Exp $ + * $Id: wt.c,v 1.14 1994/05/05 05:37:09 cgd Exp $ */ /* @@ -153,7 +153,7 @@ int wtwait __P((struct wt_softc *sc, int catch, char *msg)); int wtcmd __P((struct wt_softc *sc, int cmd)); int wtstart __P((struct wt_softc *sc, int flag, void *vaddr, size_t len)); void wtdma __P((struct wt_softc *sc)); -void wttimer __P((struct wt_softc *sc)); +void wttimer __P((void *arg)); void wtclock __P((struct wt_softc *sc)); int wtreset __P((struct wt_softc *sc)); int wtsense __P((struct wt_softc *sc, int verbose, int ignore)); @@ -880,7 +880,7 @@ wtclock(sc) * Some controllers seem to lose dma interrupts too often. To make the * tape stream we need 1 tick timeout. */ - timeout((timeout_t)wttimer, (caddr_t)sc, (sc->flags & TPACTIVE) ? 1 : hz); + timeout(wttimer, (caddr_t)sc, (sc->flags & TPACTIVE) ? 1 : hz); } /* @@ -889,9 +889,10 @@ wtclock(sc) * multiple devices on a single IRQ line. */ void -wttimer(sc) - struct wt_softc *sc; +wttimer(arg) + void *arg; { + struct wt_softc *sc = (struct wt_softc *)arg; int s; sc->flags &= ~TPTIMER; |
