aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_sli.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_sli.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 3dba3a967ed..f40aa7b905f 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -3763,7 +3763,6 @@ lpfc_sli_validate_fcp_iocb(struct lpfc_iocbq *iocbq, struct lpfc_vport *vport,
3763 lpfc_ctx_cmd ctx_cmd) 3763 lpfc_ctx_cmd ctx_cmd)
3764{ 3764{
3765 struct lpfc_scsi_buf *lpfc_cmd; 3765 struct lpfc_scsi_buf *lpfc_cmd;
3766 struct scsi_cmnd *cmnd;
3767 int rc = 1; 3766 int rc = 1;
3768 3767
3769 if (!(iocbq->iocb_flag & LPFC_IO_FCP)) 3768 if (!(iocbq->iocb_flag & LPFC_IO_FCP))
@@ -3773,19 +3772,20 @@ lpfc_sli_validate_fcp_iocb(struct lpfc_iocbq *iocbq, struct lpfc_vport *vport,
3773 return rc; 3772 return rc;
3774 3773
3775 lpfc_cmd = container_of(iocbq, struct lpfc_scsi_buf, cur_iocbq); 3774 lpfc_cmd = container_of(iocbq, struct lpfc_scsi_buf, cur_iocbq);
3776 cmnd = lpfc_cmd->pCmd;
3777 3775
3778 if (cmnd == NULL) 3776 if (lpfc_cmd->pCmd == NULL)
3779 return rc; 3777 return rc;
3780 3778
3781 switch (ctx_cmd) { 3779 switch (ctx_cmd) {
3782 case LPFC_CTX_LUN: 3780 case LPFC_CTX_LUN:
3783 if ((cmnd->device->id == tgt_id) && 3781 if ((lpfc_cmd->rdata->pnode) &&
3784 (cmnd->device->lun == lun_id)) 3782 (lpfc_cmd->rdata->pnode->nlp_sid == tgt_id) &&
3783 (scsilun_to_int(&lpfc_cmd->fcp_cmnd->fcp_lun) == lun_id))
3785 rc = 0; 3784 rc = 0;
3786 break; 3785 break;
3787 case LPFC_CTX_TGT: 3786 case LPFC_CTX_TGT:
3788 if (cmnd->device->id == tgt_id) 3787 if ((lpfc_cmd->rdata->pnode) &&
3788 (lpfc_cmd->rdata->pnode->nlp_sid == tgt_id))
3789 rc = 0; 3789 rc = 0;
3790 break; 3790 break;
3791 case LPFC_CTX_HOST: 3791 case LPFC_CTX_HOST:
@@ -3995,6 +3995,7 @@ lpfc_sli_issue_mbox_wait(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmboxq,
3995 if (pmboxq->context1) 3995 if (pmboxq->context1)
3996 return MBX_NOT_FINISHED; 3996 return MBX_NOT_FINISHED;
3997 3997
3998 pmboxq->mbox_flag &= ~LPFC_MBX_WAKE;
3998 /* setup wake call as IOCB callback */ 3999 /* setup wake call as IOCB callback */
3999 pmboxq->mbox_cmpl = lpfc_sli_wake_mbox_wait; 4000 pmboxq->mbox_cmpl = lpfc_sli_wake_mbox_wait;
4000 /* setup context field to pass wait_queue pointer to wake function */ 4001 /* setup context field to pass wait_queue pointer to wake function */