Skip to contentSkip to conversation

libata-eh: fix slave link EH action mask handling

PATCH In review Tejun Heo 4 participants 6 messages Oct 21, 2008 – Oct 23, 2008 libata

lore
Share & tools
lore

Tejun Heo

author
#0 lore raw

PATCH 1/1 libata-eh: fix slave link EH action mask handling

Slave link action mask is transferred to masater link and all the EH actions are taken by the master link. ata_eh_about_to_do() and ata_eh_done() are called with ATA_EH_ALL_ACTIONS to clear the slave link actions during transfer. This always sets ATA_PFLAG_RECOVERED flag causing spurious "EH complete" messages.

Don't set ATA_PFLAG_RECOVERED for slave link actions.

---
 drivers/ata/libata-eh.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/ata/libata-eh.c +4 -1
Index: work/drivers/ata/libata-eh.c
===================================================================
@@ -1206,7 +1206,10 @@ void ata_eh_about_to_do(struct ata_link
 
 	ata_eh_clear_action(link, dev, ehi, action);
 
-	if (!(ehc->i.flags & ATA_EHI_QUIET))
+	/* About to take EH action, set RECOVERED.  Ignore actions on
+	 * slave links as master will do them again.
+	 */
+	if (!(ehc->i.flags & ATA_EHI_QUIET) && link != ap->slave_link)
 		ap->pflags |= ATA_PFLAG_RECOVERED;
 
 	spin_unlock_irqrestore(ap->lock, flags);
author
#1 lore raw
Quoted 9 lines · Tejun Heo

Slave link action mask is transferred to masater link and all the EH actions are taken by the master link. ata_eh_about_to_do() and ata_eh_done() are called with ATA_EH_ALL_ACTIONS to clear the slave link actions during transfer. This always sets ATA_PFLAG_RECOVERED flag causing spurious "EH complete" messages.

Don't set ATA_PFLAG_RECOVERED for slave link actions.

Oops, slave link is not included in 2.6.27, so this fix doesn't need to go into -stable. Stable team, please ignore this patch. Sorry about the noise.

Thanks.

Signature · 1 line
tejun
author
#4 lore raw

PATCH 1/1 libata-eh: fix slave link EH action mask handling

Slave link action mask is transferred to master link and all the EH actions are taken by the master link. ata_eh_about_to_do() and ata_eh_done() are called with ATA_EH_ALL_ACTIONS to clear the slave link actions during transfer. This always sets ATA_PFLAG_RECOVERED flag causing spurious "EH complete" messages.

Don't set ATA_PFLAG_RECOVERED for slave link actions.

---
Thanks. Commit message updated.

 drivers/ata/libata-eh.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/ata/libata-eh.c +4 -1
Index: work/drivers/ata/libata-eh.c
===================================================================
@@ -1206,7 +1206,10 @@ void ata_eh_about_to_do(struct ata_link
 
 	ata_eh_clear_action(link, dev, ehi, action);
 
-	if (!(ehc->i.flags & ATA_EHI_QUIET))
+	/* About to take EH action, set RECOVERED.  Ignore actions on
+	 * slave links as master will do them again.
+	 */
+	if (!(ehc->i.flags & ATA_EHI_QUIET) && link != ap->slave_link)
 		ap->pflags |= ATA_PFLAG_RECOVERED;
 
 	spin_unlock_irqrestore(ap->lock, flags);
#2 lore raw
In reply to Tejun Heo
Quoted 7 lines · Tejun Heo
Quoted 6 lines · Tejun Heo

Slave link action mask is transferred to masater link and all the EH actions are taken by the master link. ata_eh_about_to_do() and ata_eh_done() are called with ATA_EH_ALL_ACTIONS to clear the slave link actions during transfer. This always sets ATA_PFLAG_RECOVERED flag causing spurious "EH complete" messages.

Quoted 7 lines
Quoted 3 lines

Don't set ATA_PFLAG_RECOVERED for slave link actions.

Oops, slave link is not included in 2.6.27, so this fix doesn't need to go into -stable. Stable team, please ignore this patch. Sorry about the noise.

No problem, it's now ignored :)

thanks,

greg k-h

Applied
#5 lore raw
In reply to Tejun Heo
Quoted 6 lines · Tejun Heo

Slave link action mask is transferred to master link and all the EH actions are taken by the master link. ata_eh_about_to_do() and ata_eh_done() are called with ATA_EH_ALL_ACTIONS to clear the slave link actions during transfer. This always sets ATA_PFLAG_RECOVERED flag causing spurious "EH complete" messages.

Quoted 8 lines

Don't set ATA_PFLAG_RECOVERED for slave link actions.

---
Thanks. Commit message updated.

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

applied