diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-04-21 22:33:19 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-04-21 22:33:19 +0000 |
commit | 67d88b0a9910a68bb666b448d2dac29cb4d3d8c2 (patch) | |
tree | 967b89f6e07398a22bd8c76d30179b648776542d /sys/dev/isa/wd.c | |
parent | ba95d3c1d69cdb251d15a12ebf70f50b0ea2019b (diff) |
partial sync with netbsd 960418, more to come
Diffstat (limited to 'sys/dev/isa/wd.c')
-rw-r--r-- | sys/dev/isa/wd.c | 44 |
1 files changed, 26 insertions, 18 deletions
diff --git a/sys/dev/isa/wd.c b/sys/dev/isa/wd.c index 96fedd9de01..76267053725 100644 --- a/sys/dev/isa/wd.c +++ b/sys/dev/isa/wd.c @@ -1,5 +1,5 @@ -/* $OpenBSD: wd.c,v 1.9 1996/04/18 23:47:51 niklas Exp $ */ -/* $NetBSD: wd.c,v 1.146 1996/03/01 04:08:51 mycroft Exp $ */ +/* $OpenBSD: wd.c,v 1.10 1996/04/21 22:24:40 deraadt Exp $ */ +/* $NetBSD: wd.c,v 1.148 1996/04/11 22:30:31 cgd Exp $ */ /* * Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved. @@ -139,15 +139,23 @@ struct wdc_softc { int wdcprobe __P((struct device *, void *, void *)); void wdcattach __P((struct device *, struct device *, void *)); -struct cfdriver wdccd = { - NULL, "wdc", wdcprobe, wdcattach, DV_DULL, sizeof(struct wdc_softc) +struct cfattach wdc_ca = { + sizeof(struct wdc_softc), wdcprobe, wdcattach +}; + +struct cfdriver wdc_cd = { + NULL, "wdc", DV_DULL }; int wdprobe __P((struct device *, void *, void *)); void wdattach __P((struct device *, struct device *, void *)); -struct cfdriver wdcd = { - NULL, "wd", wdprobe, wdattach, DV_DISK, sizeof(struct wd_softc) +struct cfattach wd_ca = { + sizeof(struct wd_softc), wdprobe, wdattach +}; + +struct cfdriver wd_cd = { + NULL, "wd", DV_DISK }; void wdgetdisklabel __P((struct wd_softc *)); @@ -249,8 +257,8 @@ wdcattach(parent, self, aux) printf("\n"); - wdc->sc_ih = isa_intr_establish(ia->ia_irq, IST_EDGE, IPL_BIO, wdcintr, - wdc, wdc->sc_dev.dv_xname); + wdc->sc_ih = isa_intr_establish(ia->ia_ic, ia->ia_irq, IST_EDGE, + IPL_BIO, wdcintr, wdc, wdc->sc_dev.dv_xname); for (wa.wa_drive = 0; wa.wa_drive < 2; wa.wa_drive++) (void)config_found(self, (void *)&wa, wdprint); @@ -354,7 +362,7 @@ void wdstrategy(bp) struct buf *bp; { - struct wd_softc *wd = wdcd.cd_devs[WDUNIT(bp->b_dev)]; + struct wd_softc *wd = wd_cd.cd_devs[WDUNIT(bp->b_dev)]; int s; /* Valid request? */ @@ -889,9 +897,9 @@ wdopen(dev, flag, fmt) int error; unit = WDUNIT(dev); - if (unit >= wdcd.cd_ndevs) + if (unit >= wd_cd.cd_ndevs) return ENXIO; - wd = wdcd.cd_devs[unit]; + wd = wd_cd.cd_devs[unit]; if (wd == 0) return ENXIO; @@ -963,7 +971,7 @@ wdclose(dev, flag, fmt) dev_t dev; int flag, fmt; { - struct wd_softc *wd = wdcd.cd_devs[WDUNIT(dev)]; + struct wd_softc *wd = wd_cd.cd_devs[WDUNIT(dev)]; int part = WDPART(dev); int error; @@ -1308,7 +1316,7 @@ wdioctl(dev, cmd, addr, flag, p) int flag; struct proc *p; { - struct wd_softc *wd = wdcd.cd_devs[WDUNIT(dev)]; + struct wd_softc *wd = wd_cd.cd_devs[WDUNIT(dev)]; int error; if ((wd->sc_flags & WDF_LOADED) == 0) @@ -1424,7 +1432,7 @@ wdsize(dev) if (wdopen(dev, 0, S_IFBLK) != 0) return -1; - wd = wdcd.cd_devs[WDUNIT(dev)]; + wd = wd_cd.cd_devs[WDUNIT(dev)]; part = WDPART(dev); if (wd->sc_dk.dk_label->d_partitions[part].p_fstype != FS_SWAP) size = -1; @@ -1463,9 +1471,9 @@ wddump(dev, blkno, va, size) wddoingadump = 1; unit = WDUNIT(dev); - if (unit >= wdcd.cd_ndevs) + if (unit >= wd_cd.cd_ndevs) return ENXIO; - wd = wdcd.cd_devs[unit]; + wd = wd_cd.cd_devs[unit]; if (wd == 0) return ENXIO; @@ -1657,8 +1665,8 @@ wdcunwedge(wdc) (void) wdcreset(wdc); /* Schedule recalibrate for all drives on this controller. */ - for (unit = 0; unit < wdcd.cd_ndevs; unit++) { - struct wd_softc *wd = wdcd.cd_devs[unit]; + for (unit = 0; unit < wd_cd.cd_ndevs; unit++) { + struct wd_softc *wd = wd_cd.cd_devs[unit]; if (!wd || (void *)wd->sc_dev.dv_parent != wdc) continue; if (wd->sc_state > RECAL) |