aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/amr/amr_pci.c
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2004-12-05 23:48:17 +0000
committerScott Long <scottl@FreeBSD.org>2004-12-05 23:48:17 +0000
commitdc0ff2140bedd8d151ca14867f4d0168fdbb7416 (patch)
tree9eea5a1c633325715743c7bf5c0ce5678ab4b4c6 /sys/dev/amr/amr_pci.c
parentec3724d9d012230086b02bf2db4e0841b00ff023 (diff)
downloadsrc-dc0ff2140bedd8d151ca14867f4d0168fdbb7416.tar.gz
src-dc0ff2140bedd8d151ca14867f4d0168fdbb7416.zip
Fix a number of bugs and significantly alter the command execution path to
properly support bounce buffers and resource shortages. This allows the driver to work properly and reliably with more than 4GB of RAM. Of the three data paths that exist in the driver, (block, CAM, ioctl), the ioctl path has not been well tested with these changes due to difficulty with finding an application that uses it that actually works. Sponsored by: The FreeBSD Foundation and FreeBSD Systems, Inc.
Notes
Notes: svn path=/head/; revision=138422
Diffstat (limited to 'sys/dev/amr/amr_pci.c')
-rw-r--r--sys/dev/amr/amr_pci.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/amr/amr_pci.c b/sys/dev/amr/amr_pci.c
index aa4094b5a7bf..f4cf4ac4356e 100644
--- a/sys/dev/amr/amr_pci.c
+++ b/sys/dev/amr/amr_pci.c
@@ -253,7 +253,7 @@ amr_pci_attach(device_t dev)
NULL, NULL, /* filter, filterarg */
MAXBSIZE, AMR_NSEG, /* maxsize, nsegments */
BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */
- BUS_DMA_ALLOCNOW, /* flags */
+ 0, /* flags */
NULL, NULL, /* lockfunc, lockarg */
&sc->amr_parent_dmat)) {
device_printf(dev, "can't allocate parent DMA tag\n");
@@ -265,12 +265,12 @@ amr_pci_attach(device_t dev)
*/
if (bus_dma_tag_create(sc->amr_parent_dmat, /* parent */
1, 0, /* alignment, boundary */
- BUS_SPACE_MAXADDR, /* lowaddr */
+ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */
BUS_SPACE_MAXADDR, /* highaddr */
NULL, NULL, /* filter, filterarg */
MAXBSIZE, AMR_NSEG, /* maxsize, nsegments */
- BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */
- 0, /* flags */
+ MAXBSIZE, /* maxsegsize */
+ BUS_DMA_ALLOCNOW, /* flags */
busdma_lock_mutex, &Giant, /* lockfunc, lockarg */
&sc->amr_buffer_dmat)) {
device_printf(sc->amr_dev, "can't allocate buffer DMA tag\n");
@@ -506,7 +506,7 @@ amr_sglist_map(struct amr_softc *sc)
segsize = sizeof(struct amr_sgentry) * AMR_NSEG * AMR_MAXCMD;
error = bus_dma_tag_create(sc->amr_parent_dmat, /* parent */
1, 0, /* alignment, boundary */
- BUS_SPACE_MAXADDR, /* lowaddr */
+ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */
BUS_SPACE_MAXADDR, /* highaddr */
NULL, NULL, /* filter, filterarg */
segsize, 1, /* maxsize, nsegments */
@@ -578,7 +578,7 @@ amr_setup_mbox(struct amr_softc *sc)
*/
error = bus_dma_tag_create(sc->amr_parent_dmat, /* parent */
16, 0, /* alignment, boundary */
- BUS_SPACE_MAXADDR, /* lowaddr */
+ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */
BUS_SPACE_MAXADDR, /* highaddr */
NULL, NULL, /* filter, filterarg */
sizeof(struct amr_mailbox) + 16, 1, /* maxsize, nsegments */