diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2013-05-27 18:45:08 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-05-27 20:18:08 -0400 |
commit | 8bfbeed58665dbbf63813017712bd0c8e978379e (patch) | |
tree | 5e7e95f8563e4e4a8aa072b6aeec8029a339ffd7 /drivers/ata | |
parent | 333279c82b984f3eac61feff2b76a8b79e3db6c8 (diff) |
sata_rcar: correct 'sata_rcar_sht'
Using ATA_BMDMA_SHT() to intialize 'sata_rcar_sht' was suboptimal as
the R-Car descriptor table transfer counter is 28 bits wide (bit 1 to
bit 28), so that the 'dma_boundary' field of 0xFFFF is just too small,
as well as the 'sg_tablesize' field of 128. Use ATA_BASE_SHT() to
initialize 'sata_rcar_sht' instead and give proper values to the
'dma_boundary' and 'sg_tablesize' fields explicitly.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/sata_rcar.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c index 629b07c452c5..178165be0c32 100644 --- a/drivers/ata/sata_rcar.c +++ b/drivers/ata/sata_rcar.c | |||
@@ -121,6 +121,8 @@ | |||
121 | /* Descriptor table word 0 bit (when DTA32M = 1) */ | 121 | /* Descriptor table word 0 bit (when DTA32M = 1) */ |
122 | #define SATA_RCAR_DTEND BIT(0) | 122 | #define SATA_RCAR_DTEND BIT(0) |
123 | 123 | ||
124 | #define SATA_RCAR_DMA_BOUNDARY 0x1FFFFFFEUL | ||
125 | |||
124 | struct sata_rcar_priv { | 126 | struct sata_rcar_priv { |
125 | void __iomem *base; | 127 | void __iomem *base; |
126 | struct clk *clk; | 128 | struct clk *clk; |
@@ -575,7 +577,14 @@ static u8 sata_rcar_bmdma_status(struct ata_port *ap) | |||
575 | } | 577 | } |
576 | 578 | ||
577 | static struct scsi_host_template sata_rcar_sht = { | 579 | static struct scsi_host_template sata_rcar_sht = { |
578 | ATA_BMDMA_SHT(DRV_NAME), | 580 | ATA_BASE_SHT(DRV_NAME), |
581 | /* | ||
582 | * This controller allows transfer chunks up to 512MB which cross 64KB | ||
583 | * boundaries, therefore the DMA limits are more relaxed than standard | ||
584 | * ATA SFF. | ||
585 | */ | ||
586 | .sg_tablesize = ATA_MAX_PRD, | ||
587 | .dma_boundary = SATA_RCAR_DMA_BOUNDARY, | ||
579 | }; | 588 | }; |
580 | 589 | ||
581 | static struct ata_port_operations sata_rcar_port_ops = { | 590 | static struct ata_port_operations sata_rcar_port_ops = { |