]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
scsi: lpfc: Update definition of firmware configuration mbox cmds
authorJustin Tee <justin.tee@broadcom.com>
Thu, 12 Dec 2024 23:33:06 +0000 (15:33 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 2 Jan 2025 20:01:22 +0000 (15:01 -0500)
There are unused fields in mailbox commands that query for firmware
configuration information.  As such, update the struct definitions by
correcting the name of certain fields and removing the unused fields.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://lore.kernel.org/r/20241212233309.71356-8-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_hw4.h
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/lpfc/lpfc_sli4.h

index 26e1313ebb21fced6545d55768b7b8efcd4419f2..2dedb273b091993273406e7dbed758c6cf982d3e 100644 (file)
@@ -1907,22 +1907,22 @@ struct lpfc_mbx_query_fw_config {
                uint32_t asic_revision;
                uint32_t physical_port;
                uint32_t function_mode;
-#define LPFC_FCOE_INI_MODE     0x00000040
-#define LPFC_FCOE_TGT_MODE     0x00000080
+#define LPFC_FC_INI_MODE       0x00000040
+#define LPFC_FC_TGT_MODE       0x00000080
 #define LPFC_DUA_MODE          0x00000800
-               uint32_t ulp0_mode;
-#define LPFC_ULP_FCOE_INIT_MODE        0x00000040
-#define LPFC_ULP_FCOE_TGT_MODE 0x00000080
-               uint32_t ulp0_nap_words[12];
-               uint32_t ulp1_mode;
-               uint32_t ulp1_nap_words[12];
+               uint32_t oper_mode;
+               uint32_t rsvd9[2];
+               uint32_t wqid_base;
+               uint32_t wqid_tot;
+               uint32_t rqid_base;
+               uint32_t rqid_tot;
+               uint32_t rsvd15[19];
                uint32_t function_capabilities;
                uint32_t cqid_base;
                uint32_t cqid_tot;
                uint32_t eqid_base;
                uint32_t eqid_tot;
-               uint32_t ulp0_nap2_words[2];
-               uint32_t ulp1_nap2_words[2];
+               uint32_t rsvd39[4];
        } rsp;
 };
 
@@ -3778,25 +3778,22 @@ struct lpfc_mbx_get_prof_cfg {
 struct lpfc_controller_attribute {
        uint32_t version_string[8];
        uint32_t manufacturer_name[8];
-       uint32_t supported_modes;
+       uint32_t rsvd16;
        uint32_t word17;
-#define lpfc_cntl_attr_eprom_ver_lo_SHIFT      0
-#define lpfc_cntl_attr_eprom_ver_lo_MASK       0x000000ff
-#define lpfc_cntl_attr_eprom_ver_lo_WORD       word17
-#define lpfc_cntl_attr_eprom_ver_hi_SHIFT      8
-#define lpfc_cntl_attr_eprom_ver_hi_MASK       0x000000ff
-#define lpfc_cntl_attr_eprom_ver_hi_WORD       word17
 #define lpfc_cntl_attr_flash_id_SHIFT          16
 #define lpfc_cntl_attr_flash_id_MASK           0x000000ff
 #define lpfc_cntl_attr_flash_id_WORD           word17
-       uint32_t mbx_da_struct_ver;
-       uint32_t ep_fw_da_struct_ver;
+#define lpfc_cntl_attr_boot_enable_SHIFT       24
+#define lpfc_cntl_attr_boot_enable_MASK                0x00000001
+#define lpfc_cntl_attr_boot_enable_WORD                word17
+       uint32_t rsvd18[2];
        uint32_t ncsi_ver_str[3];
-       uint32_t dflt_ext_timeout;
+       uint32_t rsvd23;
        uint32_t model_number[8];
        uint32_t description[16];
        uint32_t serial_number[8];
-       uint32_t ip_ver_str[8];
+       uint32_t ipl_name[5];
+       uint32_t rsvd61[3];
        uint32_t fw_ver_str[8];
        uint32_t bios_ver_str[8];
        uint32_t redboot_ver_str[8];
@@ -3804,53 +3801,31 @@ struct lpfc_controller_attribute {
        uint32_t flash_fw_ver_str[8];
        uint32_t functionality;
        uint32_t word105;
-#define lpfc_cntl_attr_max_cbd_len_SHIFT       0
-#define lpfc_cntl_attr_max_cbd_len_MASK                0x0000ffff
-#define lpfc_cntl_attr_max_cbd_len_WORD                word105
 #define lpfc_cntl_attr_asic_rev_SHIFT          16
 #define lpfc_cntl_attr_asic_rev_MASK           0x000000ff
 #define lpfc_cntl_attr_asic_rev_WORD           word105
-#define lpfc_cntl_attr_gen_guid0_SHIFT         24
-#define lpfc_cntl_attr_gen_guid0_MASK          0x000000ff
-#define lpfc_cntl_attr_gen_guid0_WORD          word105
-       uint32_t gen_guid1_12[3];
+       uint32_t rsvd106[3];
        uint32_t word109;
-#define lpfc_cntl_attr_gen_guid13_14_SHIFT     0
-#define lpfc_cntl_attr_gen_guid13_14_MASK      0x0000ffff
-#define lpfc_cntl_attr_gen_guid13_14_WORD      word109
-#define lpfc_cntl_attr_gen_guid15_SHIFT                16
-#define lpfc_cntl_attr_gen_guid15_MASK         0x000000ff
-#define lpfc_cntl_attr_gen_guid15_WORD         word109
 #define lpfc_cntl_attr_hba_port_cnt_SHIFT      24
 #define lpfc_cntl_attr_hba_port_cnt_MASK       0x000000ff
 #define lpfc_cntl_attr_hba_port_cnt_WORD       word109
-       uint32_t word110;
-#define lpfc_cntl_attr_dflt_lnk_tmo_SHIFT      0
-#define lpfc_cntl_attr_dflt_lnk_tmo_MASK       0x0000ffff
-#define lpfc_cntl_attr_dflt_lnk_tmo_WORD       word110
-#define lpfc_cntl_attr_multi_func_dev_SHIFT    24
-#define lpfc_cntl_attr_multi_func_dev_MASK     0x000000ff
-#define lpfc_cntl_attr_multi_func_dev_WORD     word110
+       uint32_t rsvd110;
        uint32_t word111;
-#define lpfc_cntl_attr_cache_valid_SHIFT       0
-#define lpfc_cntl_attr_cache_valid_MASK                0x000000ff
-#define lpfc_cntl_attr_cache_valid_WORD                word111
 #define lpfc_cntl_attr_hba_status_SHIFT                8
 #define lpfc_cntl_attr_hba_status_MASK         0x000000ff
 #define lpfc_cntl_attr_hba_status_WORD         word111
-#define lpfc_cntl_attr_max_domain_SHIFT                16
-#define lpfc_cntl_attr_max_domain_MASK         0x000000ff
-#define lpfc_cntl_attr_max_domain_WORD         word111
 #define lpfc_cntl_attr_lnk_numb_SHIFT          24
 #define lpfc_cntl_attr_lnk_numb_MASK           0x0000003f
 #define lpfc_cntl_attr_lnk_numb_WORD           word111
 #define lpfc_cntl_attr_lnk_type_SHIFT          30
 #define lpfc_cntl_attr_lnk_type_MASK           0x00000003
 #define lpfc_cntl_attr_lnk_type_WORD           word111
-       uint32_t fw_post_status;
-       uint32_t hba_mtu[8];
+       uint32_t rsvd112[9];
        uint32_t word121;
-       uint32_t reserved1[3];
+#define lpfc_cntl_attr_asic_gen_SHIFT          8
+#define lpfc_cntl_attr_asic_gen_MASK           0x000000ff
+#define lpfc_cntl_attr_asic_gen_WORD           word121
+       uint32_t rsvd122[3];
        uint32_t word125;
 #define lpfc_cntl_attr_pci_vendor_id_SHIFT     0
 #define lpfc_cntl_attr_pci_vendor_id_MASK      0x0000ffff
@@ -3875,15 +3850,7 @@ struct lpfc_controller_attribute {
 #define lpfc_cntl_attr_pci_fnc_num_SHIFT       16
 #define lpfc_cntl_attr_pci_fnc_num_MASK                0x000000ff
 #define lpfc_cntl_attr_pci_fnc_num_WORD                word127
-#define lpfc_cntl_attr_inf_type_SHIFT          24
-#define lpfc_cntl_attr_inf_type_MASK           0x000000ff
-#define lpfc_cntl_attr_inf_type_WORD           word127
-       uint32_t unique_id[2];
-       uint32_t word130;
-#define lpfc_cntl_attr_num_netfil_SHIFT                0
-#define lpfc_cntl_attr_num_netfil_MASK         0x000000ff
-#define lpfc_cntl_attr_num_netfil_WORD         word130
-       uint32_t reserved2[4];
+       uint32_t rsvd128[7];
 };
 
 struct lpfc_mbx_get_cntl_attributes {
index 44ddecb3909d3c48270a6f69ad0939dfb800cfe4..b9462478977157f31768e75152f76e418d457c18 100644 (file)
@@ -11109,14 +11109,11 @@ lpfc_sli4_queue_setup(struct lpfc_hba *phba)
 
        phba->sli4_hba.fw_func_mode =
                        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,
-                       phba->sli4_hba.ulp0_mode, phba->sli4_hba.ulp1_mode);
+                       "3251 QUERY_FW_CFG: func_mode:x%x\n",
+                       phba->sli4_hba.fw_func_mode);
 
        mempool_free(mboxq, phba->mbox_mem_pool);
 
index c1e9ec0243bacbf89ff8c1e938b7923feb8c16fd..9be3da91c92358eb9c9f2ed9e263c78ef4e8c917 100644 (file)
@@ -865,8 +865,6 @@ struct lpfc_sli4_hba {
        struct lpfc_name wwpn;
 
        uint32_t fw_func_mode;  /* FW function protocol mode */
-       uint32_t ulp0_mode;     /* ULP0 protocol mode */
-       uint32_t ulp1_mode;     /* ULP1 protocol mode */
 
        /* Optimized Access Storage specific queues/structures */
        uint64_t oas_next_lun;