diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2002-03-26 16:50:13 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2002-03-26 16:50:13 +0000 |
commit | 98f6aab0a210e093d82725405a0106e5f2fb129c (patch) | |
tree | c1d3b7c60d1f4f7465d0c786dda621c1a2906774 | |
parent | b4a099cb6878ac17ebee48fd20bfae6887c0d8ff (diff) |
On the wdc_obio controller if one device is UDMA capable and one is not,
downgrade the UDMA device to DMA. Works around a problem with old combo
drives on some Apple machines.
-rw-r--r-- | sys/arch/macppc/dev/wdc_obio.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/sys/arch/macppc/dev/wdc_obio.c b/sys/arch/macppc/dev/wdc_obio.c index c1b046b63ae..d7b40dbd250 100644 --- a/sys/arch/macppc/dev/wdc_obio.c +++ b/sys/arch/macppc/dev/wdc_obio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wdc_obio.c,v 1.5 2002/03/14 01:26:36 millert Exp $ */ +/* $OpenBSD: wdc_obio.c,v 1.6 2002/03/26 16:50:12 drahn Exp $ */ /* $NetBSD: wdc_obio.c,v 1.15 2001/07/25 20:26:33 bouyer Exp $ */ /*- @@ -365,6 +365,8 @@ wdc_obio_ata4_adjust_timing(chp) if (drvp->drive_flags & DRIVE_UDMA) { if (udmamode == -1 || udmamode > drvp->UDMA_mode) udmamode = drvp->UDMA_mode; + } else { + udmamode = -2; } } if (piomode == -1) @@ -375,10 +377,19 @@ wdc_obio_ata4_adjust_timing(chp) drvp->PIO_mode = piomode; if (drvp->drive_flags & DRIVE_DMA) drvp->DMA_mode = dmamode; - if (drvp->drive_flags & DRIVE_UDMA) - drvp->UDMA_mode = udmamode; + if (drvp->drive_flags & DRIVE_UDMA) { + if (udmamode == -2) { + drvp->drive_flags &= ~DRIVE_UDMA; + } else { + drvp->UDMA_mode = udmamode; + } + } } } + + if (udmamode == -2) + udmamode = -1; + min_cycle = pio_timing[piomode].cycle; min_active = pio_timing[piomode].active; |