diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-05-28 07:54:40 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-06-17 13:04:55 -0400 |
commit | 8fa728a26886f56a9ee10a44fea0ddda301d21c3 (patch) | |
tree | 105ead5c90057400abae0c8aa9e2b5ba1818c327 /drivers/scsi/ips.c | |
parent | 3471c288036bf0835a82d0b1bbce2002f6e68390 (diff) |
[SCSI] allow sleeping in ->eh_abort_handler()
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/ips.c')
-rw-r--r-- | drivers/scsi/ips.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c index fbc2cb6667a1..6572e100f7b2 100644 --- a/drivers/scsi/ips.c +++ b/drivers/scsi/ips.c | |||
@@ -819,12 +819,15 @@ ips_eh_abort(Scsi_Cmnd * SC) | |||
819 | ips_ha_t *ha; | 819 | ips_ha_t *ha; |
820 | ips_copp_wait_item_t *item; | 820 | ips_copp_wait_item_t *item; |
821 | int ret; | 821 | int ret; |
822 | unsigned long cpu_flags; | ||
823 | struct Scsi_Host *host; | ||
822 | 824 | ||
823 | METHOD_TRACE("ips_eh_abort", 1); | 825 | METHOD_TRACE("ips_eh_abort", 1); |
824 | 826 | ||
825 | if (!SC) | 827 | if (!SC) |
826 | return (FAILED); | 828 | return (FAILED); |
827 | 829 | ||
830 | host = SC->device->host; | ||
828 | ha = (ips_ha_t *) SC->device->host->hostdata; | 831 | ha = (ips_ha_t *) SC->device->host->hostdata; |
829 | 832 | ||
830 | if (!ha) | 833 | if (!ha) |
@@ -833,6 +836,8 @@ ips_eh_abort(Scsi_Cmnd * SC) | |||
833 | if (!ha->active) | 836 | if (!ha->active) |
834 | return (FAILED); | 837 | return (FAILED); |
835 | 838 | ||
839 | IPS_LOCK_SAVE(host->host_lock, cpu_flags); | ||
840 | |||
836 | /* See if the command is on the copp queue */ | 841 | /* See if the command is on the copp queue */ |
837 | item = ha->copp_waitlist.head; | 842 | item = ha->copp_waitlist.head; |
838 | while ((item) && (item->scsi_cmd != SC)) | 843 | while ((item) && (item->scsi_cmd != SC)) |
@@ -851,6 +856,8 @@ ips_eh_abort(Scsi_Cmnd * SC) | |||
851 | /* command must have already been sent */ | 856 | /* command must have already been sent */ |
852 | ret = (FAILED); | 857 | ret = (FAILED); |
853 | } | 858 | } |
859 | |||
860 | IPS_UNLOCK_RESTORE(host->host_lock, cpu_flags); | ||
854 | return ret; | 861 | return ret; |
855 | } | 862 | } |
856 | 863 | ||