[SCSI] lpfc 8.3.18: Add support of received ELS commands

Add support of received ELS commands

- Add support for received RLS ELS command
- Add support for received ECHO ELS command
- Add support for received RTV ELS command

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>

authored by

James Smart and committed by
James Bottomley
12265f68 5ac6b303

+389 -2
+4
drivers/scsi/lpfc/lpfc.h
··· 202 uint32_t elsRcvPRLO; 203 uint32_t elsRcvPRLI; 204 uint32_t elsRcvLIRR; 205 uint32_t elsRcvRPS; 206 uint32_t elsRcvRPL; 207 uint32_t elsRcvRRQ; 208 uint32_t elsXmitFLOGI; 209 uint32_t elsXmitFDISC; 210 uint32_t elsXmitPLOGI; ··· 576 /* These fields used to be binfo */ 577 uint32_t fc_pref_DID; /* preferred D_ID */ 578 uint8_t fc_pref_ALPA; /* preferred AL_PA */ 579 uint32_t fc_edtov; /* E_D_TOV timer value */ 580 uint32_t fc_arbtov; /* ARB_TOV timer value */ 581 uint32_t fc_ratov; /* R_A_TOV timer value */
··· 202 uint32_t elsRcvPRLO; 203 uint32_t elsRcvPRLI; 204 uint32_t elsRcvLIRR; 205 + uint32_t elsRcvRLS; 206 uint32_t elsRcvRPS; 207 uint32_t elsRcvRPL; 208 uint32_t elsRcvRRQ; 209 + uint32_t elsRcvRTV; 210 + uint32_t elsRcvECHO; 211 uint32_t elsXmitFLOGI; 212 uint32_t elsXmitFDISC; 213 uint32_t elsXmitPLOGI; ··· 573 /* These fields used to be binfo */ 574 uint32_t fc_pref_DID; /* preferred D_ID */ 575 uint8_t fc_pref_ALPA; /* preferred AL_PA */ 576 + uint32_t fc_edtovResol; /* E_D_TOV timer resolution */ 577 uint32_t fc_edtov; /* E_D_TOV timer value */ 578 uint32_t fc_arbtov; /* ARB_TOV timer value */ 579 uint32_t fc_ratov; /* R_A_TOV timer value */
+344 -2
drivers/scsi/lpfc/lpfc_els.c
··· 517 if (sp->cmn.edtovResolution) /* E_D_TOV ticks are in nanoseconds */ 518 phba->fc_edtov = (phba->fc_edtov + 999999) / 1000000; 519 520 phba->fc_ratov = (be32_to_cpu(sp->cmn.w2.r_a_tov) + 999) / 1000; 521 522 if (phba->fc_topology == TOPOLOGY_LOOP) { ··· 3929 } 3930 3931 /** 3932 * lpfc_els_disc_adisc - Issue remaining adisc iocbs to npr nodes of a vport 3933 * @vport: pointer to a host virtual N_Port data structure. 3934 * ··· 4745 } 4746 4747 /** 4748 * lpfc_els_rcv_lirr - Process an unsolicited lirr iocb 4749 * @vport: pointer to a host virtual N_Port data structure. 4750 * @cmdiocb: pointer to lpfc command iocb data structure. ··· 4817 struct lpfc_nodelist *ndlp) 4818 { 4819 lpfc_els_rsp_acc(vport, ELS_CMD_ACC, cmdiocb, ndlp, NULL); 4820 } 4821 4822 /** ··· 4995 } 4996 4997 /** 4998 - * lpfc_els_rcv_rps - Process an unsolicited rps iocb 4999 * @vport: pointer to a host virtual N_Port data structure. 5000 * @cmdiocb: pointer to lpfc command iocb data structure. 5001 * @ndlp: pointer to a node-list data structure. ··· 5333 pcmd = (struct lpfc_dmabuf *) cmdiocb->context2; 5334 lp = (uint32_t *) pcmd->virt; 5335 rpl = (RPL *) (lp + 1); 5336 - 5337 maxsize = be32_to_cpu(rpl->maxsize); 5338 5339 /* We support only one port */ ··· 6151 if (newnode) 6152 lpfc_nlp_put(ndlp); 6153 break; 6154 case ELS_CMD_RPS: 6155 lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_UNSOL, 6156 "RCV RPS: did:x%x/ste:x%x flg:x%x", ··· 6191 if (newnode) 6192 lpfc_nlp_put(ndlp); 6193 break; 6194 case ELS_CMD_RRQ: 6195 lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_UNSOL, 6196 "RCV RRQ: did:x%x/ste:x%x flg:x%x", ··· 6207 6208 phba->fc_stat.elsRcvRRQ++; 6209 lpfc_els_rcv_rrq(vport, elsiocb, ndlp); 6210 if (newnode) 6211 lpfc_nlp_put(ndlp); 6212 break;
··· 517 if (sp->cmn.edtovResolution) /* E_D_TOV ticks are in nanoseconds */ 518 phba->fc_edtov = (phba->fc_edtov + 999999) / 1000000; 519 520 + phba->fc_edtovResol = sp->cmn.edtovResolution; 521 phba->fc_ratov = (be32_to_cpu(sp->cmn.w2.r_a_tov) + 999) / 1000; 522 523 if (phba->fc_topology == TOPOLOGY_LOOP) { ··· 3928 } 3929 3930 /** 3931 + * lpfc_els_rsp_echo_acc - Issue echo acc response 3932 + * @vport: pointer to a virtual N_Port data structure. 3933 + * @data: pointer to echo data to return in the accept. 3934 + * @oldiocb: pointer to the original lpfc command iocb data structure. 3935 + * @ndlp: pointer to a node-list data structure. 3936 + * 3937 + * Return code 3938 + * 0 - Successfully issued acc echo response 3939 + * 1 - Failed to issue acc echo response 3940 + **/ 3941 + static int 3942 + lpfc_els_rsp_echo_acc(struct lpfc_vport *vport, uint8_t *data, 3943 + struct lpfc_iocbq *oldiocb, struct lpfc_nodelist *ndlp) 3944 + { 3945 + struct lpfc_hba *phba = vport->phba; 3946 + struct lpfc_iocbq *elsiocb; 3947 + struct lpfc_sli *psli; 3948 + uint8_t *pcmd; 3949 + uint16_t cmdsize; 3950 + int rc; 3951 + 3952 + psli = &phba->sli; 3953 + cmdsize = oldiocb->iocb.unsli3.rcvsli3.acc_len; 3954 + 3955 + elsiocb = lpfc_prep_els_iocb(vport, 0, cmdsize, oldiocb->retry, ndlp, 3956 + ndlp->nlp_DID, ELS_CMD_ACC); 3957 + if (!elsiocb) 3958 + return 1; 3959 + 3960 + elsiocb->iocb.ulpContext = oldiocb->iocb.ulpContext; /* Xri */ 3961 + /* Xmit ECHO ACC response tag <ulpIoTag> */ 3962 + lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, 3963 + "2876 Xmit ECHO ACC response tag x%x xri x%x\n", 3964 + elsiocb->iotag, elsiocb->iocb.ulpContext); 3965 + pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt); 3966 + *((uint32_t *) (pcmd)) = ELS_CMD_ACC; 3967 + pcmd += sizeof(uint32_t); 3968 + memcpy(pcmd, data, cmdsize - sizeof(uint32_t)); 3969 + 3970 + lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_RSP, 3971 + "Issue ACC ECHO: did:x%x flg:x%x", 3972 + ndlp->nlp_DID, ndlp->nlp_flag, 0); 3973 + 3974 + phba->fc_stat.elsXmitACC++; 3975 + elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp; 3976 + lpfc_nlp_put(ndlp); 3977 + elsiocb->context1 = NULL; /* Don't need ndlp for cmpl, 3978 + * it could be freed */ 3979 + 3980 + rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0); 3981 + if (rc == IOCB_ERROR) { 3982 + lpfc_els_free_iocb(phba, elsiocb); 3983 + return 1; 3984 + } 3985 + return 0; 3986 + } 3987 + 3988 + /** 3989 * lpfc_els_disc_adisc - Issue remaining adisc iocbs to npr nodes of a vport 3990 * @vport: pointer to a host virtual N_Port data structure. 3991 * ··· 4686 } 4687 4688 /** 4689 + * lpfc_els_rcv_echo - Process an unsolicited echo iocb 4690 + * @vport: pointer to a host virtual N_Port data structure. 4691 + * @cmdiocb: pointer to lpfc command iocb data structure. 4692 + * @ndlp: pointer to a node-list data structure. 4693 + * 4694 + * Return code 4695 + * 0 - Successfully processed echo iocb (currently always return 0) 4696 + **/ 4697 + static int 4698 + lpfc_els_rcv_echo(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, 4699 + struct lpfc_nodelist *ndlp) 4700 + { 4701 + uint8_t *pcmd; 4702 + 4703 + pcmd = (uint8_t *) (((struct lpfc_dmabuf *) cmdiocb->context2)->virt); 4704 + 4705 + /* skip over first word of echo command to find echo data */ 4706 + pcmd += sizeof(uint32_t); 4707 + 4708 + lpfc_els_rsp_echo_acc(vport, pcmd, cmdiocb, ndlp); 4709 + return 0; 4710 + } 4711 + 4712 + /** 4713 * lpfc_els_rcv_lirr - Process an unsolicited lirr iocb 4714 * @vport: pointer to a host virtual N_Port data structure. 4715 * @cmdiocb: pointer to lpfc command iocb data structure. ··· 4734 struct lpfc_nodelist *ndlp) 4735 { 4736 lpfc_els_rsp_acc(vport, ELS_CMD_ACC, cmdiocb, ndlp, NULL); 4737 + } 4738 + 4739 + /** 4740 + * lpfc_els_rsp_rls_acc - Completion callbk func for MBX_READ_LNK_STAT mbox cmd 4741 + * @phba: pointer to lpfc hba data structure. 4742 + * @pmb: pointer to the driver internal queue element for mailbox command. 4743 + * 4744 + * This routine is the completion callback function for the MBX_READ_LNK_STAT 4745 + * mailbox command. This callback function is to actually send the Accept 4746 + * (ACC) response to a Read Port Status (RPS) unsolicited IOCB event. It 4747 + * collects the link statistics from the completion of the MBX_READ_LNK_STAT 4748 + * mailbox command, constructs the RPS response with the link statistics 4749 + * collected, and then invokes the lpfc_sli_issue_iocb() routine to send ACC 4750 + * response to the RPS. 4751 + * 4752 + * Note that, in lpfc_prep_els_iocb() routine, the reference count of ndlp 4753 + * will be incremented by 1 for holding the ndlp and the reference to ndlp 4754 + * will be stored into the context1 field of the IOCB for the completion 4755 + * callback function to the RPS Accept Response ELS IOCB command. 4756 + * 4757 + **/ 4758 + static void 4759 + lpfc_els_rsp_rls_acc(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) 4760 + { 4761 + MAILBOX_t *mb; 4762 + IOCB_t *icmd; 4763 + struct RLS_RSP *rls_rsp; 4764 + uint8_t *pcmd; 4765 + struct lpfc_iocbq *elsiocb; 4766 + struct lpfc_nodelist *ndlp; 4767 + uint16_t xri; 4768 + uint32_t cmdsize; 4769 + 4770 + mb = &pmb->u.mb; 4771 + 4772 + ndlp = (struct lpfc_nodelist *) pmb->context2; 4773 + xri = (uint16_t) ((unsigned long)(pmb->context1)); 4774 + pmb->context1 = NULL; 4775 + pmb->context2 = NULL; 4776 + 4777 + if (mb->mbxStatus) { 4778 + mempool_free(pmb, phba->mbox_mem_pool); 4779 + return; 4780 + } 4781 + 4782 + cmdsize = sizeof(struct RLS_RSP) + sizeof(uint32_t); 4783 + mempool_free(pmb, phba->mbox_mem_pool); 4784 + elsiocb = lpfc_prep_els_iocb(phba->pport, 0, cmdsize, 4785 + lpfc_max_els_tries, ndlp, 4786 + ndlp->nlp_DID, ELS_CMD_ACC); 4787 + 4788 + /* Decrement the ndlp reference count from previous mbox command */ 4789 + lpfc_nlp_put(ndlp); 4790 + 4791 + if (!elsiocb) 4792 + return; 4793 + 4794 + icmd = &elsiocb->iocb; 4795 + icmd->ulpContext = xri; 4796 + 4797 + pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt); 4798 + *((uint32_t *) (pcmd)) = ELS_CMD_ACC; 4799 + pcmd += sizeof(uint32_t); /* Skip past command */ 4800 + rls_rsp = (struct RLS_RSP *)pcmd; 4801 + 4802 + rls_rsp->linkFailureCnt = cpu_to_be32(mb->un.varRdLnk.linkFailureCnt); 4803 + rls_rsp->lossSyncCnt = cpu_to_be32(mb->un.varRdLnk.lossSyncCnt); 4804 + rls_rsp->lossSignalCnt = cpu_to_be32(mb->un.varRdLnk.lossSignalCnt); 4805 + rls_rsp->primSeqErrCnt = cpu_to_be32(mb->un.varRdLnk.primSeqErrCnt); 4806 + rls_rsp->invalidXmitWord = cpu_to_be32(mb->un.varRdLnk.invalidXmitWord); 4807 + rls_rsp->crcCnt = cpu_to_be32(mb->un.varRdLnk.crcCnt); 4808 + 4809 + /* Xmit ELS RLS ACC response tag <ulpIoTag> */ 4810 + lpfc_printf_vlog(ndlp->vport, KERN_INFO, LOG_ELS, 4811 + "2874 Xmit ELS RLS ACC response tag x%x xri x%x, " 4812 + "did x%x, nlp_flag x%x, nlp_state x%x, rpi x%x\n", 4813 + elsiocb->iotag, elsiocb->iocb.ulpContext, 4814 + ndlp->nlp_DID, ndlp->nlp_flag, ndlp->nlp_state, 4815 + ndlp->nlp_rpi); 4816 + elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp; 4817 + phba->fc_stat.elsXmitACC++; 4818 + if (lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0) == IOCB_ERROR) 4819 + lpfc_els_free_iocb(phba, elsiocb); 4820 } 4821 4822 /** ··· 4829 } 4830 4831 /** 4832 + * lpfc_els_rcv_rls - Process an unsolicited rls iocb 4833 + * @vport: pointer to a host virtual N_Port data structure. 4834 + * @cmdiocb: pointer to lpfc command iocb data structure. 4835 + * @ndlp: pointer to a node-list data structure. 4836 + * 4837 + * This routine processes Read Port Status (RPL) IOCB received as an 4838 + * ELS unsolicited event. It first checks the remote port state. If the 4839 + * remote port is not in NLP_STE_UNMAPPED_NODE state or NLP_STE_MAPPED_NODE 4840 + * state, it invokes the lpfc_els_rsl_reject() routine to send the reject 4841 + * response. Otherwise, it issue the MBX_READ_LNK_STAT mailbox command 4842 + * for reading the HBA link statistics. It is for the callback function, 4843 + * lpfc_els_rsp_rls_acc(), set to the MBX_READ_LNK_STAT mailbox command 4844 + * to actually sending out RPL Accept (ACC) response. 4845 + * 4846 + * Return codes 4847 + * 0 - Successfully processed rls iocb (currently always return 0) 4848 + **/ 4849 + static int 4850 + lpfc_els_rcv_rls(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, 4851 + struct lpfc_nodelist *ndlp) 4852 + { 4853 + struct lpfc_hba *phba = vport->phba; 4854 + LPFC_MBOXQ_t *mbox; 4855 + struct lpfc_dmabuf *pcmd; 4856 + struct ls_rjt stat; 4857 + 4858 + if ((ndlp->nlp_state != NLP_STE_UNMAPPED_NODE) && 4859 + (ndlp->nlp_state != NLP_STE_MAPPED_NODE)) 4860 + /* reject the unsolicited RPS request and done with it */ 4861 + goto reject_out; 4862 + 4863 + pcmd = (struct lpfc_dmabuf *) cmdiocb->context2; 4864 + 4865 + mbox = mempool_alloc(phba->mbox_mem_pool, GFP_ATOMIC); 4866 + if (mbox) { 4867 + lpfc_read_lnk_stat(phba, mbox); 4868 + mbox->context1 = 4869 + (void *)((unsigned long) cmdiocb->iocb.ulpContext); 4870 + mbox->context2 = lpfc_nlp_get(ndlp); 4871 + mbox->vport = vport; 4872 + mbox->mbox_cmpl = lpfc_els_rsp_rls_acc; 4873 + if (lpfc_sli_issue_mbox(phba, mbox, MBX_NOWAIT) 4874 + != MBX_NOT_FINISHED) 4875 + /* Mbox completion will send ELS Response */ 4876 + return 0; 4877 + /* Decrement reference count used for the failed mbox 4878 + * command. 4879 + */ 4880 + lpfc_nlp_put(ndlp); 4881 + mempool_free(mbox, phba->mbox_mem_pool); 4882 + } 4883 + reject_out: 4884 + /* issue rejection response */ 4885 + stat.un.b.lsRjtRsvd0 = 0; 4886 + stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; 4887 + stat.un.b.lsRjtRsnCodeExp = LSEXP_CANT_GIVE_DATA; 4888 + stat.un.b.vendorUnique = 0; 4889 + lpfc_els_rsp_reject(vport, stat.un.lsRjtError, cmdiocb, ndlp, NULL); 4890 + return 0; 4891 + } 4892 + 4893 + /** 4894 + * lpfc_els_rcv_rtv - Process an unsolicited rtv iocb 4895 + * @vport: pointer to a host virtual N_Port data structure. 4896 + * @cmdiocb: pointer to lpfc command iocb data structure. 4897 + * @ndlp: pointer to a node-list data structure. 4898 + * 4899 + * This routine processes Read Timout Value (RTV) IOCB received as an 4900 + * ELS unsolicited event. It first checks the remote port state. If the 4901 + * remote port is not in NLP_STE_UNMAPPED_NODE state or NLP_STE_MAPPED_NODE 4902 + * state, it invokes the lpfc_els_rsl_reject() routine to send the reject 4903 + * response. Otherwise, it sends the Accept(ACC) response to a Read Timeout 4904 + * Value (RTV) unsolicited IOCB event. 4905 + * 4906 + * Note that, in lpfc_prep_els_iocb() routine, the reference count of ndlp 4907 + * will be incremented by 1 for holding the ndlp and the reference to ndlp 4908 + * will be stored into the context1 field of the IOCB for the completion 4909 + * callback function to the RPS Accept Response ELS IOCB command. 4910 + * 4911 + * Return codes 4912 + * 0 - Successfully processed rtv iocb (currently always return 0) 4913 + **/ 4914 + static int 4915 + lpfc_els_rcv_rtv(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, 4916 + struct lpfc_nodelist *ndlp) 4917 + { 4918 + struct lpfc_hba *phba = vport->phba; 4919 + struct ls_rjt stat; 4920 + struct RTV_RSP *rtv_rsp; 4921 + uint8_t *pcmd; 4922 + struct lpfc_iocbq *elsiocb; 4923 + uint32_t cmdsize; 4924 + 4925 + 4926 + if ((ndlp->nlp_state != NLP_STE_UNMAPPED_NODE) && 4927 + (ndlp->nlp_state != NLP_STE_MAPPED_NODE)) 4928 + /* reject the unsolicited RPS request and done with it */ 4929 + goto reject_out; 4930 + 4931 + cmdsize = sizeof(struct RTV_RSP) + sizeof(uint32_t); 4932 + elsiocb = lpfc_prep_els_iocb(phba->pport, 0, cmdsize, 4933 + lpfc_max_els_tries, ndlp, 4934 + ndlp->nlp_DID, ELS_CMD_ACC); 4935 + 4936 + if (!elsiocb) 4937 + return 1; 4938 + 4939 + pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt); 4940 + *((uint32_t *) (pcmd)) = ELS_CMD_ACC; 4941 + pcmd += sizeof(uint32_t); /* Skip past command */ 4942 + 4943 + /* use the command's xri in the response */ 4944 + elsiocb->iocb.ulpContext = cmdiocb->iocb.ulpContext; 4945 + 4946 + rtv_rsp = (struct RTV_RSP *)pcmd; 4947 + 4948 + /* populate RTV payload */ 4949 + rtv_rsp->ratov = cpu_to_be32(phba->fc_ratov * 1000); /* report msecs */ 4950 + rtv_rsp->edtov = cpu_to_be32(phba->fc_edtov); 4951 + bf_set(qtov_edtovres, rtv_rsp, phba->fc_edtovResol ? 1 : 0); 4952 + bf_set(qtov_rttov, rtv_rsp, 0); /* Field is for FC ONLY */ 4953 + rtv_rsp->qtov = cpu_to_be32(rtv_rsp->qtov); 4954 + 4955 + /* Xmit ELS RLS ACC response tag <ulpIoTag> */ 4956 + lpfc_printf_vlog(ndlp->vport, KERN_INFO, LOG_ELS, 4957 + "2875 Xmit ELS RTV ACC response tag x%x xri x%x, " 4958 + "did x%x, nlp_flag x%x, nlp_state x%x, rpi x%x, " 4959 + "Data: x%x x%x x%x\n", 4960 + elsiocb->iotag, elsiocb->iocb.ulpContext, 4961 + ndlp->nlp_DID, ndlp->nlp_flag, ndlp->nlp_state, 4962 + ndlp->nlp_rpi, 4963 + rtv_rsp->ratov, rtv_rsp->edtov, rtv_rsp->qtov); 4964 + elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp; 4965 + phba->fc_stat.elsXmitACC++; 4966 + if (lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0) == IOCB_ERROR) 4967 + lpfc_els_free_iocb(phba, elsiocb); 4968 + return 0; 4969 + 4970 + reject_out: 4971 + /* issue rejection response */ 4972 + stat.un.b.lsRjtRsvd0 = 0; 4973 + stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; 4974 + stat.un.b.lsRjtRsnCodeExp = LSEXP_CANT_GIVE_DATA; 4975 + stat.un.b.vendorUnique = 0; 4976 + lpfc_els_rsp_reject(vport, stat.un.lsRjtError, cmdiocb, ndlp, NULL); 4977 + return 0; 4978 + } 4979 + 4980 + /* lpfc_els_rcv_rps - Process an unsolicited rps iocb 4981 * @vport: pointer to a host virtual N_Port data structure. 4982 * @cmdiocb: pointer to lpfc command iocb data structure. 4983 * @ndlp: pointer to a node-list data structure. ··· 5019 pcmd = (struct lpfc_dmabuf *) cmdiocb->context2; 5020 lp = (uint32_t *) pcmd->virt; 5021 rpl = (RPL *) (lp + 1); 5022 maxsize = be32_to_cpu(rpl->maxsize); 5023 5024 /* We support only one port */ ··· 5838 if (newnode) 5839 lpfc_nlp_put(ndlp); 5840 break; 5841 + case ELS_CMD_RLS: 5842 + lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_UNSOL, 5843 + "RCV RLS: did:x%x/ste:x%x flg:x%x", 5844 + did, vport->port_state, ndlp->nlp_flag); 5845 + 5846 + phba->fc_stat.elsRcvRLS++; 5847 + lpfc_els_rcv_rls(vport, elsiocb, ndlp); 5848 + if (newnode) 5849 + lpfc_nlp_put(ndlp); 5850 + break; 5851 case ELS_CMD_RPS: 5852 lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_UNSOL, 5853 "RCV RPS: did:x%x/ste:x%x flg:x%x", ··· 5868 if (newnode) 5869 lpfc_nlp_put(ndlp); 5870 break; 5871 + case ELS_CMD_RTV: 5872 + lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_UNSOL, 5873 + "RCV RTV: did:x%x/ste:x%x flg:x%x", 5874 + did, vport->port_state, ndlp->nlp_flag); 5875 + phba->fc_stat.elsRcvRTV++; 5876 + lpfc_els_rcv_rtv(vport, elsiocb, ndlp); 5877 + if (newnode) 5878 + lpfc_nlp_put(ndlp); 5879 + break; 5880 case ELS_CMD_RRQ: 5881 lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_UNSOL, 5882 "RCV RRQ: did:x%x/ste:x%x flg:x%x", ··· 5875 5876 phba->fc_stat.elsRcvRRQ++; 5877 lpfc_els_rcv_rrq(vport, elsiocb, ndlp); 5878 + if (newnode) 5879 + lpfc_nlp_put(ndlp); 5880 + break; 5881 + case ELS_CMD_ECHO: 5882 + lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_UNSOL, 5883 + "RCV ECHO: did:x%x/ste:x%x flg:x%x", 5884 + did, vport->port_state, ndlp->nlp_flag); 5885 + 5886 + phba->fc_stat.elsRcvECHO++; 5887 + lpfc_els_rcv_echo(vport, elsiocb, ndlp); 5888 if (newnode) 5889 lpfc_nlp_put(ndlp); 5890 break;
+41
drivers/scsi/lpfc/lpfc_hw.h
··· 861 uint32_t crcCnt; 862 } RPS_RSP; 863 864 typedef struct _RPL { /* Structure is in Big Endian format */ 865 uint32_t maxsize; 866 uint32_t index;
··· 861 uint32_t crcCnt; 862 } RPS_RSP; 863 864 + struct RLS { /* Structure is in Big Endian format */ 865 + uint32_t rls; 866 + #define rls_rsvd_SHIFT 24 867 + #define rls_rsvd_MASK 0x000000ff 868 + #define rls_rsvd_WORD rls 869 + #define rls_did_SHIFT 0 870 + #define rls_did_MASK 0x00ffffff 871 + #define rls_did_WORD rls 872 + }; 873 + 874 + struct RLS_RSP { /* Structure is in Big Endian format */ 875 + uint32_t linkFailureCnt; 876 + uint32_t lossSyncCnt; 877 + uint32_t lossSignalCnt; 878 + uint32_t primSeqErrCnt; 879 + uint32_t invalidXmitWord; 880 + uint32_t crcCnt; 881 + }; 882 + 883 + struct RTV_RSP { /* Structure is in Big Endian format */ 884 + uint32_t ratov; 885 + uint32_t edtov; 886 + uint32_t qtov; 887 + #define qtov_rsvd0_SHIFT 28 888 + #define qtov_rsvd0_MASK 0x0000000f 889 + #define qtov_rsvd0_WORD qtov /* reserved */ 890 + #define qtov_edtovres_SHIFT 27 891 + #define qtov_edtovres_MASK 0x00000001 892 + #define qtov_edtovres_WORD qtov /* E_D_TOV Resolution */ 893 + #define qtov__rsvd1_SHIFT 19 894 + #define qtov_rsvd1_MASK 0x0000003f 895 + #define qtov_rsvd1_WORD qtov /* reserved */ 896 + #define qtov_rttov_SHIFT 18 897 + #define qtov_rttov_MASK 0x00000001 898 + #define qtov_rttov_WORD qtov /* R_T_TOV value */ 899 + #define qtov_rsvd2_SHIFT 0 900 + #define qtov_rsvd2_MASK 0x0003ffff 901 + #define qtov_rsvd2_WORD qtov /* reserved */ 902 + }; 903 + 904 + 905 typedef struct _RPL { /* Structure is in Big Endian format */ 906 uint32_t maxsize; 907 uint32_t index;