Commit 763aadbf authored by Nicholas Bellinger's avatar Nicholas Bellinger Committed by Christoph Hellwig

hpsa: Convert SCSI LLD ->queuecommand() for host_lock less operation

There isn't anything in hpsa that requires the host lock to be held
during queuecommand.
Signed-off-by: default avatarDon Brace <don.brace@pmcs.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
Reviewed-by: default avatarStephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 2f371c92
...@@ -3881,8 +3881,11 @@ static int hpsa_scsi_ioaccel_raid_map(struct ctlr_info *h, ...@@ -3881,8 +3881,11 @@ static int hpsa_scsi_ioaccel_raid_map(struct ctlr_info *h,
dev->scsi3addr); dev->scsi3addr);
} }
static int hpsa_scsi_queue_command_lck(struct scsi_cmnd *cmd, /*
void (*done)(struct scsi_cmnd *)) * Running in struct Scsi_Host->host_lock less mode using LLD internal
* struct ctlr_info *h->lock w/ spin_lock_irqsave() protection.
*/
static int hpsa_scsi_queue_command(struct Scsi_Host *sh, struct scsi_cmnd *cmd)
{ {
struct ctlr_info *h; struct ctlr_info *h;
struct hpsa_scsi_dev_t *dev; struct hpsa_scsi_dev_t *dev;
...@@ -3895,14 +3898,14 @@ static int hpsa_scsi_queue_command_lck(struct scsi_cmnd *cmd, ...@@ -3895,14 +3898,14 @@ static int hpsa_scsi_queue_command_lck(struct scsi_cmnd *cmd,
dev = cmd->device->hostdata; dev = cmd->device->hostdata;
if (!dev) { if (!dev) {
cmd->result = DID_NO_CONNECT << 16; cmd->result = DID_NO_CONNECT << 16;
done(cmd); cmd->scsi_done(cmd);
return 0; return 0;
} }
memcpy(scsi3addr, dev->scsi3addr, sizeof(scsi3addr)); memcpy(scsi3addr, dev->scsi3addr, sizeof(scsi3addr));
if (unlikely(lockup_detected(h))) { if (unlikely(lockup_detected(h))) {
cmd->result = DID_ERROR << 16; cmd->result = DID_ERROR << 16;
done(cmd); cmd->scsi_done(cmd);
return 0; return 0;
} }
c = cmd_alloc(h); c = cmd_alloc(h);
...@@ -3912,9 +3915,6 @@ static int hpsa_scsi_queue_command_lck(struct scsi_cmnd *cmd, ...@@ -3912,9 +3915,6 @@ static int hpsa_scsi_queue_command_lck(struct scsi_cmnd *cmd,
} }
/* Fill in the command list header */ /* Fill in the command list header */
cmd->scsi_done = done; /* save this for use by completion code */
/* save c in case we have to abort it */ /* save c in case we have to abort it */
cmd->host_scribble = (unsigned char *) c; cmd->host_scribble = (unsigned char *) c;
...@@ -4005,8 +4005,6 @@ static int hpsa_scsi_queue_command_lck(struct scsi_cmnd *cmd, ...@@ -4005,8 +4005,6 @@ static int hpsa_scsi_queue_command_lck(struct scsi_cmnd *cmd,
return 0; return 0;
} }
static DEF_SCSI_QCMD(hpsa_scsi_queue_command)
static int do_not_scan_if_controller_locked_up(struct ctlr_info *h) static int do_not_scan_if_controller_locked_up(struct ctlr_info *h)
{ {
unsigned long flags; unsigned long flags;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment