aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_bsg.c
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2011-07-22 18:36:52 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-07-27 07:11:02 -0400
commit7851fe2c7f294d0beccf4c3d6af52e8247b89f00 (patch)
treeda056a1fd71824d3c8fd6e2b663cba5f3c965d94 /drivers/scsi/lpfc/lpfc_bsg.c
parent88a2cfbb8bf3802ca5a90c7d1567a1e542e6ef0c (diff)
[SCSI] lpfc 8.3.25: Adapter Interface fixes and changes
Adapter Interface fixes and changes - Modify the macro field from lpfc_init_vpi_vpi to lpfc_init_vfi_vpi - Add the new CQE_CODE_RECEIVE_V1 CQE Code, add code in the driver to handle the new Code the same as the CQE_CODE_RECEIVE code except that there are two new checks for this code that will cause the driver to use the new V1 macros for rq_id and fcf_id. - Fix a bug in lpfc_prep_seq() where the size out of the first CQE was ONLY being used, even though multiple dmabufs make up the sequence, each have their own CQE with potentially different sizes. - Fix bug in lpfc_bsg_ct_unsol_event() where the ulpContext and ulpWord[3] fields of the XMIT_SEQUENCE64_CX IOCB were being calculated incorrectly. - Do physical to logical translation before indexing into the active XRI array. - Populate physical vpi in the iocb data structure. - Put the current accumulated total in each IOCB in the chain as we are walking thru then. The last IOCB in the chain should have the total length of the sequence. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_bsg.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_bsg.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c
index 8675aa20642a..f46378fb802c 100644
--- a/drivers/scsi/lpfc/lpfc_bsg.c
+++ b/drivers/scsi/lpfc/lpfc_bsg.c
@@ -960,8 +960,10 @@ lpfc_bsg_ct_unsol_event(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
960 evt_dat->immed_dat].oxid, 960 evt_dat->immed_dat].oxid,
961 phba->ct_ctx[ 961 phba->ct_ctx[
962 evt_dat->immed_dat].SID); 962 evt_dat->immed_dat].SID);
963 phba->ct_ctx[evt_dat->immed_dat].rxid =
964 piocbq->iocb.ulpContext;
963 phba->ct_ctx[evt_dat->immed_dat].oxid = 965 phba->ct_ctx[evt_dat->immed_dat].oxid =
964 piocbq->iocb.ulpContext; 966 piocbq->iocb.unsli3.rcvsli3.ox_id;
965 phba->ct_ctx[evt_dat->immed_dat].SID = 967 phba->ct_ctx[evt_dat->immed_dat].SID =
966 piocbq->iocb.un.rcvels.remoteID; 968 piocbq->iocb.un.rcvels.remoteID;
967 phba->ct_ctx[evt_dat->immed_dat].flags = UNSOL_VALID; 969 phba->ct_ctx[evt_dat->immed_dat].flags = UNSOL_VALID;
@@ -1312,7 +1314,8 @@ lpfc_issue_ct_rsp(struct lpfc_hba *phba, struct fc_bsg_job *job, uint32_t tag,
1312 rc = IOCB_ERROR; 1314 rc = IOCB_ERROR;
1313 goto issue_ct_rsp_exit; 1315 goto issue_ct_rsp_exit;
1314 } 1316 }
1315 icmd->ulpContext = phba->ct_ctx[tag].oxid; 1317 icmd->ulpContext = phba->ct_ctx[tag].rxid;
1318 icmd->unsli3.rcvsli3.ox_id = phba->ct_ctx[tag].oxid;
1316 ndlp = lpfc_findnode_did(phba->pport, phba->ct_ctx[tag].SID); 1319 ndlp = lpfc_findnode_did(phba->pport, phba->ct_ctx[tag].SID);
1317 if (!ndlp) { 1320 if (!ndlp) {
1318 lpfc_printf_log(phba, KERN_WARNING, LOG_ELS, 1321 lpfc_printf_log(phba, KERN_WARNING, LOG_ELS,
@@ -1337,9 +1340,7 @@ lpfc_issue_ct_rsp(struct lpfc_hba *phba, struct fc_bsg_job *job, uint32_t tag,
1337 goto issue_ct_rsp_exit; 1340 goto issue_ct_rsp_exit;
1338 } 1341 }
1339 1342
1340 icmd->un.ulpWord[3] = ndlp->nlp_rpi; 1343 icmd->un.ulpWord[3] =
1341 if (phba->sli_rev == LPFC_SLI_REV4)
1342 icmd->ulpContext =
1343 phba->sli4_hba.rpi_ids[ndlp->nlp_rpi]; 1344 phba->sli4_hba.rpi_ids[ndlp->nlp_rpi];
1344 1345
1345 /* The exchange is done, mark the entry as invalid */ 1346 /* The exchange is done, mark the entry as invalid */
@@ -1351,8 +1352,8 @@ lpfc_issue_ct_rsp(struct lpfc_hba *phba, struct fc_bsg_job *job, uint32_t tag,
1351 1352
1352 /* Xmit CT response on exchange <xid> */ 1353 /* Xmit CT response on exchange <xid> */
1353 lpfc_printf_log(phba, KERN_INFO, LOG_ELS, 1354 lpfc_printf_log(phba, KERN_INFO, LOG_ELS,
1354 "2722 Xmit CT response on exchange x%x Data: x%x x%x\n", 1355 "2722 Xmit CT response on exchange x%x Data: x%x x%x x%x\n",
1355 icmd->ulpContext, icmd->ulpIoTag, phba->link_state); 1356 icmd->ulpContext, icmd->ulpIoTag, tag, phba->link_state);
1356 1357
1357 ctiocb->iocb_cmpl = NULL; 1358 ctiocb->iocb_cmpl = NULL;
1358 ctiocb->iocb_flag |= LPFC_IO_LIBDFC; 1359 ctiocb->iocb_flag |= LPFC_IO_LIBDFC;