summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>2001-04-04 07:29:51 +0000
committerConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>2001-04-04 07:29:51 +0000
commit1221231bf93b54ae324444e29253917845b0945f (patch)
tree154a277aaae9c00ec26e8a3d4132c3df7549cead /sys/dev/ic
parent34820c1a8c8e2054e58e4104ec2891b7d92152a6 (diff)
Lay the groundwork for disabling ATAPI DMA on controllers
where we have trouble. Note, in theory, ATAPI DMA is no different than ATA DMA. "Promise" not to tell anybody
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/wdc.c8
-rw-r--r--sys/dev/ic/wdcvar.h3
2 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/ic/wdc.c b/sys/dev/ic/wdc.c
index 56e6047ee07..0f7f443fe0a 100644
--- a/sys/dev/ic/wdc.c
+++ b/sys/dev/ic/wdc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wdc.c,v 1.29 2001/04/02 19:01:18 art Exp $ */
+/* $OpenBSD: wdc.c,v 1.30 2001/04/04 07:29:50 csapuntz Exp $ */
/* $NetBSD: wdc.c,v 1.68 1999/06/23 19:00:17 bouyer Exp $ */
@@ -1228,6 +1228,12 @@ wdc_probe_caps(drvp, params)
return;
}
drvp->drive_flags |= DRIVE_MODE;
+
+ /* Some controllers don't support ATAPI DMA */
+ if ((drvp->drive_flags & DRIVE_ATAPI) &&
+ (wdc->cap & WDC_CAPABILITY_NO_ATAPI_DMA))
+ return;
+
printed = 0;
for (i = 7; i >= 0; i--) {
if ((params->atap_dmamode_supp & (1 << i)) == 0)
diff --git a/sys/dev/ic/wdcvar.h b/sys/dev/ic/wdcvar.h
index fb2c30b6520..adefd62d2e3 100644
--- a/sys/dev/ic/wdcvar.h
+++ b/sys/dev/ic/wdcvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: wdcvar.h,v 1.16 2001/03/25 13:11:53 csapuntz Exp $ */
+/* $OpenBSD: wdcvar.h,v 1.17 2001/04/04 07:29:50 csapuntz Exp $ */
/* $NetBSD: wdcvar.h,v 1.17 1999/04/11 20:50:29 bouyer Exp $ */
/*-
@@ -154,6 +154,7 @@ struct wdc_softc { /* Per controller state */
#define WDC_CAPABILITY_PREATA 0x0200 /* ctrl can be a pre-ata one */
#define WDC_CAPABILITY_IRQACK 0x0400 /* callback to ack interrupt */
#define WDC_CAPABILITY_SINGLE_DRIVE 0x800 /* Don't proble second drive */
+#define WDC_CAPABILITY_NO_ATAPI_DMA 0x1000 /* Don't do DMA with ATAPI */
u_int8_t PIO_cap; /* highest PIO mode supported */
u_int8_t DMA_cap; /* highest DMA mode supported */
u_int8_t UDMA_cap; /* highest UDMA mode supported */