From d7cd375c47367463987b9b26cfa787a905fa419e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Schmidt?= Date: Fri, 11 Aug 2006 21:19:29 +0000 Subject: Unbreak nForce4 SATA support. Hopefully I dont break something else this time..... --- sys/dev/ata/ata-chipset.c | 14 +++++++------- sys/dev/ata/ata-pci.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/dev/ata/ata-chipset.c b/sys/dev/ata/ata-chipset.c index 9e5b4c2f4432..86d6e3023a66 100644 --- a/sys/dev/ata/ata-chipset.c +++ b/sys/dev/ata/ata-chipset.c @@ -2778,11 +2778,11 @@ ata_nvidia_ident(device_t dev) { ATA_NFORCE_CK804_S1, 0, 0, NV4, ATA_SA300, "nForce CK804" }, { ATA_NFORCE_CK804_S2, 0, 0, NV4, ATA_SA300, "nForce CK804" }, { ATA_NFORCE_MCP51, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nForce MCP51" }, - { ATA_NFORCE_MCP51_S1, 0, 0, NV4LONG, ATA_SA300, "nForce MCP51" }, - { ATA_NFORCE_MCP51_S2, 0, 0, NV4LONG, ATA_SA300, "nForce MCP51" }, + { ATA_NFORCE_MCP51_S1, 0, 0, NV4|NVQ, ATA_SA300, "nForce MCP51" }, + { ATA_NFORCE_MCP51_S2, 0, 0, NV4|NVQ, ATA_SA300, "nForce MCP51" }, { ATA_NFORCE_MCP55, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nForce MCP55" }, - { ATA_NFORCE_MCP55_S1, 0, 0, NV4LONG, ATA_SA300, "nForce MCP55" }, - { ATA_NFORCE_MCP55_S2, 0, 0, NV4LONG, ATA_SA300, "nForce MCP55" }, + { ATA_NFORCE_MCP55_S1, 0, 0, NV4|NVQ, ATA_SA300, "nForce MCP55" }, + { ATA_NFORCE_MCP55_S2, 0, 0, NV4|NVQ, ATA_SA300, "nForce MCP55" }, { 0, 0, 0, 0, 0, 0}} ; char buffer[64] ; @@ -2821,7 +2821,7 @@ ata_nvidia_chipinit(device_t dev) /* enable control access */ pci_write_config(dev, 0x50, pci_read_config(dev, 0x50, 1) | 0x04,1); - if (ctlr->chip->cfg2 & NV4LONG) { + if (ctlr->chip->cfg2 & NVQ) { /* clear interrupt status */ ATA_OUTL(ctlr->r_res2, offset, 0x00ff00ff); @@ -2881,11 +2881,11 @@ ata_nvidia_status(device_t dev) struct ata_channel *ch = device_get_softc(dev); int offset = ctlr->chip->cfg2 & NV4 ? 0x0440 : 0x0010; struct ata_connect_task *tp; - int shift = ch->unit << (ctlr->chip->cfg2 & NV4LONG ? 4 : 2); + int shift = ch->unit << (ctlr->chip->cfg2 & NVQ ? 4 : 2); u_int32_t status; /* get and clear interrupt status */ - if (ctlr->chip->cfg2 & NV4LONG) { + if (ctlr->chip->cfg2 & NVQ) { status = ATA_INL(ctlr->r_res2, offset); ATA_OUTL(ctlr->r_res2, offset, (0x0f << shift)); } diff --git a/sys/dev/ata/ata-pci.h b/sys/dev/ata/ata-pci.h index cdcb17901877..49d0de5b29dc 100644 --- a/sys/dev/ata/ata-pci.h +++ b/sys/dev/ata/ata-pci.h @@ -392,7 +392,7 @@ struct ata_connect_task { #define AMDBUG 0x0002 #define NVIDIA 0x0004 #define NV4 0x0010 -#define NV4LONG 0x0030 +#define NVQ 0x0020 #define VIACLK 0x0100 #define VIABUG 0x0200 #define VIABAR 0x0400 -- cgit v1.2.3