]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
lpfc: Add support for ELS LCB.
authorJames Smart <james.smart@avagotech.com>
Thu, 21 May 2015 17:55:18 +0000 (13:55 -0400)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 19 Oct 2015 16:10:55 +0000 (09:10 -0700)
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>
Orabug: 22029622
From dick.kennedy@avagotech.com lpfc-10.5.0.1-11.0.0.3-1.tar.gz
Acked-by: Chuck Anderson <chuck.anderson@oracle.com>
drivers/scsi/lpfc/lpfc_els.c
drivers/scsi/lpfc/lpfc_hw.h
drivers/scsi/lpfc/lpfc_hw4.h
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/lpfc/lpfc_sli4.h

index b8bd04fe548eaab610a73236008fc678f77d8a4a..4d3d931b177a73d60f4d3129744e7fbf94c8a066 100644 (file)
@@ -4589,16 +4589,16 @@ lpfc_els_disc_plogi(struct lpfc_vport *vport)
                if (!NLP_CHK_NODE_ACT(ndlp))
                        continue;
                if (ndlp->nlp_state == NLP_STE_NPR_NODE &&
-                   (ndlp->nlp_flag & NLP_NPR_2B_DISC) != 0 &&
-                   (ndlp->nlp_flag & NLP_DELAY_TMO) == 0 &&
-                   (ndlp->nlp_flag & NLP_NPR_ADISC) == 0) {
+                               (ndlp->nlp_flag & NLP_NPR_2B_DISC) != 0 &&
+                               (ndlp->nlp_flag & NLP_DELAY_TMO) == 0 &&
+                               (ndlp->nlp_flag & NLP_NPR_ADISC) == 0) {
                        ndlp->nlp_prev_state = ndlp->nlp_state;
                        lpfc_nlp_set_state(vport, ndlp, NLP_STE_PLOGI_ISSUE);
                        lpfc_issue_els_plogi(vport, ndlp->nlp_DID, 0);
                        sentplogi++;
                        vport->num_disc_nodes++;
                        if (vport->num_disc_nodes >=
-                           vport->cfg_discovery_threads) {
+                                       vport->cfg_discovery_threads) {
                                spin_lock_irq(shost->host_lock);
                                vport->fc_flag |= FC_NLP_MORE;
                                spin_unlock_irq(shost->host_lock);
index 8fb7242aa931967d48c2cd29078515dedae7cd94..892c5257d87cdca4f843de8d87260ed786672185 100644 (file)
@@ -559,6 +559,7 @@ struct fc_vft_header {
 #define ELS_CMD_SCR       0x62000000
 #define ELS_CMD_RNID      0x78000000
 #define ELS_CMD_LIRR      0x7A000000
+#define ELS_CMD_LCB      0x81000000
 #else  /*  __LITTLE_ENDIAN_BITFIELD */
 #define ELS_CMD_MASK      0xffff
 #define ELS_RSP_MASK      0xff
@@ -597,6 +598,7 @@ struct fc_vft_header {
 #define ELS_CMD_SCR       0x62
 #define ELS_CMD_RNID      0x78
 #define ELS_CMD_LIRR      0x7A
+#define ELS_CMD_LCB      0x81
 #endif
 
 /*
index c831e0fc3af5cbf86e3c447efbf0c3dcb9e52973..7cc7bec31bfe45e3cb90fff93edc255bd0fe70be 100644 (file)
@@ -914,6 +914,8 @@ struct mbox_header {
 #define LPFC_MBOX_OPCODE_FUNCTION_RESET                        0x3D
 #define LPFC_MBOX_OPCODE_SET_PHYSICAL_LINK_CONFIG      0x3E
 #define LPFC_MBOX_OPCODE_SET_BOOT_CONFIG               0x43
+#define LPFC_MBOX_OPCODE_SET_BEACON_CONFIG              0x45
+#define LPFC_MBOX_OPCODE_GET_BEACON_CONFIG              0x46
 #define LPFC_MBOX_OPCODE_GET_PORT_NAME                 0x4D
 #define LPFC_MBOX_OPCODE_MQ_CREATE_EXT                 0x5A
 #define LPFC_MBOX_OPCODE_GET_VPD_DATA                  0x5B
@@ -1479,6 +1481,26 @@ struct lpfc_mbx_query_fw_config {
        } rsp;
 };
 
+struct lpfc_mbx_set_beacon_config {
+       struct mbox_header header;
+       uint32_t word4;
+#define lpfc_mbx_set_beacon_port_num_SHIFT             0
+#define lpfc_mbx_set_beacon_port_num_MASK              0x0000003F
+#define lpfc_mbx_set_beacon_port_num_WORD              word4
+#define lpfc_mbx_set_beacon_port_type_SHIFT            6
+#define lpfc_mbx_set_beacon_port_type_MASK             0x00000003
+#define lpfc_mbx_set_beacon_port_type_WORD             word4
+#define lpfc_mbx_set_beacon_state_SHIFT                        8
+#define lpfc_mbx_set_beacon_state_MASK                 0x000000FF
+#define lpfc_mbx_set_beacon_state_WORD                 word4
+#define lpfc_mbx_set_beacon_duration_SHIFT             16
+#define lpfc_mbx_set_beacon_duration_MASK              0x000000FF
+#define lpfc_mbx_set_beacon_duration_WORD              word4
+#define lpfc_mbx_set_beacon_status_duration_SHIFT      24
+#define lpfc_mbx_set_beacon_status_duration_MASK       0x000000FF
+#define lpfc_mbx_set_beacon_status_duration_WORD       word4
+};
+
 struct lpfc_id_range {
        uint32_t word5;
 #define lpfc_mbx_rsrc_id_word4_0_SHIFT 0
@@ -3220,6 +3242,7 @@ struct lpfc_mqe {
                struct lpfc_mbx_request_features req_ftrs;
                struct lpfc_mbx_post_hdr_tmpl hdr_tmpl;
                struct lpfc_mbx_query_fw_config query_fw_cfg;
+               struct lpfc_mbx_set_beacon_config beacon_config;
                struct lpfc_mbx_supp_pages supp_pages;
                struct lpfc_mbx_pc_sli4_params sli4_params;
                struct lpfc_mbx_get_sli4_parameters get_sli4_parameters;
@@ -3241,8 +3264,8 @@ struct lpfc_mcqe {
 #define lpfc_mcqe_status_MASK          0x0000FFFF
 #define lpfc_mcqe_status_WORD          word0
 #define lpfc_mcqe_ext_status_SHIFT     16
-#define lpfc_mcqe_ext_status_MASK      0x0000FFFF
-#define lpfc_mcqe_ext_status_WORD      word0
+#define lpfc_mcqe_ext_status_MASK      0x0000FFFF
+#define lpfc_mcqe_ext_status_WORD      word0
        uint32_t mcqe_tag0;
        uint32_t mcqe_tag1;
        uint32_t trailer;
index c2a31485192959ee1f4f8d4dc8833cf17e3e03d3..14424e66b5615b7a7ac0d149239f176bcbcb6392 100644 (file)
@@ -7506,6 +7506,8 @@ lpfc_sli4_queue_setup(struct lpfc_hba *phba)
                        mboxq->u.mqe.un.query_fw_cfg.rsp.function_mode;
        phba->sli4_hba.ulp0_mode = mboxq->u.mqe.un.query_fw_cfg.rsp.ulp0_mode;
        phba->sli4_hba.ulp1_mode = mboxq->u.mqe.un.query_fw_cfg.rsp.ulp1_mode;
+       phba->sli4_hba.physical_port =
+                       mboxq->u.mqe.un.query_fw_cfg.rsp.physical_port;
        lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
                        "3251 QUERY_FW_CFG: func_mode:x%x, ulp0_mode:x%x, "
                        "ulp1_mode:x%x\n", phba->sli4_hba.fw_func_mode,
index 7fa294e48692db9339c31b8e71d4610b463e45fc..d1a5b057c6f38c91f2367a885d875248357522b7 100644 (file)
@@ -602,6 +602,7 @@ struct lpfc_sli4_hba {
        struct lpfc_iov iov;
        spinlock_t abts_scsi_buf_list_lock; /* list of aborted SCSI IOs */
        spinlock_t abts_sgl_list_lock; /* list of aborted els IOs */
+       uint32_t physical_port;
 
        /* CPU to vector mapping information */
        struct lpfc_vector_map_info *cpu_map;