libata: fix last_ctl caching in ata_tf_read()
PATCH 1/1 libata: fix last_ctl caching in ata_tf_read()
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 <[email protected]>
---
(Apply after Petr's patch to fix the sense data.)
drivers/ata/libata-sff.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/ata/libata-sff.c +4 -0
@@ -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);
Quoted 1 line · Chuck Ebbert
libata: fix
last_ctlcaching inata_tf_read()
...
drivers/ata/libata-sff.c void ata_tf_read(struct ata_port *ap, st · line 211
Quoted 1 line
drivers/ata/libata-sff.c +1
-0+ 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.