diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2004-08-25 21:00:38 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2004-08-25 21:00:38 +0000 |
commit | ed289beab17eb705994e0607310ff1f5dadd38c9 (patch) | |
tree | 772a1fd060fed287cf6f77b439100bd55209aaf0 /sys | |
parent | f5006eba1c3736a687553bccba1f67cc6d21fb18 (diff) |
Allow DMA transfers to be disabled through device flags; default is to enable
DMA.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/hp300/conf/GENERIC | 4 | ||||
-rw-r--r-- | sys/arch/hp300/conf/RAMDISK | 4 | ||||
-rw-r--r-- | sys/arch/hp300/dev/spc.c | 11 |
3 files changed, 12 insertions, 7 deletions
diff --git a/sys/arch/hp300/conf/GENERIC b/sys/arch/hp300/conf/GENERIC index 9ea6c96e91c..1fffdc7814d 100644 --- a/sys/arch/hp300/conf/GENERIC +++ b/sys/arch/hp300/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.31 2004/08/03 21:46:54 miod Exp $ +# $OpenBSD: GENERIC,v 1.32 2004/08/25 21:00:37 miod Exp $ # $NetBSD: GENERIC,v 1.23 1997/01/31 06:12:57 thorpej Exp $ # # Generic kernel - one size fits all. @@ -110,7 +110,7 @@ ct* at hpibbus? slave ? punit ? # HP-IB cartridge tapes mt* at hpibbus? slave ? punit ? # HP-IB 9-track tape ppi0 at hpibbus0 slave 5 punit 0 # HP-IB plotter -spc* at dio? scode ? # SCSI controller +spc* at dio? scode ? flags 0x00 # SCSI controller scsibus* at spc? sd* at scsibus? target ? lun ? # SCSI disks diff --git a/sys/arch/hp300/conf/RAMDISK b/sys/arch/hp300/conf/RAMDISK index 41ee06bb3bb..57f8beb4967 100644 --- a/sys/arch/hp300/conf/RAMDISK +++ b/sys/arch/hp300/conf/RAMDISK @@ -1,4 +1,4 @@ -# $OpenBSD: RAMDISK,v 1.18 2004/08/22 21:31:33 miod Exp $ +# $OpenBSD: RAMDISK,v 1.19 2004/08/25 21:00:37 miod Exp $ # # Ram disk kernel. # @@ -117,7 +117,7 @@ hd* at hpibbus? slave ? punit ? # HP-IB disks ct* at hpibbus? slave ? punit ? # HP-IB cartridge tapes mt* at hpibbus? slave ? punit ? # HP-IB 9-track tape -spc* at dio? scode ? # SCSI controller +spc* at dio? scode ? flags 0x00 # SCSI controller scsibus* at spc? sd* at scsibus? target ? lun ? # SCSI disks diff --git a/sys/arch/hp300/dev/spc.c b/sys/arch/hp300/dev/spc.c index dc04a869107..7fa89855b19 100644 --- a/sys/arch/hp300/dev/spc.c +++ b/sys/arch/hp300/dev/spc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spc.c,v 1.6 2004/08/25 20:57:38 miod Exp $ */ +/* $OpenBSD: spc.c,v 1.7 2004/08/25 21:00:37 miod Exp $ */ /* $NetBSD: spc.c,v 1.2 2003/11/17 14:37:59 tsutsui Exp $ */ /* @@ -84,6 +84,9 @@ struct cfdriver spc_cd = { NULL, "spc", DV_DULL }; +/* cf_flags */ +#define SPC_NODMA 0x01 + int spc_dio_match(struct device *parent, void *vcf, void *aux) { @@ -140,8 +143,10 @@ spc_dio_attach(struct device *parent, struct device *self, void *aux) sc->sc_initiator = id; - sc->sc_dma_start = spc_dio_dmastart; - sc->sc_dma_done = spc_dio_dmadone; + if ((sc->sc_dev.dv_cfdata->cf_flags & SPC_NODMA) == 0) { + sc->sc_dma_start = spc_dio_dmastart; + sc->sc_dma_done = spc_dio_dmadone; + } sc->sc_reset = spc_dio_reset; dsc->sc_dq.dq_softc = dsc; |