From: Albert Lee <albertcc@tw.ibm.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, Doug Maxey <dwm@enoyolf.org>,
Mark Lord <mlord@pobox.com>, Tejun Heo <htejun@gmail.com>,
Linux IDE <linux-ide@vger.kernel.org>
Subject: [PATCH 7/7] libata: remove ap->last_ctl
Date: Sat, 07 Jul 2007 15:23:55 +0800 [thread overview]
Message-ID: <468F3F8B.5010200@tw.ibm.com> (raw)
In-Reply-To: <468F3949.5050800@tw.ibm.com>
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 <albertcc@tw.ibm.com>
---
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;
next prev parent reply other threads:[~2007-07-07 7:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-07 6:57 [PATCH 0/7] libata: irq_on/off restructuring (take #2) Albert Lee
2007-07-07 7:00 ` [PATCH 1/7] libata: remove irq_on from ata_bus_reset() and ata_std_postreset() Albert Lee
2007-07-12 20:12 ` Jeff Garzik
2007-07-07 7:02 ` [PATCH 2/7] sata_promise: pdc_freeze() semantic change Albert Lee
2007-10-02 15:28 ` Jeff Garzik
2007-07-07 7:05 ` [PATCH 3/7] libata: add freeze/thaw to old EH LLDDs Albert Lee
2007-07-07 7:09 ` [PATCH 4/7] libata: use freeze/thaw for polling PIO Albert Lee
2007-07-13 6:53 ` Tejun Heo
2007-07-07 7:12 ` [PATCH 5/7] libata: integrate freeze/thaw with irq_on/off Albert Lee
2007-07-13 6:51 ` Tejun Heo
2007-07-16 9:17 ` Albert Lee
2007-07-07 7:20 ` [PATCH 6/7] libata: remove nIEN handling from ata_tf_load() Albert Lee
2007-07-07 7:23 ` Albert Lee [this message]
2007-07-13 6:58 ` [PATCH 7/7] libata: remove ap->last_ctl Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=468F3F8B.5010200@tw.ibm.com \
--to=albertcc@tw.ibm.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=albertl@mail.com \
--cc=dwm@enoyolf.org \
--cc=htejun@gmail.com \
--cc=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
--cc=mlord@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).