libata-eh: fix slave link EH action mask handling
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
@@ -1206,7 +1206,10 @@ void ata_eh_about_to_do(struct ata_linkata_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);
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()andata_eh_done()are called withATA_EH_ALL_ACTIONSto clear the slave link actions during transfer. This always setsATA_PFLAG_RECOVEREDflag causing spurious "EH complete" messages.Don't set
ATA_PFLAG_RECOVEREDfor slave link actions.Signed-off-by Tejun Heo <[email protected]>
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
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()andata_eh_done()are called withATA_EH_ALL_ACTIONSto clear the slave link actions during transfer. This always setsATA_PFLAG_RECOVEREDflag causing spurious "EH complete" messages.
Quoted 7 lines
Quoted 3 lines
Don't set
ATA_PFLAG_RECOVEREDfor slave link actions.Signed-off-by Tejun Heo <[email protected]>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
Hello.
Quoted 2 lines · Tejun Heo
Slave link action mask is transferred to masater link and all the EH
s/masater/master/
MBR, Sergei
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
@@ -1206,7 +1206,10 @@ void ata_eh_about_to_do(struct ata_linkata_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);
Jeff Garzik
AppliedQuoted 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()andata_eh_done()are called withATA_EH_ALL_ACTIONSto clear the slave link actions during transfer. This always setsATA_PFLAG_RECOVEREDflag causing spurious "EH complete" messages.
Quoted 8 lines
Don't set
ATA_PFLAG_RECOVEREDfor slave link actions.Signed-off-by Tejun Heo <[email protected]>---
Thanks. Commit message updated.drivers/ata/libata-eh.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
applied