Skip to contentSkip to conversation

libata: add missing read of error register

PATCH Eric A. Cottrell 1 participant 1 message Apr 17, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello Jeff,

Problem:
The feature member is not being set from the error register when the taskfile is read. This causes a problem when the task file is read to determine errors.

Solution:
In libata-core.c add code to set the feature member in the taskfile structure.

drivers/scsi/libata-core.c +2 -0
@@ -261,6 +261,7 @@
 {
 	struct ata_ioports *ioaddr = &ap->ioaddr;
 
+	tf->feature = inb(ioaddr->error_addr);
 	tf->nsect = inb(ioaddr->nsect_addr);
 	tf->lbal = inb(ioaddr->lbal_addr);
 	tf->lbam = inb(ioaddr->lbam_addr);
@@ -293,6 +294,7 @@
 {
 	struct ata_ioports *ioaddr = &ap->ioaddr;
 
+	tf->feature = readb((void __iomem *)ioaddr->error_addr);
 	tf->nsect = readb((void __iomem *)ioaddr->nsect_addr);
 	tf->lbal = readb((void __iomem *)ioaddr->lbal_addr);
 	tf->lbam = readb((void __iomem *)ioaddr->lbam_addr);