diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-12-11 11:37:06 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-12-11 11:37:06 -0500 |
commit | 5369bea7d7db1d95f63907f3470e23d32930be98 (patch) | |
tree | b4d9fdf93c10a3f630f26ccad66437e2209ce102 | |
parent | f6718653361e8f8a6aac9946822aa2090edf4f37 (diff) |
[ARM] dma: Use sensible DMA parameters for Acorn drivers
The hardware supports transfers up to a page boundary per buffer.
Currently, we work around that in the DMA code by splitting each
buffer up as we run through the scatterlist. Avoid this by telling
the block layers about the hardware restriction.
Eventually, this will allow us to phase out the splitting code,
but not until the old IDE layer allows us to control the value it
gives to blk_queue_segment_boundary().
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/mach-rpc/include/mach/isa-dma.h | 2 | ||||
-rw-r--r-- | drivers/ata/pata_icside.c | 6 | ||||
-rw-r--r-- | drivers/scsi/arm/cumana_2.c | 3 | ||||
-rw-r--r-- | drivers/scsi/arm/eesox.c | 3 | ||||
-rw-r--r-- | drivers/scsi/arm/powertec.c | 3 |
5 files changed, 10 insertions, 7 deletions
diff --git a/arch/arm/mach-rpc/include/mach/isa-dma.h b/arch/arm/mach-rpc/include/mach/isa-dma.h index bad720548587..67bfc6719c34 100644 --- a/arch/arm/mach-rpc/include/mach/isa-dma.h +++ b/arch/arm/mach-rpc/include/mach/isa-dma.h | |||
@@ -23,5 +23,7 @@ | |||
23 | 23 | ||
24 | #define DMA_FLOPPY DMA_VIRTUAL_FLOPPY | 24 | #define DMA_FLOPPY DMA_VIRTUAL_FLOPPY |
25 | 25 | ||
26 | #define IOMD_DMA_BOUNDARY (PAGE_SIZE - 1) | ||
27 | |||
26 | #endif /* _ASM_ARCH_DMA_H */ | 28 | #endif /* _ASM_ARCH_DMA_H */ |
27 | 29 | ||
diff --git a/drivers/ata/pata_icside.c b/drivers/ata/pata_icside.c index 63121f45ba25..d7bc925c524d 100644 --- a/drivers/ata/pata_icside.c +++ b/drivers/ata/pata_icside.c | |||
@@ -45,8 +45,6 @@ static const struct portinfo pata_icside_portinfo_v6_2 = { | |||
45 | .stepping = 6, | 45 | .stepping = 6, |
46 | }; | 46 | }; |
47 | 47 | ||
48 | #define PATA_ICSIDE_MAX_SG 128 | ||
49 | |||
50 | struct pata_icside_state { | 48 | struct pata_icside_state { |
51 | void __iomem *irq_port; | 49 | void __iomem *irq_port; |
52 | void __iomem *ioc_base; | 50 | void __iomem *ioc_base; |
@@ -295,8 +293,8 @@ static int icside_dma_init(struct pata_icside_info *info) | |||
295 | 293 | ||
296 | static struct scsi_host_template pata_icside_sht = { | 294 | static struct scsi_host_template pata_icside_sht = { |
297 | ATA_BASE_SHT(DRV_NAME), | 295 | ATA_BASE_SHT(DRV_NAME), |
298 | .sg_tablesize = PATA_ICSIDE_MAX_SG, | 296 | .sg_tablesize = SCSI_MAX_SG_CHAIN_SEGMENTS, |
299 | .dma_boundary = ~0, /* no dma boundaries */ | 297 | .dma_boundary = IOMD_DMA_BOUNDARY, |
300 | }; | 298 | }; |
301 | 299 | ||
302 | static void pata_icside_postreset(struct ata_link *link, unsigned int *classes) | 300 | static void pata_icside_postreset(struct ata_link *link, unsigned int *classes) |
diff --git a/drivers/scsi/arm/cumana_2.c b/drivers/scsi/arm/cumana_2.c index 68a64123af8f..8ee01b907332 100644 --- a/drivers/scsi/arm/cumana_2.c +++ b/drivers/scsi/arm/cumana_2.c | |||
@@ -390,7 +390,8 @@ static struct scsi_host_template cumanascsi2_template = { | |||
390 | .eh_abort_handler = fas216_eh_abort, | 390 | .eh_abort_handler = fas216_eh_abort, |
391 | .can_queue = 1, | 391 | .can_queue = 1, |
392 | .this_id = 7, | 392 | .this_id = 7, |
393 | .sg_tablesize = SG_ALL, | 393 | .sg_tablesize = SCSI_MAX_SG_CHAIN_SEGMENTS, |
394 | .dma_boundary = IOMD_DMA_BOUNDARY, | ||
394 | .cmd_per_lun = 1, | 395 | .cmd_per_lun = 1, |
395 | .use_clustering = DISABLE_CLUSTERING, | 396 | .use_clustering = DISABLE_CLUSTERING, |
396 | .proc_name = "cumanascsi2", | 397 | .proc_name = "cumanascsi2", |
diff --git a/drivers/scsi/arm/eesox.c b/drivers/scsi/arm/eesox.c index bb2477b3fb0b..d8435132f461 100644 --- a/drivers/scsi/arm/eesox.c +++ b/drivers/scsi/arm/eesox.c | |||
@@ -508,7 +508,8 @@ static struct scsi_host_template eesox_template = { | |||
508 | .eh_abort_handler = fas216_eh_abort, | 508 | .eh_abort_handler = fas216_eh_abort, |
509 | .can_queue = 1, | 509 | .can_queue = 1, |
510 | .this_id = 7, | 510 | .this_id = 7, |
511 | .sg_tablesize = SG_ALL, | 511 | .sg_tablesize = SCSI_MAX_SG_CHAIN_SEGMENTS, |
512 | .dma_boundary = IOMD_DMA_BOUNDARY, | ||
512 | .cmd_per_lun = 1, | 513 | .cmd_per_lun = 1, |
513 | .use_clustering = DISABLE_CLUSTERING, | 514 | .use_clustering = DISABLE_CLUSTERING, |
514 | .proc_name = "eesox", | 515 | .proc_name = "eesox", |
diff --git a/drivers/scsi/arm/powertec.c b/drivers/scsi/arm/powertec.c index d9a546d1917c..e2297b4c1b9e 100644 --- a/drivers/scsi/arm/powertec.c +++ b/drivers/scsi/arm/powertec.c | |||
@@ -302,7 +302,8 @@ static struct scsi_host_template powertecscsi_template = { | |||
302 | 302 | ||
303 | .can_queue = 8, | 303 | .can_queue = 8, |
304 | .this_id = 7, | 304 | .this_id = 7, |
305 | .sg_tablesize = SG_ALL, | 305 | .sg_tablesize = SCSI_MAX_SG_CHAIN_SEGMENTS, |
306 | .dma_boundary = IOMD_DMA_BOUNDARY, | ||
306 | .cmd_per_lun = 2, | 307 | .cmd_per_lun = 2, |
307 | .use_clustering = ENABLE_CLUSTERING, | 308 | .use_clustering = ENABLE_CLUSTERING, |
308 | .proc_name = "powertec", | 309 | .proc_name = "powertec", |