aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/aac/aac_pci.c
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2003-03-26 17:50:11 +0000
committerScott Long <scottl@FreeBSD.org>2003-03-26 17:50:11 +0000
commita6d35632f54d08ba6cf4ab1caa7104df86622feb (patch)
tree92e990283b189ad46204b84551373713cdfe2f3d /sys/dev/aac/aac_pci.c
parent11f3a6e295cd466b27619162038109128ffe787c (diff)
downloadsrc-a6d35632f54d08ba6cf4ab1caa7104df86622feb.tar.gz
src-a6d35632f54d08ba6cf4ab1caa7104df86622feb.zip
Begin support for 64-bit address support and workarounds for newer cards:
- Add data structuress for doing 64-bit scatter/gather - Move busdma tag creations around so that only the parent is created in aac_pci.c. - Retrieve the capabilities word from the firmware before setting up command structures and tags. This allows the driver to decide whether to do 64-bit commands, and if work-arounds are needed for systems with >2GB of RAM. - Only enable the SCSI passthrough if it's enabled in the capabilities word in the firmware. This should fix problems with the 2120S and 2200S cards in systems with more than 2GB of RAM. Full 64-bit support is forthcoming. MFC-After: 1 week
Notes
Notes: svn path=/head/; revision=112679
Diffstat (limited to 'sys/dev/aac/aac_pci.c')
-rw-r--r--sys/dev/aac/aac_pci.c83
1 files changed, 25 insertions, 58 deletions
diff --git a/sys/dev/aac/aac_pci.c b/sys/dev/aac/aac_pci.c
index 85fed9d7d89a..8875502715a0 100644
--- a/sys/dev/aac/aac_pci.c
+++ b/sys/dev/aac/aac_pci.c
@@ -92,40 +92,40 @@ struct aac_ident
int quirks;
char *desc;
} aac_identifiers[] = {
- {0x1028, 0x0001, 0x1028, 0x0001, AAC_HWIF_I960RX, AAC_QUIRK_NOCAM,
+ {0x1028, 0x0001, 0x1028, 0x0001, AAC_HWIF_I960RX, 0,
"Dell PERC 2/Si"},
- {0x1028, 0x0002, 0x1028, 0x0002, AAC_HWIF_I960RX, AAC_QUIRK_NOCAM,
+ {0x1028, 0x0002, 0x1028, 0x0002, AAC_HWIF_I960RX, 0,
"Dell PERC 3/Di"},
- {0x1028, 0x0003, 0x1028, 0x0003, AAC_HWIF_I960RX, AAC_QUIRK_NOCAM,
+ {0x1028, 0x0003, 0x1028, 0x0003, AAC_HWIF_I960RX, 0,
"Dell PERC 3/Si"},
- {0x1028, 0x0004, 0x1028, 0x00d0, AAC_HWIF_I960RX, AAC_QUIRK_NOCAM,
+ {0x1028, 0x0004, 0x1028, 0x00d0, AAC_HWIF_I960RX, 0,
"Dell PERC 3/Si"},
- {0x1028, 0x0002, 0x1028, 0x00d1, AAC_HWIF_I960RX, AAC_QUIRK_NOCAM,
+ {0x1028, 0x0002, 0x1028, 0x00d1, AAC_HWIF_I960RX, 0,
"Dell PERC 3/Di"},
- {0x1028, 0x0002, 0x1028, 0x00d9, AAC_HWIF_I960RX, AAC_QUIRK_NOCAM,
+ {0x1028, 0x0002, 0x1028, 0x00d9, AAC_HWIF_I960RX, 0,
"Dell PERC 3/Di"},
- {0x1028, 0x0008, 0x1028, 0x00cf, AAC_HWIF_I960RX, AAC_QUIRK_NOCAM,
+ {0x1028, 0x0008, 0x1028, 0x00cf, AAC_HWIF_I960RX, 0,
"Dell PERC 3/Di"},
- {0x1028, 0x000a, 0x1028, 0x0106, AAC_HWIF_I960RX, AAC_QUIRK_NOCAM,
+ {0x1028, 0x000a, 0x1028, 0x0106, AAC_HWIF_I960RX, 0,
"Dell PERC 3/Di"},
- {0x1028, 0x000a, 0x1028, 0x011b, AAC_HWIF_I960RX, AAC_QUIRK_NOCAM,
+ {0x1028, 0x000a, 0x1028, 0x011b, AAC_HWIF_I960RX, 0,
"Dell PERC 3/Di"},
- {0x1028, 0x000a, 0x1028, 0x0121, AAC_HWIF_I960RX, AAC_QUIRK_NOCAM,
+ {0x1028, 0x000a, 0x1028, 0x0121, AAC_HWIF_I960RX, 0,
"Dell PERC 3/Di"},
- {0x1011, 0x0046, 0x9005, 0x0364, AAC_HWIF_STRONGARM, AAC_QUIRK_NOCAM,
+ {0x1011, 0x0046, 0x9005, 0x0364, AAC_HWIF_STRONGARM, 0,
"Adaptec AAC-364"},
- {0x1011, 0x0046, 0x9005, 0x0365, AAC_HWIF_STRONGARM, AAC_QUIRK_NOCAM,
+ {0x1011, 0x0046, 0x9005, 0x0365, AAC_HWIF_STRONGARM, 0,
"Adaptec SCSI RAID 5400S"},
- {0x1011, 0x0046, 0x9005, 0x1364, AAC_HWIF_STRONGARM, AAC_QUIRK_NOCAM |
- AAC_QUIRK_PERC2QC, "Dell PERC 2/QC"},
- {0x1011, 0x0046, 0x103c, 0x10c2, AAC_HWIF_STRONGARM, AAC_QUIRK_NOCAM,
+ {0x1011, 0x0046, 0x9005, 0x1364, AAC_HWIF_STRONGARM, AAC_FLAGS_PERC2QC,
+ "Dell PERC 2/QC"},
+ {0x1011, 0x0046, 0x103c, 0x10c2, AAC_HWIF_STRONGARM, 0,
"HP NetRaid-4M"},
- {0x9005, 0x0285, 0x9005, 0x0285, AAC_HWIF_I960RX, 0,
- "Adaptec SCSI RAID 2200S"},
- {0x9005, 0x0285, 0x1028, 0x0287, AAC_HWIF_I960RX, 0,
- "Dell PERC 320/DC"},
- {0x9005, 0x0285, 0x9005, 0x0286, AAC_HWIF_I960RX, 0,
- "Adaptec SCSI RAID 2120S"},
+ {0x9005, 0x0285, 0x9005, 0x0285, AAC_HWIF_I960RX, AAC_FLAGS_NO4GB |
+ AAC_FLAGS_256FIBS, "Adaptec SCSI RAID 2200S"},
+ {0x9005, 0x0285, 0x1028, 0x0287, AAC_HWIF_I960RX, AAC_FLAGS_NO4GB |
+ AAC_FLAGS_256FIBS, "Dell PERC 320/DC"},
+ {0x9005, 0x0285, 0x9005, 0x0286, AAC_HWIF_I960RX, AAC_FLAGS_NO4GB |
+ AAC_FLAGS_256FIBS, "Adaptec SCSI RAID 2120S"},
{0, 0, 0, 0, 0, 0, 0}
};
@@ -239,51 +239,18 @@ aac_pci_attach(device_t dev)
*/
if (bus_dma_tag_create(NULL, /* parent */
PAGE_SIZE, 0, /* algnmnt, boundary */
- BUS_SPACE_MAXADDR_32BIT, /* lowaddr */
+ BUS_SPACE_MAXADDR, /* lowaddr */
BUS_SPACE_MAXADDR, /* highaddr */
NULL, NULL, /* filter, filterarg */
- MAXBSIZE, /* maxsize */
+ BUS_SPACE_MAXSIZE_32BIT, /* maxsize */
AAC_MAXSGENTRIES, /* nsegments */
BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */
- BUS_DMA_ALLOCNOW, /* flags */
+ 0, /* flags */
&sc->aac_parent_dmat)) {
device_printf(sc->aac_dev, "can't allocate parent DMA tag\n");
goto out;
}
- /*
- * Create DMA tag for mapping buffers into controller-addressable space.
- */
- if (bus_dma_tag_create(sc->aac_parent_dmat, /* parent */
- 1, 0, /* algnmnt, boundary */
- BUS_SPACE_MAXADDR_32BIT, /* lowaddr */
- BUS_SPACE_MAXADDR, /* highaddr */
- NULL, NULL, /* filter, filterarg */
- MAXBSIZE, AAC_MAXSGENTRIES, /* maxsize, nsegments */
- BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */
- 0, /* flags */
- &sc->aac_buffer_dmat)) {
- device_printf(sc->aac_dev, "can't allocate buffer DMA tag\n");
- goto out;
- }
-
- /*
- * Create DMA tag for mapping FIBs into controller-addressable space..
- */
- if (bus_dma_tag_create(sc->aac_parent_dmat, /* parent */
- 1, 0, /* algnmnt, boundary */
- BUS_SPACE_MAXADDR_32BIT, /* lowaddr */
- BUS_SPACE_MAXADDR, /* highaddr */
- NULL, NULL, /* filter, filterarg */
- AAC_FIB_COUNT *
- sizeof(struct aac_fib), 1, /* maxsize, nsegments */
- BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */
- 0, /* flags */
- &sc->aac_fib_dmat)) {
- device_printf(sc->aac_dev, "can't allocate FIB DMA tag\n");;
- goto out;
- }
-
/*
* Detect the hardware interface version, set up the bus interface
* indirection.
@@ -312,7 +279,7 @@ aac_pci_attach(device_t dev)
}
/* Set up quirks */
- sc->quirks = aac_identifiers[i].quirks;
+ sc->flags = aac_identifiers[i].quirks;
break;
}