summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>1999-10-28 19:59:28 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>1999-10-28 19:59:28 +0000
commit285f8809474ef89dec537b3b4c39c14d080002d1 (patch)
tree11ee19ca45cdd27a0cbbc9efe73834cf3d673178 /sys/dev/ic
parent3b546b79efeab130bec997fd1a1a751a92eb52f4 (diff)
Downgrade to mode 2 first if we were udma > 2; from NetBSD. costa@ ok.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/wdc.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/dev/ic/wdc.c b/sys/dev/ic/wdc.c
index 270ebaff974..620c74a9ec7 100644
--- a/sys/dev/ic/wdc.c
+++ b/sys/dev/ic/wdc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wdc.c,v 1.10 1999/10/09 03:42:04 csapuntz Exp $ */
+/* $OpenBSD: wdc.c,v 1.11 1999/10/28 19:59:27 fgsch Exp $ */
/* $NetBSD: wdc.c,v 1.68 1999/06/23 19:00:17 bouyer Exp $ */
@@ -1045,6 +1045,16 @@ wdc_downgrade_mode(drvp)
return 0;
/*
+ * If we were using Ultra-DMA mode > 2, downgrade to mode 2 first.
+ * Maybe we didn't properly notice the cable type
+ */
+ if ((drvp->drive_flags & DRIVE_UDMA) && drvp->UDMA_mode > 2) {
+ drvp->UDMA_mode = 2;
+ printf("%s: transfer error, downgrading to DMA mode %d\n",
+ drv_dev->dv_xname, drvp->UDMA_mode);
+ }
+
+ /*
* If we were using ultra-DMA, don't downgrade to multiword DMA
* if we noticed a CRC error. It has been noticed that CRC errors
* in ultra-DMA lead to silent data corruption in multiword DMA.