diff options
author | Jeff Garzik <jgarzik@pretzel.yyz.us> | 2005-06-22 13:10:49 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-06-22 13:10:49 -0400 |
commit | 80bd6d7f5e0d872a0f5a151473d2a39d95d210a8 (patch) | |
tree | b3a36048d6b7de88f7e906624ecb4b98816bb736 /drivers/scsi/ips.c | |
parent | 949d33e70f2c3e93bfe5265a50e40175b1ab1ec1 (diff) | |
parent | 2a5a68b840cbab31baab2d9b2e1e6de3b289ae1e (diff) |
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'drivers/scsi/ips.c')
-rw-r--r-- | drivers/scsi/ips.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c index fbc2cb6667a1..6dfcb4fbccdd 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 | ||
@@ -866,7 +873,7 @@ ips_eh_abort(Scsi_Cmnd * SC) | |||
866 | /* */ | 873 | /* */ |
867 | /****************************************************************************/ | 874 | /****************************************************************************/ |
868 | static int | 875 | static int |
869 | ips_eh_reset(Scsi_Cmnd * SC) | 876 | __ips_eh_reset(Scsi_Cmnd * SC) |
870 | { | 877 | { |
871 | int ret; | 878 | int ret; |
872 | int i; | 879 | int i; |
@@ -1053,6 +1060,18 @@ ips_eh_reset(Scsi_Cmnd * SC) | |||
1053 | 1060 | ||
1054 | } | 1061 | } |
1055 | 1062 | ||
1063 | static int | ||
1064 | ips_eh_reset(Scsi_Cmnd * SC) | ||
1065 | { | ||
1066 | int rc; | ||
1067 | |||
1068 | spin_lock_irq(SC->device->host->host_lock); | ||
1069 | rc = __ips_eh_reset(SC); | ||
1070 | spin_unlock_irq(SC->device->host->host_lock); | ||
1071 | |||
1072 | return rc; | ||
1073 | } | ||
1074 | |||
1056 | /****************************************************************************/ | 1075 | /****************************************************************************/ |
1057 | /* */ | 1076 | /* */ |
1058 | /* Routine Name: ips_queue */ | 1077 | /* Routine Name: ips_queue */ |