Skip to content

Commit

Permalink
[ARM] dma: Use sensible DMA parameters for Acorn drivers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Russell King authored and Russell King committed Dec 11, 2008
1 parent f671865 commit 5369bea
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 2 additions & 0 deletions arch/arm/mach-rpc/include/mach/isa-dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,7 @@

#define DMA_FLOPPY DMA_VIRTUAL_FLOPPY

#define IOMD_DMA_BOUNDARY (PAGE_SIZE - 1)

#endif /* _ASM_ARCH_DMA_H */

6 changes: 2 additions & 4 deletions drivers/ata/pata_icside.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion drivers/scsi/arm/cumana_2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion drivers/scsi/arm/eesox.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion drivers/scsi/arm/powertec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 5369bea

Please sign in to comment.