diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_scsi.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 1e88b7a8a451..c94da4f2b8a6 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c | |||
@@ -605,9 +605,6 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, | |||
605 | result = cmd->result; | 605 | result = cmd->result; |
606 | sdev = cmd->device; | 606 | sdev = cmd->device; |
607 | lpfc_scsi_unprep_dma_buf(phba, lpfc_cmd); | 607 | lpfc_scsi_unprep_dma_buf(phba, lpfc_cmd); |
608 | spin_lock_irqsave(sdev->host->host_lock, flags); | ||
609 | lpfc_cmd->pCmd = NULL; /* This must be done before scsi_done */ | ||
610 | spin_unlock_irqrestore(sdev->host->host_lock, flags); | ||
611 | cmd->scsi_done(cmd); | 608 | cmd->scsi_done(cmd); |
612 | 609 | ||
613 | if (phba->cfg_poll & ENABLE_FCP_RING_POLLING) { | 610 | if (phba->cfg_poll & ENABLE_FCP_RING_POLLING) { |
@@ -616,6 +613,7 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, | |||
616 | * wake up the thread. | 613 | * wake up the thread. |
617 | */ | 614 | */ |
618 | spin_lock_irqsave(sdev->host->host_lock, flags); | 615 | spin_lock_irqsave(sdev->host->host_lock, flags); |
616 | lpfc_cmd->pCmd = NULL; | ||
619 | if (lpfc_cmd->waitq) | 617 | if (lpfc_cmd->waitq) |
620 | wake_up(lpfc_cmd->waitq); | 618 | wake_up(lpfc_cmd->waitq); |
621 | spin_unlock_irqrestore(sdev->host->host_lock, flags); | 619 | spin_unlock_irqrestore(sdev->host->host_lock, flags); |
@@ -686,6 +684,7 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, | |||
686 | * wake up the thread. | 684 | * wake up the thread. |
687 | */ | 685 | */ |
688 | spin_lock_irqsave(sdev->host->host_lock, flags); | 686 | spin_lock_irqsave(sdev->host->host_lock, flags); |
687 | lpfc_cmd->pCmd = NULL; | ||
689 | if (lpfc_cmd->waitq) | 688 | if (lpfc_cmd->waitq) |
690 | wake_up(lpfc_cmd->waitq); | 689 | wake_up(lpfc_cmd->waitq); |
691 | spin_unlock_irqrestore(sdev->host->host_lock, flags); | 690 | spin_unlock_irqrestore(sdev->host->host_lock, flags); |