aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_scsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_scsi.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_scsi.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index 6df8bc003a88..0910a9ab76a5 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -169,6 +169,9 @@ lpfc_ramp_up_queue_handler(struct lpfc_hba *phba)
169 for(i = 0; i <= phba->max_vpi && vports[i] != NULL; i++) { 169 for(i = 0; i <= phba->max_vpi && vports[i] != NULL; i++) {
170 shost = lpfc_shost_from_vport(vports[i]); 170 shost = lpfc_shost_from_vport(vports[i]);
171 shost_for_each_device(sdev, shost) { 171 shost_for_each_device(sdev, shost) {
172 if (vports[i]->cfg_lun_queue_depth <=
173 sdev->queue_depth)
174 continue;
172 if (sdev->ordered_tags) 175 if (sdev->ordered_tags)
173 scsi_adjust_queue_depth(sdev, 176 scsi_adjust_queue_depth(sdev,
174 MSG_ORDERED_TAG, 177 MSG_ORDERED_TAG,
@@ -606,6 +609,9 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn,
606 result = cmd->result; 609 result = cmd->result;
607 sdev = cmd->device; 610 sdev = cmd->device;
608 lpfc_scsi_unprep_dma_buf(phba, lpfc_cmd); 611 lpfc_scsi_unprep_dma_buf(phba, lpfc_cmd);
612 spin_lock_irqsave(sdev->host->host_lock, flags);
613 lpfc_cmd->pCmd = NULL; /* This must be done before scsi_done */
614 spin_unlock_irqrestore(sdev->host->host_lock, flags);
609 cmd->scsi_done(cmd); 615 cmd->scsi_done(cmd);
610 616
611 if (phba->cfg_poll & ENABLE_FCP_RING_POLLING) { 617 if (phba->cfg_poll & ENABLE_FCP_RING_POLLING) {
@@ -614,7 +620,6 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn,
614 * wake up the thread. 620 * wake up the thread.
615 */ 621 */
616 spin_lock_irqsave(sdev->host->host_lock, flags); 622 spin_lock_irqsave(sdev->host->host_lock, flags);
617 lpfc_cmd->pCmd = NULL;
618 if (lpfc_cmd->waitq) 623 if (lpfc_cmd->waitq)
619 wake_up(lpfc_cmd->waitq); 624 wake_up(lpfc_cmd->waitq);
620 spin_unlock_irqrestore(sdev->host->host_lock, flags); 625 spin_unlock_irqrestore(sdev->host->host_lock, flags);
@@ -685,7 +690,6 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn,
685 * wake up the thread. 690 * wake up the thread.
686 */ 691 */
687 spin_lock_irqsave(sdev->host->host_lock, flags); 692 spin_lock_irqsave(sdev->host->host_lock, flags);
688 lpfc_cmd->pCmd = NULL;
689 if (lpfc_cmd->waitq) 693 if (lpfc_cmd->waitq)
690 wake_up(lpfc_cmd->waitq); 694 wake_up(lpfc_cmd->waitq);
691 spin_unlock_irqrestore(sdev->host->host_lock, flags); 695 spin_unlock_irqrestore(sdev->host->host_lock, flags);