summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2006-08-11 21:19:29 +0000
committersos <sos@FreeBSD.org>2006-08-11 21:19:29 +0000
commit8657240d0ef31869845607a7a3a29c0fe3f46d41 (patch)
tree618040239931988aa344487bdc069456f966f193
parent707c86ce464655cc21368747d6d2380c3a45d907 (diff)
downloadFreeBSD-src-8657240d0ef31869845607a7a3a29c0fe3f46d41.zip
FreeBSD-src-8657240d0ef31869845607a7a3a29c0fe3f46d41.tar.gz
Unbreak nForce4 SATA support.
Hopefully I dont break something else this time.....
-rw-r--r--sys/dev/ata/ata-chipset.c14
-rw-r--r--sys/dev/ata/ata-pci.h2
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/ata/ata-chipset.c b/sys/dev/ata/ata-chipset.c
index 9e5b4c2..86d6e30 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 cdcb179..49d0de5 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
OpenPOWER on IntegriCloud