aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_fsl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/sata_fsl.c')
-rw-r--r--drivers/ata/sata_fsl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index a3c33f165427..d041709dee1a 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -323,6 +323,7 @@ static unsigned int sata_fsl_fill_sg(struct ata_queued_cmd *qc, void *cmd_desc,
323 struct scatterlist *sg; 323 struct scatterlist *sg;
324 unsigned int num_prde = 0; 324 unsigned int num_prde = 0;
325 u32 ttl_dwords = 0; 325 u32 ttl_dwords = 0;
326 unsigned int si;
326 327
327 /* 328 /*
328 * NOTE : direct & indirect prdt's are contigiously allocated 329 * NOTE : direct & indirect prdt's are contigiously allocated
@@ -333,13 +334,14 @@ static unsigned int sata_fsl_fill_sg(struct ata_queued_cmd *qc, void *cmd_desc,
333 struct prde *prd_ptr_to_indirect_ext = NULL; 334 struct prde *prd_ptr_to_indirect_ext = NULL;
334 unsigned indirect_ext_segment_sz = 0; 335 unsigned indirect_ext_segment_sz = 0;
335 dma_addr_t indirect_ext_segment_paddr; 336 dma_addr_t indirect_ext_segment_paddr;
337 unsigned int si;
336 338
337 VPRINTK("SATA FSL : cd = 0x%x, prd = 0x%x\n", cmd_desc, prd); 339 VPRINTK("SATA FSL : cd = 0x%x, prd = 0x%x\n", cmd_desc, prd);
338 340
339 indirect_ext_segment_paddr = cmd_desc_paddr + 341 indirect_ext_segment_paddr = cmd_desc_paddr +
340 SATA_FSL_CMD_DESC_OFFSET_TO_PRDT + SATA_FSL_MAX_PRD_DIRECT * 16; 342 SATA_FSL_CMD_DESC_OFFSET_TO_PRDT + SATA_FSL_MAX_PRD_DIRECT * 16;
341 343
342 ata_for_each_sg(sg, qc) { 344 for_each_sg(qc->sg, sg, qc->n_elem, si) {
343 dma_addr_t sg_addr = sg_dma_address(sg); 345 dma_addr_t sg_addr = sg_dma_address(sg);
344 u32 sg_len = sg_dma_len(sg); 346 u32 sg_len = sg_dma_len(sg);
345 347