Add support for the CMD PCI646U. Linux claims that this driver is brocken

with UDMA, so enable Ultra-DMA only if "options PCIIDE_CMD0646U_UDMA" is set.
This commit is contained in:
bouyer 2000-08-02 20:23:45 +00:00
parent a09c11603b
commit bd0766459c
2 changed files with 19 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: pciide.c,v 1.82 2000/08/01 21:02:55 bouyer Exp $ */
/* $NetBSD: pciide.c,v 1.83 2000/08/02 20:23:45 bouyer Exp $ */
/*
@ -2201,6 +2201,21 @@ cmd0643_9_chip_map(sc, pa)
if (rev >= CMD0646U2_REV) {
sc->sc_wdcdev.cap |= WDC_CAPABILITY_UDMA;
sc->sc_wdcdev.UDMA_cap = 2;
} else if (rev >= CMD0646U_REV) {
/*
* Linux's driver claims that the 646U is broken
* with UDMA. Only enable it if we know what we're
* doing
*/
#ifdef PCIIDE_CMD0646U_UDMA
sc->sc_wdcdev.cap |= WDC_CAPABILITY_UDMA;
sc->sc_wdcdev.UDMA_cap = 2;
#endif
/* explicitely disable UDMA */
pciide_pci_write(sc->sc_pc, sc->sc_tag,
CMD_UDMATIM(0), 0);
pciide_pci_write(sc->sc_pc, sc->sc_tag,
CMD_UDMATIM(1), 0);
}
sc->sc_wdcdev.irqack = cmd646_9_irqack;
break;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pciide_cmd_reg.h,v 1.8 2000/08/01 21:02:56 bouyer Exp $ */
/* $NetBSD: pciide_cmd_reg.h,v 1.9 2000/08/02 20:23:46 bouyer Exp $ */
/*
* Copyright (c) 1998 Manuel Bouyer.
@ -37,8 +37,9 @@
* Available from http://www.cmd.com/
*/
/* revision of the 0646U2 */
/* Interesting revision of the 0646 */
#define CMD0646U2_REV 0x05
#define CMD0646U_REV 0x03
/* Configuration (RO) */
#define CMD_CONF 0x50