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 | af181c2d765ec9735356bc313ab9e844ec2c7a24 (patch) | |
tree | efc014ff6e83c895f477abb100a2c8f8c65d1c46 | |
parent | 41542dbe12e34165e586de1e3fe0a245707aa39e (diff) |
[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, | |||
93 | return rc; | 93 | return rc; |
94 | } | 94 | } |
95 | 95 | ||
96 | static void ata_eh_clear_action(struct ata_device *dev, | ||
97 | struct ata_eh_info *ehi, unsigned int action) | ||
98 | { | ||
99 | int i; | ||
100 | |||
101 | if (!dev) { | ||
102 | ehi->action &= ~action; | ||
103 | for (i = 0; i < ATA_MAX_DEVICES; i++) | ||
104 | ehi->dev_action[i] &= ~action; | ||
105 | } else { | ||
106 | /* doesn't make sense for port-wide EH actions */ | ||
107 | WARN_ON(!(action & ATA_EH_PERDEV_MASK)); | ||
108 | |||
109 | /* break ehi->action into ehi->dev_action */ | ||
110 | if (ehi->action & action) { | ||
111 | for (i = 0; i < ATA_MAX_DEVICES; i++) | ||
112 | ehi->dev_action[i] |= ehi->action & action; | ||
113 | ehi->action &= ~action; | ||
114 | } | ||
115 | |||
116 | /* turn off the specified per-dev action */ | ||
117 | ehi->dev_action[dev->devno] &= ~action; | ||
118 | } | ||
119 | } | ||
120 | |||
96 | /** | 121 | /** |
97 | * ata_scsi_timed_out - SCSI layer time out callback | 122 | * ata_scsi_timed_out - SCSI layer time out callback |
98 | * @cmd: timed out SCSI command | 123 | * @cmd: timed out SCSI command |
@@ -705,31 +730,6 @@ static void ata_eh_detach_dev(struct ata_device *dev) | |||
705 | spin_unlock_irqrestore(ap->lock, flags); | 730 | spin_unlock_irqrestore(ap->lock, flags); |
706 | } | 731 | } |
707 | 732 | ||
708 | static void ata_eh_clear_action(struct ata_device *dev, | ||
709 | struct ata_eh_info *ehi, unsigned int action) | ||
710 | { | ||
711 | int i; | ||
712 | |||
713 | if (!dev) { | ||
714 | ehi->action &= ~action; | ||
715 | for (i = 0; i < ATA_MAX_DEVICES; i++) | ||
716 | ehi->dev_action[i] &= ~action; | ||
717 | } else { | ||
718 | /* doesn't make sense for port-wide EH actions */ | ||
719 | WARN_ON(!(action & ATA_EH_PERDEV_MASK)); | ||
720 | |||
721 | /* break ehi->action into ehi->dev_action */ | ||
722 | if (ehi->action & action) { | ||
723 | for (i = 0; i < ATA_MAX_DEVICES; i++) | ||
724 | ehi->dev_action[i] |= ehi->action & action; | ||
725 | ehi->action &= ~action; | ||
726 | } | ||
727 | |||
728 | /* turn off the specified per-dev action */ | ||
729 | ehi->dev_action[dev->devno] &= ~action; | ||
730 | } | ||
731 | } | ||
732 | |||
733 | /** | 733 | /** |
734 | * ata_eh_about_to_do - about to perform eh_action | 734 | * ata_eh_about_to_do - about to perform eh_action |
735 | * @ap: target ATA port | 735 | * @ap: target ATA port |