diff options
author | Tejun Heo <htejun@gmail.com> | 2007-01-18 03:22:18 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-01-19 19:22:45 -0500 |
commit | 79a55b72a1996f77e9d23c7a5282e5839d45beb3 (patch) | |
tree | 9b1a4633b6810b6e28f7dd409f9fd47444f053f8 | |
parent | 501e0c500217e38276d61445ee0839b3f2c66d05 (diff) |
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>
-rw-r--r-- | drivers/ata/libata-eh.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 08ad44b3e48f..56cf59b60ec4 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -1979,6 +1979,10 @@ static int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset, | |||
1979 | 1979 | ||
1980 | ehc->tries[dev->devno] = ATA_EH_DEV_TRIES; | 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 | /* process hotplug request */ | 1986 | /* process hotplug request */ |
1983 | if (dev->flags & ATA_DFLAG_DETACH) | 1987 | if (dev->flags & ATA_DFLAG_DETACH) |
1984 | ata_eh_detach_dev(dev); | 1988 | ata_eh_detach_dev(dev); |