aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJames Smart <james.smart@avagotech.com>2015-05-21 13:55:18 -0400
committerJames Bottomley <JBottomley@Odin.com>2015-06-05 18:30:28 -0400
commit8b017a30a31390bf7968d60e408f2d38fc7bd254 (patch)
tree195b8f6267b4ff13921bdece2ceb92c2855aa7d8 /drivers
parent0290217ad830f2813bb9ed5f51af686c0c591f28 (diff)
lpfc: Add support for ELS LCB.
Also has a little whitespace fixing. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/lpfc/lpfc.h1
-rw-r--r--drivers/scsi/lpfc/lpfc_els.c239
-rw-r--r--drivers/scsi/lpfc/lpfc_hw.h32
-rw-r--r--drivers/scsi/lpfc/lpfc_hw4.h27
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c2
-rw-r--r--drivers/scsi/lpfc/lpfc_sli4.h11
6 files changed, 306 insertions, 6 deletions
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
index 9b81a34d7449..3246d09d22ff 100644
--- a/drivers/scsi/lpfc/lpfc.h
+++ b/drivers/scsi/lpfc/lpfc.h
@@ -230,6 +230,7 @@ struct lpfc_stats {
230 uint32_t elsRcvRRQ; 230 uint32_t elsRcvRRQ;
231 uint32_t elsRcvRTV; 231 uint32_t elsRcvRTV;
232 uint32_t elsRcvECHO; 232 uint32_t elsRcvECHO;
233 uint32_t elsRcvLCB;
233 uint32_t elsXmitFLOGI; 234 uint32_t elsXmitFLOGI;
234 uint32_t elsXmitFDISC; 235 uint32_t elsXmitFDISC;
235 uint32_t elsXmitPLOGI; 236 uint32_t elsXmitPLOGI;
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index 851e8efe364e..3975276d1155 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -4587,16 +4587,16 @@ lpfc_els_disc_plogi(struct lpfc_vport *vport)
4587 if (!NLP_CHK_NODE_ACT(ndlp)) 4587 if (!NLP_CHK_NODE_ACT(ndlp))
4588 continue; 4588 continue;
4589 if (ndlp->nlp_state == NLP_STE_NPR_NODE && 4589 if (ndlp->nlp_state == NLP_STE_NPR_NODE &&
4590 (ndlp->nlp_flag & NLP_NPR_2B_DISC) != 0 && 4590 (ndlp->nlp_flag & NLP_NPR_2B_DISC) != 0 &&
4591 (ndlp->nlp_flag & NLP_DELAY_TMO) == 0 && 4591 (ndlp->nlp_flag & NLP_DELAY_TMO) == 0 &&
4592 (ndlp->nlp_flag & NLP_NPR_ADISC) == 0) { 4592 (ndlp->nlp_flag & NLP_NPR_ADISC) == 0) {
4593 ndlp->nlp_prev_state = ndlp->nlp_state; 4593 ndlp->nlp_prev_state = ndlp->nlp_state;
4594 lpfc_nlp_set_state(vport, ndlp, NLP_STE_PLOGI_ISSUE); 4594 lpfc_nlp_set_state(vport, ndlp, NLP_STE_PLOGI_ISSUE);
4595 lpfc_issue_els_plogi(vport, ndlp->nlp_DID, 0); 4595 lpfc_issue_els_plogi(vport, ndlp->nlp_DID, 0);
4596 sentplogi++; 4596 sentplogi++;
4597 vport->num_disc_nodes++; 4597 vport->num_disc_nodes++;
4598 if (vport->num_disc_nodes >= 4598 if (vport->num_disc_nodes >=
4599 vport->cfg_discovery_threads) { 4599 vport->cfg_discovery_threads) {
4600 spin_lock_irq(shost->host_lock); 4600 spin_lock_irq(shost->host_lock);
4601 vport->fc_flag |= FC_NLP_MORE; 4601 vport->fc_flag |= FC_NLP_MORE;
4602 spin_unlock_irq(shost->host_lock); 4602 spin_unlock_irq(shost->host_lock);
@@ -4615,6 +4615,233 @@ lpfc_els_disc_plogi(struct lpfc_vport *vport)
4615 return sentplogi; 4615 return sentplogi;
4616} 4616}
4617 4617
4618static void
4619lpfc_els_lcb_rsp(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
4620{
4621 MAILBOX_t *mb;
4622 IOCB_t *icmd;
4623 uint8_t *pcmd;
4624 struct lpfc_iocbq *elsiocb;
4625 struct lpfc_nodelist *ndlp;
4626 struct ls_rjt *stat;
4627 struct lpfc_lcb_context *lcb_context;
4628 struct fc_lcb_res_frame *lcb_res;
4629 uint32_t cmdsize;
4630 int rc;
4631
4632 mb = &pmb->u.mb;
4633
4634 lcb_context = (struct lpfc_lcb_context *)pmb->context1;
4635 ndlp = lcb_context->ndlp;
4636 pmb->context1 = NULL;
4637 pmb->context2 = NULL;
4638
4639 if (mb->mbxStatus) {
4640 mempool_free(pmb, phba->mbox_mem_pool);
4641 goto error;
4642 }
4643
4644 mempool_free(pmb, phba->mbox_mem_pool);
4645
4646 cmdsize = sizeof(struct fc_lcb_res_frame);
4647 elsiocb = lpfc_prep_els_iocb(phba->pport, 0, cmdsize,
4648 lpfc_max_els_tries, ndlp,
4649 ndlp->nlp_DID, ELS_CMD_ACC);
4650
4651 /* Decrement the ndlp reference count from previous mbox command */
4652 lpfc_nlp_put(ndlp);
4653
4654 if (!elsiocb)
4655 goto free_lcb_context;
4656
4657 lcb_res = (struct fc_lcb_res_frame *)
4658 (((struct lpfc_dmabuf *)elsiocb->context2)->virt);
4659
4660 icmd = &elsiocb->iocb;
4661 icmd->ulpContext = lcb_context->rx_id;
4662 icmd->unsli3.rcvsli3.ox_id = lcb_context->ox_id;
4663
4664 pcmd = (uint8_t *)(((struct lpfc_dmabuf *)elsiocb->context2)->virt);
4665 *((uint32_t *)(pcmd)) = ELS_CMD_ACC;
4666 lcb_res->lcb_sub_command = lcb_context->sub_command;
4667 lcb_res->lcb_type = lcb_context->type;
4668 lcb_res->lcb_frequency = lcb_context->frequency;
4669 elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp;
4670 phba->fc_stat.elsXmitACC++;
4671 rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0);
4672 if (rc == IOCB_ERROR)
4673 lpfc_els_free_iocb(phba, elsiocb);
4674
4675 kfree(lcb_context);
4676 return;
4677
4678error:
4679 cmdsize = sizeof(struct fc_lcb_res_frame);
4680 elsiocb = lpfc_prep_els_iocb(phba->pport, 0, cmdsize,
4681 lpfc_max_els_tries, ndlp,
4682 ndlp->nlp_DID, ELS_CMD_LS_RJT);
4683 lpfc_nlp_put(ndlp);
4684 if (!elsiocb)
4685 goto free_lcb_context;
4686
4687 icmd = &elsiocb->iocb;
4688 icmd->ulpContext = lcb_context->rx_id;
4689 icmd->unsli3.rcvsli3.ox_id = lcb_context->ox_id;
4690 pcmd = (uint8_t *)(((struct lpfc_dmabuf *)elsiocb->context2)->virt);
4691
4692 *((uint32_t *)(pcmd)) = ELS_CMD_LS_RJT;
4693 stat = (struct ls_rjt *)(pcmd + sizeof(uint32_t));
4694 stat->un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC;
4695
4696 elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp;
4697 phba->fc_stat.elsXmitLSRJT++;
4698 rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0);
4699 if (rc == IOCB_ERROR)
4700 lpfc_els_free_iocb(phba, elsiocb);
4701free_lcb_context:
4702 kfree(lcb_context);
4703}
4704
4705static int
4706lpfc_sli4_set_beacon(struct lpfc_vport *vport,
4707 struct lpfc_lcb_context *lcb_context,
4708 uint32_t beacon_state)
4709{
4710 struct lpfc_hba *phba = vport->phba;
4711 LPFC_MBOXQ_t *mbox = NULL;
4712 uint32_t len;
4713 int rc;
4714
4715 mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
4716 if (!mbox)
4717 return 1;
4718
4719 len = sizeof(struct lpfc_mbx_set_beacon_config) -
4720 sizeof(struct lpfc_sli4_cfg_mhdr);
4721 lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_COMMON,
4722 LPFC_MBOX_OPCODE_SET_BEACON_CONFIG, len,
4723 LPFC_SLI4_MBX_EMBED);
4724 mbox->context1 = (void *)lcb_context;
4725 mbox->vport = phba->pport;
4726 mbox->mbox_cmpl = lpfc_els_lcb_rsp;
4727 bf_set(lpfc_mbx_set_beacon_port_num, &mbox->u.mqe.un.beacon_config,
4728 phba->sli4_hba.physical_port);
4729 bf_set(lpfc_mbx_set_beacon_state, &mbox->u.mqe.un.beacon_config,
4730 beacon_state);
4731 bf_set(lpfc_mbx_set_beacon_port_type, &mbox->u.mqe.un.beacon_config, 1);
4732 bf_set(lpfc_mbx_set_beacon_duration, &mbox->u.mqe.un.beacon_config, 0);
4733 rc = lpfc_sli_issue_mbox(phba, mbox, MBX_NOWAIT);
4734 if (rc == MBX_NOT_FINISHED) {
4735 mempool_free(mbox, phba->mbox_mem_pool);
4736 return 1;
4737 }
4738
4739 return 0;
4740}
4741
4742
4743/**
4744 * lpfc_els_rcv_lcb - Process an unsolicited LCB
4745 * @vport: pointer to a host virtual N_Port data structure.
4746 * @cmdiocb: pointer to lpfc command iocb data structure.
4747 * @ndlp: pointer to a node-list data structure.
4748 *
4749 * This routine processes an unsolicited LCB(LINK CABLE BEACON) IOCB.
4750 * First, the payload of the unsolicited LCB is checked.
4751 * Then based on Subcommand beacon will either turn on or off.
4752 *
4753 * Return code
4754 * 0 - Sent the acc response
4755 * 1 - Sent the reject response.
4756 **/
4757static int
4758lpfc_els_rcv_lcb(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
4759 struct lpfc_nodelist *ndlp)
4760{
4761 struct lpfc_hba *phba = vport->phba;
4762 struct lpfc_dmabuf *pcmd;
4763 IOCB_t *icmd;
4764 uint8_t *lp;
4765 struct fc_lcb_request_frame *beacon;
4766 struct lpfc_lcb_context *lcb_context;
4767 uint8_t state, rjt_err;
4768 struct ls_rjt stat;
4769
4770 icmd = &cmdiocb->iocb;
4771 pcmd = (struct lpfc_dmabuf *)cmdiocb->context2;
4772 lp = (uint8_t *)pcmd->virt;
4773 beacon = (struct fc_lcb_request_frame *)pcmd->virt;
4774
4775 lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS,
4776 "0192 ELS LCB Data x%x x%x x%x x%x sub x%x "
4777 "type x%x frequency %x duration x%x\n",
4778 lp[0], lp[1], lp[2],
4779 beacon->lcb_command,
4780 beacon->lcb_sub_command,
4781 beacon->lcb_type,
4782 beacon->lcb_frequency,
4783 be16_to_cpu(beacon->lcb_duration));
4784
4785 if (phba->sli_rev < LPFC_SLI_REV4 ||
4786 (bf_get(lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf) !=
4787 LPFC_SLI_INTF_IF_TYPE_2)) {
4788 rjt_err = LSRJT_CMD_UNSUPPORTED;
4789 goto rjt;
4790 }
4791 lcb_context = kmalloc(sizeof(struct lpfc_lcb_context), GFP_KERNEL);
4792
4793 if (phba->hba_flag & HBA_FCOE_MODE) {
4794 rjt_err = LSRJT_CMD_UNSUPPORTED;
4795 goto rjt;
4796 }
4797 if (beacon->lcb_frequency == 0) {
4798 rjt_err = LSRJT_CMD_UNSUPPORTED;
4799 goto rjt;
4800 }
4801 if ((beacon->lcb_type != LPFC_LCB_GREEN) &&
4802 (beacon->lcb_type != LPFC_LCB_AMBER)) {
4803 rjt_err = LSRJT_CMD_UNSUPPORTED;
4804 goto rjt;
4805 }
4806 if ((beacon->lcb_sub_command != LPFC_LCB_ON) &&
4807 (beacon->lcb_sub_command != LPFC_LCB_OFF)) {
4808 rjt_err = LSRJT_CMD_UNSUPPORTED;
4809 goto rjt;
4810 }
4811 if ((beacon->lcb_sub_command == LPFC_LCB_ON) &&
4812 (beacon->lcb_type != LPFC_LCB_GREEN) &&
4813 (beacon->lcb_type != LPFC_LCB_AMBER)) {
4814 rjt_err = LSRJT_CMD_UNSUPPORTED;
4815 goto rjt;
4816 }
4817 if (be16_to_cpu(beacon->lcb_duration) != 0) {
4818 rjt_err = LSRJT_CMD_UNSUPPORTED;
4819 goto rjt;
4820 }
4821
4822 state = (beacon->lcb_sub_command == LPFC_LCB_ON) ? 1 : 0;
4823 lcb_context->sub_command = beacon->lcb_sub_command;
4824 lcb_context->type = beacon->lcb_type;
4825 lcb_context->frequency = beacon->lcb_frequency;
4826 lcb_context->ox_id = cmdiocb->iocb.unsli3.rcvsli3.ox_id;
4827 lcb_context->rx_id = cmdiocb->iocb.ulpContext;
4828 lcb_context->ndlp = lpfc_nlp_get(ndlp);
4829 if (lpfc_sli4_set_beacon(vport, lcb_context, state)) {
4830 lpfc_printf_vlog(ndlp->vport, KERN_ERR,
4831 LOG_ELS, "0193 failed to send mail box");
4832 lpfc_nlp_put(ndlp);
4833 rjt_err = LSRJT_UNABLE_TPC;
4834 goto rjt;
4835 }
4836 return 0;
4837rjt:
4838 memset(&stat, 0, sizeof(stat));
4839 stat.un.b.lsRjtRsnCode = rjt_err;
4840 lpfc_els_rsp_reject(vport, stat.un.lsRjtError, cmdiocb, ndlp, NULL);
4841 return 1;
4842}
4843
4844
4618/** 4845/**
4619 * lpfc_els_flush_rscn - Clean up any rscn activities with a vport 4846 * lpfc_els_flush_rscn - Clean up any rscn activities with a vport
4620 * @vport: pointer to a host virtual N_Port data structure. 4847 * @vport: pointer to a host virtual N_Port data structure.
@@ -6821,6 +7048,10 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
6821 } 7048 }
6822 lpfc_disc_state_machine(vport, ndlp, elsiocb, NLP_EVT_RCV_PRLO); 7049 lpfc_disc_state_machine(vport, ndlp, elsiocb, NLP_EVT_RCV_PRLO);
6823 break; 7050 break;
7051 case ELS_CMD_LCB:
7052 phba->fc_stat.elsRcvLCB++;
7053 lpfc_els_rcv_lcb(vport, elsiocb, ndlp);
7054 break;
6824 case ELS_CMD_RSCN: 7055 case ELS_CMD_RSCN:
6825 phba->fc_stat.elsRcvRSCN++; 7056 phba->fc_stat.elsRcvRSCN++;
6826 lpfc_els_rcv_rscn(vport, elsiocb, ndlp); 7057 lpfc_els_rcv_rscn(vport, elsiocb, ndlp);
diff --git a/drivers/scsi/lpfc/lpfc_hw.h b/drivers/scsi/lpfc/lpfc_hw.h
index 37beb9dc1311..6ad0a6fac9ae 100644
--- a/drivers/scsi/lpfc/lpfc_hw.h
+++ b/drivers/scsi/lpfc/lpfc_hw.h
@@ -558,6 +558,7 @@ struct fc_vft_header {
558#define ELS_CMD_SCR 0x62000000 558#define ELS_CMD_SCR 0x62000000
559#define ELS_CMD_RNID 0x78000000 559#define ELS_CMD_RNID 0x78000000
560#define ELS_CMD_LIRR 0x7A000000 560#define ELS_CMD_LIRR 0x7A000000
561#define ELS_CMD_LCB 0x81000000
561#else /* __LITTLE_ENDIAN_BITFIELD */ 562#else /* __LITTLE_ENDIAN_BITFIELD */
562#define ELS_CMD_MASK 0xffff 563#define ELS_CMD_MASK 0xffff
563#define ELS_RSP_MASK 0xff 564#define ELS_RSP_MASK 0xff
@@ -595,6 +596,7 @@ struct fc_vft_header {
595#define ELS_CMD_SCR 0x62 596#define ELS_CMD_SCR 0x62
596#define ELS_CMD_RNID 0x78 597#define ELS_CMD_RNID 0x78
597#define ELS_CMD_LIRR 0x7A 598#define ELS_CMD_LIRR 0x7A
599#define ELS_CMD_LCB 0x81
598#endif 600#endif
599 601
600/* 602/*
@@ -1010,6 +1012,36 @@ typedef struct _ELS_PKT { /* Structure is in Big Endian format */
1010 } un; 1012 } un;
1011} ELS_PKT; 1013} ELS_PKT;
1012 1014
1015/*
1016 * Link Cable Beacon (LCB) ELS Frame
1017 */
1018
1019struct fc_lcb_request_frame {
1020 uint32_t lcb_command; /* ELS command opcode (0x81) */
1021 uint8_t lcb_sub_command;/* LCB Payload Word 1, bit 24:31 */
1022#define LPFC_LCB_ON 0x1
1023#define LPFC_LCB_OFF 0x2
1024 uint8_t reserved[3];
1025
1026 uint8_t lcb_type; /* LCB Payload Word 2, bit 24:31 */
1027#define LPFC_LCB_GREEN 0x1
1028#define LPFC_LCB_AMBER 0x2
1029 uint8_t lcb_frequency; /* LCB Payload Word 2, bit 16:23 */
1030 uint16_t lcb_duration; /* LCB Payload Word 2, bit 15:0 */
1031};
1032
1033/*
1034 * Link Cable Beacon (LCB) ELS Response Frame
1035 */
1036struct fc_lcb_res_frame {
1037 uint32_t lcb_ls_acc; /* Acceptance of LCB request (0x02) */
1038 uint8_t lcb_sub_command;/* LCB Payload Word 1, bit 24:31 */
1039 uint8_t reserved[3];
1040 uint8_t lcb_type; /* LCB Payload Word 2, bit 24:31 */
1041 uint8_t lcb_frequency; /* LCB Payload Word 2, bit 16:23 */
1042 uint16_t lcb_duration; /* LCB Payload Word 2, bit 15:0 */
1043};
1044
1013/******** FDMI ********/ 1045/******** FDMI ********/
1014 1046
1015/* lpfc_sli_ct_request defines the CT_IU preamble for FDMI commands */ 1047/* lpfc_sli_ct_request defines the CT_IU preamble for FDMI commands */
diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h
index 1813c45946f4..9f2bfcc79426 100644
--- a/drivers/scsi/lpfc/lpfc_hw4.h
+++ b/drivers/scsi/lpfc/lpfc_hw4.h
@@ -914,6 +914,8 @@ struct mbox_header {
914#define LPFC_MBOX_OPCODE_FUNCTION_RESET 0x3D 914#define LPFC_MBOX_OPCODE_FUNCTION_RESET 0x3D
915#define LPFC_MBOX_OPCODE_SET_PHYSICAL_LINK_CONFIG 0x3E 915#define LPFC_MBOX_OPCODE_SET_PHYSICAL_LINK_CONFIG 0x3E
916#define LPFC_MBOX_OPCODE_SET_BOOT_CONFIG 0x43 916#define LPFC_MBOX_OPCODE_SET_BOOT_CONFIG 0x43
917#define LPFC_MBOX_OPCODE_SET_BEACON_CONFIG 0x45
918#define LPFC_MBOX_OPCODE_GET_BEACON_CONFIG 0x46
917#define LPFC_MBOX_OPCODE_GET_PORT_NAME 0x4D 919#define LPFC_MBOX_OPCODE_GET_PORT_NAME 0x4D
918#define LPFC_MBOX_OPCODE_MQ_CREATE_EXT 0x5A 920#define LPFC_MBOX_OPCODE_MQ_CREATE_EXT 0x5A
919#define LPFC_MBOX_OPCODE_GET_VPD_DATA 0x5B 921#define LPFC_MBOX_OPCODE_GET_VPD_DATA 0x5B
@@ -1479,6 +1481,26 @@ struct lpfc_mbx_query_fw_config {
1479 } rsp; 1481 } rsp;
1480}; 1482};
1481 1483
1484struct lpfc_mbx_set_beacon_config {
1485 struct mbox_header header;
1486 uint32_t word4;
1487#define lpfc_mbx_set_beacon_port_num_SHIFT 0
1488#define lpfc_mbx_set_beacon_port_num_MASK 0x0000003F
1489#define lpfc_mbx_set_beacon_port_num_WORD word4
1490#define lpfc_mbx_set_beacon_port_type_SHIFT 6
1491#define lpfc_mbx_set_beacon_port_type_MASK 0x00000003
1492#define lpfc_mbx_set_beacon_port_type_WORD word4
1493#define lpfc_mbx_set_beacon_state_SHIFT 8
1494#define lpfc_mbx_set_beacon_state_MASK 0x000000FF
1495#define lpfc_mbx_set_beacon_state_WORD word4
1496#define lpfc_mbx_set_beacon_duration_SHIFT 16
1497#define lpfc_mbx_set_beacon_duration_MASK 0x000000FF
1498#define lpfc_mbx_set_beacon_duration_WORD word4
1499#define lpfc_mbx_set_beacon_status_duration_SHIFT 24
1500#define lpfc_mbx_set_beacon_status_duration_MASK 0x000000FF
1501#define lpfc_mbx_set_beacon_status_duration_WORD word4
1502};
1503
1482struct lpfc_id_range { 1504struct lpfc_id_range {
1483 uint32_t word5; 1505 uint32_t word5;
1484#define lpfc_mbx_rsrc_id_word4_0_SHIFT 0 1506#define lpfc_mbx_rsrc_id_word4_0_SHIFT 0
@@ -3021,6 +3043,7 @@ struct lpfc_mqe {
3021 struct lpfc_mbx_request_features req_ftrs; 3043 struct lpfc_mbx_request_features req_ftrs;
3022 struct lpfc_mbx_post_hdr_tmpl hdr_tmpl; 3044 struct lpfc_mbx_post_hdr_tmpl hdr_tmpl;
3023 struct lpfc_mbx_query_fw_config query_fw_cfg; 3045 struct lpfc_mbx_query_fw_config query_fw_cfg;
3046 struct lpfc_mbx_set_beacon_config beacon_config;
3024 struct lpfc_mbx_supp_pages supp_pages; 3047 struct lpfc_mbx_supp_pages supp_pages;
3025 struct lpfc_mbx_pc_sli4_params sli4_params; 3048 struct lpfc_mbx_pc_sli4_params sli4_params;
3026 struct lpfc_mbx_get_sli4_parameters get_sli4_parameters; 3049 struct lpfc_mbx_get_sli4_parameters get_sli4_parameters;
@@ -3041,8 +3064,8 @@ struct lpfc_mcqe {
3041#define lpfc_mcqe_status_MASK 0x0000FFFF 3064#define lpfc_mcqe_status_MASK 0x0000FFFF
3042#define lpfc_mcqe_status_WORD word0 3065#define lpfc_mcqe_status_WORD word0
3043#define lpfc_mcqe_ext_status_SHIFT 16 3066#define lpfc_mcqe_ext_status_SHIFT 16
3044#define lpfc_mcqe_ext_status_MASK 0x0000FFFF 3067#define lpfc_mcqe_ext_status_MASK 0x0000FFFF
3045#define lpfc_mcqe_ext_status_WORD word0 3068#define lpfc_mcqe_ext_status_WORD word0
3046 uint32_t mcqe_tag0; 3069 uint32_t mcqe_tag0;
3047 uint32_t mcqe_tag1; 3070 uint32_t mcqe_tag1;
3048 uint32_t trailer; 3071 uint32_t trailer;
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index e8c8c1ecc1f5..15825f6ac4cc 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -7500,6 +7500,8 @@ lpfc_sli4_queue_setup(struct lpfc_hba *phba)
7500 mboxq->u.mqe.un.query_fw_cfg.rsp.function_mode; 7500 mboxq->u.mqe.un.query_fw_cfg.rsp.function_mode;
7501 phba->sli4_hba.ulp0_mode = mboxq->u.mqe.un.query_fw_cfg.rsp.ulp0_mode; 7501 phba->sli4_hba.ulp0_mode = mboxq->u.mqe.un.query_fw_cfg.rsp.ulp0_mode;
7502 phba->sli4_hba.ulp1_mode = mboxq->u.mqe.un.query_fw_cfg.rsp.ulp1_mode; 7502 phba->sli4_hba.ulp1_mode = mboxq->u.mqe.un.query_fw_cfg.rsp.ulp1_mode;
7503 phba->sli4_hba.physical_port =
7504 mboxq->u.mqe.un.query_fw_cfg.rsp.physical_port;
7503 lpfc_printf_log(phba, KERN_INFO, LOG_INIT, 7505 lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
7504 "3251 QUERY_FW_CFG: func_mode:x%x, ulp0_mode:x%x, " 7506 "3251 QUERY_FW_CFG: func_mode:x%x, ulp0_mode:x%x, "
7505 "ulp1_mode:x%x\n", phba->sli4_hba.fw_func_mode, 7507 "ulp1_mode:x%x\n", phba->sli4_hba.fw_func_mode,
diff --git a/drivers/scsi/lpfc/lpfc_sli4.h b/drivers/scsi/lpfc/lpfc_sli4.h
index 6eca3b8124d3..2ce6cb58fa8d 100644
--- a/drivers/scsi/lpfc/lpfc_sli4.h
+++ b/drivers/scsi/lpfc/lpfc_sli4.h
@@ -602,6 +602,7 @@ struct lpfc_sli4_hba {
602 struct lpfc_iov iov; 602 struct lpfc_iov iov;
603 spinlock_t abts_scsi_buf_list_lock; /* list of aborted SCSI IOs */ 603 spinlock_t abts_scsi_buf_list_lock; /* list of aborted SCSI IOs */
604 spinlock_t abts_sgl_list_lock; /* list of aborted els IOs */ 604 spinlock_t abts_sgl_list_lock; /* list of aborted els IOs */
605 uint32_t physical_port;
605 606
606 /* CPU to vector mapping information */ 607 /* CPU to vector mapping information */
607 struct lpfc_vector_map_info *cpu_map; 608 struct lpfc_vector_map_info *cpu_map;
@@ -651,6 +652,16 @@ struct lpfc_rsrc_blks {
651 uint16_t rsrc_used; 652 uint16_t rsrc_used;
652}; 653};
653 654
655struct lpfc_lcb_context {
656 uint8_t sub_command;
657 uint8_t type;
658 uint8_t frequency;
659 uint16_t ox_id;
660 uint16_t rx_id;
661 struct lpfc_nodelist *ndlp;
662};
663
664
654/* 665/*
655 * SLI4 specific function prototypes 666 * SLI4 specific function prototypes
656 */ 667 */