All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Ebbert <cebbert@redhat.com>
To: IDE/ATA development list <linux-ide@vger.kernel.org>
Subject: [patch] libata: fix last_ctl caching in ata_tf_read()
Date: Mon, 16 Jul 2007 14:35:34 -0400	[thread overview]
Message-ID: <469BBA76.5000901@redhat.com> (raw)

libata: fix last_ctl caching in ata_tf_read()

last_ctl was not cached properly. (Pointed out
by Tejun Heo.)

Signed-off-by: Chuck Ebbert <cebbert@redhat.com>

---
(Apply after Petr's patch to fix the sense data.)

 drivers/ata/libata-sff.c |    5 +++++
 1 file changed, 5 insertions(+)

--- linux-2.6.22.noarch.orig/drivers/ata/libata-sff.c
+++ linux-2.6.22.noarch/drivers/ata/libata-sff.c
@@ -196,7 +196,9 @@ void ata_tf_read(struct ata_port *ap, st
 {
 	struct ata_ioports *ioaddr = &ap->ioaddr;
 
+	ap->last_ctl = tf->ctl;
 	iowrite8(tf->ctl, ioaddr->ctl_addr);
+
 	tf->command = ata_check_status(ap);
 	tf->feature = ioread8(ioaddr->error_addr);
 	tf->nsect = ioread8(ioaddr->nsect_addr);
@@ -205,7 +208,9 @@ void ata_tf_read(struct ata_port *ap, st
 	tf->device = ioread8(ioaddr->device_addr);
 
 	if (tf->flags & ATA_TFLAG_LBA48) {
+		ap->last_ctl = tf_ctl | ATA_HOB;
 		iowrite8(tf->ctl | ATA_HOB, ioaddr->ctl_addr);
+
 		tf->hob_feature = ioread8(ioaddr->error_addr);
 		tf->hob_nsect = ioread8(ioaddr->nsect_addr);
 		tf->hob_lbal = ioread8(ioaddr->lbal_addr);

             reply	other threads:[~2007-07-16 18:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-16 18:35 Chuck Ebbert [this message]
2007-07-16 23:13 ` [patch] libata: fix last_ctl caching in ata_tf_read() Mark Lord
  -- strict thread matches above, loose matches on Subject: below --
2007-07-17 13:53 Chuck Ebbert
2007-07-20 11:46 ` Jeff Garzik

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=469BBA76.5000901@redhat.com \
    --to=cebbert@redhat.com \
    --cc=linux-ide@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.