Use "edc" instead of "dasd". As pointed out by Soren, dasd doesn't

mean anything special in IBM-talk. And edc better matches prior art, too.
This commit is contained in:
jdolecek 2001-04-19 17:17:28 +00:00
parent 230d9cbc0f
commit dbf91c827d
10 changed files with 93 additions and 93 deletions

View File

@ -1,10 +1,10 @@
# $NetBSD: Makefile,v 1.193 2001/04/19 08:16:06 jdolecek Exp $ # $NetBSD: Makefile,v 1.194 2001/04/19 17:17:29 jdolecek Exp $
# @(#)Makefile 8.1 (Berkeley) 6/18/93 # @(#)Makefile 8.1 (Berkeley) 6/18/93
MAN= adv.4 adw.4 ahb.4 ahc.4 an.4 aria.4 atalk.4 audio.4 auich.4 auvia.4 \ MAN= adv.4 adw.4 ahb.4 ahc.4 an.4 aria.4 atalk.4 audio.4 auich.4 auvia.4 \
awi.4 bba.4 bha.4 bktr.4 bpf.4 cac.4 cardbus.4 ccd.4 \ awi.4 bba.4 bha.4 bktr.4 bpf.4 cac.4 cardbus.4 ccd.4 \
cd.4 ch.4 clcs.4 clct.4 clnp.4 cltp.4 cmpci.4 cms.4 cnw.4 dasd.4 ddb.4 \ cd.4 ch.4 clcs.4 clct.4 clnp.4 cltp.4 cmpci.4 cms.4 cnw.4 ddb.4 \
de.4 dpt.4 drum.4 eap.4 elmc.4 en.4 envsys.4 ep.4 esh.4 \ de.4 dpt.4 drum.4 eap.4 edc.4 elmc.4 en.4 envsys.4 ep.4 esh.4 \
esis.4 esm.4 eso.4 exphy.4 fd.4 fpa.4 fms.4 fxp.4 gre.4 hme.4 icmp.4 \ esis.4 esm.4 eso.4 exphy.4 fd.4 fpa.4 fms.4 fxp.4 gre.4 hme.4 icmp.4 \
icsphy.4 idp.4 ifmedia.4 inet.4 inphy.4 intersil7170.4 ioat.4 \ icsphy.4 idp.4 ifmedia.4 inet.4 inphy.4 intersil7170.4 ioat.4 \
iop.4 iophy.4 iopsp.4 ip.4 ipip.4 ipkdb.4 iso.4 isp.4 \ iop.4 iophy.4 iopsp.4 ip.4 ipip.4 ipkdb.4 iso.4 isp.4 \

View File

@ -1,4 +1,4 @@
.\" $NetBSD: dasd.4,v 1.1 2001/04/19 08:16:06 jdolecek Exp $ .\" $NetBSD: edc.4,v 1.1 2001/04/19 17:17:30 jdolecek Exp $
.\" .\"
.\" Copyright (c) 1999 The NetBSD Foundation, Inc. .\" Copyright (c) 1999 The NetBSD Foundation, Inc.
.\" All rights reserved. .\" All rights reserved.

View File

@ -1,4 +1,4 @@
# $NetBSD: PS2,v 1.15 2001/04/19 07:37:10 jdolecek Exp $ # $NetBSD: PS2,v 1.16 2001/04/19 17:17:28 jdolecek Exp $
# #
# Sample kernel config for PS/2 with MCA bus # Sample kernel config for PS/2 with MCA bus
# #
@ -117,8 +117,8 @@ we* at mca? slot ? # WD/SMC Ethernet
ate* at mca? slot ? # Allied Telesis AT1720 ate* at mca? slot ? # Allied Telesis AT1720
# MCA ESDI controllers & disks - EXPERIMENTAL # MCA ESDI controllers & disks - EXPERIMENTAL
dasd* at mca? slot ? # IBM DASD-compliant ESDI controllers edc* at mca? slot ? # IBM ESDI Disk Controllers
ed* at dasd? ed* at edc?
# MCA SCSI controllers # MCA SCSI controllers
aha* at mca? slot ? # Adaptec AHA-1640 aha* at mca? slot ? # Adaptec AHA-1640

View File

@ -1,4 +1,4 @@
# $NetBSD: DEVNAMES,v 1.47 2001/04/19 07:47:50 jdolecek Exp $ # $NetBSD: DEVNAMES,v 1.48 2001/04/19 17:17:28 jdolecek Exp $
# #
# This file contains all used device names and defined attributes in # This file contains all used device names and defined attributes in
# alphabetical order. New devices added to the system somewhere should first # alphabetical order. New devices added to the system somewhere should first
@ -213,7 +213,6 @@ cy MI
cy82c693 MI cy82c693 MI
cz MI cz MI
daic MI daic MI
dasd MI (MCA)
dc pmax dc pmax
dca hp300 dca hp300
dcm hp300 dcm hp300
@ -255,6 +254,7 @@ eccmemctl sparc
ed amiga ed amiga
ed amigappc ed amigappc
ed MI (MCA) ed MI (MCA)
edc MI (MCA)
eeprom sparc eeprom sparc
eeprom sparc64 eeprom sparc64
eeprom sun3 eeprom sun3

View File

@ -1,4 +1,4 @@
/* $NetBSD: ed_mca.c,v 1.1 2001/04/19 07:30:24 jdolecek Exp $ */ /* $NetBSD: ed_mca.c,v 1.2 2001/04/19 17:17:29 jdolecek Exp $ */
/* /*
* Copyright (c) 2001 The NetBSD Foundation, Inc. * Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -63,9 +63,9 @@
#include <machine/intr.h> #include <machine/intr.h>
#include <machine/bus.h> #include <machine/bus.h>
#include <dev/mca/dasdreg.h> #include <dev/mca/edcreg.h>
#include <dev/mca/edvar.h> #include <dev/mca/edvar.h>
#include <dev/mca/dasdvar.h> #include <dev/mca/edcvar.h>
/* #define WDCDEBUG */ /* #define WDCDEBUG */
@ -117,7 +117,7 @@ ed_mca_probe(parent, match, aux)
void *aux; void *aux;
{ {
u_int16_t cmd_args[2]; u_int16_t cmd_args[2];
struct dasd_mca_softc *sc = (void *) parent; struct edc_mca_softc *sc = (void *) parent;
struct ed_attach_args *eda = (void *) aux; struct ed_attach_args *eda = (void *) aux;
/* /*
@ -125,7 +125,7 @@ ed_mca_probe(parent, match, aux)
*/ */
cmd_args[0] = 6; /* Options: 00s110, s: 0=Physical 1=Pseudo */ cmd_args[0] = 6; /* Options: 00s110, s: 0=Physical 1=Pseudo */
cmd_args[1] = 0; cmd_args[1] = 0;
if (dasd_run_cmd(sc, CMD_GET_DEV_CONF, eda->sc_devno, cmd_args, 2, 0)) if (edc_run_cmd(sc, CMD_GET_DEV_CONF, eda->sc_devno, cmd_args, 2, 0))
return (0); return (0);
return (1); return (1);
@ -137,15 +137,15 @@ ed_mca_attach(parent, self, aux)
void *aux; void *aux;
{ {
struct ed_softc *ed = (void *) self; struct ed_softc *ed = (void *) self;
struct dasd_mca_softc *sc = (void *) parent; struct edc_mca_softc *sc = (void *) parent;
struct ed_attach_args *eda = (void *) aux; struct ed_attach_args *eda = (void *) aux;
char pbuf[8]; char pbuf[8];
int error, nsegs; int error, nsegs;
ed->dasd_softc = sc; ed->edc_softc = sc;
ed->sc_dmat = eda->sc_dmat; ed->sc_dmat = eda->sc_dmat;
ed->sc_devno = eda->sc_devno; ed->sc_devno = eda->sc_devno;
dasd_add_disk(sc, ed, eda->sc_devno); edc_add_disk(sc, ed, eda->sc_devno);
BUFQ_INIT(&ed->sc_q); BUFQ_INIT(&ed->sc_q);
spinlockinit(&ed->sc_q_lock, "edbqlock", 0); spinlockinit(&ed->sc_q_lock, "edbqlock", 0);
@ -419,7 +419,7 @@ __edstart(ed, bp)
cmd_args[1] = bp->b_bcount / DEV_BSIZE; cmd_args[1] = bp->b_bcount / DEV_BSIZE;
cmd_args[2] = ((cyl & 0x1f) << 11) | (head << 5) | sector; cmd_args[2] = ((cyl & 0x1f) << 11) | (head << 5) | sector;
cmd_args[3] = ((cyl & 0x3E0) >> 5); cmd_args[3] = ((cyl & 0x3E0) >> 5);
if (dasd_run_cmd(ed->dasd_softc, if (edc_run_cmd(ed->edc_softc,
(bp->b_flags & B_READ) ? CMD_READ_DATA : CMD_WRITE_DATA, (bp->b_flags & B_READ) ? CMD_READ_DATA : CMD_WRITE_DATA,
ed->sc_devno, cmd_args, 4, 1)) { ed->sc_devno, cmd_args, 4, 1)) {
printf("%s: data i/o command failed\n", ed->sc_dev.dv_xname); printf("%s: data i/o command failed\n", ed->sc_dev.dv_xname);
@ -1092,7 +1092,7 @@ ed_get_params(ed)
*/ */
cmd_args[0] = 6; /* Options: 00s110, s: 0=Physical 1=Pseudo */ cmd_args[0] = 6; /* Options: 00s110, s: 0=Physical 1=Pseudo */
cmd_args[1] = 0; cmd_args[1] = 0;
if (dasd_run_cmd(ed->dasd_softc, CMD_GET_DEV_CONF, ed->sc_devno, cmd_args, 2, 0)) if (edc_run_cmd(ed->edc_softc, CMD_GET_DEV_CONF, ed->sc_devno, cmd_args, 2, 0))
return (1); return (1);
ed->spares = ed->sc_status_block[1] >> 8; ed->spares = ed->sc_status_block[1] >> 8;
@ -1129,7 +1129,7 @@ ed_shutdown(arg)
/* Issue Park Head command */ /* Issue Park Head command */
cmd_args[0] = 6; /* Options: 000110 */ cmd_args[0] = 6; /* Options: 000110 */
cmd_args[1] = 0; cmd_args[1] = 0;
(void) dasd_run_cmd(ed->dasd_softc, CMD_PARK_HEAD, ed->sc_devno, (void) edc_run_cmd(ed->edc_softc, CMD_PARK_HEAD, ed->sc_devno,
cmd_args, 2, 0); cmd_args, 2, 0);
#endif #endif
} }
@ -1171,10 +1171,10 @@ edworker(arg)
splx(s); splx(s);
/* /*
* Wait until the command executes; dasd_intr() wakes * Wait until the command executes; edc_intr() wakes
* as up. * as up.
*/ */
(void) tsleep(&ed->dasd_softc, PRIBIO, "edwrk", 0); (void) tsleep(&ed->edc_softc, PRIBIO, "edwrk", 0);
/* Handle i/o results */ /* Handle i/o results */
s = splbio(); s = splbio();

View File

@ -1,4 +1,4 @@
/* $NetBSD: dasd_mca.c,v 1.1 2001/04/19 07:30:24 jdolecek Exp $ */ /* $NetBSD: edc_mca.c,v 1.1 2001/04/19 17:17:29 jdolecek Exp $ */
/* /*
* Copyright (c) 2001 The NetBSD Foundation, Inc. * Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -41,14 +41,14 @@
* for MCA rev. 2.2 in hands, thanks to Scott Telford <st@epcc.ed.ac.uk>. * for MCA rev. 2.2 in hands, thanks to Scott Telford <st@epcc.ed.ac.uk>.
* *
* TODO: * TODO:
* - move the MCA DMA controller (dasd_setup_dma()) goo to device driver * - move the MCA DMA controller (edc_setup_dma()) goo to device driver
* independant location * independant location
* - improve error recovery * - improve error recovery
* add any soft resets when anything gets stuck? * add any soft resets when anything gets stuck?
* - test with > 1 disk (this is supported by some controllers), eliminate * - test with > 1 disk (this is supported by some controllers), eliminate
* any remaining devno=0 assumptions if there are any still * any remaining devno=0 assumptions if there are any still
* - test with > 1 ESDI controller in machine; shared interrupts * - test with > 1 ESDI controller in machine; shared interrupts
* necessary for this to work should be supported - dasd_intr() specifically * necessary for this to work should be supported - edc_intr() specifically
* checks if the interrupt is for this controller * checks if the interrupt is for this controller
*/ */
@ -77,12 +77,12 @@
#include <dev/mca/mcavar.h> #include <dev/mca/mcavar.h>
#include <dev/mca/mcadevs.h> #include <dev/mca/mcadevs.h>
#include <dev/mca/dasdreg.h> #include <dev/mca/edcreg.h>
#include <dev/mca/edvar.h> #include <dev/mca/edvar.h>
#include <dev/mca/dasdvar.h> #include <dev/mca/edcvar.h>
#define DASD_MAXDEVS 7 #define DASD_MAXDEVS 7
struct dasd_mca_softc { struct edc_mca_softc {
struct device sc_dev; struct device sc_dev;
bus_space_tag_t sc_iot; bus_space_tag_t sc_iot;
@ -104,27 +104,27 @@ struct dasd_mca_softc {
* controller */ * controller */
}; };
int dasd_mca_probe __P((struct device *, struct cfdata *, void *)); int edc_mca_probe __P((struct device *, struct cfdata *, void *));
void dasd_mca_attach __P((struct device *, struct device *, void *)); void edc_mca_attach __P((struct device *, struct device *, void *));
struct cfattach dasd_mca_ca = { struct cfattach edc_mca_ca = {
sizeof(struct dasd_mca_softc), dasd_mca_probe, dasd_mca_attach sizeof(struct edc_mca_softc), edc_mca_probe, edc_mca_attach
}; };
#define DMA_EXTCMD 0x18 #define DMA_EXTCMD 0x18
#define DMA_EXEC 0x1A #define DMA_EXEC 0x1A
static int dasd_intr __P((void *)); static int edc_intr __P((void *));
static void dasd_attach_ed __P((struct device *)); static void edc_attach_ed __P((struct device *));
static void dasd_dump_status_block __P((struct dasd_mca_softc *, int, int, static void edc_dump_status_block __P((struct edc_mca_softc *, int, int,
int)); int));
static int dasd_setup_dma __P((struct dasd_mca_softc *, struct buf *, static int edc_setup_dma __P((struct edc_mca_softc *, struct buf *,
bus_addr_t, bus_size_t)); bus_addr_t, bus_size_t));
static int dasd_do_attn __P((struct dasd_mca_softc *, int, int, int)); static int edc_do_attn __P((struct edc_mca_softc *, int, int, int));
static int dasd_cmd_wait __P((struct dasd_mca_softc *, int, int, int)); static int edc_cmd_wait __P((struct edc_mca_softc *, int, int, int));
int int
dasd_mca_probe(parent, match, aux) edc_mca_probe(parent, match, aux)
struct device *parent; struct device *parent;
struct cfdata *match; struct cfdata *match;
void *aux; void *aux;
@ -141,11 +141,11 @@ dasd_mca_probe(parent, match, aux)
} }
void void
dasd_mca_attach(parent, self, aux) edc_mca_attach(parent, self, aux)
struct device *parent, *self; struct device *parent, *self;
void *aux; void *aux;
{ {
struct dasd_mca_softc *sc = (void *) self; struct edc_mca_softc *sc = (void *) self;
struct mca_attach_args *ma = aux; struct mca_attach_args *ma = aux;
int pos2, pos3, pos4; int pos2, pos3, pos4;
int irq, drq, iobase; int irq, drq, iobase;
@ -248,7 +248,7 @@ dasd_mca_attach(parent, self, aux)
sc->sc_dmat = ma->ma_dmat; sc->sc_dmat = ma->ma_dmat;
sc->sc_ih = mca_intr_establish(ma->ma_mc, irq, IPL_BIO, dasd_intr, sc); sc->sc_ih = mca_intr_establish(ma->ma_mc, irq, IPL_BIO, edc_intr, sc);
if (sc->sc_ih == NULL) { if (sc->sc_ih == NULL) {
printf("%s: couldn't establish interrupt handler\n", printf("%s: couldn't establish interrupt handler\n",
sc->sc_dev.dv_xname); sc->sc_dev.dv_xname);
@ -266,18 +266,18 @@ dasd_mca_attach(parent, self, aux)
sc->sc_maxdevs = 2; sc->sc_maxdevs = 2;
/* Defer probe for individual disks until interrupts are enabled. */ /* Defer probe for individual disks until interrupts are enabled. */
config_interrupts(self, dasd_attach_ed); config_interrupts(self, edc_attach_ed);
} }
/* /*
* Try to attach ed* at dasd? if any configured and installed now * Try to attach ed* at edc? if any configured and installed now
* that interrupts are enabled. * that interrupts are enabled.
*/ */
static void static void
dasd_attach_ed(self) edc_attach_ed(self)
struct device *self; struct device *self;
{ {
struct dasd_mca_softc *sc = (void *) self; struct edc_mca_softc *sc = (void *) self;
struct ed_softc *ed; struct ed_softc *ed;
struct ed_attach_args eda; struct ed_attach_args eda;
int devno; int devno;
@ -291,7 +291,7 @@ dasd_attach_ed(self)
BCR_INT_ENABLE|BCR_RESET); BCR_INT_ENABLE|BCR_RESET);
} else { } else {
/* "SOFT" reset */ /* "SOFT" reset */
dasd_do_attn(sc, ATN_RESET_ATTACHMENT, DASD_DEVNO_CONTROLLER,0); edc_do_attn(sc, ATN_RESET_ATTACHMENT, DASD_DEVNO_CONTROLLER,0);
} }
/* Wait until the reset completes. */ /* Wait until the reset completes. */
@ -300,7 +300,7 @@ dasd_attach_ed(self)
/* /*
* Get dummy ed_softc to be used during probe. Once a disk is * Get dummy ed_softc to be used during probe. Once a disk is
* found, ed_mca_attach() calls dasd_add_disk() to insert the * found, ed_mca_attach() calls edc_add_disk() to insert the
* right pointer into sc->sc_ed[] array. * right pointer into sc->sc_ed[] array.
*/ */
MALLOC(ed, struct ed_softc *, sizeof(struct ed_softc), MALLOC(ed, struct ed_softc *, sizeof(struct ed_softc),
@ -328,8 +328,8 @@ dasd_attach_ed(self)
} }
void void
dasd_add_disk(sc, ed, devno) edc_add_disk(sc, ed, devno)
struct dasd_mca_softc *sc; struct edc_mca_softc *sc;
struct ed_softc *ed; struct ed_softc *ed;
int devno; int devno;
{ {
@ -337,10 +337,10 @@ dasd_add_disk(sc, ed, devno)
} }
static int static int
dasd_intr(arg) edc_intr(arg)
void *arg; void *arg;
{ {
struct dasd_mca_softc *sc = arg; struct edc_mca_softc *sc = arg;
u_int8_t isr, intr_id; u_int8_t isr, intr_id;
u_int16_t sifr; u_int16_t sifr;
int cmd, devno, bioerror; int cmd, devno, bioerror;
@ -414,7 +414,7 @@ dasd_intr(arg)
* controller to do the transfer. * controller to do the transfer.
*/ */
ed = sc->sc_ed[devno]; ed = sc->sc_ed[devno];
if (!dasd_setup_dma(sc, ed->sc_bp, if (!edc_setup_dma(sc, ed->sc_bp,
ed->dmamap_xfer->dm_segs[0].ds_addr, ed->dmamap_xfer->dm_segs[0].ds_addr,
ed->dmamap_xfer->dm_segs[0].ds_len)) { ed->dmamap_xfer->dm_segs[0].ds_len)) {
/* error XXX bail out? */ /* error XXX bail out? */
@ -438,7 +438,7 @@ dasd_intr(arg)
break; break;
default: default:
if ((sc->sc_flags & DASD_QUIET) == 0) if ((sc->sc_flags & DASD_QUIET) == 0)
dasd_dump_status_block(sc, devno, cmd, intr_id); edc_dump_status_block(sc, devno, cmd, intr_id);
bioerror = EIO; bioerror = EIO;
break; break;
@ -452,13 +452,13 @@ dasd_intr(arg)
* is ready to accept another one. * is ready to accept another one.
*/ */
if (intr_id != ISR_DATA_TRANSFER_RDY && intr_id != ISR_ATTN_ERROR) if (intr_id != ISR_DATA_TRANSFER_RDY && intr_id != ISR_ATTN_ERROR)
dasd_do_attn(sc, ATN_END_INT, devno, intr_id); edc_do_attn(sc, ATN_END_INT, devno, intr_id);
/* If Read or Write Data, wakeup worker thread to finish it */ /* If Read or Write Data, wakeup worker thread to finish it */
if (intr_id != ISR_DATA_TRANSFER_RDY if (intr_id != ISR_DATA_TRANSFER_RDY
&& (cmd == CMD_READ_DATA || cmd == CMD_WRITE_DATA)) { && (cmd == CMD_READ_DATA || cmd == CMD_WRITE_DATA)) {
sc->sc_ed[devno]->sc_error = bioerror; sc->sc_ed[devno]->sc_error = bioerror;
wakeup_one(&sc->sc_ed[devno]->dasd_softc); wakeup_one(&sc->sc_ed[devno]->edc_softc);
} }
return (1); return (1);
@ -469,8 +469,8 @@ dasd_intr(arg)
* written in DASD Storage Interface Specification MC (Rev 2.2). * written in DASD Storage Interface Specification MC (Rev 2.2).
*/ */
static int static int
dasd_do_attn(sc, attn_type, devno, intr_id) edc_do_attn(sc, attn_type, devno, intr_id)
struct dasd_mca_softc *sc; struct edc_mca_softc *sc;
int attn_type, devno, intr_id; int attn_type, devno, intr_id;
{ {
int tries; int tries;
@ -488,7 +488,7 @@ dasd_do_attn(sc, attn_type, devno, intr_id)
} }
if (tries == 1000) { if (tries == 1000) {
printf("%s: dasd_do_attn: timeout waiting for attachment to become available\n", printf("%s: edc_do_attn: timeout waiting for attachment to become available\n",
(devno == DASD_DEVNO_CONTROLLER) (devno == DASD_DEVNO_CONTROLLER)
? sc->sc_dev.dv_xname ? sc->sc_dev.dv_xname
: sc->sc_ed[devno]->sc_dev.dv_xname); : sc->sc_ed[devno]->sc_dev.dv_xname);
@ -516,8 +516,8 @@ dasd_do_attn(sc, attn_type, devno, intr_id)
* interval. * interval.
*/ */
static int static int
dasd_cmd_wait(sc, devno, cmd, secs) edc_cmd_wait(sc, devno, cmd, secs)
struct dasd_mca_softc *sc; struct edc_mca_softc *sc;
int devno, cmd, secs; int devno, cmd, secs;
{ {
struct timeval start, now; struct timeval start, now;
@ -548,8 +548,8 @@ dasd_cmd_wait(sc, devno, cmd, secs)
} }
int int
dasd_run_cmd(sc, cmd, devno, cmd_args, cmd_len, async) edc_run_cmd(sc, cmd, devno, cmd_args, cmd_len, async)
struct dasd_mca_softc *sc; struct edc_mca_softc *sc;
int cmd; int cmd;
int devno; int devno;
u_int16_t cmd_args[]; u_int16_t cmd_args[];
@ -565,14 +565,14 @@ dasd_run_cmd(sc, cmd, devno, cmd_args, cmd_len, async)
*/ */
if (sc->sc_cmd_async) { if (sc->sc_cmd_async) {
/* Wait maximum 15s */ /* Wait maximum 15s */
if (dasd_cmd_wait(sc, devno, cmd, 15)) if (edc_cmd_wait(sc, devno, cmd, 15))
return (EAGAIN); /* Busy */ return (EAGAIN); /* Busy */
sc->sc_cmd_async = 0; sc->sc_cmd_async = 0;
} }
/* Do Attention Request for Command Request. */ /* Do Attention Request for Command Request. */
if ((error = dasd_do_attn(sc, ATN_CMD_REQ, devno, 0))) if ((error = edc_do_attn(sc, ATN_CMD_REQ, devno, 0)))
return (error); return (error);
/* /*
@ -617,7 +617,7 @@ dasd_run_cmd(sc, cmd, devno, cmd_args, cmd_len, async)
} }
/* Wait for command to complete, but maximum 15 seconds. */ /* Wait for command to complete, but maximum 15 seconds. */
if (dasd_cmd_wait(sc, devno, cmd, 15)) if (edc_cmd_wait(sc, devno, cmd, 15))
return (EAGAIN); return (EAGAIN);
/* Check if the command completed successfully; if not, return error */ /* Check if the command completed successfully; if not, return error */
@ -633,8 +633,8 @@ dasd_run_cmd(sc, cmd, devno, cmd_args, cmd_len, async)
} }
static int static int
dasd_setup_dma(sc, bp, phys, cnt) edc_setup_dma(sc, bp, phys, cnt)
struct dasd_mca_softc *sc; struct edc_mca_softc *sc;
struct buf *bp; struct buf *bp;
bus_addr_t phys; bus_addr_t phys;
bus_size_t cnt; bus_size_t cnt;
@ -673,7 +673,7 @@ dasd_setup_dma(sc, bp, phys, cnt)
return (1); return (1);
} }
static const char * const dasd_commands[] = { static const char * const edc_commands[] = {
"Invalid Command", "Invalid Command",
"Read Data", "Read Data",
"Write Data", "Write Data",
@ -698,7 +698,7 @@ static const char * const dasd_commands[] = {
"Power Conservation Command", "Power Conservation Command",
}; };
static const char * const dasd_cmd_status[256] = { static const char * const edc_cmd_status[256] = {
"Reserved", "Reserved",
"Command completed successfully", "Command completed successfully",
"Reserved", "Reserved",
@ -718,7 +718,7 @@ static const char * const dasd_cmd_status[256] = {
/* 0x14 - 0xff reserved */ /* 0x14 - 0xff reserved */
}; };
static const char * const dasd_cmd_error[256] = { static const char * const edc_cmd_error[256] = {
"No Error", "No Error",
"Invalid parameter in the command block", "Invalid parameter in the command block",
"Reserved", "Reserved",
@ -742,7 +742,7 @@ static const char * const dasd_cmd_error[256] = {
/* 0x14-0xff reserved */ /* 0x14-0xff reserved */
}; };
static const char * const dasd_dev_status[] = { static const char * const edc_dev_status[] = {
"Seek or Command complete", "Seek or Command complete",
"Track 0 Flag (emulated)", "Track 0 Flag (emulated)",
"Write Fault (emulated)", "Write Fault (emulated)",
@ -753,7 +753,7 @@ static const char * const dasd_dev_status[] = {
"Reserved (0)", "Reserved (0)",
}; };
static const char * const dasd_dev_errors[] = { static const char * const edc_dev_errors[] = {
"No Error", "No Error",
"Seek Fault", /* Device report */ "Seek Fault", /* Device report */
"Interface Fault (Parity, Attn, or Cmd Complete Error)", "Interface Fault (Parity, Attn, or Cmd Complete Error)",
@ -782,29 +782,29 @@ static const char * const dasd_dev_errors[] = {
}; };
static void static void
dasd_dump_status_block(sc, devno, cmd, intr_id) edc_dump_status_block(sc, devno, cmd, intr_id)
struct dasd_mca_softc *sc; struct edc_mca_softc *sc;
int devno, cmd, intr_id; int devno, cmd, intr_id;
{ {
struct ed_softc *ed = sc->sc_ed[devno]; struct ed_softc *ed = sc->sc_ed[devno];
printf("%s: Command: %s, Status: %s\n", printf("%s: Command: %s, Status: %s\n",
ed->sc_dev.dv_xname, ed->sc_dev.dv_xname,
dasd_commands[ed->sc_status_block[0] & 0x1f], edc_commands[ed->sc_status_block[0] & 0x1f],
dasd_cmd_status[SB_GET_CMD_STATUS(ed->sc_status_block)] edc_cmd_status[SB_GET_CMD_STATUS(ed->sc_status_block)]
); );
printf("%s: IntrId: %s\n", ed->sc_dev.dv_xname, printf("%s: IntrId: %s\n", ed->sc_dev.dv_xname,
dasd_cmd_status[intr_id]); edc_cmd_status[intr_id]);
if (cmd == ISR_COMPLETED_WARNING) { if (cmd == ISR_COMPLETED_WARNING) {
printf("%s: Command Error Code: %s\n", printf("%s: Command Error Code: %s\n",
ed->sc_dev.dv_xname, ed->sc_dev.dv_xname,
dasd_cmd_error[ed->sc_status_block[1] & 0xff]); edc_cmd_error[ed->sc_status_block[1] & 0xff]);
} }
if (cmd == ISR_CMD_FAILED) { if (cmd == ISR_CMD_FAILED) {
printf("%s: Device: Status: %s, Error Code: %s\n", printf("%s: Device: Status: %s, Error Code: %s\n",
ed->sc_dev.dv_xname, ed->sc_dev.dv_xname,
dasd_dev_status[(ed->sc_status_block[2] & 0xff00) >> 8], edc_dev_status[(ed->sc_status_block[2] & 0xff00) >> 8],
dasd_dev_errors[ed->sc_status_block[2] & 0xff]); edc_dev_errors[ed->sc_status_block[2] & 0xff]);
} }
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: dasdreg.h,v 1.1 2001/04/19 07:30:24 jdolecek Exp $ */ /* $NetBSD: edcreg.h,v 1.1 2001/04/19 17:17:29 jdolecek Exp $ */
/* /*
* Copyright (c) 2001 The NetBSD Foundation, Inc. * Copyright (c) 2001 The NetBSD Foundation, Inc.

View File

@ -1,4 +1,4 @@
/* $NetBSD: dasdvar.h,v 1.1 2001/04/19 07:30:24 jdolecek Exp $ */ /* $NetBSD: edcvar.h,v 1.1 2001/04/19 17:17:29 jdolecek Exp $ */
/* /*
* Copyright (c) 2001 The NetBSD Foundation, Inc. * Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -38,6 +38,6 @@ struct ed_attach_args {
bus_dma_tag_t sc_dmat; /* DMA tag as passed by parent */ bus_dma_tag_t sc_dmat; /* DMA tag as passed by parent */
}; };
int dasd_run_cmd __P((struct dasd_mca_softc *, int, int edc_run_cmd __P((struct edc_mca_softc *, int,
int, u_int16_t [], int, int)); int, u_int16_t [], int, int));
void dasd_add_disk __P((struct dasd_mca_softc *, struct ed_softc *, int)); void edc_add_disk __P((struct edc_mca_softc *, struct ed_softc *, int));

View File

@ -1,4 +1,4 @@
/* $NetBSD: edvar.h,v 1.1 2001/04/19 07:30:24 jdolecek Exp $ */ /* $NetBSD: edvar.h,v 1.2 2001/04/19 17:17:29 jdolecek Exp $ */
/* /*
* Copyright (c) 2001 The NetBSD Foundation, Inc. * Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -33,7 +33,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
struct dasd_mca_softc; struct edc_mca_softc;
#define DASD_MAX_CMD_RES_LEN 8 #define DASD_MAX_CMD_RES_LEN 8
struct ed_softc { struct ed_softc {
@ -46,7 +46,7 @@ struct ed_softc {
struct callout sc_edstart; struct callout sc_edstart;
struct buf *sc_bp; /* buf being transfered */ struct buf *sc_bp; /* buf being transfered */
struct dasd_mca_softc *dasd_softc; /* pointer to our parent */ struct edc_mca_softc *edc_softc; /* pointer to our parent */
int sc_flags; int sc_flags;
#define WDF_LOCKED 0x001 #define WDF_LOCKED 0x001

View File

@ -1,4 +1,4 @@
# $NetBSD: files.mca,v 1.9 2001/04/19 07:30:25 jdolecek Exp $ # $NetBSD: files.mca,v 1.10 2001/04/19 17:17:29 jdolecek Exp $
# #
# Config.new file and device description for machine-independent MCA code. # Config.new file and device description for machine-independent MCA code.
# Included by ports that need it. # Included by ports that need it.
@ -41,10 +41,10 @@ attach ate at mca with ate_mca
file dev/mca/if_ate_mca.c ate_mca file dev/mca/if_ate_mca.c ate_mca
# ESDI controllers & disks # ESDI controllers & disks
device dasd { } device edc { }
attach dasd at mca with dasd_mca attach edc at mca with edc_mca
file dev/mca/dasd_mca.c dasd_mca file dev/mca/edc_mca.c edc_mca
device ed: disk device ed: disk
attach ed at dasd with ed_mca attach ed at edc with ed_mca
file dev/mca/ed_mca.c ed_mca needs-flag file dev/mca/ed_mca.c ed_mca needs-flag