aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/ata/sata_fsl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index f8d8614a514..9e99cc88340 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -355,7 +355,7 @@ static unsigned int sata_fsl_fill_sg(struct ata_queued_cmd *qc, void *cmd_desc,
"s/g len unaligned : 0x%x\n", sg_len);
if ((num_prde == (SATA_FSL_MAX_PRD_DIRECT - 1)) &&
- !ata_sg_is_last(sg, qc)) {
+ (qc->n_iter + 1 != qc->n_elem)) {
VPRINTK("setting indirect prde\n");
prd_ptr_to_indirect_ext = prd;
prd->dba = cpu_to_le32(indirect_ext_segment_paddr);