summaryrefslogtreecommitdiff
path: root/drivers/scsi/ips.c
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@hera.kernel.org>2005-06-21 14:39:41 (GMT)
committerJaroslav Kysela <perex@hera.kernel.org>2005-06-21 14:39:41 (GMT)
commitfae6ec69c84d71b1d5bda9ede1a262c1681684aa (patch)
treeeb4aff9a5c2b7d04ce09a3717bb1dd4a79fe7595 /drivers/scsi/ips.c
parentbbc0274e9bb2e3f1d724d445a2bd32566b9b66f7 (diff)
parent1d345dac1f30af1cd9f3a1faa12f9f18f17f236e (diff)
downloadlinux-fsl-qoriq-fae6ec69c84d71b1d5bda9ede1a262c1681684aa.tar.xz
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'drivers/scsi/ips.c')
-rw-r--r--drivers/scsi/ips.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
index fbc2cb6..6dfcb4f 100644
--- a/drivers/scsi/ips.c
+++ b/drivers/scsi/ips.c
@@ -819,12 +819,15 @@ ips_eh_abort(Scsi_Cmnd * SC)
ips_ha_t *ha;
ips_copp_wait_item_t *item;
int ret;
+ unsigned long cpu_flags;
+ struct Scsi_Host *host;
METHOD_TRACE("ips_eh_abort", 1);
if (!SC)
return (FAILED);
+ host = SC->device->host;
ha = (ips_ha_t *) SC->device->host->hostdata;
if (!ha)
@@ -833,6 +836,8 @@ ips_eh_abort(Scsi_Cmnd * SC)
if (!ha->active)
return (FAILED);
+ IPS_LOCK_SAVE(host->host_lock, cpu_flags);
+
/* See if the command is on the copp queue */
item = ha->copp_waitlist.head;
while ((item) && (item->scsi_cmd != SC))
@@ -851,6 +856,8 @@ ips_eh_abort(Scsi_Cmnd * SC)
/* command must have already been sent */
ret = (FAILED);
}
+
+ IPS_UNLOCK_RESTORE(host->host_lock, cpu_flags);
return ret;
}
@@ -866,7 +873,7 @@ ips_eh_abort(Scsi_Cmnd * SC)
/* */
/****************************************************************************/
static int
-ips_eh_reset(Scsi_Cmnd * SC)
+__ips_eh_reset(Scsi_Cmnd * SC)
{
int ret;
int i;
@@ -1053,6 +1060,18 @@ ips_eh_reset(Scsi_Cmnd * SC)
}
+static int
+ips_eh_reset(Scsi_Cmnd * SC)
+{
+ int rc;
+
+ spin_lock_irq(SC->device->host->host_lock);
+ rc = __ips_eh_reset(SC);
+ spin_unlock_irq(SC->device->host->host_lock);
+
+ return rc;
+}
+
/****************************************************************************/
/* */
/* Routine Name: ips_queue */