diff options
author | Tejun Heo <htejun@gmail.com> | 2006-06-24 07:30:18 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-06-26 20:59:27 -0400 |
commit | 64f65ca6e7a5a42df22ff29dadfff389dc388f65 (patch) | |
tree | 207c8f6957691c2da3ea54529a29b256b48dc6a9 /drivers | |
parent | af181c2d765ec9735356bc313ab9e844ec2c7a24 (diff) |
[PATCH] libata: implement and use ata_deh_dev_action()
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/libata-eh.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/scsi/libata-eh.c b/drivers/scsi/libata-eh.c index 126be36289a7..c7e6298db050 100644 --- a/drivers/scsi/libata-eh.c +++ b/drivers/scsi/libata-eh.c | |||
@@ -93,6 +93,13 @@ static int ata_ering_map(struct ata_ering *ering, | |||
93 | return rc; | 93 | return rc; |
94 | } | 94 | } |
95 | 95 | ||
96 | static unsigned int ata_eh_dev_action(struct ata_device *dev) | ||
97 | { | ||
98 | struct ata_eh_context *ehc = &dev->ap->eh_context; | ||
99 | |||
100 | return ehc->i.action | ehc->i.dev_action[dev->devno]; | ||
101 | } | ||
102 | |||
96 | static void ata_eh_clear_action(struct ata_device *dev, | 103 | static void ata_eh_clear_action(struct ata_device *dev, |
97 | struct ata_eh_info *ehi, unsigned int action) | 104 | struct ata_eh_info *ehi, unsigned int action) |
98 | { | 105 | { |
@@ -1592,7 +1599,7 @@ static int ata_eh_revalidate_and_attach(struct ata_port *ap, | |||
1592 | unsigned int action; | 1599 | unsigned int action; |
1593 | 1600 | ||
1594 | dev = &ap->device[i]; | 1601 | dev = &ap->device[i]; |
1595 | action = ehc->i.action | ehc->i.dev_action[dev->devno]; | 1602 | action = ata_eh_dev_action(dev); |
1596 | 1603 | ||
1597 | if (action & ATA_EH_REVALIDATE && ata_dev_enabled(dev)) { | 1604 | if (action & ATA_EH_REVALIDATE && ata_dev_enabled(dev)) { |
1598 | if (ata_port_offline(ap)) { | 1605 | if (ata_port_offline(ap)) { |