]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
libata: kill now unused n_iter and fix sata_fsl
authorJames Bottomley <James.Bottomley@HansenPartnership.com>
Tue, 5 Feb 2008 05:06:27 +0000 (14:06 +0900)
committerJeff Garzik <jeff@garzik.org>
Wed, 6 Feb 2008 11:59:32 +0000 (06:59 -0500)
qc->n_iter was used for libata's own sg walking before sg chaining
replaced it.  During conversion, the field and its usage in sata_fsl
were left behind.  Kill the filed and update sata_fsl.

tj: This was part of James's libata-use-block-layer-padding patch.
    Separated out by me.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/sata_fsl.c
include/linux/libata.h

index 922d7b2efba8cf50b6d2a1b8bb144630474623e1..efcb66b6cceff96755b886a7aade98c642530e59 100644 (file)
@@ -355,8 +355,8 @@ static unsigned int sata_fsl_fill_sg(struct ata_queued_cmd *qc, void *cmd_desc,
                        ata_port_printk(qc->ap, KERN_ERR,
                                        "s/g len unaligned : 0x%x\n", sg_len);
 
-               if ((num_prde == (SATA_FSL_MAX_PRD_DIRECT - 1)) &&
-                   (qc->n_iter + 1 != qc->n_elem)) {
+               if (num_prde == (SATA_FSL_MAX_PRD_DIRECT - 1) &&
+                   sg_next(sg) != NULL) {
                        VPRINTK("setting indirect prde\n");
                        prd_ptr_to_indirect_ext = prd;
                        prd->dba = cpu_to_le32(indirect_ext_segment_paddr);
index 4374c427778081d0a4e13fbfd3449dd488a7c0ed..bc5a8d0c70902803fe63d4d6b3104e75bfa9c34e 100644 (file)
@@ -457,7 +457,6 @@ struct ata_queued_cmd {
        unsigned long           flags;          /* ATA_QCFLAG_xxx */
        unsigned int            tag;
        unsigned int            n_elem;
-       unsigned int            n_iter;
        unsigned int            mapped_n_elem;
 
        int                     dma_dir;
@@ -1367,7 +1366,6 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc)
        qc->nbytes = qc->raw_nbytes = qc->curbytes = 0;
        qc->n_elem = 0;
        qc->mapped_n_elem = 0;
-       qc->n_iter = 0;
        qc->err_mask = 0;
        qc->pad_len = 0;
        qc->last_sg = NULL;