diff options
author | Tejun Heo <htejun@gmail.com> | 2006-06-24 20:30:18 +0900 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-06-26 20:59:27 -0400 |
commit | af181c2d765ec9735356bc313ab9e844ec2c7a24 (patch) | |
tree | efc014ff6e83c895f477abb100a2c8f8c65d1c46 | |
parent | 41542dbe12e34165e586de1e3fe0a245707aa39e (diff) | |
download | talos-obmc-linux-af181c2d765ec9735356bc313ab9e844ec2c7a24.tar.gz talos-obmc-linux-af181c2d765ec9735356bc313ab9e844ec2c7a24.zip |
[PATCH] libata: move ata_eh_clear_action() upward
Move ata_eh_clear_action() upward.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r-- | drivers/scsi/libata-eh.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/drivers/scsi/libata-eh.c b/drivers/scsi/libata-eh.c index 823385981a7a..126be36289a7 100644 --- a/drivers/scsi/libata-eh.c +++ b/drivers/scsi/libata-eh.c @@ -93,6 +93,31 @@ static int ata_ering_map(struct ata_ering *ering, return rc; } +static void ata_eh_clear_action(struct ata_device *dev, + struct ata_eh_info *ehi, unsigned int action) +{ + int i; + + if (!dev) { + ehi->action &= ~action; + for (i = 0; i < ATA_MAX_DEVICES; i++) + ehi->dev_action[i] &= ~action; + } else { + /* doesn't make sense for port-wide EH actions */ + WARN_ON(!(action & ATA_EH_PERDEV_MASK)); + + /* break ehi->action into ehi->dev_action */ + if (ehi->action & action) { + for (i = 0; i < ATA_MAX_DEVICES; i++) + ehi->dev_action[i] |= ehi->action & action; + ehi->action &= ~action; + } + + /* turn off the specified per-dev action */ + ehi->dev_action[dev->devno] &= ~action; + } +} + /** * ata_scsi_timed_out - SCSI layer time out callback * @cmd: timed out SCSI command @@ -705,31 +730,6 @@ static void ata_eh_detach_dev(struct ata_device *dev) spin_unlock_irqrestore(ap->lock, flags); } -static void ata_eh_clear_action(struct ata_device *dev, - struct ata_eh_info *ehi, unsigned int action) -{ - int i; - - if (!dev) { - ehi->action &= ~action; - for (i = 0; i < ATA_MAX_DEVICES; i++) - ehi->dev_action[i] &= ~action; - } else { - /* doesn't make sense for port-wide EH actions */ - WARN_ON(!(action & ATA_EH_PERDEV_MASK)); - - /* break ehi->action into ehi->dev_action */ - if (ehi->action & action) { - for (i = 0; i < ATA_MAX_DEVICES; i++) - ehi->dev_action[i] |= ehi->action & action; - ehi->action &= ~action; - } - - /* turn off the specified per-dev action */ - ehi->dev_action[dev->devno] &= ~action; - } -} - /** * ata_eh_about_to_do - about to perform eh_action * @ap: target ATA port |