Skip to content

Commit

Permalink
[PATCH] libata: implement and use ata_deh_dev_action()
Browse files Browse the repository at this point in the history
Implement and use ata_eh_dev_action() which returns EH action mask for
a device.

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 Jun 27, 2006
1 parent af181c2 commit 64f65ca
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion drivers/scsi/libata-eh.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ static int ata_ering_map(struct ata_ering *ering,
return rc;
}

static unsigned int ata_eh_dev_action(struct ata_device *dev)
{
struct ata_eh_context *ehc = &dev->ap->eh_context;

return ehc->i.action | ehc->i.dev_action[dev->devno];
}

static void ata_eh_clear_action(struct ata_device *dev,
struct ata_eh_info *ehi, unsigned int action)
{
Expand Down Expand Up @@ -1592,7 +1599,7 @@ static int ata_eh_revalidate_and_attach(struct ata_port *ap,
unsigned int action;

dev = &ap->device[i];
action = ehc->i.action | ehc->i.dev_action[dev->devno];
action = ata_eh_dev_action(dev);

if (action & ATA_EH_REVALIDATE && ata_dev_enabled(dev)) {
if (ata_port_offline(ap)) {
Expand Down

0 comments on commit 64f65ca

Please sign in to comment.