Skip to content

Commit

Permalink
libata: fix handling of port actions in per-dev action mask
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Jan 20, 2007
1 parent 501e0c5 commit 79a55b7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/ata/libata-eh.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 79a55b7

Please sign in to comment.