* [patch] libata: fix last_ctl caching in ata_tf_read()
@ 2007-07-16 18:35 Chuck Ebbert
2007-07-16 23:13 ` Mark Lord
0 siblings, 1 reply; 4+ messages in thread
From: Chuck Ebbert @ 2007-07-16 18:35 UTC (permalink / raw)
To: IDE/ATA development list
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);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] libata: fix last_ctl caching in ata_tf_read()
2007-07-16 18:35 [patch] libata: fix last_ctl caching in ata_tf_read() Chuck Ebbert
@ 2007-07-16 23:13 ` Mark Lord
0 siblings, 0 replies; 4+ messages in thread
From: Mark Lord @ 2007-07-16 23:13 UTC (permalink / raw)
To: Chuck Ebbert; +Cc: IDE/ATA development list
Chuck Ebbert wrote:
> libata: fix last_ctl caching in ata_tf_read()
...
> + ap->last_ctl = tf_ctl | ATA_HOB;
That line should be:
+ ap->last_ctl = tf->ctl | ATA_HOB;
Chuck: please fix that line, *test-compile* it,
and submit again.
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [patch] libata: fix last_ctl caching in ata_tf_read()
@ 2007-07-17 13:53 Chuck Ebbert
2007-07-20 11:46 ` Jeff Garzik
0 siblings, 1 reply; 4+ messages in thread
From: Chuck Ebbert @ 2007-07-17 13:53 UTC (permalink / raw)
To: Jeff Garzik; +Cc: IDE/ATA development list
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 SMART bugs.)
drivers/ata/libata-sff.c | 4 ++++
1 file changed, 4 insertions(+)
--- 2.6.22-d390.orig/drivers/ata/libata-sff.c
+++ 2.6.22-d390/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);
@@ -206,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);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] libata: fix last_ctl caching in ata_tf_read()
2007-07-17 13:53 Chuck Ebbert
@ 2007-07-20 11:46 ` Jeff Garzik
0 siblings, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2007-07-20 11:46 UTC (permalink / raw)
To: Chuck Ebbert; +Cc: IDE/ATA development list
Chuck Ebbert wrote:
> 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 SMART bugs.)
>
> drivers/ata/libata-sff.c | 4 ++++
> 1 file changed, 4 insertions(+)
Petr's new patch eliminates the need for this...
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-07-20 11:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-16 18:35 [patch] libata: fix last_ctl caching in ata_tf_read() Chuck Ebbert
2007-07-16 23:13 ` 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
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).