diff options
Diffstat (limited to 'sys/arch')
-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; |