summaryrefslogtreecommitdiff
path: root/drivers/scsi/ibmmca.c
diff options
context:
space:
mode:
authorJames Bottomley <jejb@titanic.(none)>2005-06-18 00:04:18 (GMT)
committerJames Bottomley <jejb@titanic.(none)>2005-06-18 00:04:18 (GMT)
commit3afa294c40013be5d8180005002e3f648d04d942 (patch)
tree8a8b7464fd8ee4901288afb3e9e8d761ef45647d /drivers/scsi/ibmmca.c
parenta1541d5af66d02426655b1498f814c52347dd7d3 (diff)
parent3237ee78fc00f786d5f5aec6f9310b0e39069f15 (diff)
downloadlinux-3afa294c40013be5d8180005002e3f648d04d942.tar.xz
merge by hand (qla_os.c mismerge)
Diffstat (limited to 'drivers/scsi/ibmmca.c')
-rw-r--r--drivers/scsi/ibmmca.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/drivers/scsi/ibmmca.c b/drivers/scsi/ibmmca.c
index a3fdead..b5dc353 100644
--- a/drivers/scsi/ibmmca.c
+++ b/drivers/scsi/ibmmca.c
@@ -2118,7 +2118,7 @@ static int ibmmca_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
return 0;
}
-static int ibmmca_abort(Scsi_Cmnd * cmd)
+static int __ibmmca_abort(Scsi_Cmnd * cmd)
{
/* Abort does not work, as the adapter never generates an interrupt on
* whatever situation is simulated, even when really pending commands
@@ -2225,7 +2225,19 @@ static int ibmmca_abort(Scsi_Cmnd * cmd)
}
}
-static int ibmmca_host_reset(Scsi_Cmnd * cmd)
+static int ibmmca_abort(Scsi_Cmnd * cmd)
+{
+ struct Scsi_Host *shpnt = cmd->device->host;
+ int rc;
+
+ spin_lock_irq(shpnt->host_lock);
+ rc = __ibmmca_abort(cmd);
+ spin_unlock_irq(shpnt->host_lock);
+
+ return rc;
+}
+
+static int __ibmmca_host_reset(Scsi_Cmnd * cmd)
{
struct Scsi_Host *shpnt;
Scsi_Cmnd *cmd_aid;
@@ -2312,6 +2324,18 @@ static int ibmmca_host_reset(Scsi_Cmnd * cmd)
return SUCCESS;
}
+static int ibmmca_host_reset(Scsi_Cmnd * cmd)
+{
+ struct Scsi_Host *shpnt = cmd->device->host;
+ int rc;
+
+ spin_lock_irq(shpnt->host_lock);
+ rc = __ibmmca_host_reset(cmd);
+ spin_unlock_irq(shpnt->host_lock);
+
+ return rc;
+}
+
static int ibmmca_biosparam(struct scsi_device *sdev, struct block_device *bdev, sector_t capacity, int *info)
{
int size = capacity;