From: Tejun Heo Date: Thu, 18 Jan 2007 08:22:18 +0000 (+0900) Subject: libata: fix handling of port actions in per-dev action mask X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=79a55b72a1996f77e9d23c7a5282e5839d45beb3;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Signed-off-by: Jeff Garzik --- 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, ehc->tries[dev->devno] = ATA_EH_DEV_TRIES; + /* collect port action mask recorded in dev actions */ + ehc->i.action |= ehc->i.dev_action[i] & ~ATA_EH_PERDEV_MASK; + ehc->i.dev_action[i] &= ATA_EH_PERDEV_MASK; + /* process hotplug request */ if (dev->flags & ATA_DFLAG_DETACH) ata_eh_detach_dev(dev);