From b3ffb6e4abbfb893fa4db4329499a0f9637d352c Mon Sep 17 00:00:00 2001 From: thorpej Date: Fri, 24 Jan 2003 05:51:04 +0000 Subject: [PATCH] * Enable Ultra133 on the NVIDIA nForce 2. * Make sure to test for PCI_VENDOR_AMD before testing for any AMD products. --- sys/dev/pci/pciide.c | 9 +++++---- sys/dev/pci/pciide_amd_reg.h | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/dev/pci/pciide.c b/sys/dev/pci/pciide.c index 9b91b7b2a304..6555bad2780c 100644 --- a/sys/dev/pci/pciide.c +++ b/sys/dev/pci/pciide.c @@ -1,4 +1,4 @@ -/* $NetBSD: pciide.c,v 1.177 2003/01/24 04:53:13 thorpej Exp $ */ +/* $NetBSD: pciide.c,v 1.178 2003/01/24 05:51:04 thorpej Exp $ */ /* @@ -76,7 +76,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pciide.c,v 1.177 2003/01/24 04:53:13 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pciide.c,v 1.178 2003/01/24 05:51:04 thorpej Exp $"); #ifndef WDCDEBUG #define WDCDEBUG @@ -2056,7 +2056,7 @@ amd7x6_chip_map(sc, pa) sc->sc_wdcdev.UDMA_cap = 5; break; case PCI_PRODUCT_NVIDIA_NFORCE2_ATA133: - sc->sc_wdcdev.UDMA_cap = 5; /* XXX */ + sc->sc_wdcdev.UDMA_cap = 6; break; } sc->sc_amd_regbase = AMD7X6_NVIDIA_REGBASE; @@ -2154,7 +2154,8 @@ amd7x6_setup_channel(chp) * PCIIDE_AMD756_ENABLEDMA. It causes a hard hang if * triggered. */ - if (sc->sc_pp->ide_product == + if (sc->sc_pci_vendor == PCI_VENDOR_AMD && + sc->sc_pp->ide_product == PCI_PRODUCT_AMD_PBC756_IDE && AMD756_CHIPREV_DISABLEDMA(rev)) { printf("%s:%d:%d: multi-word DMA disabled due " diff --git a/sys/dev/pci/pciide_amd_reg.h b/sys/dev/pci/pciide_amd_reg.h index 9c0a342a0a58..3dbccc8ac354 100644 --- a/sys/dev/pci/pciide_amd_reg.h +++ b/sys/dev/pci/pciide_amd_reg.h @@ -1,4 +1,4 @@ -/* $NetBSD: pciide_amd_reg.h,v 1.5 2003/01/24 04:53:14 thorpej Exp $ */ +/* $NetBSD: pciide_amd_reg.h,v 1.6 2003/01/24 05:51:04 thorpej Exp $ */ /* * Copyright (c) 2000 David Sainty. @@ -87,4 +87,4 @@ static const int8_t amd7x6_pio_rec[] = {0x08, 0x08, 0x08, 0x02, 0x00}; (((1 - (channel)) << 4) + ((1 - (drive)) << 3))) static const int8_t amd7x6_udma_tim[] __attribute__((__unused__)) = - {0x02, 0x01, 0x00, 0x04, 0x05, 0x06}; + {0x02, 0x01, 0x00, 0x04, 0x05, 0x06, 0x07};