diff options
author | James Smart <james.smart@emulex.com> | 2012-08-03 12:35:24 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-09-14 09:36:59 -0400 |
commit | b9a7c631d4f0ddd482e2c3183d5e02148bdf5365 (patch) | |
tree | a82515e927c164dedb1de7ae0cfd68312af0c0af /drivers/scsi/lpfc | |
parent | b84daac9dce4c87b83668d6790f3b092a2e906ae (diff) |
[SCSI] lpfc 8.3.33: Convert to no SCSI host lock in queuecommand
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index eb993db5fef9..bb9a2249b75d 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c | |||
@@ -4241,9 +4241,8 @@ void lpfc_poll_timeout(unsigned long ptr) | |||
4241 | * SCSI_MLQUEUE_HOST_BUSY - Block all devices served by this host temporarily. | 4241 | * SCSI_MLQUEUE_HOST_BUSY - Block all devices served by this host temporarily. |
4242 | **/ | 4242 | **/ |
4243 | static int | 4243 | static int |
4244 | lpfc_queuecommand_lck(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *)) | 4244 | lpfc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd) |
4245 | { | 4245 | { |
4246 | struct Scsi_Host *shost = cmnd->device->host; | ||
4247 | struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; | 4246 | struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; |
4248 | struct lpfc_hba *phba = vport->phba; | 4247 | struct lpfc_hba *phba = vport->phba; |
4249 | struct lpfc_rport_data *rdata = cmnd->device->hostdata; | 4248 | struct lpfc_rport_data *rdata = cmnd->device->hostdata; |
@@ -4299,7 +4298,6 @@ lpfc_queuecommand_lck(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *)) | |||
4299 | lpfc_cmd->timeout = 0; | 4298 | lpfc_cmd->timeout = 0; |
4300 | lpfc_cmd->start_time = jiffies; | 4299 | lpfc_cmd->start_time = jiffies; |
4301 | cmnd->host_scribble = (unsigned char *)lpfc_cmd; | 4300 | cmnd->host_scribble = (unsigned char *)lpfc_cmd; |
4302 | cmnd->scsi_done = done; | ||
4303 | 4301 | ||
4304 | if (scsi_get_prot_op(cmnd) != SCSI_PROT_NORMAL) { | 4302 | if (scsi_get_prot_op(cmnd) != SCSI_PROT_NORMAL) { |
4305 | if (vport->phba->cfg_enable_bg) { | 4303 | if (vport->phba->cfg_enable_bg) { |
@@ -4363,11 +4361,9 @@ lpfc_queuecommand_lck(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *)) | |||
4363 | goto out_host_busy_free_buf; | 4361 | goto out_host_busy_free_buf; |
4364 | } | 4362 | } |
4365 | if (phba->cfg_poll & ENABLE_FCP_RING_POLLING) { | 4363 | if (phba->cfg_poll & ENABLE_FCP_RING_POLLING) { |
4366 | spin_unlock(shost->host_lock); | ||
4367 | lpfc_sli_handle_fast_ring_event(phba, | 4364 | lpfc_sli_handle_fast_ring_event(phba, |
4368 | &phba->sli.ring[LPFC_FCP_RING], HA_R0RE_REQ); | 4365 | &phba->sli.ring[LPFC_FCP_RING], HA_R0RE_REQ); |
4369 | 4366 | ||
4370 | spin_lock(shost->host_lock); | ||
4371 | if (phba->cfg_poll & DISABLE_FCP_RING_INT) | 4367 | if (phba->cfg_poll & DISABLE_FCP_RING_INT) |
4372 | lpfc_poll_rearm_timer(phba); | 4368 | lpfc_poll_rearm_timer(phba); |
4373 | } | 4369 | } |
@@ -4384,11 +4380,10 @@ lpfc_queuecommand_lck(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *)) | |||
4384 | return SCSI_MLQUEUE_TARGET_BUSY; | 4380 | return SCSI_MLQUEUE_TARGET_BUSY; |
4385 | 4381 | ||
4386 | out_fail_command: | 4382 | out_fail_command: |
4387 | done(cmnd); | 4383 | cmnd->scsi_done(cmnd); |
4388 | return 0; | 4384 | return 0; |
4389 | } | 4385 | } |
4390 | 4386 | ||
4391 | static DEF_SCSI_QCMD(lpfc_queuecommand) | ||
4392 | 4387 | ||
4393 | /** | 4388 | /** |
4394 | * lpfc_abort_handler - scsi_host_template eh_abort_handler entry point | 4389 | * lpfc_abort_handler - scsi_host_template eh_abort_handler entry point |