Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Russell King and committed by
Russell King
5369bea7 f6718653

+10 -7
+2
arch/arm/mach-rpc/include/mach/isa-dma.h
··· 23 23 24 24 #define DMA_FLOPPY DMA_VIRTUAL_FLOPPY 25 25 26 + #define IOMD_DMA_BOUNDARY (PAGE_SIZE - 1) 27 + 26 28 #endif /* _ASM_ARCH_DMA_H */ 27 29
+2 -4
drivers/ata/pata_icside.c
··· 45 45 .stepping = 6, 46 46 }; 47 47 48 - #define PATA_ICSIDE_MAX_SG 128 49 - 50 48 struct pata_icside_state { 51 49 void __iomem *irq_port; 52 50 void __iomem *ioc_base; ··· 293 295 294 296 static struct scsi_host_template pata_icside_sht = { 295 297 ATA_BASE_SHT(DRV_NAME), 296 - .sg_tablesize = PATA_ICSIDE_MAX_SG, 297 - .dma_boundary = ~0, /* no dma boundaries */ 298 + .sg_tablesize = SCSI_MAX_SG_CHAIN_SEGMENTS, 299 + .dma_boundary = IOMD_DMA_BOUNDARY, 298 300 }; 299 301 300 302 static void pata_icside_postreset(struct ata_link *link, unsigned int *classes)
+2 -1
drivers/scsi/arm/cumana_2.c
··· 390 390 .eh_abort_handler = fas216_eh_abort, 391 391 .can_queue = 1, 392 392 .this_id = 7, 393 - .sg_tablesize = SG_ALL, 393 + .sg_tablesize = SCSI_MAX_SG_CHAIN_SEGMENTS, 394 + .dma_boundary = IOMD_DMA_BOUNDARY, 394 395 .cmd_per_lun = 1, 395 396 .use_clustering = DISABLE_CLUSTERING, 396 397 .proc_name = "cumanascsi2",
+2 -1
drivers/scsi/arm/eesox.c
··· 508 508 .eh_abort_handler = fas216_eh_abort, 509 509 .can_queue = 1, 510 510 .this_id = 7, 511 - .sg_tablesize = SG_ALL, 511 + .sg_tablesize = SCSI_MAX_SG_CHAIN_SEGMENTS, 512 + .dma_boundary = IOMD_DMA_BOUNDARY, 512 513 .cmd_per_lun = 1, 513 514 .use_clustering = DISABLE_CLUSTERING, 514 515 .proc_name = "eesox",
+2 -1
drivers/scsi/arm/powertec.c
··· 302 302 303 303 .can_queue = 8, 304 304 .this_id = 7, 305 - .sg_tablesize = SG_ALL, 305 + .sg_tablesize = SCSI_MAX_SG_CHAIN_SEGMENTS, 306 + .dma_boundary = IOMD_DMA_BOUNDARY, 306 307 .cmd_per_lun = 2, 307 308 .use_clustering = ENABLE_CLUSTERING, 308 309 .proc_name = "powertec",