mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-10 15:58:47 +00:00
libata: fix EH action overwriting in ata_eh_reset()
ehc->i.action got accidentally overwritten to ATA_EH_HARD/SOFTRESET in ata_eh_reset(). The original intention was to clear reset action which wasn't selected. This can cause unexpected behavior when other EH actions are scheduled together with reset. Fix it. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
This commit is contained in:
parent
eb3a55a9f4
commit
a674050e06
@ -2251,10 +2251,10 @@ int ata_eh_reset(struct ata_link *link, int classify,
|
|||||||
ehc->i.action &= ~ATA_EH_RESET;
|
ehc->i.action &= ~ATA_EH_RESET;
|
||||||
if (hardreset) {
|
if (hardreset) {
|
||||||
reset = hardreset;
|
reset = hardreset;
|
||||||
ehc->i.action = ATA_EH_HARDRESET;
|
ehc->i.action |= ATA_EH_HARDRESET;
|
||||||
} else if (softreset) {
|
} else if (softreset) {
|
||||||
reset = softreset;
|
reset = softreset;
|
||||||
ehc->i.action = ATA_EH_SOFTRESET;
|
ehc->i.action |= ATA_EH_SOFTRESET;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (prereset) {
|
if (prereset) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user