]> err.no Git - linux-2.6/commitdiff
ata/sata_fsl: Kill ata_sg_is_last()
authorLi Yang <leoli@freescale.com>
Wed, 31 Oct 2007 11:27:56 +0000 (19:27 +0800)
committerJeff Garzik <jeff@garzik.org>
Sat, 3 Nov 2007 12:46:27 +0000 (08:46 -0400)
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/sata_fsl.c

index f8d8614a514bca54714383564e4370dd1998e07a..9e99cc88340f5f69a6ffdaa12f98bed21f845900 100644 (file)
@@ -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);