summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2004-09-10 10:31:37 +0000
committersos <sos@FreeBSD.org>2004-09-10 10:31:37 +0000
commit7c3c92e15d210b1c0ccf7383ffb6f4259e5b4fda (patch)
tree374e5a78471b99202a6a1c25b0ca3370c55df366
parent932b912ae28a5bfd99565c98c1d2a0799b69c4bb (diff)
downloadFreeBSD-src-7c3c92e15d210b1c0ccf7383ffb6f4259e5b4fda.zip
FreeBSD-src-7c3c92e15d210b1c0ccf7383ffb6f4259e5b4fda.tar.gz
Reduce the amount of memory reported to busdma.
This made the requirements for bouncebuffers too big with PAE. Cleanup the way size defines for transfers are implemented.
-rw-r--r--sys/dev/ata/ata-chipset.c10
-rw-r--r--sys/dev/ata/ata-dma.c8
2 files changed, 10 insertions, 8 deletions
diff --git a/sys/dev/ata/ata-chipset.c b/sys/dev/ata/ata-chipset.c
index 9abd1d6..637f663 100644
--- a/sys/dev/ata/ata-chipset.c
+++ b/sys/dev/ata/ata-chipset.c
@@ -546,7 +546,7 @@ ata_cyrix_setmode(struct ata_device *atadev, int mode)
int error;
atadev->channel->dma->alignment = 16;
- atadev->channel->dma->max_iosize = 63 * 1024;
+ atadev->channel->dma->max_iosize = 126 * DEV_BSIZE;
mode = ata_limit_mode(atadev, mode, ATA_UDMA2);
@@ -1067,7 +1067,7 @@ ata_national_setmode(struct ata_device *atadev, int mode)
int error;
atadev->channel->dma->alignment = 16;
- atadev->channel->dma->max_iosize = 63 * 1024;
+ atadev->channel->dma->max_iosize = 126 * DEV_BSIZE;
mode = ata_limit_mode(atadev, mode, ATA_UDMA2);
@@ -2157,8 +2157,10 @@ ata_sii_allocate(device_t dev, struct ata_channel *ch)
if (ctlr->chip->max_dma >= ATA_SA150)
ch->flags |= ATA_NO_SLAVE;
- if ((ctlr->chip->cfg2 & SIIBUG) && ch->dma)
- ch->dma->boundary = 8 * 1024;
+ if ((ctlr->chip->cfg2 & SIIBUG) && ch->dma) {
+ ch->dma->boundary = 16 * DEV_BSIZE;
+ ch->dma->max_iosize = 15 * DEV_BSIZE;
+ }
ata_generic_hw(ch);
diff --git a/sys/dev/ata/ata-dma.c b/sys/dev/ata/ata-dma.c
index 644755d..051d8c2 100644
--- a/sys/dev/ata/ata-dma.c
+++ b/sys/dev/ata/ata-dma.c
@@ -75,8 +75,8 @@ ata_dmainit(struct ata_channel *ch)
ch->dma->load = ata_dmaload;
ch->dma->unload = ata_dmaunload;
ch->dma->alignment = 2;
- ch->dma->max_iosize = 64 * 1024;
- ch->dma->boundary = 64 * 1024;
+ ch->dma->max_iosize = 128 * DEV_BSIZE;
+ ch->dma->boundary = 128 * DEV_BSIZE;
}
}
@@ -96,7 +96,7 @@ ata_dmaalloc(struct ata_channel *ch)
if (bus_dma_tag_create(NULL, ch->dma->alignment, 0,
BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR,
- NULL, NULL, 16*1024*1024,
+ NULL, NULL, 256 * DEV_BSIZE,
ATA_DMA_ENTRIES, ch->dma->max_iosize,
BUS_DMA_ALLOCNOW, NULL, NULL, &ch->dma->dmatag))
goto error;
@@ -109,7 +109,7 @@ ata_dmaalloc(struct ata_channel *ch)
if (bus_dma_tag_create(ch->dma->dmatag,ch->dma->alignment,ch->dma->boundary,
BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR,
- NULL, NULL, 16*1024*1024,
+ NULL, NULL, 256 * DEV_BSIZE,
ATA_DMA_ENTRIES, ch->dma->max_iosize,
BUS_DMA_ALLOCNOW, NULL, NULL, &ch->dma->ddmatag))
goto error;
OpenPOWER on IntegriCloud