aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_sx4.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/sata_sx4.c')
-rw-r--r--drivers/ata/sata_sx4.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ata/sata_sx4.c b/drivers/ata/sata_sx4.c
index 3de0c27caf53..211ba8da64f4 100644
--- a/drivers/ata/sata_sx4.c
+++ b/drivers/ata/sata_sx4.c
@@ -473,7 +473,7 @@ static void pdc20621_dma_prep(struct ata_queued_cmd *qc)
473 void __iomem *mmio = ap->host->iomap[PDC_MMIO_BAR]; 473 void __iomem *mmio = ap->host->iomap[PDC_MMIO_BAR];
474 void __iomem *dimm_mmio = ap->host->iomap[PDC_DIMM_BAR]; 474 void __iomem *dimm_mmio = ap->host->iomap[PDC_DIMM_BAR];
475 unsigned int portno = ap->port_no; 475 unsigned int portno = ap->port_no;
476 unsigned int i, idx, total_len = 0, sgt_len; 476 unsigned int i, si, idx, total_len = 0, sgt_len;
477 u32 *buf = (u32 *) &pp->dimm_buf[PDC_DIMM_HEADER_SZ]; 477 u32 *buf = (u32 *) &pp->dimm_buf[PDC_DIMM_HEADER_SZ];
478 478
479 WARN_ON(!(qc->flags & ATA_QCFLAG_DMAMAP)); 479 WARN_ON(!(qc->flags & ATA_QCFLAG_DMAMAP));
@@ -487,7 +487,7 @@ static void pdc20621_dma_prep(struct ata_queued_cmd *qc)
487 * Build S/G table 487 * Build S/G table
488 */ 488 */
489 idx = 0; 489 idx = 0;
490 ata_for_each_sg(sg, qc) { 490 for_each_sg(qc->sg, sg, qc->n_elem, si) {
491 buf[idx++] = cpu_to_le32(sg_dma_address(sg)); 491 buf[idx++] = cpu_to_le32(sg_dma_address(sg));
492 buf[idx++] = cpu_to_le32(sg_dma_len(sg)); 492 buf[idx++] = cpu_to_le32(sg_dma_len(sg));
493 total_len += sg_dma_len(sg); 493 total_len += sg_dma_len(sg);