]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[ARM] dma: Use sensible DMA parameters for Acorn drivers
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Thu, 11 Dec 2008 16:37:06 +0000 (16:37 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 11 Dec 2008 16:37:06 +0000 (16:37 +0000)
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>
arch/arm/mach-rpc/include/mach/isa-dma.h
drivers/ata/pata_icside.c
drivers/scsi/arm/cumana_2.c
drivers/scsi/arm/eesox.c
drivers/scsi/arm/powertec.c

index bad720548587e1b1722f3b8fa1b7071d0cb6f2de..67bfc6719c3470330ba728bd9125fc0d39a4e57a 100644 (file)
@@ -23,5 +23,7 @@
 
 #define DMA_FLOPPY             DMA_VIRTUAL_FLOPPY
 
+#define IOMD_DMA_BOUNDARY      (PAGE_SIZE - 1)
+
 #endif /* _ASM_ARCH_DMA_H */
 
index 63121f45ba25d3686b64b034e7c981a1ecf3f44a..d7bc925c524d7eba3321395ebfaf328db55fa73c 100644 (file)
@@ -45,8 +45,6 @@ static const struct portinfo pata_icside_portinfo_v6_2 = {
        .stepping       = 6,
 };
 
-#define PATA_ICSIDE_MAX_SG     128
-
 struct pata_icside_state {
        void __iomem *irq_port;
        void __iomem *ioc_base;
@@ -295,8 +293,8 @@ static int icside_dma_init(struct pata_icside_info *info)
 
 static struct scsi_host_template pata_icside_sht = {
        ATA_BASE_SHT(DRV_NAME),
-       .sg_tablesize           = PATA_ICSIDE_MAX_SG,
-       .dma_boundary           = ~0, /* no dma boundaries */
+       .sg_tablesize           = SCSI_MAX_SG_CHAIN_SEGMENTS,
+       .dma_boundary           = IOMD_DMA_BOUNDARY,
 };
 
 static void pata_icside_postreset(struct ata_link *link, unsigned int *classes)
index 68a64123af8f9fd28379a640d7a00b4f6ddcdd39..8ee01b907332fe3fb829243f127ae3c44e708014 100644 (file)
@@ -390,7 +390,8 @@ static struct scsi_host_template cumanascsi2_template = {
        .eh_abort_handler               = fas216_eh_abort,
        .can_queue                      = 1,
        .this_id                        = 7,
-       .sg_tablesize                   = SG_ALL,
+       .sg_tablesize                   = SCSI_MAX_SG_CHAIN_SEGMENTS,
+       .dma_boundary                   = IOMD_DMA_BOUNDARY,
        .cmd_per_lun                    = 1,
        .use_clustering                 = DISABLE_CLUSTERING,
        .proc_name                      = "cumanascsi2",
index bb2477b3fb0be49051010ec15842303265cc8de9..d8435132f46157774559e26a59af0347c2441304 100644 (file)
@@ -508,7 +508,8 @@ static struct scsi_host_template eesox_template = {
        .eh_abort_handler               = fas216_eh_abort,
        .can_queue                      = 1,
        .this_id                        = 7,
-       .sg_tablesize                   = SG_ALL,
+       .sg_tablesize                   = SCSI_MAX_SG_CHAIN_SEGMENTS,
+       .dma_boundary                   = IOMD_DMA_BOUNDARY,
        .cmd_per_lun                    = 1,
        .use_clustering                 = DISABLE_CLUSTERING,
        .proc_name                      = "eesox",
index d9a546d1917ce560435084bde443325f47cb22be..e2297b4c1b9e8ef546fb87cff49f9e67172d0026 100644 (file)
@@ -302,7 +302,8 @@ static struct scsi_host_template powertecscsi_template = {
 
        .can_queue                      = 8,
        .this_id                        = 7,
-       .sg_tablesize                   = SG_ALL,
+       .sg_tablesize                   = SCSI_MAX_SG_CHAIN_SEGMENTS,
+       .dma_boundary                   = IOMD_DMA_BOUNDARY,
        .cmd_per_lun                    = 2,
        .use_clustering                 = ENABLE_CLUSTERING,
        .proc_name                      = "powertec",