aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2014-11-14 18:27:19 -0500
committerChristoph Hellwig <hch@lst.de>2014-11-20 03:11:26 -0500
commit763aadbf5015e86e93d209f10e34fd4daacc459b (patch)
treefc19fb84300c638f8d875930efb7599c99f052cd
parent2f371c92c446a1ca2d1911c7479de4c78c4b3804 (diff)
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: Don Brace <don.brace@pmcs.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> Reviewed-by: Stephen M. Cameron <stephenmcameron@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r--drivers/scsi/hpsa.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 236e2fa93086..4db9d1921dca 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -3881,8 +3881,11 @@ static int hpsa_scsi_ioaccel_raid_map(struct ctlr_info *h,
3881 dev->scsi3addr); 3881 dev->scsi3addr);
3882} 3882}
3883 3883
3884static int hpsa_scsi_queue_command_lck(struct scsi_cmnd *cmd, 3884/*
3885 void (*done)(struct scsi_cmnd *)) 3885 * Running in struct Scsi_Host->host_lock less mode using LLD internal
3886 * struct ctlr_info *h->lock w/ spin_lock_irqsave() protection.
3887 */
3888static int hpsa_scsi_queue_command(struct Scsi_Host *sh, struct scsi_cmnd *cmd)
3886{ 3889{
3887 struct ctlr_info *h; 3890 struct ctlr_info *h;
3888 struct hpsa_scsi_dev_t *dev; 3891 struct hpsa_scsi_dev_t *dev;
@@ -3895,14 +3898,14 @@ static int hpsa_scsi_queue_command_lck(struct scsi_cmnd *cmd,
3895 dev = cmd->device->hostdata; 3898 dev = cmd->device->hostdata;
3896 if (!dev) { 3899 if (!dev) {
3897 cmd->result = DID_NO_CONNECT << 16; 3900 cmd->result = DID_NO_CONNECT << 16;
3898 done(cmd); 3901 cmd->scsi_done(cmd);
3899 return 0; 3902 return 0;
3900 } 3903 }
3901 memcpy(scsi3addr, dev->scsi3addr, sizeof(scsi3addr)); 3904 memcpy(scsi3addr, dev->scsi3addr, sizeof(scsi3addr));
3902 3905
3903 if (unlikely(lockup_detected(h))) { 3906 if (unlikely(lockup_detected(h))) {
3904 cmd->result = DID_ERROR << 16; 3907 cmd->result = DID_ERROR << 16;
3905 done(cmd); 3908 cmd->scsi_done(cmd);
3906 return 0; 3909 return 0;
3907 } 3910 }
3908 c = cmd_alloc(h); 3911 c = cmd_alloc(h);
@@ -3912,9 +3915,6 @@ static int hpsa_scsi_queue_command_lck(struct scsi_cmnd *cmd,
3912 } 3915 }
3913 3916
3914 /* Fill in the command list header */ 3917 /* Fill in the command list header */
3915
3916 cmd->scsi_done = done; /* save this for use by completion code */
3917
3918 /* save c in case we have to abort it */ 3918 /* save c in case we have to abort it */
3919 cmd->host_scribble = (unsigned char *) c; 3919 cmd->host_scribble = (unsigned char *) c;
3920 3920
@@ -4005,8 +4005,6 @@ static int hpsa_scsi_queue_command_lck(struct scsi_cmnd *cmd,
4005 return 0; 4005 return 0;
4006} 4006}
4007 4007
4008static DEF_SCSI_QCMD(hpsa_scsi_queue_command)
4009
4010static int do_not_scan_if_controller_locked_up(struct ctlr_info *h) 4008static int do_not_scan_if_controller_locked_up(struct ctlr_info *h)
4011{ 4009{
4012 unsigned long flags; 4010 unsigned long flags;