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 SMART bugs.)
drivers/ata/libata-sff.c | 4 ++++ 1 file changed, 4 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);
@@ -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);
Quoted 5 lines · Chuck Ebbert
libata: fix
last_ctlcaching inata_tf_read()
last_ctlwas not cached properly. (Pointed out
by Tejun Heo.)
Quoted 7 lines
Signed-off-by Chuck Ebbert <[email protected]>---
(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...