aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_sli.c
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2008-06-14 22:52:59 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-07-12 09:22:28 -0400
commit495a714c50e2c6ca6357129812f983b3ac0a32f2 (patch)
treef4f7237ed2bcb5e35c9dacae60864d169303b6b4 /drivers/scsi/lpfc/lpfc_sli.c
parent5e9d9b8276980fc5dfa88ce34f6ec88ce3026232 (diff)
[SCSI] lpfc 8.2.7 : Miscellaneous Fixes
Miscellaneous Fixes: - Fix bug in mbox sysfs interface that locked in EAGAIN if discovery stalled. - Fix missing error message when npiv and loop are true when link up occurs. - Fix panic in lpfc_scsi_cmd_iocb_cmpl: scsi_buf was NULL, but created race conditions with other code paths. - Fix error in sysfs mailbox structure that didn't rezero on next use. - Add missing mempool_free() to attachment failure path - Fix missing put of ndlp structure during driver unload. - Fix applications unable to send mailbox commands during discovery. - Remove unused argument (type) from function lpfc_post_buffer() API - Fix vport name is not shown after hbacmd vportcreate. - Remove repeated code statements. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
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 */