add a udma_mode field to wdc_softc, and use it the same way dma_mode is used

(higthest ultra-dma mode supported). There may be a higther ultra-dma mode
defined ...
This commit is contained in:
bouyer 1998-12-03 15:38:59 +00:00
parent 1b04131eff
commit 2b28c858d8
3 changed files with 10 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: wdc.c,v 1.49 1998/12/02 15:53:34 bouyer Exp $ */
/* $NetBSD: wdc.c,v 1.50 1998/12/03 15:38:59 bouyer Exp $ */
/*
@ -841,12 +841,10 @@ wdc_probe_caps(drvp)
continue;
printf("%s UDMA mode %d", sep, i);
sep = ",";
/*
* ATA-4 specs says if a mode is supported,
* all lower modes shall be supported.
* No need to look further.
*/
if (wdc->cap & WDC_CAPABILITY_UDMA) {
if ((wdc->cap & WDC_CAPABILITY_MODE) &&
wdc->udma_mode < i)
continue;
drvp->UDMA_mode = i;
drvp->UDMA_cap = i;
drvp->drive_flags |= DRIVE_UDMA;

View File

@ -1,4 +1,4 @@
/* $NetBSD: wdcvar.h,v 1.11 1998/12/02 15:53:35 bouyer Exp $ */
/* $NetBSD: wdcvar.h,v 1.12 1998/12/03 15:38:59 bouyer Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -92,6 +92,7 @@ struct wdc_softc { /* Per controller state */
#define WDC_CAPABILITY_NO_EXTRA_RESETS 0x0100 /* only reset once */
u_int8_t pio_mode; /* highest PIO mode supported */
u_int8_t dma_mode; /* highest DMA mode supported */
u_int8_t udma_mode; /* highest UDMA mode supported */
int nchannels; /* Number of channels on this controller */
struct channel_softc **channels; /* channels-specific datas (array) */

View File

@ -1,4 +1,4 @@
/* $NetBSD: pciide.c,v 1.24 1998/12/03 13:50:38 bouyer Exp $ */
/* $NetBSD: pciide.c,v 1.25 1998/12/03 15:38:59 bouyer Exp $ */
/*
* Copyright (c) 1996, 1998 Christopher G. Demetriou. All rights reserved.
@ -1181,6 +1181,7 @@ piix_setup_cap(sc)
WDC_CAPABILITY_DMA;
sc->sc_wdcdev.pio_mode = 4;
sc->sc_wdcdev.dma_mode = 2;
sc->sc_wdcdev.udma_mode = 2;
}
void
@ -1547,6 +1548,7 @@ apollo_setup_cap(sc)
WDC_CAPABILITY_DMA;
sc->sc_wdcdev.pio_mode = 4;
sc->sc_wdcdev.dma_mode = 2;
sc->sc_wdcdev.udma_mode = 2;
}
void
@ -1906,6 +1908,7 @@ sis_setup_cap(sc)
WDC_CAPABILITY_DMA | WDC_CAPABILITY_UDMA;
sc->sc_wdcdev.pio_mode = 4;
sc->sc_wdcdev.dma_mode = 2;
sc->sc_wdcdev.udma_mode = 2;
}
void