libata: fix handling of port actions in per-dev action mask

libata EH ignores port-wide actions in per-dev action mask. However,
device resume requests EH_SOFTRESET using per-dev action mask. Under
certain circumstances, this results in not resetting frozen port after
resuming which causes failure of all commands.

This patch allows port-wide actions to be requested in per-dev action
mask. Before EH recovery starts, port-wide actions will be collected.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

authored by Tejun Heo and committed by Jeff Garzik 79a55b72 501e0c50

+4
+4
drivers/ata/libata-eh.c
··· 1979 1979 1980 1980 ehc->tries[dev->devno] = ATA_EH_DEV_TRIES; 1981 1981 1982 + /* collect port action mask recorded in dev actions */ 1983 + ehc->i.action |= ehc->i.dev_action[i] & ~ATA_EH_PERDEV_MASK; 1984 + ehc->i.dev_action[i] &= ATA_EH_PERDEV_MASK; 1985 + 1982 1986 /* process hotplug request */ 1983 1987 if (dev->flags & ATA_DFLAG_DETACH) 1984 1988 ata_eh_detach_dev(dev);