With the previous changes made to tf_load(), ap->last_ctl is now unused. Remove 
it.

(The purpose of ap->last_ctl is to cache the last status of nIEN bit
and hopefully avoid writing the Control register unnecessarily.
However, the libata polling code always call irq_on() in ata_hsm_qc_complete()
and such mechanism isn't much utilized.)

Signed-off-by: Albert Lee <[EMAIL PROTECTED]>
---

diff -Nrup 06_tf_load_cleanup/drivers/ata/libata-core.c 
07_last_ctl_cleanup/drivers/ata/libata-core.c
--- 06_tf_load_cleanup/drivers/ata/libata-core.c        2007-07-07 
10:49:04.000000000 +0800
+++ 07_last_ctl_cleanup/drivers/ata/libata-core.c       2007-07-07 
10:50:36.000000000 +0800
@@ -5987,7 +5987,6 @@ struct ata_port *ata_port_alloc(struct a
 
        ap->hw_sata_spd_limit = UINT_MAX;
        ap->active_tag = ATA_TAG_POISON;
-       ap->last_ctl = 0xFF;
 
 #if defined(ATA_VERBOSE_DEBUG)
        /* turn on all debugging levels */
diff -Nrup 06_tf_load_cleanup/drivers/ata/libata-sff.c 
07_last_ctl_cleanup/drivers/ata/libata-sff.c
--- 06_tf_load_cleanup/drivers/ata/libata-sff.c 2007-07-07 10:50:10.000000000 
+0800
+++ 07_last_ctl_cleanup/drivers/ata/libata-sff.c        2007-07-07 
10:50:36.000000000 +0800
@@ -53,7 +53,6 @@ void ata_irq_on(struct ata_port *ap)
        struct ata_ioports *ioaddr = &ap->ioaddr;
 
        ap->ctl &= ~ATA_NIEN;
-       ap->last_ctl = ap->ctl;
 
        iowrite8(ap->ctl, ioaddr->ctl_addr);
        ata_wait_idle(ap);
@@ -76,7 +75,6 @@ void ata_irq_off(struct ata_port *ap)
        struct ata_ioports *ioaddr = &ap->ioaddr;
 
        ap->ctl |= ATA_NIEN;
-       ap->last_ctl = ap->ctl;
 
        iowrite8(ap->ctl, ioaddr->ctl_addr);
 
diff -Nrup 06_tf_load_cleanup/drivers/ata/pata_scc.c 
07_last_ctl_cleanup/drivers/ata/pata_scc.c
--- 06_tf_load_cleanup/drivers/ata/pata_scc.c   2007-07-07 10:50:10.000000000 
+0800
+++ 07_last_ctl_cleanup/drivers/ata/pata_scc.c  2007-07-07 10:50:36.000000000 
+0800
@@ -794,7 +794,6 @@ static void scc_irq_on (struct ata_port 
        struct ata_ioports *ioaddr = &ap->ioaddr;
 
        ap->ctl &= ~ATA_NIEN;
-       ap->last_ctl = ap->ctl;
 
        out_be32(ioaddr->ctl_addr, ap->ctl);
        ata_wait_idle(ap);
@@ -814,7 +813,6 @@ static void scc_irq_off (struct ata_port
        struct ata_ioports *ioaddr = &ap->ioaddr;
 
        ap->ctl |= ATA_NIEN;
-       ap->last_ctl = ap->ctl;
 
        out_be32(ioaddr->ctl_addr, ap->ctl);
 
diff -Nrup 06_tf_load_cleanup/include/linux/libata.h 
07_last_ctl_cleanup/include/linux/libata.h
--- 06_tf_load_cleanup/include/linux/libata.h   2007-07-07 10:49:04.000000000 
+0800
+++ 07_last_ctl_cleanup/include/linux/libata.h  2007-07-07 10:50:36.000000000 
+0800
@@ -507,7 +507,6 @@ struct ata_port {
        struct ata_ioports      ioaddr; /* ATA cmd/ctl/dma register blocks */
 
        u8                      ctl;    /* cache of ATA control register */
-       u8                      last_ctl;       /* Cache last written value */
        unsigned int            pio_mask;
        unsigned int            mwdma_mask;
        unsigned int            udma_mask;


-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to