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>

authored by

Tejun Heo and committed by
Jeff Garzik
a674050e eb3a55a9

+2 -2
+2 -2
drivers/ata/libata-eh.c
··· 2251 ehc->i.action &= ~ATA_EH_RESET; 2252 if (hardreset) { 2253 reset = hardreset; 2254 - ehc->i.action = ATA_EH_HARDRESET; 2255 } else if (softreset) { 2256 reset = softreset; 2257 - ehc->i.action = ATA_EH_SOFTRESET; 2258 } 2259 2260 if (prereset) {
··· 2251 ehc->i.action &= ~ATA_EH_RESET; 2252 if (hardreset) { 2253 reset = hardreset; 2254 + ehc->i.action |= ATA_EH_HARDRESET; 2255 } else if (softreset) { 2256 reset = softreset; 2257 + ehc->i.action |= ATA_EH_SOFTRESET; 2258 } 2259 2260 if (prereset) {