1da0436e9SJames Smart /******************************************************************* 2da0436e9SJames Smart * This file is part of the Emulex Linux Device Driver for * 3da0436e9SJames Smart * Fibre Channel Host Bus Adapters. * 4*f14371acSJustin Tee * Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term * 53e21d1cbSJames Smart * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * 650611577SJames Smart * Copyright (C) 2009-2016 Emulex. All rights reserved. * 7da0436e9SJames Smart * EMULEX and SLI are trademarks of Emulex. * 8d080abe0SJames Smart * www.broadcom.com * 9da0436e9SJames Smart * * 10da0436e9SJames Smart * This program is free software; you can redistribute it and/or * 11da0436e9SJames Smart * modify it under the terms of version 2 of the GNU General * 12da0436e9SJames Smart * Public License as published by the Free Software Foundation. * 13da0436e9SJames Smart * This program is distributed in the hope that it will be useful. * 14da0436e9SJames Smart * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND * 15da0436e9SJames Smart * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, * 16da0436e9SJames Smart * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE * 17da0436e9SJames Smart * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD * 18da0436e9SJames Smart * TO BE LEGALLY INVALID. See the GNU General Public License for * 19da0436e9SJames Smart * more details, a copy of which can be found in the file COPYING * 20da0436e9SJames Smart * included with this package. * 21da0436e9SJames Smart *******************************************************************/ 22da0436e9SJames Smart 23428569e6SJames Smart #include <uapi/scsi/fc/fc_fs.h> 24df3fe766SJames Smart #include <uapi/scsi/fc/fc_els.h> 25df3fe766SJames Smart 26da0436e9SJames Smart /* Macros to deal with bit fields. Each bit field must have 3 #defines 27da0436e9SJames Smart * associated with it (_SHIFT, _MASK, and _WORD). 28da0436e9SJames Smart * EG. For a bit field that is in the 7th bit of the "field4" field of a 29da0436e9SJames Smart * structure and is 2 bits in size the following #defines must exist: 30da0436e9SJames Smart * struct temp { 31da0436e9SJames Smart * uint32_t field1; 32da0436e9SJames Smart * uint32_t field2; 33da0436e9SJames Smart * uint32_t field3; 34da0436e9SJames Smart * uint32_t field4; 35da0436e9SJames Smart * #define example_bit_field_SHIFT 7 36da0436e9SJames Smart * #define example_bit_field_MASK 0x03 37da0436e9SJames Smart * #define example_bit_field_WORD field4 38da0436e9SJames Smart * uint32_t field5; 39da0436e9SJames Smart * }; 40da0436e9SJames Smart * Then the macros below may be used to get or set the value of that field. 41da0436e9SJames Smart * EG. To get the value of the bit field from the above example: 42da0436e9SJames Smart * struct temp t1; 43da0436e9SJames Smart * value = bf_get(example_bit_field, &t1); 44da0436e9SJames Smart * And then to set that bit field: 45da0436e9SJames Smart * bf_set(example_bit_field, &t1, 2); 46da0436e9SJames Smart * Or clear that bit field: 47da0436e9SJames Smart * bf_set(example_bit_field, &t1, 0); 48da0436e9SJames Smart */ 49079b5c91SJames Smart #define bf_get_be32(name, ptr) \ 50079b5c91SJames Smart ((be32_to_cpu((ptr)->name##_WORD) >> name##_SHIFT) & name##_MASK) 51cb5172eaSJames Smart #define bf_get_le32(name, ptr) \ 52cb5172eaSJames Smart ((le32_to_cpu((ptr)->name##_WORD) >> name##_SHIFT) & name##_MASK) 53da0436e9SJames Smart #define bf_get(name, ptr) \ 54da0436e9SJames Smart (((ptr)->name##_WORD >> name##_SHIFT) & name##_MASK) 55cb5172eaSJames Smart #define bf_set_le32(name, ptr, value) \ 56cb5172eaSJames Smart ((ptr)->name##_WORD = cpu_to_le32(((((value) & \ 57cb5172eaSJames Smart name##_MASK) << name##_SHIFT) | (le32_to_cpu((ptr)->name##_WORD) & \ 58cb5172eaSJames Smart ~(name##_MASK << name##_SHIFT))))) 59da0436e9SJames Smart #define bf_set(name, ptr, value) \ 60da0436e9SJames Smart ((ptr)->name##_WORD = ((((value) & name##_MASK) << name##_SHIFT) | \ 61da0436e9SJames Smart ((ptr)->name##_WORD & ~(name##_MASK << name##_SHIFT)))) 62da0436e9SJames Smart 631b64aa9eSJames Smart #define get_wqe_reqtag(x) (((x)->wqe.words[9] >> 0) & 0xFFFF) 646831ce12SJames Smart #define get_wqe_tmo(x) (((x)->wqe.words[7] >> 24) & 0x00FF) 651b64aa9eSJames Smart 661b64aa9eSJames Smart #define get_job_ulpword(x, y) ((x)->iocb.un.ulpWord[y]) 671b64aa9eSJames Smart 681b64aa9eSJames Smart #define set_job_ulpstatus(x, y) bf_set(lpfc_wcqe_c_status, &(x)->wcqe_cmpl, y) 691b64aa9eSJames Smart #define set_job_ulpword4(x, y) ((&(x)->wcqe_cmpl)->parameter = y) 701b64aa9eSJames Smart 71da0436e9SJames Smart struct dma_address { 72da0436e9SJames Smart uint32_t addr_lo; 73da0436e9SJames Smart uint32_t addr_hi; 74da0436e9SJames Smart }; 75da0436e9SJames Smart 768fa38513SJames Smart struct lpfc_sli_intf { 778fa38513SJames Smart uint32_t word0; 788fa38513SJames Smart #define lpfc_sli_intf_valid_SHIFT 29 7928baac74SJames Smart #define lpfc_sli_intf_valid_MASK 0x00000007 808fa38513SJames Smart #define lpfc_sli_intf_valid_WORD word0 818fa38513SJames Smart #define LPFC_SLI_INTF_VALID 6 82085c647cSJames Smart #define lpfc_sli_intf_sli_hint2_SHIFT 24 83085c647cSJames Smart #define lpfc_sli_intf_sli_hint2_MASK 0x0000001F 84085c647cSJames Smart #define lpfc_sli_intf_sli_hint2_WORD word0 85085c647cSJames Smart #define LPFC_SLI_INTF_SLI_HINT2_NONE 0 86085c647cSJames Smart #define lpfc_sli_intf_sli_hint1_SHIFT 16 87085c647cSJames Smart #define lpfc_sli_intf_sli_hint1_MASK 0x000000FF 88085c647cSJames Smart #define lpfc_sli_intf_sli_hint1_WORD word0 89085c647cSJames Smart #define LPFC_SLI_INTF_SLI_HINT1_NONE 0 90085c647cSJames Smart #define LPFC_SLI_INTF_SLI_HINT1_1 1 91085c647cSJames Smart #define LPFC_SLI_INTF_SLI_HINT1_2 2 92085c647cSJames Smart #define lpfc_sli_intf_if_type_SHIFT 12 93085c647cSJames Smart #define lpfc_sli_intf_if_type_MASK 0x0000000F 94085c647cSJames Smart #define lpfc_sli_intf_if_type_WORD word0 95085c647cSJames Smart #define LPFC_SLI_INTF_IF_TYPE_0 0 96085c647cSJames Smart #define LPFC_SLI_INTF_IF_TYPE_1 1 97085c647cSJames Smart #define LPFC_SLI_INTF_IF_TYPE_2 2 9827d6ac0aSJames Smart #define LPFC_SLI_INTF_IF_TYPE_6 6 9928baac74SJames Smart #define lpfc_sli_intf_sli_family_SHIFT 8 100085c647cSJames Smart #define lpfc_sli_intf_sli_family_MASK 0x0000000F 10128baac74SJames Smart #define lpfc_sli_intf_sli_family_WORD word0 102085c647cSJames Smart #define LPFC_SLI_INTF_FAMILY_BE2 0x0 103085c647cSJames Smart #define LPFC_SLI_INTF_FAMILY_BE3 0x1 104085c647cSJames Smart #define LPFC_SLI_INTF_FAMILY_LNCR_A0 0xa 105085c647cSJames Smart #define LPFC_SLI_INTF_FAMILY_LNCR_B0 0xb 106f6c5e6c4SJames Smart #define LPFC_SLI_INTF_FAMILY_G6 0xc 107f6c5e6c4SJames Smart #define LPFC_SLI_INTF_FAMILY_G7 0xd 108f6c5e6c4SJames Smart #define LPFC_SLI_INTF_FAMILY_G7P 0xe 10928baac74SJames Smart #define lpfc_sli_intf_slirev_SHIFT 4 11028baac74SJames Smart #define lpfc_sli_intf_slirev_MASK 0x0000000F 11128baac74SJames Smart #define lpfc_sli_intf_slirev_WORD word0 11228baac74SJames Smart #define LPFC_SLI_INTF_REV_SLI3 3 11328baac74SJames Smart #define LPFC_SLI_INTF_REV_SLI4 4 114085c647cSJames Smart #define lpfc_sli_intf_func_type_SHIFT 0 115085c647cSJames Smart #define lpfc_sli_intf_func_type_MASK 0x00000001 116085c647cSJames Smart #define lpfc_sli_intf_func_type_WORD word0 117085c647cSJames Smart #define LPFC_SLI_INTF_IF_TYPE_PHYS 0 118085c647cSJames Smart #define LPFC_SLI_INTF_IF_TYPE_VIRT 1 1198fa38513SJames Smart }; 1208fa38513SJames Smart 121da0436e9SJames Smart #define LPFC_SLI4_MBX_EMBED true 122da0436e9SJames Smart #define LPFC_SLI4_MBX_NEMBED false 123da0436e9SJames Smart 124da0436e9SJames Smart #define LPFC_SLI4_MB_WORD_COUNT 64 125da0436e9SJames Smart #define LPFC_MAX_MQ_PAGE 8 126962bc51bSJames Smart #define LPFC_MAX_WQ_PAGE_V0 4 127da0436e9SJames Smart #define LPFC_MAX_WQ_PAGE 8 128895427bdSJames Smart #define LPFC_MAX_RQ_PAGE 8 129da0436e9SJames Smart #define LPFC_MAX_CQ_PAGE 4 130da0436e9SJames Smart #define LPFC_MAX_EQ_PAGE 8 131da0436e9SJames Smart 132da0436e9SJames Smart #define LPFC_VIR_FUNC_MAX 32 /* Maximum number of virtual functions */ 133da0436e9SJames Smart #define LPFC_PCI_FUNC_MAX 5 /* Maximum number of PCI functions */ 134da0436e9SJames Smart #define LPFC_VFR_PAGE_SIZE 0x1000 /* 4KB BAR2 per-VF register page size */ 135da0436e9SJames Smart 136da0436e9SJames Smart /* Define SLI4 Alignment requirements. */ 137da0436e9SJames Smart #define LPFC_ALIGN_16_BYTE 16 138da0436e9SJames Smart #define LPFC_ALIGN_64_BYTE 64 139b62232baSJames Smart #define SLI4_PAGE_SIZE 4096 140da0436e9SJames Smart 141da0436e9SJames Smart /* Define SLI4 specific definitions. */ 142da0436e9SJames Smart #define LPFC_MQ_CQE_BYTE_OFFSET 256 143da0436e9SJames Smart #define LPFC_MBX_CMD_HDR_LENGTH 16 144da0436e9SJames Smart #define LPFC_MBX_ERROR_RANGE 0x4000 145da0436e9SJames Smart #define LPFC_BMBX_BIT1_ADDR_HI 0x2 146da0436e9SJames Smart #define LPFC_BMBX_BIT1_ADDR_LO 0 147da0436e9SJames Smart #define LPFC_RPI_HDR_COUNT 64 148da0436e9SJames Smart #define LPFC_HDR_TEMPLATE_SIZE 4096 149da0436e9SJames Smart #define LPFC_RPI_ALLOC_ERROR 0xFFFF 150da0436e9SJames Smart #define LPFC_FCF_RECORD_WD_CNT 132 151da0436e9SJames Smart #define LPFC_ENTIRE_FCF_DATABASE 0 152da0436e9SJames Smart #define LPFC_DFLT_FCF_INDEX 0 153da0436e9SJames Smart 154da0436e9SJames Smart /* Virtual function numbers */ 155da0436e9SJames Smart #define LPFC_VF0 0 156da0436e9SJames Smart #define LPFC_VF1 1 157da0436e9SJames Smart #define LPFC_VF2 2 158da0436e9SJames Smart #define LPFC_VF3 3 159da0436e9SJames Smart #define LPFC_VF4 4 160da0436e9SJames Smart #define LPFC_VF5 5 161da0436e9SJames Smart #define LPFC_VF6 6 162da0436e9SJames Smart #define LPFC_VF7 7 163da0436e9SJames Smart #define LPFC_VF8 8 164da0436e9SJames Smart #define LPFC_VF9 9 165da0436e9SJames Smart #define LPFC_VF10 10 166da0436e9SJames Smart #define LPFC_VF11 11 167da0436e9SJames Smart #define LPFC_VF12 12 168da0436e9SJames Smart #define LPFC_VF13 13 169da0436e9SJames Smart #define LPFC_VF14 14 170da0436e9SJames Smart #define LPFC_VF15 15 171da0436e9SJames Smart #define LPFC_VF16 16 172da0436e9SJames Smart #define LPFC_VF17 17 173da0436e9SJames Smart #define LPFC_VF18 18 174da0436e9SJames Smart #define LPFC_VF19 19 175da0436e9SJames Smart #define LPFC_VF20 20 176da0436e9SJames Smart #define LPFC_VF21 21 177da0436e9SJames Smart #define LPFC_VF22 22 178da0436e9SJames Smart #define LPFC_VF23 23 179da0436e9SJames Smart #define LPFC_VF24 24 180da0436e9SJames Smart #define LPFC_VF25 25 181da0436e9SJames Smart #define LPFC_VF26 26 182da0436e9SJames Smart #define LPFC_VF27 27 183da0436e9SJames Smart #define LPFC_VF28 28 184da0436e9SJames Smart #define LPFC_VF29 29 185da0436e9SJames Smart #define LPFC_VF30 30 186da0436e9SJames Smart #define LPFC_VF31 31 187da0436e9SJames Smart 188da0436e9SJames Smart /* PCI function numbers */ 189da0436e9SJames Smart #define LPFC_PCI_FUNC0 0 190da0436e9SJames Smart #define LPFC_PCI_FUNC1 1 191da0436e9SJames Smart #define LPFC_PCI_FUNC2 2 192da0436e9SJames Smart #define LPFC_PCI_FUNC3 3 193da0436e9SJames Smart #define LPFC_PCI_FUNC4 4 194da0436e9SJames Smart 19588a2cfbbSJames Smart /* SLI4 interface type-2 PDEV_CTL register */ 196c0c11512SJames Smart #define LPFC_CTL_PDEV_CTL_OFFSET 0x414 197c0c11512SJames Smart #define LPFC_CTL_PDEV_CTL_DRST 0x00000001 198c0c11512SJames Smart #define LPFC_CTL_PDEV_CTL_FRST 0x00000002 199c0c11512SJames Smart #define LPFC_CTL_PDEV_CTL_DD 0x00000004 200c0c11512SJames Smart #define LPFC_CTL_PDEV_CTL_LC 0x00000008 201c0c11512SJames Smart #define LPFC_CTL_PDEV_CTL_FRL_ALL 0x00 202c0c11512SJames Smart #define LPFC_CTL_PDEV_CTL_FRL_FC_FCOE 0x10 203c0c11512SJames Smart #define LPFC_CTL_PDEV_CTL_FRL_NIC 0x20 204d2cc9bcdSJames Smart #define LPFC_CTL_PDEV_CTL_DDL_RAS 0x1000000 205c0c11512SJames Smart 206c0c11512SJames Smart #define LPFC_FW_DUMP_REQUEST (LPFC_CTL_PDEV_CTL_DD | LPFC_CTL_PDEV_CTL_FRST) 207c0c11512SJames Smart 208da0436e9SJames Smart /* Active interrupt test count */ 209da0436e9SJames Smart #define LPFC_ACT_INTR_CNT 4 210da0436e9SJames Smart 21149aa143dSJames Smart /* Algrithmns for scheduling FCP commands to WQs */ 21245aa312eSJames Smart #define LPFC_FCP_SCHED_BY_HDWQ 0 21349aa143dSJames Smart #define LPFC_FCP_SCHED_BY_CPU 1 21449aa143dSJames Smart 2157ea92eb4SJames Smart /* Algrithmns for NameServer Query after RSCN */ 2167ea92eb4SJames Smart #define LPFC_NS_QUERY_GID_FT 0 2177ea92eb4SJames Smart #define LPFC_NS_QUERY_GID_PT 1 2187ea92eb4SJames Smart 219da0436e9SJames Smart /* Delay Multiplier constant */ 220da0436e9SJames Smart #define LPFC_DMULT_CONST 651042 2210cf07f84SJames Smart #define LPFC_DMULT_MAX 1023 222bf8dae83SJames Smart 223bf8dae83SJames Smart /* Configuration of Interrupts / sec for entire HBA port */ 224bf8dae83SJames Smart #define LPFC_MIN_IMAX 5000 225bf8dae83SJames Smart #define LPFC_MAX_IMAX 5000000 22632517fc0SJames Smart #define LPFC_DEF_IMAX 0 22732517fc0SJames Smart 22832517fc0SJames Smart #define LPFC_MAX_AUTO_EQ_DELAY 120 22932517fc0SJames Smart #define LPFC_EQ_DELAY_STEP 15 23032517fc0SJames Smart #define LPFC_EQD_ISR_TRIGGER 20000 23132517fc0SJames Smart /* 1s intervals */ 23232517fc0SJames Smart #define LPFC_EQ_DELAY_MSECS 1000 233da0436e9SJames Smart 2347bb03bbfSJames Smart #define LPFC_MIN_CPU_MAP 0 2356a828b0fSJames Smart #define LPFC_MAX_CPU_MAP 1 2367bb03bbfSJames Smart #define LPFC_HBA_CPU_MAP 1 2377bb03bbfSJames Smart 23828baac74SJames Smart /* PORT_CAPABILITIES constants. */ 23928baac74SJames Smart #define LPFC_MAX_SUPPORTED_PAGES 8 24028baac74SJames Smart 2416831ce12SJames Smart enum ulp_bde64_word3 { 2426831ce12SJames Smart ULP_BDE64_SIZE_MASK = 0xffffff, 2436831ce12SJames Smart 2446831ce12SJames Smart ULP_BDE64_TYPE_SHIFT = 24, 2456831ce12SJames Smart ULP_BDE64_TYPE_MASK = (0xff << ULP_BDE64_TYPE_SHIFT), 2466831ce12SJames Smart 2476831ce12SJames Smart /* BDE (Host_resident) */ 2486831ce12SJames Smart ULP_BDE64_TYPE_BDE_64 = (0x00 << ULP_BDE64_TYPE_SHIFT), 2496831ce12SJames Smart /* Immediate Data BDE */ 2506831ce12SJames Smart ULP_BDE64_TYPE_BDE_IMMED = (0x01 << ULP_BDE64_TYPE_SHIFT), 2516831ce12SJames Smart /* BDE (Port-resident) */ 2526831ce12SJames Smart ULP_BDE64_TYPE_BDE_64P = (0x02 << ULP_BDE64_TYPE_SHIFT), 2536831ce12SJames Smart /* Input BDE (Host-resident) */ 2546831ce12SJames Smart ULP_BDE64_TYPE_BDE_64I = (0x08 << ULP_BDE64_TYPE_SHIFT), 2556831ce12SJames Smart /* Input BDE (Port-resident) */ 2566831ce12SJames Smart ULP_BDE64_TYPE_BDE_64IP = (0x0A << ULP_BDE64_TYPE_SHIFT), 2576831ce12SJames Smart /* BLP (Host-resident) */ 2586831ce12SJames Smart ULP_BDE64_TYPE_BLP_64 = (0x40 << ULP_BDE64_TYPE_SHIFT), 2596831ce12SJames Smart /* BLP (Port-resident) */ 2606831ce12SJames Smart ULP_BDE64_TYPE_BLP_64P = (0x42 << ULP_BDE64_TYPE_SHIFT), 2616831ce12SJames Smart }; 2626831ce12SJames Smart 2636831ce12SJames Smart struct ulp_bde64_le { 2646831ce12SJames Smart __le32 type_size; /* type 31:24, size 23:0 */ 2656831ce12SJames Smart __le32 addr_low; 2666831ce12SJames Smart __le32 addr_high; 2676831ce12SJames Smart }; 2686831ce12SJames Smart 269da0436e9SJames Smart struct ulp_bde64 { 270da0436e9SJames Smart union ULP_BDE_TUS { 271da0436e9SJames Smart uint32_t w; 272da0436e9SJames Smart struct { 273da0436e9SJames Smart #ifdef __BIG_ENDIAN_BITFIELD 274da0436e9SJames Smart uint32_t bdeFlags:8; /* BDE Flags 0 IS A SUPPORTED 275da0436e9SJames Smart VALUE !! */ 276da0436e9SJames Smart uint32_t bdeSize:24; /* Size of buffer (in bytes) */ 277da0436e9SJames Smart #else /* __LITTLE_ENDIAN_BITFIELD */ 278da0436e9SJames Smart uint32_t bdeSize:24; /* Size of buffer (in bytes) */ 279da0436e9SJames Smart uint32_t bdeFlags:8; /* BDE Flags 0 IS A SUPPORTED 280da0436e9SJames Smart VALUE !! */ 281da0436e9SJames Smart #endif 282da0436e9SJames Smart #define BUFF_TYPE_BDE_64 0x00 /* BDE (Host_resident) */ 283da0436e9SJames Smart #define BUFF_TYPE_BDE_IMMED 0x01 /* Immediate Data BDE */ 284da0436e9SJames Smart #define BUFF_TYPE_BDE_64P 0x02 /* BDE (Port-resident) */ 285da0436e9SJames Smart #define BUFF_TYPE_BDE_64I 0x08 /* Input BDE (Host-resident) */ 286da0436e9SJames Smart #define BUFF_TYPE_BDE_64IP 0x0A /* Input BDE (Port-resident) */ 287da0436e9SJames Smart #define BUFF_TYPE_BLP_64 0x40 /* BLP (Host-resident) */ 288da0436e9SJames Smart #define BUFF_TYPE_BLP_64P 0x42 /* BLP (Port-resident) */ 289da0436e9SJames Smart } f; 290da0436e9SJames Smart } tus; 291da0436e9SJames Smart uint32_t addrLow; 292da0436e9SJames Smart uint32_t addrHigh; 293da0436e9SJames Smart }; 294da0436e9SJames Smart 2950c651878SJames Smart /* Maximun size of immediate data that can fit into a 128 byte WQE */ 2960c651878SJames Smart #define LPFC_MAX_BDE_IMM_SIZE 64 2970c651878SJames Smart 298da0436e9SJames Smart struct lpfc_sli4_flags { 299da0436e9SJames Smart uint32_t word0; 3006d368e53SJames Smart #define lpfc_idx_rsrc_rdy_SHIFT 0 3016d368e53SJames Smart #define lpfc_idx_rsrc_rdy_MASK 0x00000001 3026d368e53SJames Smart #define lpfc_idx_rsrc_rdy_WORD word0 3036d368e53SJames Smart #define LPFC_IDX_RSRC_RDY 1 3048a9d2e80SJames Smart #define lpfc_rpi_rsrc_rdy_SHIFT 1 3056d368e53SJames Smart #define lpfc_rpi_rsrc_rdy_MASK 0x00000001 3066d368e53SJames Smart #define lpfc_rpi_rsrc_rdy_WORD word0 3076d368e53SJames Smart #define LPFC_RPI_RSRC_RDY 1 3088a9d2e80SJames Smart #define lpfc_vpi_rsrc_rdy_SHIFT 2 3096d368e53SJames Smart #define lpfc_vpi_rsrc_rdy_MASK 0x00000001 3106d368e53SJames Smart #define lpfc_vpi_rsrc_rdy_WORD word0 3116d368e53SJames Smart #define LPFC_VPI_RSRC_RDY 1 3128a9d2e80SJames Smart #define lpfc_vfi_rsrc_rdy_SHIFT 3 3136d368e53SJames Smart #define lpfc_vfi_rsrc_rdy_MASK 0x00000001 3146d368e53SJames Smart #define lpfc_vfi_rsrc_rdy_WORD word0 3156d368e53SJames Smart #define LPFC_VFI_RSRC_RDY 1 3165e633302SGaurav Srivastava #define lpfc_ftr_ashdr_SHIFT 4 3175e633302SGaurav Srivastava #define lpfc_ftr_ashdr_MASK 0x00000001 3185e633302SGaurav Srivastava #define lpfc_ftr_ashdr_WORD word0 319da0436e9SJames Smart }; 320da0436e9SJames Smart 321546fc854SJames Smart struct sli4_bls_rsp { 3225ffc266eSJames Smart uint32_t word0_rsvd; /* Word0 must be reserved */ 3235ffc266eSJames Smart uint32_t word1; 3245ffc266eSJames Smart #define lpfc_abts_orig_SHIFT 0 3255ffc266eSJames Smart #define lpfc_abts_orig_MASK 0x00000001 3265ffc266eSJames Smart #define lpfc_abts_orig_WORD word1 3275ffc266eSJames Smart #define LPFC_ABTS_UNSOL_RSP 1 3285ffc266eSJames Smart #define LPFC_ABTS_UNSOL_INT 0 3295ffc266eSJames Smart uint32_t word2; 3305ffc266eSJames Smart #define lpfc_abts_rxid_SHIFT 0 3315ffc266eSJames Smart #define lpfc_abts_rxid_MASK 0x0000FFFF 3325ffc266eSJames Smart #define lpfc_abts_rxid_WORD word2 3335ffc266eSJames Smart #define lpfc_abts_oxid_SHIFT 16 3345ffc266eSJames Smart #define lpfc_abts_oxid_MASK 0x0000FFFF 3355ffc266eSJames Smart #define lpfc_abts_oxid_WORD word2 3365ffc266eSJames Smart uint32_t word3; 337546fc854SJames Smart #define lpfc_vndr_code_SHIFT 0 338546fc854SJames Smart #define lpfc_vndr_code_MASK 0x000000FF 339546fc854SJames Smart #define lpfc_vndr_code_WORD word3 340546fc854SJames Smart #define lpfc_rsn_expln_SHIFT 8 341546fc854SJames Smart #define lpfc_rsn_expln_MASK 0x000000FF 342546fc854SJames Smart #define lpfc_rsn_expln_WORD word3 343546fc854SJames Smart #define lpfc_rsn_code_SHIFT 16 344546fc854SJames Smart #define lpfc_rsn_code_MASK 0x000000FF 345546fc854SJames Smart #define lpfc_rsn_code_WORD word3 346546fc854SJames Smart 3475ffc266eSJames Smart uint32_t word4; 3485ffc266eSJames Smart uint32_t word5_rsvd; /* Word5 must be reserved */ 3495ffc266eSJames Smart }; 3505ffc266eSJames Smart 351da0436e9SJames Smart /* event queue entry structure */ 352da0436e9SJames Smart struct lpfc_eqe { 353da0436e9SJames Smart uint32_t word0; 354da0436e9SJames Smart #define lpfc_eqe_resource_id_SHIFT 16 35516f3b48dSJames Smart #define lpfc_eqe_resource_id_MASK 0x0000FFFF 356da0436e9SJames Smart #define lpfc_eqe_resource_id_WORD word0 357da0436e9SJames Smart #define lpfc_eqe_minor_code_SHIFT 4 358da0436e9SJames Smart #define lpfc_eqe_minor_code_MASK 0x00000FFF 359da0436e9SJames Smart #define lpfc_eqe_minor_code_WORD word0 360da0436e9SJames Smart #define lpfc_eqe_major_code_SHIFT 1 361da0436e9SJames Smart #define lpfc_eqe_major_code_MASK 0x00000007 362da0436e9SJames Smart #define lpfc_eqe_major_code_WORD word0 363da0436e9SJames Smart #define lpfc_eqe_valid_SHIFT 0 364da0436e9SJames Smart #define lpfc_eqe_valid_MASK 0x00000001 365da0436e9SJames Smart #define lpfc_eqe_valid_WORD word0 366da0436e9SJames Smart }; 367da0436e9SJames Smart 368da0436e9SJames Smart /* completion queue entry structure (common fields for all cqe types) */ 369da0436e9SJames Smart struct lpfc_cqe { 370da0436e9SJames Smart uint32_t reserved0; 371da0436e9SJames Smart uint32_t reserved1; 372da0436e9SJames Smart uint32_t reserved2; 373da0436e9SJames Smart uint32_t word3; 374da0436e9SJames Smart #define lpfc_cqe_valid_SHIFT 31 375da0436e9SJames Smart #define lpfc_cqe_valid_MASK 0x00000001 376da0436e9SJames Smart #define lpfc_cqe_valid_WORD word3 377da0436e9SJames Smart #define lpfc_cqe_code_SHIFT 16 378da0436e9SJames Smart #define lpfc_cqe_code_MASK 0x000000FF 379da0436e9SJames Smart #define lpfc_cqe_code_WORD word3 380da0436e9SJames Smart }; 381da0436e9SJames Smart 382da0436e9SJames Smart /* Completion Queue Entry Status Codes */ 383da0436e9SJames Smart #define CQE_STATUS_SUCCESS 0x0 384da0436e9SJames Smart #define CQE_STATUS_FCP_RSP_FAILURE 0x1 385da0436e9SJames Smart #define CQE_STATUS_REMOTE_STOP 0x2 386da0436e9SJames Smart #define CQE_STATUS_LOCAL_REJECT 0x3 387da0436e9SJames Smart #define CQE_STATUS_NPORT_RJT 0x4 388da0436e9SJames Smart #define CQE_STATUS_FABRIC_RJT 0x5 389da0436e9SJames Smart #define CQE_STATUS_NPORT_BSY 0x6 390da0436e9SJames Smart #define CQE_STATUS_FABRIC_BSY 0x7 391da0436e9SJames Smart #define CQE_STATUS_INTERMED_RSP 0x8 392da0436e9SJames Smart #define CQE_STATUS_LS_RJT 0x9 393da0436e9SJames Smart #define CQE_STATUS_CMD_REJECT 0xb 394da0436e9SJames Smart #define CQE_STATUS_FCP_TGT_LENCHECK 0xc 395da0436e9SJames Smart #define CQE_STATUS_NEED_BUFF_ENTRY 0xf 396acd6859bSJames Smart #define CQE_STATUS_DI_ERROR 0x16 397acd6859bSJames Smart 398da0436e9SJames Smart /* Status returned by hardware (valid only if status = CQE_STATUS_SUCCESS). */ 399da0436e9SJames Smart #define CQE_HW_STATUS_NO_ERR 0x0 400da0436e9SJames Smart #define CQE_HW_STATUS_UNDERRUN 0x1 401da0436e9SJames Smart #define CQE_HW_STATUS_OVERRUN 0x2 402da0436e9SJames Smart 403da0436e9SJames Smart /* Completion Queue Entry Codes */ 404da0436e9SJames Smart #define CQE_CODE_COMPL_WQE 0x1 405da0436e9SJames Smart #define CQE_CODE_RELEASE_WQE 0x2 406da0436e9SJames Smart #define CQE_CODE_RECEIVE 0x4 407da0436e9SJames Smart #define CQE_CODE_XRI_ABORTED 0x5 4087851fe2cSJames Smart #define CQE_CODE_RECEIVE_V1 0x9 409895427bdSJames Smart #define CQE_CODE_NVME_ERSP 0xd 410da0436e9SJames Smart 4115c1db2acSJames Smart /* 4125c1db2acSJames Smart * Define mask value for xri_aborted and wcqe completed CQE extended status. 4135c1db2acSJames Smart * Currently, extended status is limited to 9 bits (0x0 -> 0x103) . 4145c1db2acSJames Smart */ 415e3d2b802SJames Smart #define WCQE_PARAM_MASK 0x1FF 4165c1db2acSJames Smart 417da0436e9SJames Smart /* completion queue entry for wqe completions */ 418da0436e9SJames Smart struct lpfc_wcqe_complete { 419da0436e9SJames Smart uint32_t word0; 420da0436e9SJames Smart #define lpfc_wcqe_c_request_tag_SHIFT 16 421da0436e9SJames Smart #define lpfc_wcqe_c_request_tag_MASK 0x0000FFFF 422da0436e9SJames Smart #define lpfc_wcqe_c_request_tag_WORD word0 423da0436e9SJames Smart #define lpfc_wcqe_c_status_SHIFT 8 424da0436e9SJames Smart #define lpfc_wcqe_c_status_MASK 0x000000FF 425da0436e9SJames Smart #define lpfc_wcqe_c_status_WORD word0 426da0436e9SJames Smart #define lpfc_wcqe_c_hw_status_SHIFT 0 427da0436e9SJames Smart #define lpfc_wcqe_c_hw_status_MASK 0x000000FF 428da0436e9SJames Smart #define lpfc_wcqe_c_hw_status_WORD word0 429895427bdSJames Smart #define lpfc_wcqe_c_ersp0_SHIFT 0 430895427bdSJames Smart #define lpfc_wcqe_c_ersp0_MASK 0x0000FFFF 431895427bdSJames Smart #define lpfc_wcqe_c_ersp0_WORD word0 432da0436e9SJames Smart uint32_t total_data_placed; 433daebf93fSJames Smart #define lpfc_wcqe_c_cmf_cg_SHIFT 31 434daebf93fSJames Smart #define lpfc_wcqe_c_cmf_cg_MASK 0x00000001 435daebf93fSJames Smart #define lpfc_wcqe_c_cmf_cg_WORD total_data_placed 436daebf93fSJames Smart #define lpfc_wcqe_c_cmf_bw_SHIFT 0 437daebf93fSJames Smart #define lpfc_wcqe_c_cmf_bw_MASK 0x0FFFFFFF 438daebf93fSJames Smart #define lpfc_wcqe_c_cmf_bw_WORD total_data_placed 439da0436e9SJames Smart uint32_t parameter; 440acd6859bSJames Smart #define lpfc_wcqe_c_bg_edir_SHIFT 5 441acd6859bSJames Smart #define lpfc_wcqe_c_bg_edir_MASK 0x00000001 442acd6859bSJames Smart #define lpfc_wcqe_c_bg_edir_WORD parameter 443acd6859bSJames Smart #define lpfc_wcqe_c_bg_tdpv_SHIFT 3 444acd6859bSJames Smart #define lpfc_wcqe_c_bg_tdpv_MASK 0x00000001 445acd6859bSJames Smart #define lpfc_wcqe_c_bg_tdpv_WORD parameter 446acd6859bSJames Smart #define lpfc_wcqe_c_bg_re_SHIFT 2 447acd6859bSJames Smart #define lpfc_wcqe_c_bg_re_MASK 0x00000001 448acd6859bSJames Smart #define lpfc_wcqe_c_bg_re_WORD parameter 449acd6859bSJames Smart #define lpfc_wcqe_c_bg_ae_SHIFT 1 450acd6859bSJames Smart #define lpfc_wcqe_c_bg_ae_MASK 0x00000001 451acd6859bSJames Smart #define lpfc_wcqe_c_bg_ae_WORD parameter 452acd6859bSJames Smart #define lpfc_wcqe_c_bg_ge_SHIFT 0 453acd6859bSJames Smart #define lpfc_wcqe_c_bg_ge_MASK 0x00000001 454acd6859bSJames Smart #define lpfc_wcqe_c_bg_ge_WORD parameter 455da0436e9SJames Smart uint32_t word3; 456da0436e9SJames Smart #define lpfc_wcqe_c_valid_SHIFT lpfc_cqe_valid_SHIFT 457da0436e9SJames Smart #define lpfc_wcqe_c_valid_MASK lpfc_cqe_valid_MASK 458da0436e9SJames Smart #define lpfc_wcqe_c_valid_WORD lpfc_cqe_valid_WORD 459da0436e9SJames Smart #define lpfc_wcqe_c_xb_SHIFT 28 460da0436e9SJames Smart #define lpfc_wcqe_c_xb_MASK 0x00000001 461da0436e9SJames Smart #define lpfc_wcqe_c_xb_WORD word3 462da0436e9SJames Smart #define lpfc_wcqe_c_pv_SHIFT 27 463da0436e9SJames Smart #define lpfc_wcqe_c_pv_MASK 0x00000001 464da0436e9SJames Smart #define lpfc_wcqe_c_pv_WORD word3 465da0436e9SJames Smart #define lpfc_wcqe_c_priority_SHIFT 24 466da0436e9SJames Smart #define lpfc_wcqe_c_priority_MASK 0x00000007 467da0436e9SJames Smart #define lpfc_wcqe_c_priority_WORD word3 468da0436e9SJames Smart #define lpfc_wcqe_c_code_SHIFT lpfc_cqe_code_SHIFT 469da0436e9SJames Smart #define lpfc_wcqe_c_code_MASK lpfc_cqe_code_MASK 470da0436e9SJames Smart #define lpfc_wcqe_c_code_WORD lpfc_cqe_code_WORD 471895427bdSJames Smart #define lpfc_wcqe_c_sqhead_SHIFT 0 472895427bdSJames Smart #define lpfc_wcqe_c_sqhead_MASK 0x0000FFFF 473895427bdSJames Smart #define lpfc_wcqe_c_sqhead_WORD word3 474da0436e9SJames Smart }; 475da0436e9SJames Smart 476da0436e9SJames Smart /* completion queue entry for wqe release */ 477da0436e9SJames Smart struct lpfc_wcqe_release { 478da0436e9SJames Smart uint32_t reserved0; 479da0436e9SJames Smart uint32_t reserved1; 480da0436e9SJames Smart uint32_t word2; 481da0436e9SJames Smart #define lpfc_wcqe_r_wq_id_SHIFT 16 482da0436e9SJames Smart #define lpfc_wcqe_r_wq_id_MASK 0x0000FFFF 483da0436e9SJames Smart #define lpfc_wcqe_r_wq_id_WORD word2 484da0436e9SJames Smart #define lpfc_wcqe_r_wqe_index_SHIFT 0 485da0436e9SJames Smart #define lpfc_wcqe_r_wqe_index_MASK 0x0000FFFF 486da0436e9SJames Smart #define lpfc_wcqe_r_wqe_index_WORD word2 487da0436e9SJames Smart uint32_t word3; 488da0436e9SJames Smart #define lpfc_wcqe_r_valid_SHIFT lpfc_cqe_valid_SHIFT 489da0436e9SJames Smart #define lpfc_wcqe_r_valid_MASK lpfc_cqe_valid_MASK 490da0436e9SJames Smart #define lpfc_wcqe_r_valid_WORD lpfc_cqe_valid_WORD 491da0436e9SJames Smart #define lpfc_wcqe_r_code_SHIFT lpfc_cqe_code_SHIFT 492da0436e9SJames Smart #define lpfc_wcqe_r_code_MASK lpfc_cqe_code_MASK 493da0436e9SJames Smart #define lpfc_wcqe_r_code_WORD lpfc_cqe_code_WORD 494da0436e9SJames Smart }; 495da0436e9SJames Smart 496da0436e9SJames Smart struct sli4_wcqe_xri_aborted { 497da0436e9SJames Smart uint32_t word0; 498da0436e9SJames Smart #define lpfc_wcqe_xa_status_SHIFT 8 499da0436e9SJames Smart #define lpfc_wcqe_xa_status_MASK 0x000000FF 500da0436e9SJames Smart #define lpfc_wcqe_xa_status_WORD word0 501da0436e9SJames Smart uint32_t parameter; 502da0436e9SJames Smart uint32_t word2; 503da0436e9SJames Smart #define lpfc_wcqe_xa_remote_xid_SHIFT 16 504da0436e9SJames Smart #define lpfc_wcqe_xa_remote_xid_MASK 0x0000FFFF 505da0436e9SJames Smart #define lpfc_wcqe_xa_remote_xid_WORD word2 506da0436e9SJames Smart #define lpfc_wcqe_xa_xri_SHIFT 0 507da0436e9SJames Smart #define lpfc_wcqe_xa_xri_MASK 0x0000FFFF 508da0436e9SJames Smart #define lpfc_wcqe_xa_xri_WORD word2 509da0436e9SJames Smart uint32_t word3; 510da0436e9SJames Smart #define lpfc_wcqe_xa_valid_SHIFT lpfc_cqe_valid_SHIFT 511da0436e9SJames Smart #define lpfc_wcqe_xa_valid_MASK lpfc_cqe_valid_MASK 512da0436e9SJames Smart #define lpfc_wcqe_xa_valid_WORD lpfc_cqe_valid_WORD 513da0436e9SJames Smart #define lpfc_wcqe_xa_ia_SHIFT 30 514da0436e9SJames Smart #define lpfc_wcqe_xa_ia_MASK 0x00000001 515da0436e9SJames Smart #define lpfc_wcqe_xa_ia_WORD word3 516da0436e9SJames Smart #define CQE_XRI_ABORTED_IA_REMOTE 0 517da0436e9SJames Smart #define CQE_XRI_ABORTED_IA_LOCAL 1 518da0436e9SJames Smart #define lpfc_wcqe_xa_br_SHIFT 29 519da0436e9SJames Smart #define lpfc_wcqe_xa_br_MASK 0x00000001 520da0436e9SJames Smart #define lpfc_wcqe_xa_br_WORD word3 521da0436e9SJames Smart #define CQE_XRI_ABORTED_BR_BA_ACC 0 522da0436e9SJames Smart #define CQE_XRI_ABORTED_BR_BA_RJT 1 523da0436e9SJames Smart #define lpfc_wcqe_xa_eo_SHIFT 28 524da0436e9SJames Smart #define lpfc_wcqe_xa_eo_MASK 0x00000001 525da0436e9SJames Smart #define lpfc_wcqe_xa_eo_WORD word3 526da0436e9SJames Smart #define CQE_XRI_ABORTED_EO_REMOTE 0 527da0436e9SJames Smart #define CQE_XRI_ABORTED_EO_LOCAL 1 528da0436e9SJames Smart #define lpfc_wcqe_xa_code_SHIFT lpfc_cqe_code_SHIFT 529da0436e9SJames Smart #define lpfc_wcqe_xa_code_MASK lpfc_cqe_code_MASK 530da0436e9SJames Smart #define lpfc_wcqe_xa_code_WORD lpfc_cqe_code_WORD 531da0436e9SJames Smart }; 532da0436e9SJames Smart 533da0436e9SJames Smart /* completion queue entry structure for rqe completion */ 534da0436e9SJames Smart struct lpfc_rcqe { 535da0436e9SJames Smart uint32_t word0; 5365fc849d8SJustin Tee #define lpfc_rcqe_iv_SHIFT 31 5375fc849d8SJustin Tee #define lpfc_rcqe_iv_MASK 0x00000001 5385fc849d8SJustin Tee #define lpfc_rcqe_iv_WORD word0 539da0436e9SJames Smart #define lpfc_rcqe_status_SHIFT 8 540da0436e9SJames Smart #define lpfc_rcqe_status_MASK 0x000000FF 541da0436e9SJames Smart #define lpfc_rcqe_status_WORD word0 542da0436e9SJames Smart #define FC_STATUS_RQ_SUCCESS 0x10 /* Async receive successful */ 543da0436e9SJames Smart #define FC_STATUS_RQ_BUF_LEN_EXCEEDED 0x11 /* payload truncated */ 544da0436e9SJames Smart #define FC_STATUS_INSUFF_BUF_NEED_BUF 0x12 /* Insufficient buffers */ 545da0436e9SJames Smart #define FC_STATUS_INSUFF_BUF_FRM_DISC 0x13 /* Frame Discard */ 5465fc849d8SJustin Tee #define FC_STATUS_RQ_DMA_FAILURE 0x14 /* DMA failure */ 5477851fe2cSJames Smart uint32_t word1; 5487851fe2cSJames Smart #define lpfc_rcqe_fcf_id_v1_SHIFT 0 5497851fe2cSJames Smart #define lpfc_rcqe_fcf_id_v1_MASK 0x0000003F 5507851fe2cSJames Smart #define lpfc_rcqe_fcf_id_v1_WORD word1 551da0436e9SJames Smart uint32_t word2; 552da0436e9SJames Smart #define lpfc_rcqe_length_SHIFT 16 553da0436e9SJames Smart #define lpfc_rcqe_length_MASK 0x0000FFFF 554da0436e9SJames Smart #define lpfc_rcqe_length_WORD word2 555da0436e9SJames Smart #define lpfc_rcqe_rq_id_SHIFT 6 556da0436e9SJames Smart #define lpfc_rcqe_rq_id_MASK 0x000003FF 557da0436e9SJames Smart #define lpfc_rcqe_rq_id_WORD word2 558da0436e9SJames Smart #define lpfc_rcqe_fcf_id_SHIFT 0 559da0436e9SJames Smart #define lpfc_rcqe_fcf_id_MASK 0x0000003F 560da0436e9SJames Smart #define lpfc_rcqe_fcf_id_WORD word2 5617851fe2cSJames Smart #define lpfc_rcqe_rq_id_v1_SHIFT 0 5627851fe2cSJames Smart #define lpfc_rcqe_rq_id_v1_MASK 0x0000FFFF 5637851fe2cSJames Smart #define lpfc_rcqe_rq_id_v1_WORD word2 564da0436e9SJames Smart uint32_t word3; 565da0436e9SJames Smart #define lpfc_rcqe_valid_SHIFT lpfc_cqe_valid_SHIFT 566da0436e9SJames Smart #define lpfc_rcqe_valid_MASK lpfc_cqe_valid_MASK 567da0436e9SJames Smart #define lpfc_rcqe_valid_WORD lpfc_cqe_valid_WORD 568da0436e9SJames Smart #define lpfc_rcqe_port_SHIFT 30 569da0436e9SJames Smart #define lpfc_rcqe_port_MASK 0x00000001 570da0436e9SJames Smart #define lpfc_rcqe_port_WORD word3 571da0436e9SJames Smart #define lpfc_rcqe_hdr_length_SHIFT 24 572da0436e9SJames Smart #define lpfc_rcqe_hdr_length_MASK 0x0000001F 573da0436e9SJames Smart #define lpfc_rcqe_hdr_length_WORD word3 574da0436e9SJames Smart #define lpfc_rcqe_code_SHIFT lpfc_cqe_code_SHIFT 575da0436e9SJames Smart #define lpfc_rcqe_code_MASK lpfc_cqe_code_MASK 576da0436e9SJames Smart #define lpfc_rcqe_code_WORD lpfc_cqe_code_WORD 577da0436e9SJames Smart #define lpfc_rcqe_eof_SHIFT 8 578da0436e9SJames Smart #define lpfc_rcqe_eof_MASK 0x000000FF 579da0436e9SJames Smart #define lpfc_rcqe_eof_WORD word3 580da0436e9SJames Smart #define FCOE_EOFn 0x41 581da0436e9SJames Smart #define FCOE_EOFt 0x42 582da0436e9SJames Smart #define FCOE_EOFni 0x49 583da0436e9SJames Smart #define FCOE_EOFa 0x50 584da0436e9SJames Smart #define lpfc_rcqe_sof_SHIFT 0 585da0436e9SJames Smart #define lpfc_rcqe_sof_MASK 0x000000FF 586da0436e9SJames Smart #define lpfc_rcqe_sof_WORD word3 587da0436e9SJames Smart #define FCOE_SOFi2 0x2d 588da0436e9SJames Smart #define FCOE_SOFi3 0x2e 589da0436e9SJames Smart #define FCOE_SOFn2 0x35 590da0436e9SJames Smart #define FCOE_SOFn3 0x36 591da0436e9SJames Smart }; 592da0436e9SJames Smart 593da0436e9SJames Smart struct lpfc_rqe { 594da0436e9SJames Smart uint32_t address_hi; 595da0436e9SJames Smart uint32_t address_lo; 596da0436e9SJames Smart }; 597da0436e9SJames Smart 598da0436e9SJames Smart /* buffer descriptors */ 599da0436e9SJames Smart struct lpfc_bde4 { 600da0436e9SJames Smart uint32_t addr_hi; 601da0436e9SJames Smart uint32_t addr_lo; 602da0436e9SJames Smart uint32_t word2; 603da0436e9SJames Smart #define lpfc_bde4_last_SHIFT 31 604da0436e9SJames Smart #define lpfc_bde4_last_MASK 0x00000001 605da0436e9SJames Smart #define lpfc_bde4_last_WORD word2 606da0436e9SJames Smart #define lpfc_bde4_sge_offset_SHIFT 0 607da0436e9SJames Smart #define lpfc_bde4_sge_offset_MASK 0x000003FF 608da0436e9SJames Smart #define lpfc_bde4_sge_offset_WORD word2 609da0436e9SJames Smart uint32_t word3; 610da0436e9SJames Smart #define lpfc_bde4_length_SHIFT 0 611da0436e9SJames Smart #define lpfc_bde4_length_MASK 0x000000FF 612da0436e9SJames Smart #define lpfc_bde4_length_WORD word3 613da0436e9SJames Smart }; 614da0436e9SJames Smart 615da0436e9SJames Smart struct lpfc_register { 616da0436e9SJames Smart uint32_t word0; 617da0436e9SJames Smart }; 618da0436e9SJames Smart 61965791f1fSJames Smart #define LPFC_PORT_SEM_UE_RECOVERABLE 0xE000 62065791f1fSJames Smart #define LPFC_PORT_SEM_MASK 0xF000 621085c647cSJames Smart /* The following BAR0 Registers apply to SLI4 if_type 0 UCNAs. */ 622da0436e9SJames Smart #define LPFC_UERR_STATUS_HI 0x00A4 623da0436e9SJames Smart #define LPFC_UERR_STATUS_LO 0x00A0 624a747c9ceSJames Smart #define LPFC_UE_MASK_HI 0x00AC 625a747c9ceSJames Smart #define LPFC_UE_MASK_LO 0x00A8 626da0436e9SJames Smart 6272fcee4bfSJames Smart /* The following BAR0 register sets are defined for if_type 0 and 2 UCNAs. */ 6282fcee4bfSJames Smart #define LPFC_SLI_INTF 0x0058 629bf316c78SJames Smart #define LPFC_SLI_ASIC_VER 0x009C 630da0436e9SJames Smart 63188a2cfbbSJames Smart #define LPFC_CTL_PORT_SEM_OFFSET 0x400 6322fcee4bfSJames Smart #define lpfc_port_smphr_perr_SHIFT 31 6332fcee4bfSJames Smart #define lpfc_port_smphr_perr_MASK 0x1 6342fcee4bfSJames Smart #define lpfc_port_smphr_perr_WORD word0 6352fcee4bfSJames Smart #define lpfc_port_smphr_sfi_SHIFT 30 6362fcee4bfSJames Smart #define lpfc_port_smphr_sfi_MASK 0x1 6372fcee4bfSJames Smart #define lpfc_port_smphr_sfi_WORD word0 6382fcee4bfSJames Smart #define lpfc_port_smphr_nip_SHIFT 29 6392fcee4bfSJames Smart #define lpfc_port_smphr_nip_MASK 0x1 6402fcee4bfSJames Smart #define lpfc_port_smphr_nip_WORD word0 6412fcee4bfSJames Smart #define lpfc_port_smphr_ipc_SHIFT 28 6422fcee4bfSJames Smart #define lpfc_port_smphr_ipc_MASK 0x1 6432fcee4bfSJames Smart #define lpfc_port_smphr_ipc_WORD word0 6442fcee4bfSJames Smart #define lpfc_port_smphr_scr1_SHIFT 27 6452fcee4bfSJames Smart #define lpfc_port_smphr_scr1_MASK 0x1 6462fcee4bfSJames Smart #define lpfc_port_smphr_scr1_WORD word0 6472fcee4bfSJames Smart #define lpfc_port_smphr_scr2_SHIFT 26 6482fcee4bfSJames Smart #define lpfc_port_smphr_scr2_MASK 0x1 6492fcee4bfSJames Smart #define lpfc_port_smphr_scr2_WORD word0 6502fcee4bfSJames Smart #define lpfc_port_smphr_host_scratch_SHIFT 16 6512fcee4bfSJames Smart #define lpfc_port_smphr_host_scratch_MASK 0xFF 6522fcee4bfSJames Smart #define lpfc_port_smphr_host_scratch_WORD word0 6532fcee4bfSJames Smart #define lpfc_port_smphr_port_status_SHIFT 0 6542fcee4bfSJames Smart #define lpfc_port_smphr_port_status_MASK 0xFFFF 6552fcee4bfSJames Smart #define lpfc_port_smphr_port_status_WORD word0 6562fcee4bfSJames Smart 657da0436e9SJames Smart #define LPFC_POST_STAGE_POWER_ON_RESET 0x0000 658da0436e9SJames Smart #define LPFC_POST_STAGE_AWAITING_HOST_RDY 0x0001 659da0436e9SJames Smart #define LPFC_POST_STAGE_HOST_RDY 0x0002 660da0436e9SJames Smart #define LPFC_POST_STAGE_BE_RESET 0x0003 661da0436e9SJames Smart #define LPFC_POST_STAGE_SEEPROM_CS_START 0x0100 662da0436e9SJames Smart #define LPFC_POST_STAGE_SEEPROM_CS_DONE 0x0101 663da0436e9SJames Smart #define LPFC_POST_STAGE_DDR_CONFIG_START 0x0200 664da0436e9SJames Smart #define LPFC_POST_STAGE_DDR_CONFIG_DONE 0x0201 665da0436e9SJames Smart #define LPFC_POST_STAGE_DDR_CALIBRATE_START 0x0300 666da0436e9SJames Smart #define LPFC_POST_STAGE_DDR_CALIBRATE_DONE 0x0301 667da0436e9SJames Smart #define LPFC_POST_STAGE_DDR_TEST_START 0x0400 668da0436e9SJames Smart #define LPFC_POST_STAGE_DDR_TEST_DONE 0x0401 669da0436e9SJames Smart #define LPFC_POST_STAGE_REDBOOT_INIT_START 0x0600 670da0436e9SJames Smart #define LPFC_POST_STAGE_REDBOOT_INIT_DONE 0x0601 671da0436e9SJames Smart #define LPFC_POST_STAGE_FW_IMAGE_LOAD_START 0x0700 672da0436e9SJames Smart #define LPFC_POST_STAGE_FW_IMAGE_LOAD_DONE 0x0701 673da0436e9SJames Smart #define LPFC_POST_STAGE_ARMFW_START 0x0800 674da0436e9SJames Smart #define LPFC_POST_STAGE_DHCP_QUERY_START 0x0900 675da0436e9SJames Smart #define LPFC_POST_STAGE_DHCP_QUERY_DONE 0x0901 676da0436e9SJames Smart #define LPFC_POST_STAGE_BOOT_TARGET_DISCOVERY_START 0x0A00 677da0436e9SJames Smart #define LPFC_POST_STAGE_BOOT_TARGET_DISCOVERY_DONE 0x0A01 678da0436e9SJames Smart #define LPFC_POST_STAGE_RC_OPTION_SET 0x0B00 679da0436e9SJames Smart #define LPFC_POST_STAGE_SWITCH_LINK 0x0B01 680da0436e9SJames Smart #define LPFC_POST_STAGE_SEND_ICDS_MESSAGE 0x0B02 681da0436e9SJames Smart #define LPFC_POST_STAGE_PERFROM_TFTP 0x0B03 682da0436e9SJames Smart #define LPFC_POST_STAGE_PARSE_XML 0x0B04 683da0436e9SJames Smart #define LPFC_POST_STAGE_DOWNLOAD_IMAGE 0x0B05 684da0436e9SJames Smart #define LPFC_POST_STAGE_FLASH_IMAGE 0x0B06 685da0436e9SJames Smart #define LPFC_POST_STAGE_RC_DONE 0x0B07 686da0436e9SJames Smart #define LPFC_POST_STAGE_REBOOT_SYSTEM 0x0B08 687da0436e9SJames Smart #define LPFC_POST_STAGE_MAC_ADDRESS 0x0C00 6882fcee4bfSJames Smart #define LPFC_POST_STAGE_PORT_READY 0xC000 6892fcee4bfSJames Smart #define LPFC_POST_STAGE_PORT_UE 0xF000 690085c647cSJames Smart 69188a2cfbbSJames Smart #define LPFC_CTL_PORT_STA_OFFSET 0x404 692085c647cSJames Smart #define lpfc_sliport_status_err_SHIFT 31 693085c647cSJames Smart #define lpfc_sliport_status_err_MASK 0x1 694085c647cSJames Smart #define lpfc_sliport_status_err_WORD word0 695085c647cSJames Smart #define lpfc_sliport_status_end_SHIFT 30 696085c647cSJames Smart #define lpfc_sliport_status_end_MASK 0x1 697085c647cSJames Smart #define lpfc_sliport_status_end_WORD word0 698085c647cSJames Smart #define lpfc_sliport_status_oti_SHIFT 29 699085c647cSJames Smart #define lpfc_sliport_status_oti_MASK 0x1 700085c647cSJames Smart #define lpfc_sliport_status_oti_WORD word0 701f0020e42SDick Kennedy #define lpfc_sliport_status_dip_SHIFT 25 702f0020e42SDick Kennedy #define lpfc_sliport_status_dip_MASK 0x1 703f0020e42SDick Kennedy #define lpfc_sliport_status_dip_WORD word0 704085c647cSJames Smart #define lpfc_sliport_status_rn_SHIFT 24 705085c647cSJames Smart #define lpfc_sliport_status_rn_MASK 0x1 706085c647cSJames Smart #define lpfc_sliport_status_rn_WORD word0 707085c647cSJames Smart #define lpfc_sliport_status_rdy_SHIFT 23 708085c647cSJames Smart #define lpfc_sliport_status_rdy_MASK 0x1 709085c647cSJames Smart #define lpfc_sliport_status_rdy_WORD word0 710a5b141a8SJames Smart #define lpfc_sliport_status_pldv_SHIFT 0 711a5b141a8SJames Smart #define lpfc_sliport_status_pldv_MASK 0x1 712a5b141a8SJames Smart #define lpfc_sliport_status_pldv_WORD word0 713a5b141a8SJames Smart #define CFG_PLD 0x3C 714229adb0eSJames Smart #define MAX_IF_TYPE_2_RESETS 6 715085c647cSJames Smart 71688a2cfbbSJames Smart #define LPFC_CTL_PORT_CTL_OFFSET 0x408 717085c647cSJames Smart #define lpfc_sliport_ctrl_end_SHIFT 30 718085c647cSJames Smart #define lpfc_sliport_ctrl_end_MASK 0x1 719085c647cSJames Smart #define lpfc_sliport_ctrl_end_WORD word0 720085c647cSJames Smart #define LPFC_SLIPORT_LITTLE_ENDIAN 0 721085c647cSJames Smart #define LPFC_SLIPORT_BIG_ENDIAN 1 722085c647cSJames Smart #define lpfc_sliport_ctrl_ip_SHIFT 27 723085c647cSJames Smart #define lpfc_sliport_ctrl_ip_MASK 0x1 724085c647cSJames Smart #define lpfc_sliport_ctrl_ip_WORD word0 7252fcee4bfSJames Smart #define LPFC_SLIPORT_INIT_PORT 1 726085c647cSJames Smart 72788a2cfbbSJames Smart #define LPFC_CTL_PORT_ER1_OFFSET 0x40C 72888a2cfbbSJames Smart #define LPFC_CTL_PORT_ER2_OFFSET 0x410 729085c647cSJames Smart 7300cf07f84SJames Smart #define LPFC_CTL_PORT_EQ_DELAY_OFFSET 0x418 7310cf07f84SJames Smart #define lpfc_sliport_eqdelay_delay_SHIFT 16 7320cf07f84SJames Smart #define lpfc_sliport_eqdelay_delay_MASK 0xffff 7330cf07f84SJames Smart #define lpfc_sliport_eqdelay_delay_WORD word0 7340cf07f84SJames Smart #define lpfc_sliport_eqdelay_id_SHIFT 0 7350cf07f84SJames Smart #define lpfc_sliport_eqdelay_id_MASK 0xfff 7360cf07f84SJames Smart #define lpfc_sliport_eqdelay_id_WORD word0 7370cf07f84SJames Smart #define LPFC_SEC_TO_USEC 1000000 738daebf93fSJames Smart #define LPFC_SEC_TO_MSEC 1000 73971ddeeafSJames Smart #define LPFC_MSECS_TO_SECS(msecs) ((msecs) / 1000) 7400cf07f84SJames Smart 7412fcee4bfSJames Smart /* The following Registers apply to SLI4 if_type 0 UCNAs. They typically 7422fcee4bfSJames Smart * reside in BAR 2. 7432fcee4bfSJames Smart */ 7442fcee4bfSJames Smart #define LPFC_SLIPORT_IF0_SMPHR 0x00AC 7452fcee4bfSJames Smart 746da0436e9SJames Smart #define LPFC_IMR_MASK_ALL 0xFFFFFFFF 747da0436e9SJames Smart #define LPFC_ISCR_CLEAR_ALL 0xFFFFFFFF 748da0436e9SJames Smart 749da0436e9SJames Smart #define LPFC_HST_ISR0 0x0C18 750da0436e9SJames Smart #define LPFC_HST_ISR1 0x0C1C 751da0436e9SJames Smart #define LPFC_HST_ISR2 0x0C20 752da0436e9SJames Smart #define LPFC_HST_ISR3 0x0C24 753da0436e9SJames Smart #define LPFC_HST_ISR4 0x0C28 754da0436e9SJames Smart 755da0436e9SJames Smart #define LPFC_HST_IMR0 0x0C48 756da0436e9SJames Smart #define LPFC_HST_IMR1 0x0C4C 757da0436e9SJames Smart #define LPFC_HST_IMR2 0x0C50 758da0436e9SJames Smart #define LPFC_HST_IMR3 0x0C54 759da0436e9SJames Smart #define LPFC_HST_IMR4 0x0C58 760da0436e9SJames Smart 761da0436e9SJames Smart #define LPFC_HST_ISCR0 0x0C78 762da0436e9SJames Smart #define LPFC_HST_ISCR1 0x0C7C 763da0436e9SJames Smart #define LPFC_HST_ISCR2 0x0C80 764da0436e9SJames Smart #define LPFC_HST_ISCR3 0x0C84 765da0436e9SJames Smart #define LPFC_HST_ISCR4 0x0C88 766da0436e9SJames Smart 767da0436e9SJames Smart #define LPFC_SLI4_INTR0 BIT0 768da0436e9SJames Smart #define LPFC_SLI4_INTR1 BIT1 769da0436e9SJames Smart #define LPFC_SLI4_INTR2 BIT2 770da0436e9SJames Smart #define LPFC_SLI4_INTR3 BIT3 771da0436e9SJames Smart #define LPFC_SLI4_INTR4 BIT4 772da0436e9SJames Smart #define LPFC_SLI4_INTR5 BIT5 773da0436e9SJames Smart #define LPFC_SLI4_INTR6 BIT6 774da0436e9SJames Smart #define LPFC_SLI4_INTR7 BIT7 775da0436e9SJames Smart #define LPFC_SLI4_INTR8 BIT8 776da0436e9SJames Smart #define LPFC_SLI4_INTR9 BIT9 777da0436e9SJames Smart #define LPFC_SLI4_INTR10 BIT10 778da0436e9SJames Smart #define LPFC_SLI4_INTR11 BIT11 779da0436e9SJames Smart #define LPFC_SLI4_INTR12 BIT12 780da0436e9SJames Smart #define LPFC_SLI4_INTR13 BIT13 781da0436e9SJames Smart #define LPFC_SLI4_INTR14 BIT14 782da0436e9SJames Smart #define LPFC_SLI4_INTR15 BIT15 783da0436e9SJames Smart #define LPFC_SLI4_INTR16 BIT16 784da0436e9SJames Smart #define LPFC_SLI4_INTR17 BIT17 785da0436e9SJames Smart #define LPFC_SLI4_INTR18 BIT18 786da0436e9SJames Smart #define LPFC_SLI4_INTR19 BIT19 787da0436e9SJames Smart #define LPFC_SLI4_INTR20 BIT20 788da0436e9SJames Smart #define LPFC_SLI4_INTR21 BIT21 789da0436e9SJames Smart #define LPFC_SLI4_INTR22 BIT22 790da0436e9SJames Smart #define LPFC_SLI4_INTR23 BIT23 791da0436e9SJames Smart #define LPFC_SLI4_INTR24 BIT24 792da0436e9SJames Smart #define LPFC_SLI4_INTR25 BIT25 793da0436e9SJames Smart #define LPFC_SLI4_INTR26 BIT26 794da0436e9SJames Smart #define LPFC_SLI4_INTR27 BIT27 795da0436e9SJames Smart #define LPFC_SLI4_INTR28 BIT28 796da0436e9SJames Smart #define LPFC_SLI4_INTR29 BIT29 797da0436e9SJames Smart #define LPFC_SLI4_INTR30 BIT30 798da0436e9SJames Smart #define LPFC_SLI4_INTR31 BIT31 799da0436e9SJames Smart 800085c647cSJames Smart /* 801085c647cSJames Smart * The Doorbell registers defined here exist in different BAR 802085c647cSJames Smart * register sets depending on the UCNA Port's reported if_type 803085c647cSJames Smart * value. For UCNA ports running SLI4 and if_type 0, they reside in 8042fcee4bfSJames Smart * BAR4. For UCNA ports running SLI4 and if_type 2, they reside in 80527d6ac0aSJames Smart * BAR0. For FC ports running SLI4 and if_type 6, they reside in 80627d6ac0aSJames Smart * BAR2. The offsets and base address are different, so the driver 80727d6ac0aSJames Smart * has to compute the register addresses accordingly 808085c647cSJames Smart */ 809962bc51bSJames Smart #define LPFC_ULP0_RQ_DOORBELL 0x00A0 810962bc51bSJames Smart #define LPFC_ULP1_RQ_DOORBELL 0x00C0 81127d6ac0aSJames Smart #define LPFC_IF6_RQ_DOORBELL 0x0080 812962bc51bSJames Smart #define lpfc_rq_db_list_fm_num_posted_SHIFT 24 813962bc51bSJames Smart #define lpfc_rq_db_list_fm_num_posted_MASK 0x00FF 814962bc51bSJames Smart #define lpfc_rq_db_list_fm_num_posted_WORD word0 815962bc51bSJames Smart #define lpfc_rq_db_list_fm_index_SHIFT 16 816962bc51bSJames Smart #define lpfc_rq_db_list_fm_index_MASK 0x00FF 817962bc51bSJames Smart #define lpfc_rq_db_list_fm_index_WORD word0 818962bc51bSJames Smart #define lpfc_rq_db_list_fm_id_SHIFT 0 819962bc51bSJames Smart #define lpfc_rq_db_list_fm_id_MASK 0xFFFF 820962bc51bSJames Smart #define lpfc_rq_db_list_fm_id_WORD word0 821962bc51bSJames Smart #define lpfc_rq_db_ring_fm_num_posted_SHIFT 16 822962bc51bSJames Smart #define lpfc_rq_db_ring_fm_num_posted_MASK 0x3FFF 823962bc51bSJames Smart #define lpfc_rq_db_ring_fm_num_posted_WORD word0 824962bc51bSJames Smart #define lpfc_rq_db_ring_fm_id_SHIFT 0 825962bc51bSJames Smart #define lpfc_rq_db_ring_fm_id_MASK 0xFFFF 826962bc51bSJames Smart #define lpfc_rq_db_ring_fm_id_WORD word0 827da0436e9SJames Smart 828962bc51bSJames Smart #define LPFC_ULP0_WQ_DOORBELL 0x0040 829962bc51bSJames Smart #define LPFC_ULP1_WQ_DOORBELL 0x0060 830962bc51bSJames Smart #define lpfc_wq_db_list_fm_num_posted_SHIFT 24 831962bc51bSJames Smart #define lpfc_wq_db_list_fm_num_posted_MASK 0x00FF 832962bc51bSJames Smart #define lpfc_wq_db_list_fm_num_posted_WORD word0 833962bc51bSJames Smart #define lpfc_wq_db_list_fm_index_SHIFT 16 834962bc51bSJames Smart #define lpfc_wq_db_list_fm_index_MASK 0x00FF 835962bc51bSJames Smart #define lpfc_wq_db_list_fm_index_WORD word0 836962bc51bSJames Smart #define lpfc_wq_db_list_fm_id_SHIFT 0 837962bc51bSJames Smart #define lpfc_wq_db_list_fm_id_MASK 0xFFFF 838962bc51bSJames Smart #define lpfc_wq_db_list_fm_id_WORD word0 839962bc51bSJames Smart #define lpfc_wq_db_ring_fm_num_posted_SHIFT 16 840962bc51bSJames Smart #define lpfc_wq_db_ring_fm_num_posted_MASK 0x3FFF 841962bc51bSJames Smart #define lpfc_wq_db_ring_fm_num_posted_WORD word0 842962bc51bSJames Smart #define lpfc_wq_db_ring_fm_id_SHIFT 0 843962bc51bSJames Smart #define lpfc_wq_db_ring_fm_id_MASK 0xFFFF 844962bc51bSJames Smart #define lpfc_wq_db_ring_fm_id_WORD word0 845da0436e9SJames Smart 84627d6ac0aSJames Smart #define LPFC_IF6_WQ_DOORBELL 0x0040 84727d6ac0aSJames Smart #define lpfc_if6_wq_db_list_fm_num_posted_SHIFT 24 84827d6ac0aSJames Smart #define lpfc_if6_wq_db_list_fm_num_posted_MASK 0x00FF 84927d6ac0aSJames Smart #define lpfc_if6_wq_db_list_fm_num_posted_WORD word0 85027d6ac0aSJames Smart #define lpfc_if6_wq_db_list_fm_dpp_SHIFT 23 85127d6ac0aSJames Smart #define lpfc_if6_wq_db_list_fm_dpp_MASK 0x0001 85227d6ac0aSJames Smart #define lpfc_if6_wq_db_list_fm_dpp_WORD word0 85327d6ac0aSJames Smart #define lpfc_if6_wq_db_list_fm_dpp_id_SHIFT 16 85427d6ac0aSJames Smart #define lpfc_if6_wq_db_list_fm_dpp_id_MASK 0x001F 85527d6ac0aSJames Smart #define lpfc_if6_wq_db_list_fm_dpp_id_WORD word0 85627d6ac0aSJames Smart #define lpfc_if6_wq_db_list_fm_id_SHIFT 0 85727d6ac0aSJames Smart #define lpfc_if6_wq_db_list_fm_id_MASK 0xFFFF 85827d6ac0aSJames Smart #define lpfc_if6_wq_db_list_fm_id_WORD word0 85927d6ac0aSJames Smart 860da0436e9SJames Smart #define LPFC_EQCQ_DOORBELL 0x0120 861085c647cSJames Smart #define lpfc_eqcq_doorbell_se_SHIFT 31 862085c647cSJames Smart #define lpfc_eqcq_doorbell_se_MASK 0x0001 863085c647cSJames Smart #define lpfc_eqcq_doorbell_se_WORD word0 864085c647cSJames Smart #define LPFC_EQCQ_SOLICIT_ENABLE_OFF 0 865085c647cSJames Smart #define LPFC_EQCQ_SOLICIT_ENABLE_ON 1 866da0436e9SJames Smart #define lpfc_eqcq_doorbell_arm_SHIFT 29 867da0436e9SJames Smart #define lpfc_eqcq_doorbell_arm_MASK 0x0001 868da0436e9SJames Smart #define lpfc_eqcq_doorbell_arm_WORD word0 869da0436e9SJames Smart #define lpfc_eqcq_doorbell_num_released_SHIFT 16 870da0436e9SJames Smart #define lpfc_eqcq_doorbell_num_released_MASK 0x1FFF 871da0436e9SJames Smart #define lpfc_eqcq_doorbell_num_released_WORD word0 872da0436e9SJames Smart #define lpfc_eqcq_doorbell_qt_SHIFT 10 873da0436e9SJames Smart #define lpfc_eqcq_doorbell_qt_MASK 0x0001 874da0436e9SJames Smart #define lpfc_eqcq_doorbell_qt_WORD word0 875da0436e9SJames Smart #define LPFC_QUEUE_TYPE_COMPLETION 0 876da0436e9SJames Smart #define LPFC_QUEUE_TYPE_EVENT 1 877da0436e9SJames Smart #define lpfc_eqcq_doorbell_eqci_SHIFT 9 878da0436e9SJames Smart #define lpfc_eqcq_doorbell_eqci_MASK 0x0001 879da0436e9SJames Smart #define lpfc_eqcq_doorbell_eqci_WORD word0 8806b5151fdSJames Smart #define lpfc_eqcq_doorbell_cqid_lo_SHIFT 0 8816b5151fdSJames Smart #define lpfc_eqcq_doorbell_cqid_lo_MASK 0x03FF 8826b5151fdSJames Smart #define lpfc_eqcq_doorbell_cqid_lo_WORD word0 8836b5151fdSJames Smart #define lpfc_eqcq_doorbell_cqid_hi_SHIFT 11 8846b5151fdSJames Smart #define lpfc_eqcq_doorbell_cqid_hi_MASK 0x001F 8856b5151fdSJames Smart #define lpfc_eqcq_doorbell_cqid_hi_WORD word0 8866b5151fdSJames Smart #define lpfc_eqcq_doorbell_eqid_lo_SHIFT 0 8876b5151fdSJames Smart #define lpfc_eqcq_doorbell_eqid_lo_MASK 0x01FF 8886b5151fdSJames Smart #define lpfc_eqcq_doorbell_eqid_lo_WORD word0 8896b5151fdSJames Smart #define lpfc_eqcq_doorbell_eqid_hi_SHIFT 11 8906b5151fdSJames Smart #define lpfc_eqcq_doorbell_eqid_hi_MASK 0x001F 8916b5151fdSJames Smart #define lpfc_eqcq_doorbell_eqid_hi_WORD word0 8926b5151fdSJames Smart #define LPFC_CQID_HI_FIELD_SHIFT 10 8936b5151fdSJames Smart #define LPFC_EQID_HI_FIELD_SHIFT 9 894da0436e9SJames Smart 89527d6ac0aSJames Smart #define LPFC_IF6_CQ_DOORBELL 0x00C0 89627d6ac0aSJames Smart #define lpfc_if6_cq_doorbell_se_SHIFT 31 89727d6ac0aSJames Smart #define lpfc_if6_cq_doorbell_se_MASK 0x0001 89827d6ac0aSJames Smart #define lpfc_if6_cq_doorbell_se_WORD word0 89927d6ac0aSJames Smart #define LPFC_IF6_CQ_SOLICIT_ENABLE_OFF 0 90027d6ac0aSJames Smart #define LPFC_IF6_CQ_SOLICIT_ENABLE_ON 1 90127d6ac0aSJames Smart #define lpfc_if6_cq_doorbell_arm_SHIFT 29 90227d6ac0aSJames Smart #define lpfc_if6_cq_doorbell_arm_MASK 0x0001 90327d6ac0aSJames Smart #define lpfc_if6_cq_doorbell_arm_WORD word0 90427d6ac0aSJames Smart #define lpfc_if6_cq_doorbell_num_released_SHIFT 16 90527d6ac0aSJames Smart #define lpfc_if6_cq_doorbell_num_released_MASK 0x1FFF 90627d6ac0aSJames Smart #define lpfc_if6_cq_doorbell_num_released_WORD word0 90727d6ac0aSJames Smart #define lpfc_if6_cq_doorbell_cqid_SHIFT 0 90827d6ac0aSJames Smart #define lpfc_if6_cq_doorbell_cqid_MASK 0xFFFF 90927d6ac0aSJames Smart #define lpfc_if6_cq_doorbell_cqid_WORD word0 91027d6ac0aSJames Smart 91127d6ac0aSJames Smart #define LPFC_IF6_EQ_DOORBELL 0x0120 91227d6ac0aSJames Smart #define lpfc_if6_eq_doorbell_io_SHIFT 31 91327d6ac0aSJames Smart #define lpfc_if6_eq_doorbell_io_MASK 0x0001 91427d6ac0aSJames Smart #define lpfc_if6_eq_doorbell_io_WORD word0 91527d6ac0aSJames Smart #define LPFC_IF6_EQ_INTR_OVERRIDE_OFF 0 91627d6ac0aSJames Smart #define LPFC_IF6_EQ_INTR_OVERRIDE_ON 1 91727d6ac0aSJames Smart #define lpfc_if6_eq_doorbell_arm_SHIFT 29 91827d6ac0aSJames Smart #define lpfc_if6_eq_doorbell_arm_MASK 0x0001 91927d6ac0aSJames Smart #define lpfc_if6_eq_doorbell_arm_WORD word0 92027d6ac0aSJames Smart #define lpfc_if6_eq_doorbell_num_released_SHIFT 16 92127d6ac0aSJames Smart #define lpfc_if6_eq_doorbell_num_released_MASK 0x1FFF 92227d6ac0aSJames Smart #define lpfc_if6_eq_doorbell_num_released_WORD word0 92327d6ac0aSJames Smart #define lpfc_if6_eq_doorbell_eqid_SHIFT 0 92427d6ac0aSJames Smart #define lpfc_if6_eq_doorbell_eqid_MASK 0x0FFF 92527d6ac0aSJames Smart #define lpfc_if6_eq_doorbell_eqid_WORD word0 92627d6ac0aSJames Smart 927da0436e9SJames Smart #define LPFC_BMBX 0x0160 928da0436e9SJames Smart #define lpfc_bmbx_addr_SHIFT 2 929da0436e9SJames Smart #define lpfc_bmbx_addr_MASK 0x3FFFFFFF 930da0436e9SJames Smart #define lpfc_bmbx_addr_WORD word0 931da0436e9SJames Smart #define lpfc_bmbx_hi_SHIFT 1 932da0436e9SJames Smart #define lpfc_bmbx_hi_MASK 0x0001 933da0436e9SJames Smart #define lpfc_bmbx_hi_WORD word0 934da0436e9SJames Smart #define lpfc_bmbx_rdy_SHIFT 0 935da0436e9SJames Smart #define lpfc_bmbx_rdy_MASK 0x0001 936da0436e9SJames Smart #define lpfc_bmbx_rdy_WORD word0 937da0436e9SJames Smart 938da0436e9SJames Smart #define LPFC_MQ_DOORBELL 0x0140 93927d6ac0aSJames Smart #define LPFC_IF6_MQ_DOORBELL 0x0160 940da0436e9SJames Smart #define lpfc_mq_doorbell_num_posted_SHIFT 16 941da0436e9SJames Smart #define lpfc_mq_doorbell_num_posted_MASK 0x3FFF 942da0436e9SJames Smart #define lpfc_mq_doorbell_num_posted_WORD word0 943da0436e9SJames Smart #define lpfc_mq_doorbell_id_SHIFT 0 944085c647cSJames Smart #define lpfc_mq_doorbell_id_MASK 0xFFFF 945da0436e9SJames Smart #define lpfc_mq_doorbell_id_WORD word0 946da0436e9SJames Smart 947da0436e9SJames Smart struct lpfc_sli4_cfg_mhdr { 948da0436e9SJames Smart uint32_t word1; 949da0436e9SJames Smart #define lpfc_mbox_hdr_emb_SHIFT 0 950da0436e9SJames Smart #define lpfc_mbox_hdr_emb_MASK 0x00000001 951da0436e9SJames Smart #define lpfc_mbox_hdr_emb_WORD word1 952da0436e9SJames Smart #define lpfc_mbox_hdr_sge_cnt_SHIFT 3 953da0436e9SJames Smart #define lpfc_mbox_hdr_sge_cnt_MASK 0x0000001F 954da0436e9SJames Smart #define lpfc_mbox_hdr_sge_cnt_WORD word1 955da0436e9SJames Smart uint32_t payload_length; 956da0436e9SJames Smart uint32_t tag_lo; 957da0436e9SJames Smart uint32_t tag_hi; 958da0436e9SJames Smart uint32_t reserved5; 959da0436e9SJames Smart }; 960da0436e9SJames Smart 961da0436e9SJames Smart union lpfc_sli4_cfg_shdr { 962da0436e9SJames Smart struct { 963da0436e9SJames Smart uint32_t word6; 964da0436e9SJames Smart #define lpfc_mbox_hdr_opcode_SHIFT 0 965da0436e9SJames Smart #define lpfc_mbox_hdr_opcode_MASK 0x000000FF 966da0436e9SJames Smart #define lpfc_mbox_hdr_opcode_WORD word6 967da0436e9SJames Smart #define lpfc_mbox_hdr_subsystem_SHIFT 8 968da0436e9SJames Smart #define lpfc_mbox_hdr_subsystem_MASK 0x000000FF 969da0436e9SJames Smart #define lpfc_mbox_hdr_subsystem_WORD word6 970da0436e9SJames Smart #define lpfc_mbox_hdr_port_number_SHIFT 16 971da0436e9SJames Smart #define lpfc_mbox_hdr_port_number_MASK 0x000000FF 972da0436e9SJames Smart #define lpfc_mbox_hdr_port_number_WORD word6 973da0436e9SJames Smart #define lpfc_mbox_hdr_domain_SHIFT 24 974da0436e9SJames Smart #define lpfc_mbox_hdr_domain_MASK 0x000000FF 975da0436e9SJames Smart #define lpfc_mbox_hdr_domain_WORD word6 976da0436e9SJames Smart uint32_t timeout; 977da0436e9SJames Smart uint32_t request_length; 9785a6f133eSJames Smart uint32_t word9; 9795a6f133eSJames Smart #define lpfc_mbox_hdr_version_SHIFT 0 9805a6f133eSJames Smart #define lpfc_mbox_hdr_version_MASK 0x000000FF 9815a6f133eSJames Smart #define lpfc_mbox_hdr_version_WORD word9 982912e3acdSJames Smart #define lpfc_mbox_hdr_pf_num_SHIFT 16 983912e3acdSJames Smart #define lpfc_mbox_hdr_pf_num_MASK 0x000000FF 984912e3acdSJames Smart #define lpfc_mbox_hdr_pf_num_WORD word9 985912e3acdSJames Smart #define lpfc_mbox_hdr_vh_num_SHIFT 24 986912e3acdSJames Smart #define lpfc_mbox_hdr_vh_num_MASK 0x000000FF 987912e3acdSJames Smart #define lpfc_mbox_hdr_vh_num_WORD word9 9885a6f133eSJames Smart #define LPFC_Q_CREATE_VERSION_2 2 9895a6f133eSJames Smart #define LPFC_Q_CREATE_VERSION_1 1 9905a6f133eSJames Smart #define LPFC_Q_CREATE_VERSION_0 0 991cd1c8301SJames Smart #define LPFC_OPCODE_VERSION_0 0 992cd1c8301SJames Smart #define LPFC_OPCODE_VERSION_1 1 993da0436e9SJames Smart } request; 994da0436e9SJames Smart struct { 995da0436e9SJames Smart uint32_t word6; 996da0436e9SJames Smart #define lpfc_mbox_hdr_opcode_SHIFT 0 997da0436e9SJames Smart #define lpfc_mbox_hdr_opcode_MASK 0x000000FF 998da0436e9SJames Smart #define lpfc_mbox_hdr_opcode_WORD word6 999da0436e9SJames Smart #define lpfc_mbox_hdr_subsystem_SHIFT 8 1000da0436e9SJames Smart #define lpfc_mbox_hdr_subsystem_MASK 0x000000FF 1001da0436e9SJames Smart #define lpfc_mbox_hdr_subsystem_WORD word6 1002da0436e9SJames Smart #define lpfc_mbox_hdr_domain_SHIFT 24 1003da0436e9SJames Smart #define lpfc_mbox_hdr_domain_MASK 0x000000FF 1004da0436e9SJames Smart #define lpfc_mbox_hdr_domain_WORD word6 1005da0436e9SJames Smart uint32_t word7; 1006da0436e9SJames Smart #define lpfc_mbox_hdr_status_SHIFT 0 1007da0436e9SJames Smart #define lpfc_mbox_hdr_status_MASK 0x000000FF 1008da0436e9SJames Smart #define lpfc_mbox_hdr_status_WORD word7 1009da0436e9SJames Smart #define lpfc_mbox_hdr_add_status_SHIFT 8 1010da0436e9SJames Smart #define lpfc_mbox_hdr_add_status_MASK 0x000000FF 1011da0436e9SJames Smart #define lpfc_mbox_hdr_add_status_WORD word7 101216a93e83SJames Smart #define LPFC_ADD_STATUS_INCOMPAT_OBJ 0xA2 101316a93e83SJames Smart #define lpfc_mbox_hdr_add_status_2_SHIFT 16 101416a93e83SJames Smart #define lpfc_mbox_hdr_add_status_2_MASK 0x000000FF 101516a93e83SJames Smart #define lpfc_mbox_hdr_add_status_2_WORD word7 101616a93e83SJames Smart #define LPFC_ADD_STATUS_2_INCOMPAT_FLASH 0x01 101716a93e83SJames Smart #define LPFC_ADD_STATUS_2_INCORRECT_ASIC 0x02 1018da0436e9SJames Smart uint32_t response_length; 1019da0436e9SJames Smart uint32_t actual_response_length; 1020da0436e9SJames Smart } response; 1021da0436e9SJames Smart }; 1022da0436e9SJames Smart 10236d368e53SJames Smart /* Mailbox Header structures. 10246d368e53SJames Smart * struct mbox_header is defined for first generation SLI4_CFG mailbox 10256d368e53SJames Smart * calls deployed for BE-based ports. 10266d368e53SJames Smart * 10276d368e53SJames Smart * struct sli4_mbox_header is defined for second generation SLI4 10286d368e53SJames Smart * ports that don't deploy the SLI4_CFG mechanism. 10296d368e53SJames Smart */ 1030da0436e9SJames Smart struct mbox_header { 1031da0436e9SJames Smart struct lpfc_sli4_cfg_mhdr cfg_mhdr; 1032da0436e9SJames Smart union lpfc_sli4_cfg_shdr cfg_shdr; 1033da0436e9SJames Smart }; 1034da0436e9SJames Smart 10356d368e53SJames Smart #define LPFC_EXTENT_LOCAL 0 10366d368e53SJames Smart #define LPFC_TIMEOUT_DEFAULT 0 10376d368e53SJames Smart #define LPFC_EXTENT_VERSION_DEFAULT 0 10386d368e53SJames Smart 1039da0436e9SJames Smart /* Subsystem Definitions */ 1040a183a15fSJames Smart #define LPFC_MBOX_SUBSYSTEM_NA 0x0 1041da0436e9SJames Smart #define LPFC_MBOX_SUBSYSTEM_COMMON 0x1 1042d2cc9bcdSJames Smart #define LPFC_MBOX_SUBSYSTEM_LOWLEVEL 0xB 1043da0436e9SJames Smart #define LPFC_MBOX_SUBSYSTEM_FCOE 0xC 1044da0436e9SJames Smart 1045da0436e9SJames Smart /* Device Specific Definitions */ 1046da0436e9SJames Smart 1047da0436e9SJames Smart /* The HOST ENDIAN defines are in Big Endian format. */ 1048da0436e9SJames Smart #define HOST_ENDIAN_LOW_WORD0 0xFF3412FF 1049da0436e9SJames Smart #define HOST_ENDIAN_HIGH_WORD1 0xFF7856FF 1050da0436e9SJames Smart 1051da0436e9SJames Smart /* Common Opcodes */ 1052a183a15fSJames Smart #define LPFC_MBOX_OPCODE_NA 0x00 1053da0436e9SJames Smart #define LPFC_MBOX_OPCODE_CQ_CREATE 0x0C 1054da0436e9SJames Smart #define LPFC_MBOX_OPCODE_EQ_CREATE 0x0D 1055da0436e9SJames Smart #define LPFC_MBOX_OPCODE_MQ_CREATE 0x15 1056da0436e9SJames Smart #define LPFC_MBOX_OPCODE_GET_CNTL_ATTRIBUTES 0x20 1057da0436e9SJames Smart #define LPFC_MBOX_OPCODE_NOP 0x21 1058173edbb2SJames Smart #define LPFC_MBOX_OPCODE_MODIFY_EQ_DELAY 0x29 1059da0436e9SJames Smart #define LPFC_MBOX_OPCODE_MQ_DESTROY 0x35 1060da0436e9SJames Smart #define LPFC_MBOX_OPCODE_CQ_DESTROY 0x36 1061da0436e9SJames Smart #define LPFC_MBOX_OPCODE_EQ_DESTROY 0x37 10626669f9bbSJames Smart #define LPFC_MBOX_OPCODE_QUERY_FW_CFG 0x3A 1063da0436e9SJames Smart #define LPFC_MBOX_OPCODE_FUNCTION_RESET 0x3D 1064940eb687SJames Smart #define LPFC_MBOX_OPCODE_SET_PHYSICAL_LINK_CONFIG 0x3E 1065940eb687SJames Smart #define LPFC_MBOX_OPCODE_SET_BOOT_CONFIG 0x43 10668b017a30SJames Smart #define LPFC_MBOX_OPCODE_SET_BEACON_CONFIG 0x45 10678b017a30SJames Smart #define LPFC_MBOX_OPCODE_GET_BEACON_CONFIG 0x46 1068cd1c8301SJames Smart #define LPFC_MBOX_OPCODE_GET_PORT_NAME 0x4D 1069b19a061aSJames Smart #define LPFC_MBOX_OPCODE_MQ_CREATE_EXT 0x5A 1070940eb687SJames Smart #define LPFC_MBOX_OPCODE_GET_VPD_DATA 0x5B 107161bda8f7SJames Smart #define LPFC_MBOX_OPCODE_SET_HOST_DATA 0x5D 1072940eb687SJames Smart #define LPFC_MBOX_OPCODE_SEND_ACTIVATION 0x73 1073940eb687SJames Smart #define LPFC_MBOX_OPCODE_RESET_LICENSES 0x74 10748c42a65cSJames Smart #define LPFC_MBOX_OPCODE_REG_CONGESTION_BUF 0x8E 10756d368e53SJames Smart #define LPFC_MBOX_OPCODE_GET_RSRC_EXTENT_INFO 0x9A 10766d368e53SJames Smart #define LPFC_MBOX_OPCODE_GET_ALLOC_RSRC_EXTENT 0x9B 10776d368e53SJames Smart #define LPFC_MBOX_OPCODE_ALLOC_RSRC_EXTENT 0x9C 10786d368e53SJames Smart #define LPFC_MBOX_OPCODE_DEALLOC_RSRC_EXTENT 0x9D 1079912e3acdSJames Smart #define LPFC_MBOX_OPCODE_GET_FUNCTION_CONFIG 0xA0 1080940eb687SJames Smart #define LPFC_MBOX_OPCODE_GET_PROFILE_CAPACITIES 0xA1 1081912e3acdSJames Smart #define LPFC_MBOX_OPCODE_GET_PROFILE_CONFIG 0xA4 1082a183a15fSJames Smart #define LPFC_MBOX_OPCODE_SET_PROFILE_CONFIG 0xA5 1083a183a15fSJames Smart #define LPFC_MBOX_OPCODE_GET_PROFILE_LIST 0xA6 1084a183a15fSJames Smart #define LPFC_MBOX_OPCODE_SET_ACT_PROFILE 0xA8 1085a183a15fSJames Smart #define LPFC_MBOX_OPCODE_GET_FACTORY_PROFILE_CONFIG 0xA9 1086a183a15fSJames Smart #define LPFC_MBOX_OPCODE_READ_OBJECT 0xAB 108752d52440SJames Smart #define LPFC_MBOX_OPCODE_WRITE_OBJECT 0xAC 1088a183a15fSJames Smart #define LPFC_MBOX_OPCODE_READ_OBJECT_LIST 0xAD 1089a183a15fSJames Smart #define LPFC_MBOX_OPCODE_DELETE_OBJECT 0xAE 1090fedd3b7bSJames Smart #define LPFC_MBOX_OPCODE_GET_SLI4_PARAMETERS 0xB5 109165791f1fSJames Smart #define LPFC_MBOX_OPCODE_SET_FEATURES 0xBF 1092da0436e9SJames Smart 1093da0436e9SJames Smart /* FCoE Opcodes */ 1094da0436e9SJames Smart #define LPFC_MBOX_OPCODE_FCOE_WQ_CREATE 0x01 1095da0436e9SJames Smart #define LPFC_MBOX_OPCODE_FCOE_WQ_DESTROY 0x02 1096da0436e9SJames Smart #define LPFC_MBOX_OPCODE_FCOE_POST_SGL_PAGES 0x03 1097da0436e9SJames Smart #define LPFC_MBOX_OPCODE_FCOE_REMOVE_SGL_PAGES 0x04 1098da0436e9SJames Smart #define LPFC_MBOX_OPCODE_FCOE_RQ_CREATE 0x05 1099da0436e9SJames Smart #define LPFC_MBOX_OPCODE_FCOE_RQ_DESTROY 0x06 1100da0436e9SJames Smart #define LPFC_MBOX_OPCODE_FCOE_READ_FCF_TABLE 0x08 1101da0436e9SJames Smart #define LPFC_MBOX_OPCODE_FCOE_ADD_FCF 0x09 1102da0436e9SJames Smart #define LPFC_MBOX_OPCODE_FCOE_DELETE_FCF 0x0A 1103da0436e9SJames Smart #define LPFC_MBOX_OPCODE_FCOE_POST_HDR_TEMPLATE 0x0B 1104ecfd03c6SJames Smart #define LPFC_MBOX_OPCODE_FCOE_REDISCOVER_FCF 0x10 11052d7dbc4cSJames Smart #define LPFC_MBOX_OPCODE_FCOE_CQ_CREATE_SET 0x1D 1106a183a15fSJames Smart #define LPFC_MBOX_OPCODE_FCOE_SET_FCLINK_SETTINGS 0x21 11077ad20aa9SJames Smart #define LPFC_MBOX_OPCODE_FCOE_LINK_DIAG_STATE 0x22 11087ad20aa9SJames Smart #define LPFC_MBOX_OPCODE_FCOE_LINK_DIAG_LOOPBACK 0x23 11091dc5ec24SJames Smart #define LPFC_MBOX_OPCODE_FCOE_FC_SET_TRUNK_MODE 0x42 1110da0436e9SJames Smart 1111d2cc9bcdSJames Smart /* Low level Opcodes */ 1112d2cc9bcdSJames Smart #define LPFC_MBOX_OPCODE_SET_DIAG_LOG_OPTION 0x37 1113d2cc9bcdSJames Smart 1114da0436e9SJames Smart /* Mailbox command structures */ 1115da0436e9SJames Smart struct eq_context { 1116da0436e9SJames Smart uint32_t word0; 1117da0436e9SJames Smart #define lpfc_eq_context_size_SHIFT 31 1118da0436e9SJames Smart #define lpfc_eq_context_size_MASK 0x00000001 1119da0436e9SJames Smart #define lpfc_eq_context_size_WORD word0 1120da0436e9SJames Smart #define LPFC_EQE_SIZE_4 0x0 1121da0436e9SJames Smart #define LPFC_EQE_SIZE_16 0x1 1122da0436e9SJames Smart #define lpfc_eq_context_valid_SHIFT 29 1123da0436e9SJames Smart #define lpfc_eq_context_valid_MASK 0x00000001 1124da0436e9SJames Smart #define lpfc_eq_context_valid_WORD word0 11257365f6fdSJames Smart #define lpfc_eq_context_autovalid_SHIFT 28 11267365f6fdSJames Smart #define lpfc_eq_context_autovalid_MASK 0x00000001 11277365f6fdSJames Smart #define lpfc_eq_context_autovalid_WORD word0 1128da0436e9SJames Smart uint32_t word1; 1129da0436e9SJames Smart #define lpfc_eq_context_count_SHIFT 26 1130da0436e9SJames Smart #define lpfc_eq_context_count_MASK 0x00000003 1131da0436e9SJames Smart #define lpfc_eq_context_count_WORD word1 1132da0436e9SJames Smart #define LPFC_EQ_CNT_256 0x0 1133da0436e9SJames Smart #define LPFC_EQ_CNT_512 0x1 1134da0436e9SJames Smart #define LPFC_EQ_CNT_1024 0x2 1135da0436e9SJames Smart #define LPFC_EQ_CNT_2048 0x3 1136da0436e9SJames Smart #define LPFC_EQ_CNT_4096 0x4 1137da0436e9SJames Smart uint32_t word2; 1138da0436e9SJames Smart #define lpfc_eq_context_delay_multi_SHIFT 13 1139da0436e9SJames Smart #define lpfc_eq_context_delay_multi_MASK 0x000003FF 1140da0436e9SJames Smart #define lpfc_eq_context_delay_multi_WORD word2 1141da0436e9SJames Smart uint32_t reserved3; 1142da0436e9SJames Smart }; 1143da0436e9SJames Smart 1144173edbb2SJames Smart struct eq_delay_info { 1145173edbb2SJames Smart uint32_t eq_id; 1146173edbb2SJames Smart uint32_t phase; 1147173edbb2SJames Smart uint32_t delay_multi; 1148173edbb2SJames Smart }; 114943140ca6SJames Smart #define LPFC_MAX_EQ_DELAY_EQID_CNT 8 1150173edbb2SJames Smart 1151da0436e9SJames Smart struct sgl_page_pairs { 1152da0436e9SJames Smart uint32_t sgl_pg0_addr_lo; 1153da0436e9SJames Smart uint32_t sgl_pg0_addr_hi; 1154da0436e9SJames Smart uint32_t sgl_pg1_addr_lo; 1155da0436e9SJames Smart uint32_t sgl_pg1_addr_hi; 1156da0436e9SJames Smart }; 1157da0436e9SJames Smart 1158da0436e9SJames Smart struct lpfc_mbx_post_sgl_pages { 1159da0436e9SJames Smart struct mbox_header header; 1160da0436e9SJames Smart uint32_t word0; 1161da0436e9SJames Smart #define lpfc_post_sgl_pages_xri_SHIFT 0 1162da0436e9SJames Smart #define lpfc_post_sgl_pages_xri_MASK 0x0000FFFF 1163da0436e9SJames Smart #define lpfc_post_sgl_pages_xri_WORD word0 1164da0436e9SJames Smart #define lpfc_post_sgl_pages_xricnt_SHIFT 16 1165da0436e9SJames Smart #define lpfc_post_sgl_pages_xricnt_MASK 0x0000FFFF 1166da0436e9SJames Smart #define lpfc_post_sgl_pages_xricnt_WORD word0 1167da0436e9SJames Smart struct sgl_page_pairs sgl_pg_pairs[1]; 1168da0436e9SJames Smart }; 1169da0436e9SJames Smart 1170da0436e9SJames Smart /* word0 of page-1 struct shares the same SHIFT/MASK/WORD defines as above */ 1171da0436e9SJames Smart struct lpfc_mbx_post_uembed_sgl_page1 { 1172da0436e9SJames Smart union lpfc_sli4_cfg_shdr cfg_shdr; 1173da0436e9SJames Smart uint32_t word0; 1174da0436e9SJames Smart struct sgl_page_pairs sgl_pg_pairs; 1175da0436e9SJames Smart }; 1176da0436e9SJames Smart 1177da0436e9SJames Smart struct lpfc_mbx_sge { 1178da0436e9SJames Smart uint32_t pa_lo; 1179da0436e9SJames Smart uint32_t pa_hi; 1180da0436e9SJames Smart uint32_t length; 1181da0436e9SJames Smart }; 1182da0436e9SJames Smart 118372df8a45SJames Smart struct lpfc_mbx_host_buf { 118472df8a45SJames Smart uint32_t length; 118572df8a45SJames Smart uint32_t pa_lo; 118672df8a45SJames Smart uint32_t pa_hi; 118772df8a45SJames Smart }; 118872df8a45SJames Smart 1189da0436e9SJames Smart struct lpfc_mbx_nembed_cmd { 1190da0436e9SJames Smart struct lpfc_sli4_cfg_mhdr cfg_mhdr; 1191da0436e9SJames Smart #define LPFC_SLI4_MBX_SGE_MAX_PAGES 19 1192da0436e9SJames Smart struct lpfc_mbx_sge sge[LPFC_SLI4_MBX_SGE_MAX_PAGES]; 1193da0436e9SJames Smart }; 1194da0436e9SJames Smart 1195da0436e9SJames Smart struct lpfc_mbx_nembed_sge_virt { 1196da0436e9SJames Smart void *addr[LPFC_SLI4_MBX_SGE_MAX_PAGES]; 1197da0436e9SJames Smart }; 1198da0436e9SJames Smart 119974a7baa2SJames Smart #define LPFC_MBX_OBJECT_NAME_LEN_DW 26 120072df8a45SJames Smart struct lpfc_mbx_read_object { /* Version 0 */ 120172df8a45SJames Smart struct mbox_header header; 120272df8a45SJames Smart union { 120372df8a45SJames Smart struct { 120472df8a45SJames Smart uint32_t word0; 120572df8a45SJames Smart #define lpfc_mbx_rd_object_rlen_SHIFT 0 120672df8a45SJames Smart #define lpfc_mbx_rd_object_rlen_MASK 0x00FFFFFF 120772df8a45SJames Smart #define lpfc_mbx_rd_object_rlen_WORD word0 120872df8a45SJames Smart uint32_t rd_object_offset; 120959936430SJames Smart __le32 rd_object_name[LPFC_MBX_OBJECT_NAME_LEN_DW]; 121072df8a45SJames Smart #define LPFC_OBJ_NAME_SZ 104 /* 26 x sizeof(uint32_t) is 104. */ 121172df8a45SJames Smart uint32_t rd_object_cnt; 121272df8a45SJames Smart struct lpfc_mbx_host_buf rd_object_hbuf[4]; 121372df8a45SJames Smart } request; 121472df8a45SJames Smart struct { 121572df8a45SJames Smart uint32_t rd_object_actual_rlen; 121672df8a45SJames Smart uint32_t word1; 121772df8a45SJames Smart #define lpfc_mbx_rd_object_eof_SHIFT 31 121872df8a45SJames Smart #define lpfc_mbx_rd_object_eof_MASK 0x1 121972df8a45SJames Smart #define lpfc_mbx_rd_object_eof_WORD word1 122072df8a45SJames Smart } response; 122172df8a45SJames Smart } u; 122272df8a45SJames Smart }; 122372df8a45SJames Smart 1224da0436e9SJames Smart struct lpfc_mbx_eq_create { 1225da0436e9SJames Smart struct mbox_header header; 1226da0436e9SJames Smart union { 1227da0436e9SJames Smart struct { 1228da0436e9SJames Smart uint32_t word0; 1229da0436e9SJames Smart #define lpfc_mbx_eq_create_num_pages_SHIFT 0 1230da0436e9SJames Smart #define lpfc_mbx_eq_create_num_pages_MASK 0x0000FFFF 1231da0436e9SJames Smart #define lpfc_mbx_eq_create_num_pages_WORD word0 1232da0436e9SJames Smart struct eq_context context; 1233da0436e9SJames Smart struct dma_address page[LPFC_MAX_EQ_PAGE]; 1234da0436e9SJames Smart } request; 1235da0436e9SJames Smart struct { 1236da0436e9SJames Smart uint32_t word0; 1237da0436e9SJames Smart #define lpfc_mbx_eq_create_q_id_SHIFT 0 1238da0436e9SJames Smart #define lpfc_mbx_eq_create_q_id_MASK 0x0000FFFF 1239da0436e9SJames Smart #define lpfc_mbx_eq_create_q_id_WORD word0 1240da0436e9SJames Smart } response; 1241da0436e9SJames Smart } u; 1242da0436e9SJames Smart }; 1243da0436e9SJames Smart 1244173edbb2SJames Smart struct lpfc_mbx_modify_eq_delay { 1245173edbb2SJames Smart struct mbox_header header; 1246173edbb2SJames Smart union { 1247173edbb2SJames Smart struct { 1248173edbb2SJames Smart uint32_t num_eq; 124943140ca6SJames Smart struct eq_delay_info eq[LPFC_MAX_EQ_DELAY_EQID_CNT]; 1250173edbb2SJames Smart } request; 1251173edbb2SJames Smart struct { 1252173edbb2SJames Smart uint32_t word0; 1253173edbb2SJames Smart } response; 1254173edbb2SJames Smart } u; 1255173edbb2SJames Smart }; 1256173edbb2SJames Smart 1257da0436e9SJames Smart struct lpfc_mbx_eq_destroy { 1258da0436e9SJames Smart struct mbox_header header; 1259da0436e9SJames Smart union { 1260da0436e9SJames Smart struct { 1261da0436e9SJames Smart uint32_t word0; 1262da0436e9SJames Smart #define lpfc_mbx_eq_destroy_q_id_SHIFT 0 1263da0436e9SJames Smart #define lpfc_mbx_eq_destroy_q_id_MASK 0x0000FFFF 1264da0436e9SJames Smart #define lpfc_mbx_eq_destroy_q_id_WORD word0 1265da0436e9SJames Smart } request; 1266da0436e9SJames Smart struct { 1267da0436e9SJames Smart uint32_t word0; 1268da0436e9SJames Smart } response; 1269da0436e9SJames Smart } u; 1270da0436e9SJames Smart }; 1271da0436e9SJames Smart 1272da0436e9SJames Smart struct lpfc_mbx_nop { 1273da0436e9SJames Smart struct mbox_header header; 1274da0436e9SJames Smart uint32_t context[2]; 1275da0436e9SJames Smart }; 1276da0436e9SJames Smart 1277d2cc9bcdSJames Smart 1278d2cc9bcdSJames Smart 1279d2cc9bcdSJames Smart struct lpfc_mbx_set_ras_fwlog { 1280d2cc9bcdSJames Smart struct mbox_header header; 1281d2cc9bcdSJames Smart union { 1282d2cc9bcdSJames Smart struct { 1283d2cc9bcdSJames Smart uint32_t word4; 1284d2cc9bcdSJames Smart #define lpfc_fwlog_enable_SHIFT 0 1285d2cc9bcdSJames Smart #define lpfc_fwlog_enable_MASK 0x00000001 1286d2cc9bcdSJames Smart #define lpfc_fwlog_enable_WORD word4 1287d2cc9bcdSJames Smart #define lpfc_fwlog_loglvl_SHIFT 8 1288d2cc9bcdSJames Smart #define lpfc_fwlog_loglvl_MASK 0x0000000F 1289d2cc9bcdSJames Smart #define lpfc_fwlog_loglvl_WORD word4 1290d2cc9bcdSJames Smart #define lpfc_fwlog_ra_SHIFT 15 1291d2cc9bcdSJames Smart #define lpfc_fwlog_ra_WORD 0x00000008 1292d2cc9bcdSJames Smart #define lpfc_fwlog_buffcnt_SHIFT 16 1293d2cc9bcdSJames Smart #define lpfc_fwlog_buffcnt_MASK 0x000000FF 1294d2cc9bcdSJames Smart #define lpfc_fwlog_buffcnt_WORD word4 1295d2cc9bcdSJames Smart #define lpfc_fwlog_buffsz_SHIFT 24 1296d2cc9bcdSJames Smart #define lpfc_fwlog_buffsz_MASK 0x000000FF 1297d2cc9bcdSJames Smart #define lpfc_fwlog_buffsz_WORD word4 1298d2cc9bcdSJames Smart uint32_t word5; 1299d2cc9bcdSJames Smart #define lpfc_fwlog_acqe_SHIFT 0 1300d2cc9bcdSJames Smart #define lpfc_fwlog_acqe_MASK 0x0000FFFF 1301d2cc9bcdSJames Smart #define lpfc_fwlog_acqe_WORD word5 1302d2cc9bcdSJames Smart #define lpfc_fwlog_cqid_SHIFT 16 1303d2cc9bcdSJames Smart #define lpfc_fwlog_cqid_MASK 0x0000FFFF 1304d2cc9bcdSJames Smart #define lpfc_fwlog_cqid_WORD word5 1305d2cc9bcdSJames Smart #define LPFC_MAX_FWLOG_PAGE 16 1306d2cc9bcdSJames Smart struct dma_address lwpd; 1307d2cc9bcdSJames Smart struct dma_address buff_fwlog[LPFC_MAX_FWLOG_PAGE]; 1308d2cc9bcdSJames Smart } request; 1309d2cc9bcdSJames Smart struct { 1310d2cc9bcdSJames Smart uint32_t word0; 1311d2cc9bcdSJames Smart } response; 1312d2cc9bcdSJames Smart } u; 1313d2cc9bcdSJames Smart }; 1314d2cc9bcdSJames Smart 1315d2cc9bcdSJames Smart 1316da0436e9SJames Smart struct cq_context { 1317da0436e9SJames Smart uint32_t word0; 1318da0436e9SJames Smart #define lpfc_cq_context_event_SHIFT 31 1319da0436e9SJames Smart #define lpfc_cq_context_event_MASK 0x00000001 1320da0436e9SJames Smart #define lpfc_cq_context_event_WORD word0 1321da0436e9SJames Smart #define lpfc_cq_context_valid_SHIFT 29 1322da0436e9SJames Smart #define lpfc_cq_context_valid_MASK 0x00000001 1323da0436e9SJames Smart #define lpfc_cq_context_valid_WORD word0 1324da0436e9SJames Smart #define lpfc_cq_context_count_SHIFT 27 1325da0436e9SJames Smart #define lpfc_cq_context_count_MASK 0x00000003 1326da0436e9SJames Smart #define lpfc_cq_context_count_WORD word0 1327da0436e9SJames Smart #define LPFC_CQ_CNT_256 0x0 1328da0436e9SJames Smart #define LPFC_CQ_CNT_512 0x1 1329da0436e9SJames Smart #define LPFC_CQ_CNT_1024 0x2 133081b96edaSJames Smart #define LPFC_CQ_CNT_WORD7 0x3 13315d655969SJustin Tee #define lpfc_cq_context_cqe_sz_SHIFT 25 13325d655969SJustin Tee #define lpfc_cq_context_cqe_sz_MASK 0x00000003 13335d655969SJustin Tee #define lpfc_cq_context_cqe_sz_WORD word0 13347365f6fdSJames Smart #define lpfc_cq_context_autovalid_SHIFT 15 13357365f6fdSJames Smart #define lpfc_cq_context_autovalid_MASK 0x00000001 13367365f6fdSJames Smart #define lpfc_cq_context_autovalid_WORD word0 1337da0436e9SJames Smart uint32_t word1; 13385a6f133eSJames Smart #define lpfc_cq_eq_id_SHIFT 22 /* Version 0 Only */ 1339da0436e9SJames Smart #define lpfc_cq_eq_id_MASK 0x000000FF 1340da0436e9SJames Smart #define lpfc_cq_eq_id_WORD word1 13415a6f133eSJames Smart #define lpfc_cq_eq_id_2_SHIFT 0 /* Version 2 Only */ 13425a6f133eSJames Smart #define lpfc_cq_eq_id_2_MASK 0x0000FFFF 13435a6f133eSJames Smart #define lpfc_cq_eq_id_2_WORD word1 134481b96edaSJames Smart uint32_t lpfc_cq_context_count; /* Version 2 Only */ 1345da0436e9SJames Smart uint32_t reserved1; 1346da0436e9SJames Smart }; 1347da0436e9SJames Smart 1348da0436e9SJames Smart struct lpfc_mbx_cq_create { 1349da0436e9SJames Smart struct mbox_header header; 1350da0436e9SJames Smart union { 1351da0436e9SJames Smart struct { 1352da0436e9SJames Smart uint32_t word0; 13535a6f133eSJames Smart #define lpfc_mbx_cq_create_page_size_SHIFT 16 /* Version 2 Only */ 13545a6f133eSJames Smart #define lpfc_mbx_cq_create_page_size_MASK 0x000000FF 13555a6f133eSJames Smart #define lpfc_mbx_cq_create_page_size_WORD word0 1356da0436e9SJames Smart #define lpfc_mbx_cq_create_num_pages_SHIFT 0 1357da0436e9SJames Smart #define lpfc_mbx_cq_create_num_pages_MASK 0x0000FFFF 1358da0436e9SJames Smart #define lpfc_mbx_cq_create_num_pages_WORD word0 1359da0436e9SJames Smart struct cq_context context; 1360da0436e9SJames Smart struct dma_address page[LPFC_MAX_CQ_PAGE]; 1361da0436e9SJames Smart } request; 1362da0436e9SJames Smart struct { 1363da0436e9SJames Smart uint32_t word0; 1364da0436e9SJames Smart #define lpfc_mbx_cq_create_q_id_SHIFT 0 1365da0436e9SJames Smart #define lpfc_mbx_cq_create_q_id_MASK 0x0000FFFF 1366da0436e9SJames Smart #define lpfc_mbx_cq_create_q_id_WORD word0 1367da0436e9SJames Smart } response; 1368da0436e9SJames Smart } u; 1369da0436e9SJames Smart }; 1370da0436e9SJames Smart 13712d7dbc4cSJames Smart struct lpfc_mbx_cq_create_set { 13722d7dbc4cSJames Smart union lpfc_sli4_cfg_shdr cfg_shdr; 13732d7dbc4cSJames Smart union { 13742d7dbc4cSJames Smart struct { 13752d7dbc4cSJames Smart uint32_t word0; 13762d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_page_size_SHIFT 16 /* Version 2 Only */ 13772d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_page_size_MASK 0x000000FF 13782d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_page_size_WORD word0 13792d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_num_pages_SHIFT 0 13802d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_num_pages_MASK 0x0000FFFF 13812d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_num_pages_WORD word0 13822d7dbc4cSJames Smart uint32_t word1; 13832d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_evt_SHIFT 31 13842d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_evt_MASK 0x00000001 13852d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_evt_WORD word1 13862d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_valid_SHIFT 29 13872d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_valid_MASK 0x00000001 13882d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_valid_WORD word1 13895d655969SJustin Tee #define lpfc_mbx_cq_create_set_cqecnt_SHIFT 27 13905d655969SJustin Tee #define lpfc_mbx_cq_create_set_cqecnt_MASK 0x00000003 13915d655969SJustin Tee #define lpfc_mbx_cq_create_set_cqecnt_WORD word1 13922d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_cqe_size_SHIFT 25 13932d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_cqe_size_MASK 0x00000003 13942d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_cqe_size_WORD word1 13957365f6fdSJames Smart #define lpfc_mbx_cq_create_set_autovalid_SHIFT 15 13967365f6fdSJames Smart #define lpfc_mbx_cq_create_set_autovalid_MASK 0x0000001 13977365f6fdSJames Smart #define lpfc_mbx_cq_create_set_autovalid_WORD word1 13982d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_nodelay_SHIFT 14 13992d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_nodelay_MASK 0x00000001 14002d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_nodelay_WORD word1 14012d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_clswm_SHIFT 12 14022d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_clswm_MASK 0x00000003 14032d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_clswm_WORD word1 14045d655969SJustin Tee #define lpfc_mbx_cq_create_set_cqe_cnt_hi_SHIFT 0 14055d655969SJustin Tee #define lpfc_mbx_cq_create_set_cqe_cnt_hi_MASK 0x0000001F 14065d655969SJustin Tee #define lpfc_mbx_cq_create_set_cqe_cnt_hi_WORD word1 14072d7dbc4cSJames Smart uint32_t word2; 14082d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_arm_SHIFT 31 14092d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_arm_MASK 0x00000001 14102d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_arm_WORD word2 14115d655969SJustin Tee #define lpfc_mbx_cq_create_set_cqe_cnt_lo_SHIFT 16 14125d655969SJustin Tee #define lpfc_mbx_cq_create_set_cqe_cnt_lo_MASK 0x00007FFF 14135d655969SJustin Tee #define lpfc_mbx_cq_create_set_cqe_cnt_lo_WORD word2 14142d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_num_cq_SHIFT 0 14152d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_num_cq_MASK 0x0000FFFF 14162d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_num_cq_WORD word2 14172d7dbc4cSJames Smart uint32_t word3; 14182d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id1_SHIFT 16 14192d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id1_MASK 0x0000FFFF 14202d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id1_WORD word3 14212d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id0_SHIFT 0 14222d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id0_MASK 0x0000FFFF 14232d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id0_WORD word3 14242d7dbc4cSJames Smart uint32_t word4; 14252d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id3_SHIFT 16 14262d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id3_MASK 0x0000FFFF 14272d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id3_WORD word4 14282d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id2_SHIFT 0 14292d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id2_MASK 0x0000FFFF 14302d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id2_WORD word4 14312d7dbc4cSJames Smart uint32_t word5; 14322d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id5_SHIFT 16 14332d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id5_MASK 0x0000FFFF 14342d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id5_WORD word5 14352d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id4_SHIFT 0 14362d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id4_MASK 0x0000FFFF 14372d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id4_WORD word5 14382d7dbc4cSJames Smart uint32_t word6; 14392d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id7_SHIFT 16 14402d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id7_MASK 0x0000FFFF 14412d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id7_WORD word6 14422d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id6_SHIFT 0 14432d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id6_MASK 0x0000FFFF 14442d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id6_WORD word6 14452d7dbc4cSJames Smart uint32_t word7; 14462d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id9_SHIFT 16 14472d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id9_MASK 0x0000FFFF 14482d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id9_WORD word7 14492d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id8_SHIFT 0 14502d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id8_MASK 0x0000FFFF 14512d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id8_WORD word7 14522d7dbc4cSJames Smart uint32_t word8; 14532d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id11_SHIFT 16 14542d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id11_MASK 0x0000FFFF 14552d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id11_WORD word8 14562d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id10_SHIFT 0 14572d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id10_MASK 0x0000FFFF 14582d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id10_WORD word8 14592d7dbc4cSJames Smart uint32_t word9; 14602d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id13_SHIFT 16 14612d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id13_MASK 0x0000FFFF 14622d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id13_WORD word9 14632d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id12_SHIFT 0 14642d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id12_MASK 0x0000FFFF 14652d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id12_WORD word9 14662d7dbc4cSJames Smart uint32_t word10; 14672d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id15_SHIFT 16 14682d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id15_MASK 0x0000FFFF 14692d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id15_WORD word10 14702d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id14_SHIFT 0 14712d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id14_MASK 0x0000FFFF 14722d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_eq_id14_WORD word10 14732d7dbc4cSJames Smart struct dma_address page[1]; 14742d7dbc4cSJames Smart } request; 14752d7dbc4cSJames Smart struct { 14762d7dbc4cSJames Smart uint32_t word0; 14772d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_num_alloc_SHIFT 16 14782d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_num_alloc_MASK 0x0000FFFF 14792d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_num_alloc_WORD word0 14802d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_base_id_SHIFT 0 14812d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_base_id_MASK 0x0000FFFF 14822d7dbc4cSJames Smart #define lpfc_mbx_cq_create_set_base_id_WORD word0 14832d7dbc4cSJames Smart } response; 14842d7dbc4cSJames Smart } u; 14852d7dbc4cSJames Smart }; 14862d7dbc4cSJames Smart 1487da0436e9SJames Smart struct lpfc_mbx_cq_destroy { 1488da0436e9SJames Smart struct mbox_header header; 1489da0436e9SJames Smart union { 1490da0436e9SJames Smart struct { 1491da0436e9SJames Smart uint32_t word0; 1492da0436e9SJames Smart #define lpfc_mbx_cq_destroy_q_id_SHIFT 0 1493da0436e9SJames Smart #define lpfc_mbx_cq_destroy_q_id_MASK 0x0000FFFF 1494da0436e9SJames Smart #define lpfc_mbx_cq_destroy_q_id_WORD word0 1495da0436e9SJames Smart } request; 1496da0436e9SJames Smart struct { 1497da0436e9SJames Smart uint32_t word0; 1498da0436e9SJames Smart } response; 1499da0436e9SJames Smart } u; 1500da0436e9SJames Smart }; 1501da0436e9SJames Smart 1502da0436e9SJames Smart struct wq_context { 1503da0436e9SJames Smart uint32_t reserved0; 1504da0436e9SJames Smart uint32_t reserved1; 1505da0436e9SJames Smart uint32_t reserved2; 1506da0436e9SJames Smart uint32_t reserved3; 1507da0436e9SJames Smart }; 1508da0436e9SJames Smart 1509da0436e9SJames Smart struct lpfc_mbx_wq_create { 1510da0436e9SJames Smart struct mbox_header header; 1511da0436e9SJames Smart union { 15125a6f133eSJames Smart struct { /* Version 0 Request */ 1513da0436e9SJames Smart uint32_t word0; 1514da0436e9SJames Smart #define lpfc_mbx_wq_create_num_pages_SHIFT 0 1515962bc51bSJames Smart #define lpfc_mbx_wq_create_num_pages_MASK 0x000000FF 1516da0436e9SJames Smart #define lpfc_mbx_wq_create_num_pages_WORD word0 1517962bc51bSJames Smart #define lpfc_mbx_wq_create_dua_SHIFT 8 1518962bc51bSJames Smart #define lpfc_mbx_wq_create_dua_MASK 0x00000001 1519962bc51bSJames Smart #define lpfc_mbx_wq_create_dua_WORD word0 1520da0436e9SJames Smart #define lpfc_mbx_wq_create_cq_id_SHIFT 16 1521da0436e9SJames Smart #define lpfc_mbx_wq_create_cq_id_MASK 0x0000FFFF 1522da0436e9SJames Smart #define lpfc_mbx_wq_create_cq_id_WORD word0 1523962bc51bSJames Smart struct dma_address page[LPFC_MAX_WQ_PAGE_V0]; 1524962bc51bSJames Smart uint32_t word9; 1525962bc51bSJames Smart #define lpfc_mbx_wq_create_bua_SHIFT 0 1526962bc51bSJames Smart #define lpfc_mbx_wq_create_bua_MASK 0x00000001 1527962bc51bSJames Smart #define lpfc_mbx_wq_create_bua_WORD word9 1528962bc51bSJames Smart #define lpfc_mbx_wq_create_ulp_num_SHIFT 8 1529962bc51bSJames Smart #define lpfc_mbx_wq_create_ulp_num_MASK 0x000000FF 1530962bc51bSJames Smart #define lpfc_mbx_wq_create_ulp_num_WORD word9 1531da0436e9SJames Smart } request; 15325a6f133eSJames Smart struct { /* Version 1 Request */ 15335a6f133eSJames Smart uint32_t word0; /* Word 0 is the same as in v0 */ 15345a6f133eSJames Smart uint32_t word1; 15355a6f133eSJames Smart #define lpfc_mbx_wq_create_page_size_SHIFT 0 15365a6f133eSJames Smart #define lpfc_mbx_wq_create_page_size_MASK 0x000000FF 15375a6f133eSJames Smart #define lpfc_mbx_wq_create_page_size_WORD word1 15388ea73db4SJames Smart #define LPFC_WQ_PAGE_SIZE_4096 0x1 15391351e69fSJames Smart #define lpfc_mbx_wq_create_dpp_req_SHIFT 15 15401351e69fSJames Smart #define lpfc_mbx_wq_create_dpp_req_MASK 0x00000001 15411351e69fSJames Smart #define lpfc_mbx_wq_create_dpp_req_WORD word1 15421351e69fSJames Smart #define lpfc_mbx_wq_create_doe_SHIFT 14 15431351e69fSJames Smart #define lpfc_mbx_wq_create_doe_MASK 0x00000001 15441351e69fSJames Smart #define lpfc_mbx_wq_create_doe_WORD word1 15451351e69fSJames Smart #define lpfc_mbx_wq_create_toe_SHIFT 13 15461351e69fSJames Smart #define lpfc_mbx_wq_create_toe_MASK 0x00000001 15471351e69fSJames Smart #define lpfc_mbx_wq_create_toe_WORD word1 15485a6f133eSJames Smart #define lpfc_mbx_wq_create_wqe_size_SHIFT 8 15495a6f133eSJames Smart #define lpfc_mbx_wq_create_wqe_size_MASK 0x0000000F 15505a6f133eSJames Smart #define lpfc_mbx_wq_create_wqe_size_WORD word1 15515a6f133eSJames Smart #define LPFC_WQ_WQE_SIZE_64 0x5 15525a6f133eSJames Smart #define LPFC_WQ_WQE_SIZE_128 0x6 15535a6f133eSJames Smart #define lpfc_mbx_wq_create_wqe_count_SHIFT 16 15545a6f133eSJames Smart #define lpfc_mbx_wq_create_wqe_count_MASK 0x0000FFFF 15555a6f133eSJames Smart #define lpfc_mbx_wq_create_wqe_count_WORD word1 15565a6f133eSJames Smart uint32_t word2; 15575a6f133eSJames Smart struct dma_address page[LPFC_MAX_WQ_PAGE-1]; 15585a6f133eSJames Smart } request_1; 1559da0436e9SJames Smart struct { 1560da0436e9SJames Smart uint32_t word0; 1561da0436e9SJames Smart #define lpfc_mbx_wq_create_q_id_SHIFT 0 1562da0436e9SJames Smart #define lpfc_mbx_wq_create_q_id_MASK 0x0000FFFF 1563da0436e9SJames Smart #define lpfc_mbx_wq_create_q_id_WORD word0 1564962bc51bSJames Smart uint32_t doorbell_offset; 1565962bc51bSJames Smart uint32_t word2; 1566962bc51bSJames Smart #define lpfc_mbx_wq_create_bar_set_SHIFT 0 1567962bc51bSJames Smart #define lpfc_mbx_wq_create_bar_set_MASK 0x0000FFFF 1568962bc51bSJames Smart #define lpfc_mbx_wq_create_bar_set_WORD word2 1569962bc51bSJames Smart #define WQ_PCI_BAR_0_AND_1 0x00 1570962bc51bSJames Smart #define WQ_PCI_BAR_2_AND_3 0x01 1571962bc51bSJames Smart #define WQ_PCI_BAR_4_AND_5 0x02 1572962bc51bSJames Smart #define lpfc_mbx_wq_create_db_format_SHIFT 16 1573962bc51bSJames Smart #define lpfc_mbx_wq_create_db_format_MASK 0x0000FFFF 1574962bc51bSJames Smart #define lpfc_mbx_wq_create_db_format_WORD word2 1575da0436e9SJames Smart } response; 15761351e69fSJames Smart struct { 15771351e69fSJames Smart uint32_t word0; 15781351e69fSJames Smart #define lpfc_mbx_wq_create_dpp_rsp_SHIFT 31 15791351e69fSJames Smart #define lpfc_mbx_wq_create_dpp_rsp_MASK 0x00000001 15801351e69fSJames Smart #define lpfc_mbx_wq_create_dpp_rsp_WORD word0 15811351e69fSJames Smart #define lpfc_mbx_wq_create_v1_q_id_SHIFT 0 15821351e69fSJames Smart #define lpfc_mbx_wq_create_v1_q_id_MASK 0x0000FFFF 15831351e69fSJames Smart #define lpfc_mbx_wq_create_v1_q_id_WORD word0 15841351e69fSJames Smart uint32_t word1; 15851351e69fSJames Smart #define lpfc_mbx_wq_create_v1_bar_set_SHIFT 0 15861351e69fSJames Smart #define lpfc_mbx_wq_create_v1_bar_set_MASK 0x0000000F 15871351e69fSJames Smart #define lpfc_mbx_wq_create_v1_bar_set_WORD word1 15881351e69fSJames Smart uint32_t doorbell_offset; 15891351e69fSJames Smart uint32_t word3; 15901351e69fSJames Smart #define lpfc_mbx_wq_create_dpp_id_SHIFT 16 15911351e69fSJames Smart #define lpfc_mbx_wq_create_dpp_id_MASK 0x0000001F 15921351e69fSJames Smart #define lpfc_mbx_wq_create_dpp_id_WORD word3 15931351e69fSJames Smart #define lpfc_mbx_wq_create_dpp_bar_SHIFT 0 15941351e69fSJames Smart #define lpfc_mbx_wq_create_dpp_bar_MASK 0x0000000F 15951351e69fSJames Smart #define lpfc_mbx_wq_create_dpp_bar_WORD word3 15961351e69fSJames Smart uint32_t dpp_offset; 15971351e69fSJames Smart } response_1; 1598da0436e9SJames Smart } u; 1599da0436e9SJames Smart }; 1600da0436e9SJames Smart 1601da0436e9SJames Smart struct lpfc_mbx_wq_destroy { 1602da0436e9SJames Smart struct mbox_header header; 1603da0436e9SJames Smart union { 1604da0436e9SJames Smart struct { 1605da0436e9SJames Smart uint32_t word0; 1606da0436e9SJames Smart #define lpfc_mbx_wq_destroy_q_id_SHIFT 0 1607da0436e9SJames Smart #define lpfc_mbx_wq_destroy_q_id_MASK 0x0000FFFF 1608da0436e9SJames Smart #define lpfc_mbx_wq_destroy_q_id_WORD word0 1609da0436e9SJames Smart } request; 1610da0436e9SJames Smart struct { 1611da0436e9SJames Smart uint32_t word0; 1612da0436e9SJames Smart } response; 1613da0436e9SJames Smart } u; 1614da0436e9SJames Smart }; 1615da0436e9SJames Smart 1616da0436e9SJames Smart #define LPFC_HDR_BUF_SIZE 128 1617eeead811SJames Smart #define LPFC_DATA_BUF_SIZE 2048 16183c603be9SJames Smart #define LPFC_NVMET_DATA_BUF_SIZE 128 1619da0436e9SJames Smart struct rq_context { 1620da0436e9SJames Smart uint32_t word0; 16215a6f133eSJames Smart #define lpfc_rq_context_rqe_count_SHIFT 16 /* Version 0 Only */ 16225a6f133eSJames Smart #define lpfc_rq_context_rqe_count_MASK 0x0000000F 16235a6f133eSJames Smart #define lpfc_rq_context_rqe_count_WORD word0 1624da0436e9SJames Smart #define LPFC_RQ_RING_SIZE_512 9 /* 512 entries */ 1625da0436e9SJames Smart #define LPFC_RQ_RING_SIZE_1024 10 /* 1024 entries */ 1626da0436e9SJames Smart #define LPFC_RQ_RING_SIZE_2048 11 /* 2048 entries */ 1627da0436e9SJames Smart #define LPFC_RQ_RING_SIZE_4096 12 /* 4096 entries */ 16282d7dbc4cSJames Smart #define lpfc_rq_context_rqe_count_1_SHIFT 16 /* Version 1-2 Only */ 16295a6f133eSJames Smart #define lpfc_rq_context_rqe_count_1_MASK 0x0000FFFF 16305a6f133eSJames Smart #define lpfc_rq_context_rqe_count_1_WORD word0 16312d7dbc4cSJames Smart #define lpfc_rq_context_rqe_size_SHIFT 8 /* Version 1-2 Only */ 16325a6f133eSJames Smart #define lpfc_rq_context_rqe_size_MASK 0x0000000F 16335a6f133eSJames Smart #define lpfc_rq_context_rqe_size_WORD word0 1634c31098ceSJames Smart #define LPFC_RQE_SIZE_8 2 1635c31098ceSJames Smart #define LPFC_RQE_SIZE_16 3 1636c31098ceSJames Smart #define LPFC_RQE_SIZE_32 4 1637c31098ceSJames Smart #define LPFC_RQE_SIZE_64 5 1638c31098ceSJames Smart #define LPFC_RQE_SIZE_128 6 16395a6f133eSJames Smart #define lpfc_rq_context_page_size_SHIFT 0 /* Version 1 Only */ 16405a6f133eSJames Smart #define lpfc_rq_context_page_size_MASK 0x000000FF 16415a6f133eSJames Smart #define lpfc_rq_context_page_size_WORD word0 16428ea73db4SJames Smart #define LPFC_RQ_PAGE_SIZE_4096 0x1 16432d7dbc4cSJames Smart uint32_t word1; 16442d7dbc4cSJames Smart #define lpfc_rq_context_data_size_SHIFT 16 /* Version 2 Only */ 16452d7dbc4cSJames Smart #define lpfc_rq_context_data_size_MASK 0x0000FFFF 16462d7dbc4cSJames Smart #define lpfc_rq_context_data_size_WORD word1 16472d7dbc4cSJames Smart #define lpfc_rq_context_hdr_size_SHIFT 0 /* Version 2 Only */ 16482d7dbc4cSJames Smart #define lpfc_rq_context_hdr_size_MASK 0x0000FFFF 16492d7dbc4cSJames Smart #define lpfc_rq_context_hdr_size_WORD word1 1650da0436e9SJames Smart uint32_t word2; 1651da0436e9SJames Smart #define lpfc_rq_context_cq_id_SHIFT 16 1652df3d78c3SJames Smart #define lpfc_rq_context_cq_id_MASK 0x0000FFFF 1653da0436e9SJames Smart #define lpfc_rq_context_cq_id_WORD word2 1654da0436e9SJames Smart #define lpfc_rq_context_buf_size_SHIFT 0 1655da0436e9SJames Smart #define lpfc_rq_context_buf_size_MASK 0x0000FFFF 1656da0436e9SJames Smart #define lpfc_rq_context_buf_size_WORD word2 16572d7dbc4cSJames Smart #define lpfc_rq_context_base_cq_SHIFT 0 /* Version 2 Only */ 16582d7dbc4cSJames Smart #define lpfc_rq_context_base_cq_MASK 0x0000FFFF 16592d7dbc4cSJames Smart #define lpfc_rq_context_base_cq_WORD word2 16605a6f133eSJames Smart uint32_t buffer_size; /* Version 1 Only */ 1661da0436e9SJames Smart }; 1662da0436e9SJames Smart 1663da0436e9SJames Smart struct lpfc_mbx_rq_create { 1664da0436e9SJames Smart struct mbox_header header; 1665da0436e9SJames Smart union { 1666da0436e9SJames Smart struct { 1667da0436e9SJames Smart uint32_t word0; 1668da0436e9SJames Smart #define lpfc_mbx_rq_create_num_pages_SHIFT 0 1669da0436e9SJames Smart #define lpfc_mbx_rq_create_num_pages_MASK 0x0000FFFF 1670da0436e9SJames Smart #define lpfc_mbx_rq_create_num_pages_WORD word0 1671962bc51bSJames Smart #define lpfc_mbx_rq_create_dua_SHIFT 16 1672962bc51bSJames Smart #define lpfc_mbx_rq_create_dua_MASK 0x00000001 1673962bc51bSJames Smart #define lpfc_mbx_rq_create_dua_WORD word0 1674962bc51bSJames Smart #define lpfc_mbx_rq_create_bqu_SHIFT 17 1675962bc51bSJames Smart #define lpfc_mbx_rq_create_bqu_MASK 0x00000001 1676962bc51bSJames Smart #define lpfc_mbx_rq_create_bqu_WORD word0 1677962bc51bSJames Smart #define lpfc_mbx_rq_create_ulp_num_SHIFT 24 1678962bc51bSJames Smart #define lpfc_mbx_rq_create_ulp_num_MASK 0x000000FF 1679962bc51bSJames Smart #define lpfc_mbx_rq_create_ulp_num_WORD word0 1680da0436e9SJames Smart struct rq_context context; 16812d7dbc4cSJames Smart struct dma_address page[LPFC_MAX_RQ_PAGE]; 1682da0436e9SJames Smart } request; 1683da0436e9SJames Smart struct { 1684da0436e9SJames Smart uint32_t word0; 16852d7dbc4cSJames Smart #define lpfc_mbx_rq_create_q_cnt_v2_SHIFT 16 16862d7dbc4cSJames Smart #define lpfc_mbx_rq_create_q_cnt_v2_MASK 0x0000FFFF 16872d7dbc4cSJames Smart #define lpfc_mbx_rq_create_q_cnt_v2_WORD word0 16882d7dbc4cSJames Smart #define lpfc_mbx_rq_create_q_id_SHIFT 0 16892d7dbc4cSJames Smart #define lpfc_mbx_rq_create_q_id_MASK 0x0000FFFF 16902d7dbc4cSJames Smart #define lpfc_mbx_rq_create_q_id_WORD word0 16912d7dbc4cSJames Smart uint32_t doorbell_offset; 16922d7dbc4cSJames Smart uint32_t word2; 16932d7dbc4cSJames Smart #define lpfc_mbx_rq_create_bar_set_SHIFT 0 16942d7dbc4cSJames Smart #define lpfc_mbx_rq_create_bar_set_MASK 0x0000FFFF 16952d7dbc4cSJames Smart #define lpfc_mbx_rq_create_bar_set_WORD word2 16962d7dbc4cSJames Smart #define lpfc_mbx_rq_create_db_format_SHIFT 16 16972d7dbc4cSJames Smart #define lpfc_mbx_rq_create_db_format_MASK 0x0000FFFF 16982d7dbc4cSJames Smart #define lpfc_mbx_rq_create_db_format_WORD word2 16992d7dbc4cSJames Smart } response; 17002d7dbc4cSJames Smart } u; 17012d7dbc4cSJames Smart }; 17022d7dbc4cSJames Smart 17032d7dbc4cSJames Smart struct lpfc_mbx_rq_create_v2 { 17042d7dbc4cSJames Smart union lpfc_sli4_cfg_shdr cfg_shdr; 17052d7dbc4cSJames Smart union { 17062d7dbc4cSJames Smart struct { 17072d7dbc4cSJames Smart uint32_t word0; 17082d7dbc4cSJames Smart #define lpfc_mbx_rq_create_num_pages_SHIFT 0 17092d7dbc4cSJames Smart #define lpfc_mbx_rq_create_num_pages_MASK 0x0000FFFF 17102d7dbc4cSJames Smart #define lpfc_mbx_rq_create_num_pages_WORD word0 17112d7dbc4cSJames Smart #define lpfc_mbx_rq_create_rq_cnt_SHIFT 16 17122d7dbc4cSJames Smart #define lpfc_mbx_rq_create_rq_cnt_MASK 0x000000FF 17132d7dbc4cSJames Smart #define lpfc_mbx_rq_create_rq_cnt_WORD word0 17142d7dbc4cSJames Smart #define lpfc_mbx_rq_create_dua_SHIFT 16 17152d7dbc4cSJames Smart #define lpfc_mbx_rq_create_dua_MASK 0x00000001 17162d7dbc4cSJames Smart #define lpfc_mbx_rq_create_dua_WORD word0 17172d7dbc4cSJames Smart #define lpfc_mbx_rq_create_bqu_SHIFT 17 17182d7dbc4cSJames Smart #define lpfc_mbx_rq_create_bqu_MASK 0x00000001 17192d7dbc4cSJames Smart #define lpfc_mbx_rq_create_bqu_WORD word0 17202d7dbc4cSJames Smart #define lpfc_mbx_rq_create_ulp_num_SHIFT 24 17212d7dbc4cSJames Smart #define lpfc_mbx_rq_create_ulp_num_MASK 0x000000FF 17222d7dbc4cSJames Smart #define lpfc_mbx_rq_create_ulp_num_WORD word0 17232d7dbc4cSJames Smart #define lpfc_mbx_rq_create_dim_SHIFT 29 17242d7dbc4cSJames Smart #define lpfc_mbx_rq_create_dim_MASK 0x00000001 17252d7dbc4cSJames Smart #define lpfc_mbx_rq_create_dim_WORD word0 17262d7dbc4cSJames Smart #define lpfc_mbx_rq_create_dfd_SHIFT 30 17272d7dbc4cSJames Smart #define lpfc_mbx_rq_create_dfd_MASK 0x00000001 17282d7dbc4cSJames Smart #define lpfc_mbx_rq_create_dfd_WORD word0 17292d7dbc4cSJames Smart #define lpfc_mbx_rq_create_dnb_SHIFT 31 17302d7dbc4cSJames Smart #define lpfc_mbx_rq_create_dnb_MASK 0x00000001 17312d7dbc4cSJames Smart #define lpfc_mbx_rq_create_dnb_WORD word0 17322d7dbc4cSJames Smart struct rq_context context; 17332d7dbc4cSJames Smart struct dma_address page[1]; 17342d7dbc4cSJames Smart } request; 17352d7dbc4cSJames Smart struct { 17362d7dbc4cSJames Smart uint32_t word0; 17372d7dbc4cSJames Smart #define lpfc_mbx_rq_create_q_cnt_v2_SHIFT 16 17382d7dbc4cSJames Smart #define lpfc_mbx_rq_create_q_cnt_v2_MASK 0x0000FFFF 17392d7dbc4cSJames Smart #define lpfc_mbx_rq_create_q_cnt_v2_WORD word0 1740da0436e9SJames Smart #define lpfc_mbx_rq_create_q_id_SHIFT 0 1741da0436e9SJames Smart #define lpfc_mbx_rq_create_q_id_MASK 0x0000FFFF 1742da0436e9SJames Smart #define lpfc_mbx_rq_create_q_id_WORD word0 1743962bc51bSJames Smart uint32_t doorbell_offset; 1744962bc51bSJames Smart uint32_t word2; 1745962bc51bSJames Smart #define lpfc_mbx_rq_create_bar_set_SHIFT 0 1746962bc51bSJames Smart #define lpfc_mbx_rq_create_bar_set_MASK 0x0000FFFF 1747962bc51bSJames Smart #define lpfc_mbx_rq_create_bar_set_WORD word2 1748962bc51bSJames Smart #define lpfc_mbx_rq_create_db_format_SHIFT 16 1749962bc51bSJames Smart #define lpfc_mbx_rq_create_db_format_MASK 0x0000FFFF 1750962bc51bSJames Smart #define lpfc_mbx_rq_create_db_format_WORD word2 1751da0436e9SJames Smart } response; 1752da0436e9SJames Smart } u; 1753da0436e9SJames Smart }; 1754da0436e9SJames Smart 1755da0436e9SJames Smart struct lpfc_mbx_rq_destroy { 1756da0436e9SJames Smart struct mbox_header header; 1757da0436e9SJames Smart union { 1758da0436e9SJames Smart struct { 1759da0436e9SJames Smart uint32_t word0; 1760da0436e9SJames Smart #define lpfc_mbx_rq_destroy_q_id_SHIFT 0 1761da0436e9SJames Smart #define lpfc_mbx_rq_destroy_q_id_MASK 0x0000FFFF 1762da0436e9SJames Smart #define lpfc_mbx_rq_destroy_q_id_WORD word0 1763da0436e9SJames Smart } request; 1764da0436e9SJames Smart struct { 1765da0436e9SJames Smart uint32_t word0; 1766da0436e9SJames Smart } response; 1767da0436e9SJames Smart } u; 1768da0436e9SJames Smart }; 1769da0436e9SJames Smart 1770da0436e9SJames Smart struct mq_context { 1771da0436e9SJames Smart uint32_t word0; 17725a6f133eSJames Smart #define lpfc_mq_context_cq_id_SHIFT 22 /* Version 0 Only */ 1773da0436e9SJames Smart #define lpfc_mq_context_cq_id_MASK 0x000003FF 1774da0436e9SJames Smart #define lpfc_mq_context_cq_id_WORD word0 17755a6f133eSJames Smart #define lpfc_mq_context_ring_size_SHIFT 16 17765a6f133eSJames Smart #define lpfc_mq_context_ring_size_MASK 0x0000000F 17775a6f133eSJames Smart #define lpfc_mq_context_ring_size_WORD word0 17785a6f133eSJames Smart #define LPFC_MQ_RING_SIZE_16 0x5 17795a6f133eSJames Smart #define LPFC_MQ_RING_SIZE_32 0x6 17805a6f133eSJames Smart #define LPFC_MQ_RING_SIZE_64 0x7 17815a6f133eSJames Smart #define LPFC_MQ_RING_SIZE_128 0x8 1782da0436e9SJames Smart uint32_t word1; 1783da0436e9SJames Smart #define lpfc_mq_context_valid_SHIFT 31 1784da0436e9SJames Smart #define lpfc_mq_context_valid_MASK 0x00000001 1785da0436e9SJames Smart #define lpfc_mq_context_valid_WORD word1 1786da0436e9SJames Smart uint32_t reserved2; 1787da0436e9SJames Smart uint32_t reserved3; 1788da0436e9SJames Smart }; 1789da0436e9SJames Smart 1790da0436e9SJames Smart struct lpfc_mbx_mq_create { 1791da0436e9SJames Smart struct mbox_header header; 1792da0436e9SJames Smart union { 1793da0436e9SJames Smart struct { 1794da0436e9SJames Smart uint32_t word0; 1795da0436e9SJames Smart #define lpfc_mbx_mq_create_num_pages_SHIFT 0 1796da0436e9SJames Smart #define lpfc_mbx_mq_create_num_pages_MASK 0x0000FFFF 1797da0436e9SJames Smart #define lpfc_mbx_mq_create_num_pages_WORD word0 1798da0436e9SJames Smart struct mq_context context; 1799da0436e9SJames Smart struct dma_address page[LPFC_MAX_MQ_PAGE]; 1800da0436e9SJames Smart } request; 1801da0436e9SJames Smart struct { 1802da0436e9SJames Smart uint32_t word0; 1803da0436e9SJames Smart #define lpfc_mbx_mq_create_q_id_SHIFT 0 1804da0436e9SJames Smart #define lpfc_mbx_mq_create_q_id_MASK 0x0000FFFF 1805da0436e9SJames Smart #define lpfc_mbx_mq_create_q_id_WORD word0 1806da0436e9SJames Smart } response; 1807da0436e9SJames Smart } u; 1808da0436e9SJames Smart }; 1809da0436e9SJames Smart 1810b19a061aSJames Smart struct lpfc_mbx_mq_create_ext { 1811b19a061aSJames Smart struct mbox_header header; 1812b19a061aSJames Smart union { 1813b19a061aSJames Smart struct { 1814b19a061aSJames Smart uint32_t word0; 1815b19a061aSJames Smart #define lpfc_mbx_mq_create_ext_num_pages_SHIFT 0 1816b19a061aSJames Smart #define lpfc_mbx_mq_create_ext_num_pages_MASK 0x0000FFFF 1817b19a061aSJames Smart #define lpfc_mbx_mq_create_ext_num_pages_WORD word0 18185a6f133eSJames Smart #define lpfc_mbx_mq_create_ext_cq_id_SHIFT 16 /* Version 1 Only */ 18195a6f133eSJames Smart #define lpfc_mbx_mq_create_ext_cq_id_MASK 0x0000FFFF 18205a6f133eSJames Smart #define lpfc_mbx_mq_create_ext_cq_id_WORD word0 1821b19a061aSJames Smart uint32_t async_evt_bmap; 1822b19a061aSJames Smart #define lpfc_mbx_mq_create_ext_async_evt_link_SHIFT LPFC_TRAILER_CODE_LINK 1823b19a061aSJames Smart #define lpfc_mbx_mq_create_ext_async_evt_link_MASK 0x00000001 1824b19a061aSJames Smart #define lpfc_mbx_mq_create_ext_async_evt_link_WORD async_evt_bmap 18258b68cd52SJames Smart #define LPFC_EVT_CODE_LINK_NO_LINK 0x0 18268b68cd52SJames Smart #define LPFC_EVT_CODE_LINK_10_MBIT 0x1 18278b68cd52SJames Smart #define LPFC_EVT_CODE_LINK_100_MBIT 0x2 18288b68cd52SJames Smart #define LPFC_EVT_CODE_LINK_1_GBIT 0x3 18298b68cd52SJames Smart #define LPFC_EVT_CODE_LINK_10_GBIT 0x4 183070f3c073SJames Smart #define lpfc_mbx_mq_create_ext_async_evt_fip_SHIFT LPFC_TRAILER_CODE_FCOE 183170f3c073SJames Smart #define lpfc_mbx_mq_create_ext_async_evt_fip_MASK 0x00000001 183270f3c073SJames Smart #define lpfc_mbx_mq_create_ext_async_evt_fip_WORD async_evt_bmap 1833b19a061aSJames Smart #define lpfc_mbx_mq_create_ext_async_evt_group5_SHIFT LPFC_TRAILER_CODE_GRP5 1834b19a061aSJames Smart #define lpfc_mbx_mq_create_ext_async_evt_group5_MASK 0x00000001 1835b19a061aSJames Smart #define lpfc_mbx_mq_create_ext_async_evt_group5_WORD async_evt_bmap 183670f3c073SJames Smart #define lpfc_mbx_mq_create_ext_async_evt_fc_SHIFT LPFC_TRAILER_CODE_FC 183770f3c073SJames Smart #define lpfc_mbx_mq_create_ext_async_evt_fc_MASK 0x00000001 183870f3c073SJames Smart #define lpfc_mbx_mq_create_ext_async_evt_fc_WORD async_evt_bmap 18398b68cd52SJames Smart #define LPFC_EVT_CODE_FC_NO_LINK 0x0 18408b68cd52SJames Smart #define LPFC_EVT_CODE_FC_1_GBAUD 0x1 18418b68cd52SJames Smart #define LPFC_EVT_CODE_FC_2_GBAUD 0x2 18428b68cd52SJames Smart #define LPFC_EVT_CODE_FC_4_GBAUD 0x4 18438b68cd52SJames Smart #define LPFC_EVT_CODE_FC_8_GBAUD 0x8 18448b68cd52SJames Smart #define LPFC_EVT_CODE_FC_10_GBAUD 0xA 18458b68cd52SJames Smart #define LPFC_EVT_CODE_FC_16_GBAUD 0x10 184670f3c073SJames Smart #define lpfc_mbx_mq_create_ext_async_evt_sli_SHIFT LPFC_TRAILER_CODE_SLI 184770f3c073SJames Smart #define lpfc_mbx_mq_create_ext_async_evt_sli_MASK 0x00000001 184870f3c073SJames Smart #define lpfc_mbx_mq_create_ext_async_evt_sli_WORD async_evt_bmap 1849b19a061aSJames Smart struct mq_context context; 1850b19a061aSJames Smart struct dma_address page[LPFC_MAX_MQ_PAGE]; 1851b19a061aSJames Smart } request; 1852b19a061aSJames Smart struct { 1853b19a061aSJames Smart uint32_t word0; 1854b19a061aSJames Smart #define lpfc_mbx_mq_create_q_id_SHIFT 0 1855b19a061aSJames Smart #define lpfc_mbx_mq_create_q_id_MASK 0x0000FFFF 1856b19a061aSJames Smart #define lpfc_mbx_mq_create_q_id_WORD word0 1857b19a061aSJames Smart } response; 1858b19a061aSJames Smart } u; 1859b19a061aSJames Smart #define LPFC_ASYNC_EVENT_LINK_STATE 0x2 1860b19a061aSJames Smart #define LPFC_ASYNC_EVENT_FCF_STATE 0x4 1861b19a061aSJames Smart #define LPFC_ASYNC_EVENT_GROUP5 0x20 1862b19a061aSJames Smart }; 1863b19a061aSJames Smart 1864da0436e9SJames Smart struct lpfc_mbx_mq_destroy { 1865da0436e9SJames Smart struct mbox_header header; 1866da0436e9SJames Smart union { 1867da0436e9SJames Smart struct { 1868da0436e9SJames Smart uint32_t word0; 1869da0436e9SJames Smart #define lpfc_mbx_mq_destroy_q_id_SHIFT 0 1870da0436e9SJames Smart #define lpfc_mbx_mq_destroy_q_id_MASK 0x0000FFFF 1871da0436e9SJames Smart #define lpfc_mbx_mq_destroy_q_id_WORD word0 1872da0436e9SJames Smart } request; 1873da0436e9SJames Smart struct { 1874da0436e9SJames Smart uint32_t word0; 1875da0436e9SJames Smart } response; 1876da0436e9SJames Smart } u; 1877da0436e9SJames Smart }; 1878da0436e9SJames Smart 18796d368e53SJames Smart /* Start Gen 2 SLI4 Mailbox definitions: */ 18806d368e53SJames Smart 18816d368e53SJames Smart /* Define allocate-ready Gen 2 SLI4 FCoE Resource Extent Types. */ 18826d368e53SJames Smart #define LPFC_RSC_TYPE_FCOE_VFI 0x20 18836d368e53SJames Smart #define LPFC_RSC_TYPE_FCOE_VPI 0x21 18846d368e53SJames Smart #define LPFC_RSC_TYPE_FCOE_RPI 0x22 18856d368e53SJames Smart #define LPFC_RSC_TYPE_FCOE_XRI 0x23 18866d368e53SJames Smart 18876d368e53SJames Smart struct lpfc_mbx_get_rsrc_extent_info { 18886d368e53SJames Smart struct mbox_header header; 18896d368e53SJames Smart union { 18906d368e53SJames Smart struct { 18916d368e53SJames Smart uint32_t word4; 18926d368e53SJames Smart #define lpfc_mbx_get_rsrc_extent_info_type_SHIFT 0 18936d368e53SJames Smart #define lpfc_mbx_get_rsrc_extent_info_type_MASK 0x0000FFFF 18946d368e53SJames Smart #define lpfc_mbx_get_rsrc_extent_info_type_WORD word4 18956d368e53SJames Smart } req; 18966d368e53SJames Smart struct { 18976d368e53SJames Smart uint32_t word4; 18986d368e53SJames Smart #define lpfc_mbx_get_rsrc_extent_info_cnt_SHIFT 0 18996d368e53SJames Smart #define lpfc_mbx_get_rsrc_extent_info_cnt_MASK 0x0000FFFF 19006d368e53SJames Smart #define lpfc_mbx_get_rsrc_extent_info_cnt_WORD word4 19016d368e53SJames Smart #define lpfc_mbx_get_rsrc_extent_info_size_SHIFT 16 19026d368e53SJames Smart #define lpfc_mbx_get_rsrc_extent_info_size_MASK 0x0000FFFF 19036d368e53SJames Smart #define lpfc_mbx_get_rsrc_extent_info_size_WORD word4 19046d368e53SJames Smart } rsp; 19056d368e53SJames Smart } u; 19066d368e53SJames Smart }; 19076d368e53SJames Smart 1908962bc51bSJames Smart struct lpfc_mbx_query_fw_config { 1909962bc51bSJames Smart struct mbox_header header; 1910962bc51bSJames Smart struct { 1911962bc51bSJames Smart uint32_t config_number; 1912962bc51bSJames Smart #define LPFC_FC_FCOE 0x00000007 1913962bc51bSJames Smart uint32_t asic_revision; 1914962bc51bSJames Smart uint32_t physical_port; 1915962bc51bSJames Smart uint32_t function_mode; 191691b91309SJustin Tee #define LPFC_FC_INI_MODE 0x00000040 191791b91309SJustin Tee #define LPFC_FC_TGT_MODE 0x00000080 1918962bc51bSJames Smart #define LPFC_DUA_MODE 0x00000800 191991b91309SJustin Tee uint32_t oper_mode; 192091b91309SJustin Tee uint32_t rsvd9[2]; 192191b91309SJustin Tee uint32_t wqid_base; 192291b91309SJustin Tee uint32_t wqid_tot; 192391b91309SJustin Tee uint32_t rqid_base; 192491b91309SJustin Tee uint32_t rqid_tot; 192591b91309SJustin Tee uint32_t rsvd15[19]; 1926962bc51bSJames Smart uint32_t function_capabilities; 1927962bc51bSJames Smart uint32_t cqid_base; 1928962bc51bSJames Smart uint32_t cqid_tot; 1929962bc51bSJames Smart uint32_t eqid_base; 1930962bc51bSJames Smart uint32_t eqid_tot; 193191b91309SJustin Tee uint32_t rsvd39[4]; 1932962bc51bSJames Smart } rsp; 1933962bc51bSJames Smart }; 1934962bc51bSJames Smart 19358b017a30SJames Smart struct lpfc_mbx_set_beacon_config { 19368b017a30SJames Smart struct mbox_header header; 19378b017a30SJames Smart uint32_t word4; 19388b017a30SJames Smart #define lpfc_mbx_set_beacon_port_num_SHIFT 0 19398b017a30SJames Smart #define lpfc_mbx_set_beacon_port_num_MASK 0x0000003F 19408b017a30SJames Smart #define lpfc_mbx_set_beacon_port_num_WORD word4 19418b017a30SJames Smart #define lpfc_mbx_set_beacon_port_type_SHIFT 6 19428b017a30SJames Smart #define lpfc_mbx_set_beacon_port_type_MASK 0x00000003 19438b017a30SJames Smart #define lpfc_mbx_set_beacon_port_type_WORD word4 19448b017a30SJames Smart #define lpfc_mbx_set_beacon_state_SHIFT 8 19458b017a30SJames Smart #define lpfc_mbx_set_beacon_state_MASK 0x000000FF 19468b017a30SJames Smart #define lpfc_mbx_set_beacon_state_WORD word4 19478b017a30SJames Smart #define lpfc_mbx_set_beacon_duration_SHIFT 16 19488b017a30SJames Smart #define lpfc_mbx_set_beacon_duration_MASK 0x000000FF 19498b017a30SJames Smart #define lpfc_mbx_set_beacon_duration_WORD word4 195066e9e6bfSJames Smart 195166e9e6bfSJames Smart /* COMMON_SET_BEACON_CONFIG_V1 */ 195266e9e6bfSJames Smart #define lpfc_mbx_set_beacon_duration_v1_SHIFT 16 195366e9e6bfSJames Smart #define lpfc_mbx_set_beacon_duration_v1_MASK 0x0000FFFF 195466e9e6bfSJames Smart #define lpfc_mbx_set_beacon_duration_v1_WORD word4 195566e9e6bfSJames Smart uint32_t word5; /* RESERVED */ 19568b017a30SJames Smart }; 19578b017a30SJames Smart 19586d368e53SJames Smart struct lpfc_id_range { 19596d368e53SJames Smart uint32_t word5; 19606d368e53SJames Smart #define lpfc_mbx_rsrc_id_word4_0_SHIFT 0 19616d368e53SJames Smart #define lpfc_mbx_rsrc_id_word4_0_MASK 0x0000FFFF 19626d368e53SJames Smart #define lpfc_mbx_rsrc_id_word4_0_WORD word5 19636d368e53SJames Smart #define lpfc_mbx_rsrc_id_word4_1_SHIFT 16 19646d368e53SJames Smart #define lpfc_mbx_rsrc_id_word4_1_MASK 0x0000FFFF 19656d368e53SJames Smart #define lpfc_mbx_rsrc_id_word4_1_WORD word5 19666d368e53SJames Smart }; 19676d368e53SJames Smart 19687ad20aa9SJames Smart struct lpfc_mbx_set_link_diag_state { 19697ad20aa9SJames Smart struct mbox_header header; 19707ad20aa9SJames Smart union { 19717ad20aa9SJames Smart struct { 19727ad20aa9SJames Smart uint32_t word0; 19737ad20aa9SJames Smart #define lpfc_mbx_set_diag_state_diag_SHIFT 0 19747ad20aa9SJames Smart #define lpfc_mbx_set_diag_state_diag_MASK 0x00000001 19757ad20aa9SJames Smart #define lpfc_mbx_set_diag_state_diag_WORD word0 19769731592bSJames Smart #define lpfc_mbx_set_diag_state_diag_bit_valid_SHIFT 2 19779731592bSJames Smart #define lpfc_mbx_set_diag_state_diag_bit_valid_MASK 0x00000001 19789731592bSJames Smart #define lpfc_mbx_set_diag_state_diag_bit_valid_WORD word0 19799731592bSJames Smart #define LPFC_DIAG_STATE_DIAG_BIT_VALID_NO_CHANGE 0 19809731592bSJames Smart #define LPFC_DIAG_STATE_DIAG_BIT_VALID_CHANGE 1 19817ad20aa9SJames Smart #define lpfc_mbx_set_diag_state_link_num_SHIFT 16 19827ad20aa9SJames Smart #define lpfc_mbx_set_diag_state_link_num_MASK 0x0000003F 19837ad20aa9SJames Smart #define lpfc_mbx_set_diag_state_link_num_WORD word0 19847ad20aa9SJames Smart #define lpfc_mbx_set_diag_state_link_type_SHIFT 22 19857ad20aa9SJames Smart #define lpfc_mbx_set_diag_state_link_type_MASK 0x00000003 19867ad20aa9SJames Smart #define lpfc_mbx_set_diag_state_link_type_WORD word0 19877ad20aa9SJames Smart } req; 19887ad20aa9SJames Smart struct { 19897ad20aa9SJames Smart uint32_t word0; 19907ad20aa9SJames Smart } rsp; 19917ad20aa9SJames Smart } u; 19927ad20aa9SJames Smart }; 19937ad20aa9SJames Smart 19947ad20aa9SJames Smart struct lpfc_mbx_set_link_diag_loopback { 19957ad20aa9SJames Smart struct mbox_header header; 19967ad20aa9SJames Smart union { 19977ad20aa9SJames Smart struct { 19987ad20aa9SJames Smart uint32_t word0; 19997ad20aa9SJames Smart #define lpfc_mbx_set_diag_lpbk_type_SHIFT 0 20001b51197dSJames Smart #define lpfc_mbx_set_diag_lpbk_type_MASK 0x00000003 20017ad20aa9SJames Smart #define lpfc_mbx_set_diag_lpbk_type_WORD word0 20027ad20aa9SJames Smart #define LPFC_DIAG_LOOPBACK_TYPE_DISABLE 0x0 20037ad20aa9SJames Smart #define LPFC_DIAG_LOOPBACK_TYPE_INTERNAL 0x1 20041b51197dSJames Smart #define LPFC_DIAG_LOOPBACK_TYPE_SERDES 0x2 20059a66d990SJames Smart #define LPFC_DIAG_LOOPBACK_TYPE_EXTERNAL_TRUNKED 0x3 20067ad20aa9SJames Smart #define lpfc_mbx_set_diag_lpbk_link_num_SHIFT 16 20077ad20aa9SJames Smart #define lpfc_mbx_set_diag_lpbk_link_num_MASK 0x0000003F 20087ad20aa9SJames Smart #define lpfc_mbx_set_diag_lpbk_link_num_WORD word0 20097ad20aa9SJames Smart #define lpfc_mbx_set_diag_lpbk_link_type_SHIFT 22 20107ad20aa9SJames Smart #define lpfc_mbx_set_diag_lpbk_link_type_MASK 0x00000003 20117ad20aa9SJames Smart #define lpfc_mbx_set_diag_lpbk_link_type_WORD word0 20127ad20aa9SJames Smart } req; 20137ad20aa9SJames Smart struct { 20147ad20aa9SJames Smart uint32_t word0; 20157ad20aa9SJames Smart } rsp; 20167ad20aa9SJames Smart } u; 20177ad20aa9SJames Smart }; 20187ad20aa9SJames Smart 20197ad20aa9SJames Smart struct lpfc_mbx_run_link_diag_test { 20207ad20aa9SJames Smart struct mbox_header header; 20217ad20aa9SJames Smart union { 20227ad20aa9SJames Smart struct { 20237ad20aa9SJames Smart uint32_t word0; 20247ad20aa9SJames Smart #define lpfc_mbx_run_diag_test_link_num_SHIFT 16 20257ad20aa9SJames Smart #define lpfc_mbx_run_diag_test_link_num_MASK 0x0000003F 20267ad20aa9SJames Smart #define lpfc_mbx_run_diag_test_link_num_WORD word0 20277ad20aa9SJames Smart #define lpfc_mbx_run_diag_test_link_type_SHIFT 22 20287ad20aa9SJames Smart #define lpfc_mbx_run_diag_test_link_type_MASK 0x00000003 20297ad20aa9SJames Smart #define lpfc_mbx_run_diag_test_link_type_WORD word0 20307ad20aa9SJames Smart uint32_t word1; 20317ad20aa9SJames Smart #define lpfc_mbx_run_diag_test_test_id_SHIFT 0 20327ad20aa9SJames Smart #define lpfc_mbx_run_diag_test_test_id_MASK 0x0000FFFF 20337ad20aa9SJames Smart #define lpfc_mbx_run_diag_test_test_id_WORD word1 20347ad20aa9SJames Smart #define lpfc_mbx_run_diag_test_loops_SHIFT 16 20357ad20aa9SJames Smart #define lpfc_mbx_run_diag_test_loops_MASK 0x0000FFFF 20367ad20aa9SJames Smart #define lpfc_mbx_run_diag_test_loops_WORD word1 20377ad20aa9SJames Smart uint32_t word2; 20387ad20aa9SJames Smart #define lpfc_mbx_run_diag_test_test_ver_SHIFT 0 20397ad20aa9SJames Smart #define lpfc_mbx_run_diag_test_test_ver_MASK 0x0000FFFF 20407ad20aa9SJames Smart #define lpfc_mbx_run_diag_test_test_ver_WORD word2 20417ad20aa9SJames Smart #define lpfc_mbx_run_diag_test_err_act_SHIFT 16 20427ad20aa9SJames Smart #define lpfc_mbx_run_diag_test_err_act_MASK 0x000000FF 20437ad20aa9SJames Smart #define lpfc_mbx_run_diag_test_err_act_WORD word2 20447ad20aa9SJames Smart } req; 20457ad20aa9SJames Smart struct { 20467ad20aa9SJames Smart uint32_t word0; 20477ad20aa9SJames Smart } rsp; 20487ad20aa9SJames Smart } u; 20497ad20aa9SJames Smart }; 20507ad20aa9SJames Smart 20516d368e53SJames Smart /* 20526d368e53SJames Smart * struct lpfc_mbx_alloc_rsrc_extents: 20536d368e53SJames Smart * A mbox is generically 256 bytes long. An SLI4_CONFIG mailbox requires 20546d368e53SJames Smart * 6 words of header + 4 words of shared subcommand header + 20556d368e53SJames Smart * 1 words of Extent-Opcode-specific header = 11 words or 44 bytes total. 20566d368e53SJames Smart * 20576d368e53SJames Smart * An embedded version of SLI4_CONFIG therefore has 256 - 44 = 212 bytes 20586d368e53SJames Smart * for extents payload. 20596d368e53SJames Smart * 20606d368e53SJames Smart * 212/2 (bytes per extent) = 106 extents. 20616d368e53SJames Smart * 106/2 (extents per word) = 53 words. 20626d368e53SJames Smart * lpfc_id_range id is statically size to 53. 20636d368e53SJames Smart * 20646d368e53SJames Smart * This mailbox definition is used for ALLOC or GET_ALLOCATED 20656d368e53SJames Smart * extent ranges. For ALLOC, the type and cnt are required. 20666d368e53SJames Smart * For GET_ALLOCATED, only the type is required. 20676d368e53SJames Smart */ 20686d368e53SJames Smart struct lpfc_mbx_alloc_rsrc_extents { 20696d368e53SJames Smart struct mbox_header header; 20706d368e53SJames Smart union { 20716d368e53SJames Smart struct { 20726d368e53SJames Smart uint32_t word4; 20736d368e53SJames Smart #define lpfc_mbx_alloc_rsrc_extents_type_SHIFT 0 20746d368e53SJames Smart #define lpfc_mbx_alloc_rsrc_extents_type_MASK 0x0000FFFF 20756d368e53SJames Smart #define lpfc_mbx_alloc_rsrc_extents_type_WORD word4 20766d368e53SJames Smart #define lpfc_mbx_alloc_rsrc_extents_cnt_SHIFT 16 20776d368e53SJames Smart #define lpfc_mbx_alloc_rsrc_extents_cnt_MASK 0x0000FFFF 20786d368e53SJames Smart #define lpfc_mbx_alloc_rsrc_extents_cnt_WORD word4 20796d368e53SJames Smart } req; 20806d368e53SJames Smart struct { 20816d368e53SJames Smart uint32_t word4; 20826d368e53SJames Smart #define lpfc_mbx_rsrc_cnt_SHIFT 0 20836d368e53SJames Smart #define lpfc_mbx_rsrc_cnt_MASK 0x0000FFFF 20846d368e53SJames Smart #define lpfc_mbx_rsrc_cnt_WORD word4 20856d368e53SJames Smart struct lpfc_id_range id[53]; 20866d368e53SJames Smart } rsp; 20876d368e53SJames Smart } u; 20886d368e53SJames Smart }; 20896d368e53SJames Smart 20906d368e53SJames Smart /* 20916d368e53SJames Smart * This is the non-embedded version of ALLOC or GET RSRC_EXTENTS. Word4 in this 20926d368e53SJames Smart * structure shares the same SHIFT/MASK/WORD defines provided in the 20936d368e53SJames Smart * mbx_alloc_rsrc_extents and mbx_get_alloc_rsrc_extents, word4, provided in 20946d368e53SJames Smart * the structures defined above. This non-embedded structure provides for the 20956d368e53SJames Smart * maximum number of extents supported by the port. 20966d368e53SJames Smart */ 20976d368e53SJames Smart struct lpfc_mbx_nembed_rsrc_extent { 20986d368e53SJames Smart union lpfc_sli4_cfg_shdr cfg_shdr; 20996d368e53SJames Smart uint32_t word4; 21006d368e53SJames Smart struct lpfc_id_range id; 21016d368e53SJames Smart }; 21026d368e53SJames Smart 21036d368e53SJames Smart struct lpfc_mbx_dealloc_rsrc_extents { 21046d368e53SJames Smart struct mbox_header header; 21056d368e53SJames Smart struct { 21066d368e53SJames Smart uint32_t word4; 21076d368e53SJames Smart #define lpfc_mbx_dealloc_rsrc_extents_type_SHIFT 0 21086d368e53SJames Smart #define lpfc_mbx_dealloc_rsrc_extents_type_MASK 0x0000FFFF 21096d368e53SJames Smart #define lpfc_mbx_dealloc_rsrc_extents_type_WORD word4 21106d368e53SJames Smart } req; 21116d368e53SJames Smart 21126d368e53SJames Smart }; 21136d368e53SJames Smart 21146d368e53SJames Smart /* Start SLI4 FCoE specific mbox structures. */ 21156d368e53SJames Smart 2116da0436e9SJames Smart struct lpfc_mbx_post_hdr_tmpl { 2117da0436e9SJames Smart struct mbox_header header; 2118da0436e9SJames Smart uint32_t word10; 2119da0436e9SJames Smart #define lpfc_mbx_post_hdr_tmpl_rpi_offset_SHIFT 0 2120da0436e9SJames Smart #define lpfc_mbx_post_hdr_tmpl_rpi_offset_MASK 0x0000FFFF 2121da0436e9SJames Smart #define lpfc_mbx_post_hdr_tmpl_rpi_offset_WORD word10 2122da0436e9SJames Smart #define lpfc_mbx_post_hdr_tmpl_page_cnt_SHIFT 16 2123da0436e9SJames Smart #define lpfc_mbx_post_hdr_tmpl_page_cnt_MASK 0x0000FFFF 2124da0436e9SJames Smart #define lpfc_mbx_post_hdr_tmpl_page_cnt_WORD word10 2125da0436e9SJames Smart uint32_t rpi_paddr_lo; 2126da0436e9SJames Smart uint32_t rpi_paddr_hi; 2127da0436e9SJames Smart }; 2128da0436e9SJames Smart 2129da0436e9SJames Smart struct sli4_sge { /* SLI-4 */ 2130da0436e9SJames Smart uint32_t addr_hi; 2131da0436e9SJames Smart uint32_t addr_lo; 2132da0436e9SJames Smart 2133da0436e9SJames Smart uint32_t word2; 2134f9bb2da1SJames Smart #define lpfc_sli4_sge_offset_SHIFT 0 2135f9bb2da1SJames Smart #define lpfc_sli4_sge_offset_MASK 0x07FFFFFF 2136da0436e9SJames Smart #define lpfc_sli4_sge_offset_WORD word2 2137f9bb2da1SJames Smart #define lpfc_sli4_sge_type_SHIFT 27 2138f9bb2da1SJames Smart #define lpfc_sli4_sge_type_MASK 0x0000000F 2139f9bb2da1SJames Smart #define lpfc_sli4_sge_type_WORD word2 2140f9bb2da1SJames Smart #define LPFC_SGE_TYPE_DATA 0x0 2141f9bb2da1SJames Smart #define LPFC_SGE_TYPE_DIF 0x4 2142f9bb2da1SJames Smart #define LPFC_SGE_TYPE_LSP 0x5 2143f9bb2da1SJames Smart #define LPFC_SGE_TYPE_PEDIF 0x6 2144f9bb2da1SJames Smart #define LPFC_SGE_TYPE_PESEED 0x7 2145f9bb2da1SJames Smart #define LPFC_SGE_TYPE_DISEED 0x8 2146f9bb2da1SJames Smart #define LPFC_SGE_TYPE_ENC 0x9 2147f9bb2da1SJames Smart #define LPFC_SGE_TYPE_ATM 0xA 2148f9bb2da1SJames Smart #define LPFC_SGE_TYPE_SKIP 0xC 2149f9bb2da1SJames Smart #define lpfc_sli4_sge_last_SHIFT 31 /* Last SEG in the SGL sets it */ 2150da0436e9SJames Smart #define lpfc_sli4_sge_last_MASK 0x00000001 2151da0436e9SJames Smart #define lpfc_sli4_sge_last_WORD word2 215228baac74SJames Smart uint32_t sge_len; 2153da0436e9SJames Smart }; 2154da0436e9SJames Smart 2155af20bb73SJustin Tee struct sli4_sge_le { 2156af20bb73SJustin Tee __le32 addr_hi; 2157af20bb73SJustin Tee __le32 addr_lo; 2158af20bb73SJustin Tee 2159af20bb73SJustin Tee __le32 word2; 2160af20bb73SJustin Tee __le32 sge_len; 2161af20bb73SJustin Tee }; 2162af20bb73SJustin Tee 2163d79c9e9dSJames Smart struct sli4_hybrid_sgl { 2164d79c9e9dSJames Smart struct list_head list_node; 2165d79c9e9dSJames Smart struct sli4_sge *dma_sgl; 2166d79c9e9dSJames Smart dma_addr_t dma_phys_sgl; 2167d79c9e9dSJames Smart }; 2168d79c9e9dSJames Smart 2169d79c9e9dSJames Smart struct fcp_cmd_rsp_buf { 2170d79c9e9dSJames Smart struct list_head list_node; 2171d79c9e9dSJames Smart 2172d79c9e9dSJames Smart /* for storing cmd/rsp dma alloc'ed virt_addr */ 2173d79c9e9dSJames Smart struct fcp_cmnd *fcp_cmnd; 2174d79c9e9dSJames Smart struct fcp_rsp *fcp_rsp; 2175d79c9e9dSJames Smart 2176d79c9e9dSJames Smart /* for storing this cmd/rsp's dma mapped phys addr from per CPU pool */ 2177d79c9e9dSJames Smart dma_addr_t fcp_cmd_rsp_dma_handle; 2178d79c9e9dSJames Smart }; 2179d79c9e9dSJames Smart 2180f9bb2da1SJames Smart struct sli4_sge_diseed { /* SLI-4 */ 2181f9bb2da1SJames Smart uint32_t ref_tag; 2182f9bb2da1SJames Smart uint32_t ref_tag_tran; 2183f9bb2da1SJames Smart 2184f9bb2da1SJames Smart uint32_t word2; 2185f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_apptran_SHIFT 0 2186f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_apptran_MASK 0x0000FFFF 2187f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_apptran_WORD word2 2188f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_af_SHIFT 24 2189f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_af_MASK 0x00000001 2190f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_af_WORD word2 2191f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_na_SHIFT 25 2192f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_na_MASK 0x00000001 2193f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_na_WORD word2 2194f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_hi_SHIFT 26 2195f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_hi_MASK 0x00000001 2196f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_hi_WORD word2 2197f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_type_SHIFT 27 2198f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_type_MASK 0x0000000F 2199f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_type_WORD word2 2200f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_last_SHIFT 31 /* Last SEG in the SGL sets it */ 2201f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_last_MASK 0x00000001 2202f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_last_WORD word2 2203f9bb2da1SJames Smart uint32_t word3; 2204f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_apptag_SHIFT 0 2205f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_apptag_MASK 0x0000FFFF 2206f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_apptag_WORD word3 2207f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_bs_SHIFT 16 2208f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_bs_MASK 0x00000007 2209f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_bs_WORD word3 2210f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_ai_SHIFT 19 2211f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_ai_MASK 0x00000001 2212f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_ai_WORD word3 2213f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_me_SHIFT 20 2214f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_me_MASK 0x00000001 2215f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_me_WORD word3 2216f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_re_SHIFT 21 2217f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_re_MASK 0x00000001 2218f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_re_WORD word3 2219f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_ce_SHIFT 22 2220f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_ce_MASK 0x00000001 2221f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_ce_WORD word3 2222f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_nr_SHIFT 23 2223f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_nr_MASK 0x00000001 2224f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_nr_WORD word3 2225f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_oprx_SHIFT 24 2226f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_oprx_MASK 0x0000000F 2227f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_oprx_WORD word3 2228f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_optx_SHIFT 28 2229f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_optx_MASK 0x0000000F 2230f9bb2da1SJames Smart #define lpfc_sli4_sge_dif_optx_WORD word3 2231f9bb2da1SJames Smart /* optx and oprx use BG_OP_IN defines in lpfc_hw.h */ 2232f9bb2da1SJames Smart }; 2233f9bb2da1SJames Smart 2234da0436e9SJames Smart struct fcf_record { 2235da0436e9SJames Smart uint32_t max_rcv_size; 2236da0436e9SJames Smart uint32_t fka_adv_period; 2237da0436e9SJames Smart uint32_t fip_priority; 2238da0436e9SJames Smart uint32_t word3; 2239da0436e9SJames Smart #define lpfc_fcf_record_mac_0_SHIFT 0 2240da0436e9SJames Smart #define lpfc_fcf_record_mac_0_MASK 0x000000FF 2241da0436e9SJames Smart #define lpfc_fcf_record_mac_0_WORD word3 2242da0436e9SJames Smart #define lpfc_fcf_record_mac_1_SHIFT 8 2243da0436e9SJames Smart #define lpfc_fcf_record_mac_1_MASK 0x000000FF 2244da0436e9SJames Smart #define lpfc_fcf_record_mac_1_WORD word3 2245da0436e9SJames Smart #define lpfc_fcf_record_mac_2_SHIFT 16 2246da0436e9SJames Smart #define lpfc_fcf_record_mac_2_MASK 0x000000FF 2247da0436e9SJames Smart #define lpfc_fcf_record_mac_2_WORD word3 2248da0436e9SJames Smart #define lpfc_fcf_record_mac_3_SHIFT 24 2249da0436e9SJames Smart #define lpfc_fcf_record_mac_3_MASK 0x000000FF 2250da0436e9SJames Smart #define lpfc_fcf_record_mac_3_WORD word3 2251da0436e9SJames Smart uint32_t word4; 2252da0436e9SJames Smart #define lpfc_fcf_record_mac_4_SHIFT 0 2253da0436e9SJames Smart #define lpfc_fcf_record_mac_4_MASK 0x000000FF 2254da0436e9SJames Smart #define lpfc_fcf_record_mac_4_WORD word4 2255da0436e9SJames Smart #define lpfc_fcf_record_mac_5_SHIFT 8 2256da0436e9SJames Smart #define lpfc_fcf_record_mac_5_MASK 0x000000FF 2257da0436e9SJames Smart #define lpfc_fcf_record_mac_5_WORD word4 2258da0436e9SJames Smart #define lpfc_fcf_record_fcf_avail_SHIFT 16 2259da0436e9SJames Smart #define lpfc_fcf_record_fcf_avail_MASK 0x000000FF 22600c287589SJames Smart #define lpfc_fcf_record_fcf_avail_WORD word4 2261da0436e9SJames Smart #define lpfc_fcf_record_mac_addr_prov_SHIFT 24 2262da0436e9SJames Smart #define lpfc_fcf_record_mac_addr_prov_MASK 0x000000FF 2263da0436e9SJames Smart #define lpfc_fcf_record_mac_addr_prov_WORD word4 2264da0436e9SJames Smart #define LPFC_FCF_FPMA 1 /* Fabric Provided MAC Address */ 2265da0436e9SJames Smart #define LPFC_FCF_SPMA 2 /* Server Provided MAC Address */ 2266da0436e9SJames Smart uint32_t word5; 2267da0436e9SJames Smart #define lpfc_fcf_record_fab_name_0_SHIFT 0 2268da0436e9SJames Smart #define lpfc_fcf_record_fab_name_0_MASK 0x000000FF 2269da0436e9SJames Smart #define lpfc_fcf_record_fab_name_0_WORD word5 2270da0436e9SJames Smart #define lpfc_fcf_record_fab_name_1_SHIFT 8 2271da0436e9SJames Smart #define lpfc_fcf_record_fab_name_1_MASK 0x000000FF 2272da0436e9SJames Smart #define lpfc_fcf_record_fab_name_1_WORD word5 2273da0436e9SJames Smart #define lpfc_fcf_record_fab_name_2_SHIFT 16 2274da0436e9SJames Smart #define lpfc_fcf_record_fab_name_2_MASK 0x000000FF 2275da0436e9SJames Smart #define lpfc_fcf_record_fab_name_2_WORD word5 2276da0436e9SJames Smart #define lpfc_fcf_record_fab_name_3_SHIFT 24 2277da0436e9SJames Smart #define lpfc_fcf_record_fab_name_3_MASK 0x000000FF 2278da0436e9SJames Smart #define lpfc_fcf_record_fab_name_3_WORD word5 2279da0436e9SJames Smart uint32_t word6; 2280da0436e9SJames Smart #define lpfc_fcf_record_fab_name_4_SHIFT 0 2281da0436e9SJames Smart #define lpfc_fcf_record_fab_name_4_MASK 0x000000FF 2282da0436e9SJames Smart #define lpfc_fcf_record_fab_name_4_WORD word6 2283da0436e9SJames Smart #define lpfc_fcf_record_fab_name_5_SHIFT 8 2284da0436e9SJames Smart #define lpfc_fcf_record_fab_name_5_MASK 0x000000FF 2285da0436e9SJames Smart #define lpfc_fcf_record_fab_name_5_WORD word6 2286da0436e9SJames Smart #define lpfc_fcf_record_fab_name_6_SHIFT 16 2287da0436e9SJames Smart #define lpfc_fcf_record_fab_name_6_MASK 0x000000FF 2288da0436e9SJames Smart #define lpfc_fcf_record_fab_name_6_WORD word6 2289da0436e9SJames Smart #define lpfc_fcf_record_fab_name_7_SHIFT 24 2290da0436e9SJames Smart #define lpfc_fcf_record_fab_name_7_MASK 0x000000FF 2291da0436e9SJames Smart #define lpfc_fcf_record_fab_name_7_WORD word6 2292da0436e9SJames Smart uint32_t word7; 2293da0436e9SJames Smart #define lpfc_fcf_record_fc_map_0_SHIFT 0 2294da0436e9SJames Smart #define lpfc_fcf_record_fc_map_0_MASK 0x000000FF 2295da0436e9SJames Smart #define lpfc_fcf_record_fc_map_0_WORD word7 2296da0436e9SJames Smart #define lpfc_fcf_record_fc_map_1_SHIFT 8 2297da0436e9SJames Smart #define lpfc_fcf_record_fc_map_1_MASK 0x000000FF 2298da0436e9SJames Smart #define lpfc_fcf_record_fc_map_1_WORD word7 2299da0436e9SJames Smart #define lpfc_fcf_record_fc_map_2_SHIFT 16 2300da0436e9SJames Smart #define lpfc_fcf_record_fc_map_2_MASK 0x000000FF 2301da0436e9SJames Smart #define lpfc_fcf_record_fc_map_2_WORD word7 2302da0436e9SJames Smart #define lpfc_fcf_record_fcf_valid_SHIFT 24 230326979cedSJames Smart #define lpfc_fcf_record_fcf_valid_MASK 0x00000001 2304da0436e9SJames Smart #define lpfc_fcf_record_fcf_valid_WORD word7 230526979cedSJames Smart #define lpfc_fcf_record_fcf_fc_SHIFT 25 230626979cedSJames Smart #define lpfc_fcf_record_fcf_fc_MASK 0x00000001 230726979cedSJames Smart #define lpfc_fcf_record_fcf_fc_WORD word7 230826979cedSJames Smart #define lpfc_fcf_record_fcf_sol_SHIFT 31 230926979cedSJames Smart #define lpfc_fcf_record_fcf_sol_MASK 0x00000001 231026979cedSJames Smart #define lpfc_fcf_record_fcf_sol_WORD word7 2311da0436e9SJames Smart uint32_t word8; 2312da0436e9SJames Smart #define lpfc_fcf_record_fcf_index_SHIFT 0 2313da0436e9SJames Smart #define lpfc_fcf_record_fcf_index_MASK 0x0000FFFF 2314da0436e9SJames Smart #define lpfc_fcf_record_fcf_index_WORD word8 2315da0436e9SJames Smart #define lpfc_fcf_record_fcf_state_SHIFT 16 2316da0436e9SJames Smart #define lpfc_fcf_record_fcf_state_MASK 0x0000FFFF 2317da0436e9SJames Smart #define lpfc_fcf_record_fcf_state_WORD word8 2318da0436e9SJames Smart uint8_t vlan_bitmap[512]; 23198fa38513SJames Smart uint32_t word137; 23208fa38513SJames Smart #define lpfc_fcf_record_switch_name_0_SHIFT 0 23218fa38513SJames Smart #define lpfc_fcf_record_switch_name_0_MASK 0x000000FF 23228fa38513SJames Smart #define lpfc_fcf_record_switch_name_0_WORD word137 23238fa38513SJames Smart #define lpfc_fcf_record_switch_name_1_SHIFT 8 23248fa38513SJames Smart #define lpfc_fcf_record_switch_name_1_MASK 0x000000FF 23258fa38513SJames Smart #define lpfc_fcf_record_switch_name_1_WORD word137 23268fa38513SJames Smart #define lpfc_fcf_record_switch_name_2_SHIFT 16 23278fa38513SJames Smart #define lpfc_fcf_record_switch_name_2_MASK 0x000000FF 23288fa38513SJames Smart #define lpfc_fcf_record_switch_name_2_WORD word137 23298fa38513SJames Smart #define lpfc_fcf_record_switch_name_3_SHIFT 24 23308fa38513SJames Smart #define lpfc_fcf_record_switch_name_3_MASK 0x000000FF 23318fa38513SJames Smart #define lpfc_fcf_record_switch_name_3_WORD word137 23328fa38513SJames Smart uint32_t word138; 23338fa38513SJames Smart #define lpfc_fcf_record_switch_name_4_SHIFT 0 23348fa38513SJames Smart #define lpfc_fcf_record_switch_name_4_MASK 0x000000FF 23358fa38513SJames Smart #define lpfc_fcf_record_switch_name_4_WORD word138 23368fa38513SJames Smart #define lpfc_fcf_record_switch_name_5_SHIFT 8 23378fa38513SJames Smart #define lpfc_fcf_record_switch_name_5_MASK 0x000000FF 23388fa38513SJames Smart #define lpfc_fcf_record_switch_name_5_WORD word138 23398fa38513SJames Smart #define lpfc_fcf_record_switch_name_6_SHIFT 16 23408fa38513SJames Smart #define lpfc_fcf_record_switch_name_6_MASK 0x000000FF 23418fa38513SJames Smart #define lpfc_fcf_record_switch_name_6_WORD word138 23428fa38513SJames Smart #define lpfc_fcf_record_switch_name_7_SHIFT 24 23438fa38513SJames Smart #define lpfc_fcf_record_switch_name_7_MASK 0x000000FF 23448fa38513SJames Smart #define lpfc_fcf_record_switch_name_7_WORD word138 2345da0436e9SJames Smart }; 2346da0436e9SJames Smart 2347da0436e9SJames Smart struct lpfc_mbx_read_fcf_tbl { 2348da0436e9SJames Smart union lpfc_sli4_cfg_shdr cfg_shdr; 2349da0436e9SJames Smart union { 2350da0436e9SJames Smart struct { 2351da0436e9SJames Smart uint32_t word10; 2352da0436e9SJames Smart #define lpfc_mbx_read_fcf_tbl_indx_SHIFT 0 2353da0436e9SJames Smart #define lpfc_mbx_read_fcf_tbl_indx_MASK 0x0000FFFF 2354da0436e9SJames Smart #define lpfc_mbx_read_fcf_tbl_indx_WORD word10 2355da0436e9SJames Smart } request; 2356da0436e9SJames Smart struct { 2357da0436e9SJames Smart uint32_t eventag; 2358da0436e9SJames Smart } response; 2359da0436e9SJames Smart } u; 2360da0436e9SJames Smart uint32_t word11; 2361da0436e9SJames Smart #define lpfc_mbx_read_fcf_tbl_nxt_vindx_SHIFT 0 2362da0436e9SJames Smart #define lpfc_mbx_read_fcf_tbl_nxt_vindx_MASK 0x0000FFFF 2363da0436e9SJames Smart #define lpfc_mbx_read_fcf_tbl_nxt_vindx_WORD word11 2364da0436e9SJames Smart }; 2365da0436e9SJames Smart 2366da0436e9SJames Smart struct lpfc_mbx_add_fcf_tbl_entry { 2367da0436e9SJames Smart union lpfc_sli4_cfg_shdr cfg_shdr; 2368da0436e9SJames Smart uint32_t word10; 2369da0436e9SJames Smart #define lpfc_mbx_add_fcf_tbl_fcfi_SHIFT 0 2370da0436e9SJames Smart #define lpfc_mbx_add_fcf_tbl_fcfi_MASK 0x0000FFFF 2371da0436e9SJames Smart #define lpfc_mbx_add_fcf_tbl_fcfi_WORD word10 2372da0436e9SJames Smart struct lpfc_mbx_sge fcf_sge; 2373da0436e9SJames Smart }; 2374da0436e9SJames Smart 2375da0436e9SJames Smart struct lpfc_mbx_del_fcf_tbl_entry { 2376da0436e9SJames Smart struct mbox_header header; 2377da0436e9SJames Smart uint32_t word10; 2378da0436e9SJames Smart #define lpfc_mbx_del_fcf_tbl_count_SHIFT 0 2379da0436e9SJames Smart #define lpfc_mbx_del_fcf_tbl_count_MASK 0x0000FFFF 2380da0436e9SJames Smart #define lpfc_mbx_del_fcf_tbl_count_WORD word10 2381da0436e9SJames Smart #define lpfc_mbx_del_fcf_tbl_index_SHIFT 16 2382da0436e9SJames Smart #define lpfc_mbx_del_fcf_tbl_index_MASK 0x0000FFFF 2383da0436e9SJames Smart #define lpfc_mbx_del_fcf_tbl_index_WORD word10 2384da0436e9SJames Smart }; 2385da0436e9SJames Smart 2386ecfd03c6SJames Smart struct lpfc_mbx_redisc_fcf_tbl { 2387ecfd03c6SJames Smart struct mbox_header header; 2388ecfd03c6SJames Smart uint32_t word10; 2389ecfd03c6SJames Smart #define lpfc_mbx_redisc_fcf_count_SHIFT 0 2390ecfd03c6SJames Smart #define lpfc_mbx_redisc_fcf_count_MASK 0x0000FFFF 2391ecfd03c6SJames Smart #define lpfc_mbx_redisc_fcf_count_WORD word10 2392ecfd03c6SJames Smart uint32_t resvd; 2393ecfd03c6SJames Smart uint32_t word12; 2394ecfd03c6SJames Smart #define lpfc_mbx_redisc_fcf_index_SHIFT 0 2395ecfd03c6SJames Smart #define lpfc_mbx_redisc_fcf_index_MASK 0x0000FFFF 2396ecfd03c6SJames Smart #define lpfc_mbx_redisc_fcf_index_WORD word12 2397ecfd03c6SJames Smart }; 2398ecfd03c6SJames Smart 2399da0436e9SJames Smart /* Status field for embedded SLI_CONFIG mailbox command */ 2400da0436e9SJames Smart #define STATUS_SUCCESS 0x0 2401da0436e9SJames Smart #define STATUS_FAILED 0x1 2402da0436e9SJames Smart #define STATUS_ILLEGAL_REQUEST 0x2 2403da0436e9SJames Smart #define STATUS_ILLEGAL_FIELD 0x3 2404da0436e9SJames Smart #define STATUS_INSUFFICIENT_BUFFER 0x4 2405da0436e9SJames Smart #define STATUS_UNAUTHORIZED_REQUEST 0x5 2406da0436e9SJames Smart #define STATUS_FLASHROM_SAVE_FAILED 0x17 2407da0436e9SJames Smart #define STATUS_FLASHROM_RESTORE_FAILED 0x18 2408da0436e9SJames Smart #define STATUS_ICCBINDEX_ALLOC_FAILED 0x1a 2409da0436e9SJames Smart #define STATUS_IOCTLHANDLE_ALLOC_FAILED 0x1b 2410da0436e9SJames Smart #define STATUS_INVALID_PHY_ADDR_FROM_OSM 0x1c 2411da0436e9SJames Smart #define STATUS_INVALID_PHY_ADDR_LEN_FROM_OSM 0x1d 2412da0436e9SJames Smart #define STATUS_ASSERT_FAILED 0x1e 2413da0436e9SJames Smart #define STATUS_INVALID_SESSION 0x1f 2414da0436e9SJames Smart #define STATUS_INVALID_CONNECTION 0x20 2415da0436e9SJames Smart #define STATUS_BTL_PATH_EXCEEDS_OSM_LIMIT 0x21 2416da0436e9SJames Smart #define STATUS_BTL_NO_FREE_SLOT_PATH 0x24 2417da0436e9SJames Smart #define STATUS_BTL_NO_FREE_SLOT_TGTID 0x25 2418da0436e9SJames Smart #define STATUS_OSM_DEVSLOT_NOT_FOUND 0x26 2419da0436e9SJames Smart #define STATUS_FLASHROM_READ_FAILED 0x27 2420da0436e9SJames Smart #define STATUS_POLL_IOCTL_TIMEOUT 0x28 2421da0436e9SJames Smart #define STATUS_ERROR_ACITMAIN 0x2a 2422da0436e9SJames Smart #define STATUS_REBOOT_REQUIRED 0x2c 2423da0436e9SJames Smart #define STATUS_FCF_IN_USE 0x3a 2424def9c7a9SJames Smart #define STATUS_FCF_TABLE_EMPTY 0x43 2425da0436e9SJames Smart 2426481ad967SJames Smart /* 2427481ad967SJames Smart * Additional status field for embedded SLI_CONFIG mailbox 2428481ad967SJames Smart * command. 2429481ad967SJames Smart */ 2430481ad967SJames Smart #define ADD_STATUS_OPERATION_ALREADY_ACTIVE 0x67 24311feb8204SJames Smart #define ADD_STATUS_FW_NOT_SUPPORTED 0xEB 243266e9e6bfSJames Smart #define ADD_STATUS_INVALID_REQUEST 0x4B 243372df8a45SJames Smart #define ADD_STATUS_INVALID_OBJECT_NAME 0xA0 24340a5ce731SJames Smart #define ADD_STATUS_FW_DOWNLOAD_HW_DISABLED 0x58 2435481ad967SJames Smart 2436da0436e9SJames Smart struct lpfc_mbx_sli4_config { 2437da0436e9SJames Smart struct mbox_header header; 2438da0436e9SJames Smart }; 2439da0436e9SJames Smart 2440da0436e9SJames Smart struct lpfc_mbx_init_vfi { 2441da0436e9SJames Smart uint32_t word1; 2442da0436e9SJames Smart #define lpfc_init_vfi_vr_SHIFT 31 2443da0436e9SJames Smart #define lpfc_init_vfi_vr_MASK 0x00000001 2444da0436e9SJames Smart #define lpfc_init_vfi_vr_WORD word1 2445da0436e9SJames Smart #define lpfc_init_vfi_vt_SHIFT 30 2446da0436e9SJames Smart #define lpfc_init_vfi_vt_MASK 0x00000001 2447da0436e9SJames Smart #define lpfc_init_vfi_vt_WORD word1 2448da0436e9SJames Smart #define lpfc_init_vfi_vf_SHIFT 29 2449da0436e9SJames Smart #define lpfc_init_vfi_vf_MASK 0x00000001 2450da0436e9SJames Smart #define lpfc_init_vfi_vf_WORD word1 245176a95d75SJames Smart #define lpfc_init_vfi_vp_SHIFT 28 245276a95d75SJames Smart #define lpfc_init_vfi_vp_MASK 0x00000001 245376a95d75SJames Smart #define lpfc_init_vfi_vp_WORD word1 2454da0436e9SJames Smart #define lpfc_init_vfi_vfi_SHIFT 0 2455da0436e9SJames Smart #define lpfc_init_vfi_vfi_MASK 0x0000FFFF 2456da0436e9SJames Smart #define lpfc_init_vfi_vfi_WORD word1 2457da0436e9SJames Smart uint32_t word2; 245876a95d75SJames Smart #define lpfc_init_vfi_vpi_SHIFT 16 245976a95d75SJames Smart #define lpfc_init_vfi_vpi_MASK 0x0000FFFF 246076a95d75SJames Smart #define lpfc_init_vfi_vpi_WORD word2 2461da0436e9SJames Smart #define lpfc_init_vfi_fcfi_SHIFT 0 2462da0436e9SJames Smart #define lpfc_init_vfi_fcfi_MASK 0x0000FFFF 2463da0436e9SJames Smart #define lpfc_init_vfi_fcfi_WORD word2 2464da0436e9SJames Smart uint32_t word3; 2465da0436e9SJames Smart #define lpfc_init_vfi_pri_SHIFT 13 2466da0436e9SJames Smart #define lpfc_init_vfi_pri_MASK 0x00000007 2467da0436e9SJames Smart #define lpfc_init_vfi_pri_WORD word3 2468da0436e9SJames Smart #define lpfc_init_vfi_vf_id_SHIFT 1 2469da0436e9SJames Smart #define lpfc_init_vfi_vf_id_MASK 0x00000FFF 2470da0436e9SJames Smart #define lpfc_init_vfi_vf_id_WORD word3 2471da0436e9SJames Smart uint32_t word4; 2472da0436e9SJames Smart #define lpfc_init_vfi_hop_count_SHIFT 24 2473da0436e9SJames Smart #define lpfc_init_vfi_hop_count_MASK 0x000000FF 2474da0436e9SJames Smart #define lpfc_init_vfi_hop_count_WORD word4 2475da0436e9SJames Smart }; 2476df9e1b59SJames Smart #define MBX_VFI_IN_USE 0x9F02 2477df9e1b59SJames Smart 2478da0436e9SJames Smart 2479da0436e9SJames Smart struct lpfc_mbx_reg_vfi { 2480da0436e9SJames Smart uint32_t word1; 2481ae05ebe3SJames Smart #define lpfc_reg_vfi_upd_SHIFT 29 2482ae05ebe3SJames Smart #define lpfc_reg_vfi_upd_MASK 0x00000001 2483ae05ebe3SJames Smart #define lpfc_reg_vfi_upd_WORD word1 2484da0436e9SJames Smart #define lpfc_reg_vfi_vp_SHIFT 28 2485da0436e9SJames Smart #define lpfc_reg_vfi_vp_MASK 0x00000001 2486da0436e9SJames Smart #define lpfc_reg_vfi_vp_WORD word1 2487da0436e9SJames Smart #define lpfc_reg_vfi_vfi_SHIFT 0 2488da0436e9SJames Smart #define lpfc_reg_vfi_vfi_MASK 0x0000FFFF 2489da0436e9SJames Smart #define lpfc_reg_vfi_vfi_WORD word1 2490da0436e9SJames Smart uint32_t word2; 2491da0436e9SJames Smart #define lpfc_reg_vfi_vpi_SHIFT 16 2492da0436e9SJames Smart #define lpfc_reg_vfi_vpi_MASK 0x0000FFFF 2493da0436e9SJames Smart #define lpfc_reg_vfi_vpi_WORD word2 2494da0436e9SJames Smart #define lpfc_reg_vfi_fcfi_SHIFT 0 2495da0436e9SJames Smart #define lpfc_reg_vfi_fcfi_MASK 0x0000FFFF 2496da0436e9SJames Smart #define lpfc_reg_vfi_fcfi_WORD word2 2497c868595dSJames Smart uint32_t wwn[2]; 2498da0436e9SJames Smart struct ulp_bde64 bde; 2499b19a061aSJames Smart uint32_t e_d_tov; 2500b19a061aSJames Smart uint32_t r_a_tov; 2501da0436e9SJames Smart uint32_t word10; 2502da0436e9SJames Smart #define lpfc_reg_vfi_nport_id_SHIFT 0 2503da0436e9SJames Smart #define lpfc_reg_vfi_nport_id_MASK 0x00FFFFFF 2504da0436e9SJames Smart #define lpfc_reg_vfi_nport_id_WORD word10 250544fd7fe3SJames Smart #define lpfc_reg_vfi_bbcr_SHIFT 27 250644fd7fe3SJames Smart #define lpfc_reg_vfi_bbcr_MASK 0x00000001 250744fd7fe3SJames Smart #define lpfc_reg_vfi_bbcr_WORD word10 250844fd7fe3SJames Smart #define lpfc_reg_vfi_bbscn_SHIFT 28 250944fd7fe3SJames Smart #define lpfc_reg_vfi_bbscn_MASK 0x0000000F 251044fd7fe3SJames Smart #define lpfc_reg_vfi_bbscn_WORD word10 2511da0436e9SJames Smart }; 2512da0436e9SJames Smart 2513da0436e9SJames Smart struct lpfc_mbx_init_vpi { 2514da0436e9SJames Smart uint32_t word1; 2515da0436e9SJames Smart #define lpfc_init_vpi_vfi_SHIFT 16 2516da0436e9SJames Smart #define lpfc_init_vpi_vfi_MASK 0x0000FFFF 2517da0436e9SJames Smart #define lpfc_init_vpi_vfi_WORD word1 2518da0436e9SJames Smart #define lpfc_init_vpi_vpi_SHIFT 0 2519da0436e9SJames Smart #define lpfc_init_vpi_vpi_MASK 0x0000FFFF 2520da0436e9SJames Smart #define lpfc_init_vpi_vpi_WORD word1 2521da0436e9SJames Smart }; 2522da0436e9SJames Smart 2523da0436e9SJames Smart struct lpfc_mbx_read_vpi { 2524da0436e9SJames Smart uint32_t word1_rsvd; 2525da0436e9SJames Smart uint32_t word2; 2526da0436e9SJames Smart #define lpfc_mbx_read_vpi_vnportid_SHIFT 0 2527da0436e9SJames Smart #define lpfc_mbx_read_vpi_vnportid_MASK 0x00FFFFFF 2528da0436e9SJames Smart #define lpfc_mbx_read_vpi_vnportid_WORD word2 2529da0436e9SJames Smart uint32_t word3_rsvd; 2530da0436e9SJames Smart uint32_t word4; 2531da0436e9SJames Smart #define lpfc_mbx_read_vpi_acq_alpa_SHIFT 0 2532da0436e9SJames Smart #define lpfc_mbx_read_vpi_acq_alpa_MASK 0x000000FF 2533da0436e9SJames Smart #define lpfc_mbx_read_vpi_acq_alpa_WORD word4 2534da0436e9SJames Smart #define lpfc_mbx_read_vpi_pb_SHIFT 15 2535da0436e9SJames Smart #define lpfc_mbx_read_vpi_pb_MASK 0x00000001 2536da0436e9SJames Smart #define lpfc_mbx_read_vpi_pb_WORD word4 2537da0436e9SJames Smart #define lpfc_mbx_read_vpi_spec_alpa_SHIFT 16 2538da0436e9SJames Smart #define lpfc_mbx_read_vpi_spec_alpa_MASK 0x000000FF 2539da0436e9SJames Smart #define lpfc_mbx_read_vpi_spec_alpa_WORD word4 2540da0436e9SJames Smart #define lpfc_mbx_read_vpi_ns_SHIFT 30 2541da0436e9SJames Smart #define lpfc_mbx_read_vpi_ns_MASK 0x00000001 2542da0436e9SJames Smart #define lpfc_mbx_read_vpi_ns_WORD word4 2543da0436e9SJames Smart #define lpfc_mbx_read_vpi_hl_SHIFT 31 2544da0436e9SJames Smart #define lpfc_mbx_read_vpi_hl_MASK 0x00000001 2545da0436e9SJames Smart #define lpfc_mbx_read_vpi_hl_WORD word4 2546da0436e9SJames Smart uint32_t word5_rsvd; 2547da0436e9SJames Smart uint32_t word6; 2548da0436e9SJames Smart #define lpfc_mbx_read_vpi_vpi_SHIFT 0 2549da0436e9SJames Smart #define lpfc_mbx_read_vpi_vpi_MASK 0x0000FFFF 2550da0436e9SJames Smart #define lpfc_mbx_read_vpi_vpi_WORD word6 2551da0436e9SJames Smart uint32_t word7; 2552da0436e9SJames Smart #define lpfc_mbx_read_vpi_mac_0_SHIFT 0 2553da0436e9SJames Smart #define lpfc_mbx_read_vpi_mac_0_MASK 0x000000FF 2554da0436e9SJames Smart #define lpfc_mbx_read_vpi_mac_0_WORD word7 2555da0436e9SJames Smart #define lpfc_mbx_read_vpi_mac_1_SHIFT 8 2556da0436e9SJames Smart #define lpfc_mbx_read_vpi_mac_1_MASK 0x000000FF 2557da0436e9SJames Smart #define lpfc_mbx_read_vpi_mac_1_WORD word7 2558da0436e9SJames Smart #define lpfc_mbx_read_vpi_mac_2_SHIFT 16 2559da0436e9SJames Smart #define lpfc_mbx_read_vpi_mac_2_MASK 0x000000FF 2560da0436e9SJames Smart #define lpfc_mbx_read_vpi_mac_2_WORD word7 2561da0436e9SJames Smart #define lpfc_mbx_read_vpi_mac_3_SHIFT 24 2562da0436e9SJames Smart #define lpfc_mbx_read_vpi_mac_3_MASK 0x000000FF 2563da0436e9SJames Smart #define lpfc_mbx_read_vpi_mac_3_WORD word7 2564da0436e9SJames Smart uint32_t word8; 2565da0436e9SJames Smart #define lpfc_mbx_read_vpi_mac_4_SHIFT 0 2566da0436e9SJames Smart #define lpfc_mbx_read_vpi_mac_4_MASK 0x000000FF 2567da0436e9SJames Smart #define lpfc_mbx_read_vpi_mac_4_WORD word8 2568da0436e9SJames Smart #define lpfc_mbx_read_vpi_mac_5_SHIFT 8 2569da0436e9SJames Smart #define lpfc_mbx_read_vpi_mac_5_MASK 0x000000FF 2570da0436e9SJames Smart #define lpfc_mbx_read_vpi_mac_5_WORD word8 2571da0436e9SJames Smart #define lpfc_mbx_read_vpi_vlan_tag_SHIFT 16 2572da0436e9SJames Smart #define lpfc_mbx_read_vpi_vlan_tag_MASK 0x00000FFF 2573da0436e9SJames Smart #define lpfc_mbx_read_vpi_vlan_tag_WORD word8 2574da0436e9SJames Smart #define lpfc_mbx_read_vpi_vv_SHIFT 28 2575da0436e9SJames Smart #define lpfc_mbx_read_vpi_vv_MASK 0x0000001 2576da0436e9SJames Smart #define lpfc_mbx_read_vpi_vv_WORD word8 2577da0436e9SJames Smart }; 2578da0436e9SJames Smart 2579da0436e9SJames Smart struct lpfc_mbx_unreg_vfi { 2580da0436e9SJames Smart uint32_t word1_rsvd; 2581da0436e9SJames Smart uint32_t word2; 2582da0436e9SJames Smart #define lpfc_unreg_vfi_vfi_SHIFT 0 2583da0436e9SJames Smart #define lpfc_unreg_vfi_vfi_MASK 0x0000FFFF 2584da0436e9SJames Smart #define lpfc_unreg_vfi_vfi_WORD word2 2585da0436e9SJames Smart }; 2586da0436e9SJames Smart 2587da0436e9SJames Smart struct lpfc_mbx_resume_rpi { 2588da0436e9SJames Smart uint32_t word1; 25898fa38513SJames Smart #define lpfc_resume_rpi_index_SHIFT 0 25908fa38513SJames Smart #define lpfc_resume_rpi_index_MASK 0x0000FFFF 25918fa38513SJames Smart #define lpfc_resume_rpi_index_WORD word1 25928fa38513SJames Smart #define lpfc_resume_rpi_ii_SHIFT 30 25938fa38513SJames Smart #define lpfc_resume_rpi_ii_MASK 0x00000003 25948fa38513SJames Smart #define lpfc_resume_rpi_ii_WORD word1 25958fa38513SJames Smart #define RESUME_INDEX_RPI 0 25968fa38513SJames Smart #define RESUME_INDEX_VPI 1 25978fa38513SJames Smart #define RESUME_INDEX_VFI 2 25988fa38513SJames Smart #define RESUME_INDEX_FCFI 3 2599da0436e9SJames Smart uint32_t event_tag; 2600da0436e9SJames Smart }; 2601da0436e9SJames Smart 2602da0436e9SJames Smart #define REG_FCF_INVALID_QID 0xFFFF 2603da0436e9SJames Smart struct lpfc_mbx_reg_fcfi { 2604da0436e9SJames Smart uint32_t word1; 2605da0436e9SJames Smart #define lpfc_reg_fcfi_info_index_SHIFT 0 2606da0436e9SJames Smart #define lpfc_reg_fcfi_info_index_MASK 0x0000FFFF 2607da0436e9SJames Smart #define lpfc_reg_fcfi_info_index_WORD word1 2608da0436e9SJames Smart #define lpfc_reg_fcfi_fcfi_SHIFT 16 2609da0436e9SJames Smart #define lpfc_reg_fcfi_fcfi_MASK 0x0000FFFF 2610da0436e9SJames Smart #define lpfc_reg_fcfi_fcfi_WORD word1 2611da0436e9SJames Smart uint32_t word2; 2612da0436e9SJames Smart #define lpfc_reg_fcfi_rq_id1_SHIFT 0 2613da0436e9SJames Smart #define lpfc_reg_fcfi_rq_id1_MASK 0x0000FFFF 2614da0436e9SJames Smart #define lpfc_reg_fcfi_rq_id1_WORD word2 2615da0436e9SJames Smart #define lpfc_reg_fcfi_rq_id0_SHIFT 16 2616da0436e9SJames Smart #define lpfc_reg_fcfi_rq_id0_MASK 0x0000FFFF 2617da0436e9SJames Smart #define lpfc_reg_fcfi_rq_id0_WORD word2 2618da0436e9SJames Smart uint32_t word3; 2619da0436e9SJames Smart #define lpfc_reg_fcfi_rq_id3_SHIFT 0 2620da0436e9SJames Smart #define lpfc_reg_fcfi_rq_id3_MASK 0x0000FFFF 2621da0436e9SJames Smart #define lpfc_reg_fcfi_rq_id3_WORD word3 2622da0436e9SJames Smart #define lpfc_reg_fcfi_rq_id2_SHIFT 16 2623da0436e9SJames Smart #define lpfc_reg_fcfi_rq_id2_MASK 0x0000FFFF 2624da0436e9SJames Smart #define lpfc_reg_fcfi_rq_id2_WORD word3 2625da0436e9SJames Smart uint32_t word4; 2626da0436e9SJames Smart #define lpfc_reg_fcfi_type_match0_SHIFT 24 2627da0436e9SJames Smart #define lpfc_reg_fcfi_type_match0_MASK 0x000000FF 2628da0436e9SJames Smart #define lpfc_reg_fcfi_type_match0_WORD word4 2629da0436e9SJames Smart #define lpfc_reg_fcfi_type_mask0_SHIFT 16 2630da0436e9SJames Smart #define lpfc_reg_fcfi_type_mask0_MASK 0x000000FF 2631da0436e9SJames Smart #define lpfc_reg_fcfi_type_mask0_WORD word4 2632da0436e9SJames Smart #define lpfc_reg_fcfi_rctl_match0_SHIFT 8 2633da0436e9SJames Smart #define lpfc_reg_fcfi_rctl_match0_MASK 0x000000FF 2634da0436e9SJames Smart #define lpfc_reg_fcfi_rctl_match0_WORD word4 2635da0436e9SJames Smart #define lpfc_reg_fcfi_rctl_mask0_SHIFT 0 2636da0436e9SJames Smart #define lpfc_reg_fcfi_rctl_mask0_MASK 0x000000FF 2637da0436e9SJames Smart #define lpfc_reg_fcfi_rctl_mask0_WORD word4 2638da0436e9SJames Smart uint32_t word5; 2639da0436e9SJames Smart #define lpfc_reg_fcfi_type_match1_SHIFT 24 2640da0436e9SJames Smart #define lpfc_reg_fcfi_type_match1_MASK 0x000000FF 2641da0436e9SJames Smart #define lpfc_reg_fcfi_type_match1_WORD word5 2642da0436e9SJames Smart #define lpfc_reg_fcfi_type_mask1_SHIFT 16 2643da0436e9SJames Smart #define lpfc_reg_fcfi_type_mask1_MASK 0x000000FF 2644da0436e9SJames Smart #define lpfc_reg_fcfi_type_mask1_WORD word5 2645da0436e9SJames Smart #define lpfc_reg_fcfi_rctl_match1_SHIFT 8 2646da0436e9SJames Smart #define lpfc_reg_fcfi_rctl_match1_MASK 0x000000FF 2647da0436e9SJames Smart #define lpfc_reg_fcfi_rctl_match1_WORD word5 2648da0436e9SJames Smart #define lpfc_reg_fcfi_rctl_mask1_SHIFT 0 2649da0436e9SJames Smart #define lpfc_reg_fcfi_rctl_mask1_MASK 0x000000FF 2650da0436e9SJames Smart #define lpfc_reg_fcfi_rctl_mask1_WORD word5 2651da0436e9SJames Smart uint32_t word6; 2652da0436e9SJames Smart #define lpfc_reg_fcfi_type_match2_SHIFT 24 2653da0436e9SJames Smart #define lpfc_reg_fcfi_type_match2_MASK 0x000000FF 2654da0436e9SJames Smart #define lpfc_reg_fcfi_type_match2_WORD word6 2655da0436e9SJames Smart #define lpfc_reg_fcfi_type_mask2_SHIFT 16 2656da0436e9SJames Smart #define lpfc_reg_fcfi_type_mask2_MASK 0x000000FF 2657da0436e9SJames Smart #define lpfc_reg_fcfi_type_mask2_WORD word6 2658da0436e9SJames Smart #define lpfc_reg_fcfi_rctl_match2_SHIFT 8 2659da0436e9SJames Smart #define lpfc_reg_fcfi_rctl_match2_MASK 0x000000FF 2660da0436e9SJames Smart #define lpfc_reg_fcfi_rctl_match2_WORD word6 2661da0436e9SJames Smart #define lpfc_reg_fcfi_rctl_mask2_SHIFT 0 2662da0436e9SJames Smart #define lpfc_reg_fcfi_rctl_mask2_MASK 0x000000FF 2663da0436e9SJames Smart #define lpfc_reg_fcfi_rctl_mask2_WORD word6 2664da0436e9SJames Smart uint32_t word7; 2665da0436e9SJames Smart #define lpfc_reg_fcfi_type_match3_SHIFT 24 2666da0436e9SJames Smart #define lpfc_reg_fcfi_type_match3_MASK 0x000000FF 2667da0436e9SJames Smart #define lpfc_reg_fcfi_type_match3_WORD word7 2668da0436e9SJames Smart #define lpfc_reg_fcfi_type_mask3_SHIFT 16 2669da0436e9SJames Smart #define lpfc_reg_fcfi_type_mask3_MASK 0x000000FF 2670da0436e9SJames Smart #define lpfc_reg_fcfi_type_mask3_WORD word7 2671da0436e9SJames Smart #define lpfc_reg_fcfi_rctl_match3_SHIFT 8 2672da0436e9SJames Smart #define lpfc_reg_fcfi_rctl_match3_MASK 0x000000FF 2673da0436e9SJames Smart #define lpfc_reg_fcfi_rctl_match3_WORD word7 2674da0436e9SJames Smart #define lpfc_reg_fcfi_rctl_mask3_SHIFT 0 2675da0436e9SJames Smart #define lpfc_reg_fcfi_rctl_mask3_MASK 0x000000FF 2676da0436e9SJames Smart #define lpfc_reg_fcfi_rctl_mask3_WORD word7 2677da0436e9SJames Smart uint32_t word8; 2678da0436e9SJames Smart #define lpfc_reg_fcfi_mam_SHIFT 13 2679da0436e9SJames Smart #define lpfc_reg_fcfi_mam_MASK 0x00000003 2680da0436e9SJames Smart #define lpfc_reg_fcfi_mam_WORD word8 2681da0436e9SJames Smart #define LPFC_MAM_BOTH 0 /* Both SPMA and FPMA */ 2682da0436e9SJames Smart #define LPFC_MAM_SPMA 1 /* Server Provided MAC Address */ 2683da0436e9SJames Smart #define LPFC_MAM_FPMA 2 /* Fabric Provided MAC Address */ 2684da0436e9SJames Smart #define lpfc_reg_fcfi_vv_SHIFT 12 2685da0436e9SJames Smart #define lpfc_reg_fcfi_vv_MASK 0x00000001 2686da0436e9SJames Smart #define lpfc_reg_fcfi_vv_WORD word8 2687da0436e9SJames Smart #define lpfc_reg_fcfi_vlan_tag_SHIFT 0 2688da0436e9SJames Smart #define lpfc_reg_fcfi_vlan_tag_MASK 0x00000FFF 2689da0436e9SJames Smart #define lpfc_reg_fcfi_vlan_tag_WORD word8 2690da0436e9SJames Smart }; 2691da0436e9SJames Smart 26922d7dbc4cSJames Smart struct lpfc_mbx_reg_fcfi_mrq { 26932d7dbc4cSJames Smart uint32_t word1; 26942d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_info_index_SHIFT 0 26952d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_info_index_MASK 0x0000FFFF 26962d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_info_index_WORD word1 26972d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_fcfi_SHIFT 16 26982d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_fcfi_MASK 0x0000FFFF 26992d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_fcfi_WORD word1 27002d7dbc4cSJames Smart uint32_t word2; 27012d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rq_id1_SHIFT 0 27022d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rq_id1_MASK 0x0000FFFF 27032d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rq_id1_WORD word2 27042d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rq_id0_SHIFT 16 27052d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rq_id0_MASK 0x0000FFFF 27062d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rq_id0_WORD word2 27072d7dbc4cSJames Smart uint32_t word3; 27082d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rq_id3_SHIFT 0 27092d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rq_id3_MASK 0x0000FFFF 27102d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rq_id3_WORD word3 27112d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rq_id2_SHIFT 16 27122d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rq_id2_MASK 0x0000FFFF 27132d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rq_id2_WORD word3 27142d7dbc4cSJames Smart uint32_t word4; 27152d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_type_match0_SHIFT 24 27162d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_type_match0_MASK 0x000000FF 27172d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_type_match0_WORD word4 27182d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_type_mask0_SHIFT 16 27192d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_type_mask0_MASK 0x000000FF 27202d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_type_mask0_WORD word4 27212d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rctl_match0_SHIFT 8 27222d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rctl_match0_MASK 0x000000FF 27232d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rctl_match0_WORD word4 27242d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rctl_mask0_SHIFT 0 27252d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rctl_mask0_MASK 0x000000FF 27262d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rctl_mask0_WORD word4 27272d7dbc4cSJames Smart uint32_t word5; 27282d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_type_match1_SHIFT 24 27292d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_type_match1_MASK 0x000000FF 27302d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_type_match1_WORD word5 27312d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_type_mask1_SHIFT 16 27322d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_type_mask1_MASK 0x000000FF 27332d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_type_mask1_WORD word5 27342d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rctl_match1_SHIFT 8 27352d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rctl_match1_MASK 0x000000FF 27362d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rctl_match1_WORD word5 27372d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rctl_mask1_SHIFT 0 27382d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rctl_mask1_MASK 0x000000FF 27392d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rctl_mask1_WORD word5 27402d7dbc4cSJames Smart uint32_t word6; 27412d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_type_match2_SHIFT 24 27422d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_type_match2_MASK 0x000000FF 27432d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_type_match2_WORD word6 27442d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_type_mask2_SHIFT 16 27452d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_type_mask2_MASK 0x000000FF 27462d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_type_mask2_WORD word6 27472d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rctl_match2_SHIFT 8 27482d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rctl_match2_MASK 0x000000FF 27492d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rctl_match2_WORD word6 27502d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rctl_mask2_SHIFT 0 27512d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rctl_mask2_MASK 0x000000FF 27522d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rctl_mask2_WORD word6 27532d7dbc4cSJames Smart uint32_t word7; 27542d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_type_match3_SHIFT 24 27552d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_type_match3_MASK 0x000000FF 27562d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_type_match3_WORD word7 27572d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_type_mask3_SHIFT 16 27582d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_type_mask3_MASK 0x000000FF 27592d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_type_mask3_WORD word7 27602d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rctl_match3_SHIFT 8 27612d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rctl_match3_MASK 0x000000FF 27622d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rctl_match3_WORD word7 27632d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rctl_mask3_SHIFT 0 27642d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rctl_mask3_MASK 0x000000FF 27652d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_rctl_mask3_WORD word7 27662d7dbc4cSJames Smart uint32_t word8; 27672d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_ptc7_SHIFT 31 27682d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_ptc7_MASK 0x00000001 27692d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_ptc7_WORD word8 27702d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_ptc6_SHIFT 30 27712d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_ptc6_MASK 0x00000001 27722d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_ptc6_WORD word8 27732d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_ptc5_SHIFT 29 27742d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_ptc5_MASK 0x00000001 27752d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_ptc5_WORD word8 27762d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_ptc4_SHIFT 28 27772d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_ptc4_MASK 0x00000001 27782d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_ptc4_WORD word8 27792d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_ptc3_SHIFT 27 27802d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_ptc3_MASK 0x00000001 27812d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_ptc3_WORD word8 27822d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_ptc2_SHIFT 26 27832d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_ptc2_MASK 0x00000001 27842d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_ptc2_WORD word8 27852d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_ptc1_SHIFT 25 27862d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_ptc1_MASK 0x00000001 27872d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_ptc1_WORD word8 27882d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_ptc0_SHIFT 24 27892d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_ptc0_MASK 0x00000001 27902d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_ptc0_WORD word8 27912d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_pt7_SHIFT 23 27922d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_pt7_MASK 0x00000001 27932d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_pt7_WORD word8 27942d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_pt6_SHIFT 22 27952d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_pt6_MASK 0x00000001 27962d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_pt6_WORD word8 27972d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_pt5_SHIFT 21 27982d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_pt5_MASK 0x00000001 27992d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_pt5_WORD word8 28002d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_pt4_SHIFT 20 28012d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_pt4_MASK 0x00000001 28022d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_pt4_WORD word8 28032d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_pt3_SHIFT 19 28042d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_pt3_MASK 0x00000001 28052d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_pt3_WORD word8 28062d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_pt2_SHIFT 18 28072d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_pt2_MASK 0x00000001 28082d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_pt2_WORD word8 28092d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_pt1_SHIFT 17 28102d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_pt1_MASK 0x00000001 28112d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_pt1_WORD word8 28122d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_pt0_SHIFT 16 28132d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_pt0_MASK 0x00000001 28142d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_pt0_WORD word8 28152d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_xmv_SHIFT 15 28162d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_xmv_MASK 0x00000001 28172d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_xmv_WORD word8 28182d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_mode_SHIFT 13 28192d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_mode_MASK 0x00000001 28202d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_mode_WORD word8 28212d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_vv_SHIFT 12 28222d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_vv_MASK 0x00000001 28232d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_vv_WORD word8 28242d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_vlan_tag_SHIFT 0 28252d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_vlan_tag_MASK 0x00000FFF 28262d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_vlan_tag_WORD word8 28272d7dbc4cSJames Smart uint32_t word9; 28282d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_policy_SHIFT 12 28292d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_policy_MASK 0x0000000F 28302d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_policy_WORD word9 28312d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_filter_SHIFT 8 28322d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_filter_MASK 0x0000000F 28332d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_filter_WORD word9 28342d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_npairs_SHIFT 0 28352d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_npairs_MASK 0x000000FF 28362d7dbc4cSJames Smart #define lpfc_reg_fcfi_mrq_npairs_WORD word9 28372d7dbc4cSJames Smart uint32_t word10; 28382d7dbc4cSJames Smart uint32_t word11; 28392d7dbc4cSJames Smart uint32_t word12; 28402d7dbc4cSJames Smart uint32_t word13; 28412d7dbc4cSJames Smart uint32_t word14; 28422d7dbc4cSJames Smart uint32_t word15; 28432d7dbc4cSJames Smart uint32_t word16; 28442d7dbc4cSJames Smart }; 28452d7dbc4cSJames Smart 2846da0436e9SJames Smart struct lpfc_mbx_unreg_fcfi { 2847da0436e9SJames Smart uint32_t word1_rsv; 2848da0436e9SJames Smart uint32_t word2; 2849da0436e9SJames Smart #define lpfc_unreg_fcfi_SHIFT 0 2850da0436e9SJames Smart #define lpfc_unreg_fcfi_MASK 0x0000FFFF 2851da0436e9SJames Smart #define lpfc_unreg_fcfi_WORD word2 2852da0436e9SJames Smart }; 2853da0436e9SJames Smart 2854da0436e9SJames Smart struct lpfc_mbx_read_rev { 2855da0436e9SJames Smart uint32_t word1; 2856da0436e9SJames Smart #define lpfc_mbx_rd_rev_sli_lvl_SHIFT 16 2857da0436e9SJames Smart #define lpfc_mbx_rd_rev_sli_lvl_MASK 0x0000000F 2858da0436e9SJames Smart #define lpfc_mbx_rd_rev_sli_lvl_WORD word1 2859da0436e9SJames Smart #define lpfc_mbx_rd_rev_fcoe_SHIFT 20 2860da0436e9SJames Smart #define lpfc_mbx_rd_rev_fcoe_MASK 0x00000001 2861da0436e9SJames Smart #define lpfc_mbx_rd_rev_fcoe_WORD word1 286245ed1190SJames Smart #define lpfc_mbx_rd_rev_cee_ver_SHIFT 21 286345ed1190SJames Smart #define lpfc_mbx_rd_rev_cee_ver_MASK 0x00000003 286445ed1190SJames Smart #define lpfc_mbx_rd_rev_cee_ver_WORD word1 286545ed1190SJames Smart #define LPFC_PREDCBX_CEE_MODE 0 286645ed1190SJames Smart #define LPFC_DCBX_CEE_MODE 1 2867da0436e9SJames Smart #define lpfc_mbx_rd_rev_vpd_SHIFT 29 2868da0436e9SJames Smart #define lpfc_mbx_rd_rev_vpd_MASK 0x00000001 2869da0436e9SJames Smart #define lpfc_mbx_rd_rev_vpd_WORD word1 2870da0436e9SJames Smart uint32_t first_hw_rev; 28714e565cf0SJames Smart #define LPFC_G7_ASIC_1 0xd 2872da0436e9SJames Smart uint32_t second_hw_rev; 2873da0436e9SJames Smart uint32_t word4_rsvd; 2874da0436e9SJames Smart uint32_t third_hw_rev; 2875da0436e9SJames Smart uint32_t word6; 2876da0436e9SJames Smart #define lpfc_mbx_rd_rev_fcph_low_SHIFT 0 2877da0436e9SJames Smart #define lpfc_mbx_rd_rev_fcph_low_MASK 0x000000FF 2878da0436e9SJames Smart #define lpfc_mbx_rd_rev_fcph_low_WORD word6 2879da0436e9SJames Smart #define lpfc_mbx_rd_rev_fcph_high_SHIFT 8 2880da0436e9SJames Smart #define lpfc_mbx_rd_rev_fcph_high_MASK 0x000000FF 2881da0436e9SJames Smart #define lpfc_mbx_rd_rev_fcph_high_WORD word6 2882da0436e9SJames Smart #define lpfc_mbx_rd_rev_ftr_lvl_low_SHIFT 16 2883da0436e9SJames Smart #define lpfc_mbx_rd_rev_ftr_lvl_low_MASK 0x000000FF 2884da0436e9SJames Smart #define lpfc_mbx_rd_rev_ftr_lvl_low_WORD word6 2885da0436e9SJames Smart #define lpfc_mbx_rd_rev_ftr_lvl_high_SHIFT 24 2886da0436e9SJames Smart #define lpfc_mbx_rd_rev_ftr_lvl_high_MASK 0x000000FF 2887da0436e9SJames Smart #define lpfc_mbx_rd_rev_ftr_lvl_high_WORD word6 2888da0436e9SJames Smart uint32_t word7_rsvd; 2889da0436e9SJames Smart uint32_t fw_id_rev; 2890da0436e9SJames Smart uint8_t fw_name[16]; 2891da0436e9SJames Smart uint32_t ulp_fw_id_rev; 2892da0436e9SJames Smart uint8_t ulp_fw_name[16]; 2893da0436e9SJames Smart uint32_t word18_47_rsvd[30]; 2894da0436e9SJames Smart uint32_t word48; 2895da0436e9SJames Smart #define lpfc_mbx_rd_rev_avail_len_SHIFT 0 2896da0436e9SJames Smart #define lpfc_mbx_rd_rev_avail_len_MASK 0x00FFFFFF 2897da0436e9SJames Smart #define lpfc_mbx_rd_rev_avail_len_WORD word48 2898da0436e9SJames Smart uint32_t vpd_paddr_low; 2899da0436e9SJames Smart uint32_t vpd_paddr_high; 2900da0436e9SJames Smart uint32_t avail_vpd_len; 2901da0436e9SJames Smart uint32_t rsvd_52_63[12]; 2902da0436e9SJames Smart }; 2903da0436e9SJames Smart 2904da0436e9SJames Smart struct lpfc_mbx_read_config { 2905da0436e9SJames Smart uint32_t word1; 29066d368e53SJames Smart #define lpfc_mbx_rd_conf_extnts_inuse_SHIFT 31 29076d368e53SJames Smart #define lpfc_mbx_rd_conf_extnts_inuse_MASK 0x00000001 29086d368e53SJames Smart #define lpfc_mbx_rd_conf_extnts_inuse_WORD word1 29091b6f71f7SJames Smart #define lpfc_mbx_rd_conf_fawwpn_SHIFT 30 29101b6f71f7SJames Smart #define lpfc_mbx_rd_conf_fawwpn_MASK 0x00000001 29111b6f71f7SJames Smart #define lpfc_mbx_rd_conf_fawwpn_WORD word1 29129064aeb2SJames Smart #define lpfc_mbx_rd_conf_wcs_SHIFT 28 /* warning signaling */ 29139064aeb2SJames Smart #define lpfc_mbx_rd_conf_wcs_MASK 0x00000001 29149064aeb2SJames Smart #define lpfc_mbx_rd_conf_wcs_WORD word1 29159064aeb2SJames Smart #define lpfc_mbx_rd_conf_acs_SHIFT 27 /* alarm signaling */ 29169064aeb2SJames Smart #define lpfc_mbx_rd_conf_acs_MASK 0x00000001 29179064aeb2SJames Smart #define lpfc_mbx_rd_conf_acs_WORD word1 2918da0436e9SJames Smart uint32_t word2; 2919cd1c8301SJames Smart #define lpfc_mbx_rd_conf_lnk_numb_SHIFT 0 2920cd1c8301SJames Smart #define lpfc_mbx_rd_conf_lnk_numb_MASK 0x0000003F 2921cd1c8301SJames Smart #define lpfc_mbx_rd_conf_lnk_numb_WORD word2 2922cd1c8301SJames Smart #define lpfc_mbx_rd_conf_lnk_type_SHIFT 6 2923cd1c8301SJames Smart #define lpfc_mbx_rd_conf_lnk_type_MASK 0x00000003 2924cd1c8301SJames Smart #define lpfc_mbx_rd_conf_lnk_type_WORD word2 2925026abb87SJames Smart #define LPFC_LNK_TYPE_GE 0 2926026abb87SJames Smart #define LPFC_LNK_TYPE_FC 1 2927cd1c8301SJames Smart #define lpfc_mbx_rd_conf_lnk_ldv_SHIFT 8 2928cd1c8301SJames Smart #define lpfc_mbx_rd_conf_lnk_ldv_MASK 0x00000001 2929cd1c8301SJames Smart #define lpfc_mbx_rd_conf_lnk_ldv_WORD word2 29301dc5ec24SJames Smart #define lpfc_mbx_rd_conf_trunk_SHIFT 12 29311dc5ec24SJames Smart #define lpfc_mbx_rd_conf_trunk_MASK 0x0000000F 29321dc5ec24SJames Smart #define lpfc_mbx_rd_conf_trunk_WORD word2 293383c6cb1aSJames Smart #define lpfc_mbx_rd_conf_pt_SHIFT 20 293483c6cb1aSJames Smart #define lpfc_mbx_rd_conf_pt_MASK 0x00000003 293583c6cb1aSJames Smart #define lpfc_mbx_rd_conf_pt_WORD word2 293683c6cb1aSJames Smart #define lpfc_mbx_rd_conf_tf_SHIFT 22 293783c6cb1aSJames Smart #define lpfc_mbx_rd_conf_tf_MASK 0x00000001 293883c6cb1aSJames Smart #define lpfc_mbx_rd_conf_tf_WORD word2 293983c6cb1aSJames Smart #define lpfc_mbx_rd_conf_ptv_SHIFT 23 294083c6cb1aSJames Smart #define lpfc_mbx_rd_conf_ptv_MASK 0x00000001 294183c6cb1aSJames Smart #define lpfc_mbx_rd_conf_ptv_WORD word2 2942da0436e9SJames Smart #define lpfc_mbx_rd_conf_topology_SHIFT 24 2943da0436e9SJames Smart #define lpfc_mbx_rd_conf_topology_MASK 0x000000FF 2944da0436e9SJames Smart #define lpfc_mbx_rd_conf_topology_WORD word2 29456d368e53SJames Smart uint32_t rsvd_3; 2946da0436e9SJames Smart uint32_t word4; 2947da0436e9SJames Smart #define lpfc_mbx_rd_conf_e_d_tov_SHIFT 0 2948da0436e9SJames Smart #define lpfc_mbx_rd_conf_e_d_tov_MASK 0x0000FFFF 2949da0436e9SJames Smart #define lpfc_mbx_rd_conf_e_d_tov_WORD word4 29506d368e53SJames Smart uint32_t rsvd_5; 2951da0436e9SJames Smart uint32_t word6; 2952da0436e9SJames Smart #define lpfc_mbx_rd_conf_r_a_tov_SHIFT 0 2953da0436e9SJames Smart #define lpfc_mbx_rd_conf_r_a_tov_MASK 0x0000FFFF 2954da0436e9SJames Smart #define lpfc_mbx_rd_conf_r_a_tov_WORD word6 2955c691816eSJames Smart #define lpfc_mbx_rd_conf_link_speed_SHIFT 16 2956c691816eSJames Smart #define lpfc_mbx_rd_conf_link_speed_MASK 0x0000FFFF 2957c691816eSJames Smart #define lpfc_mbx_rd_conf_link_speed_WORD word6 29586d368e53SJames Smart uint32_t rsvd_7; 295944fd7fe3SJames Smart uint32_t word8; 296044fd7fe3SJames Smart #define lpfc_mbx_rd_conf_bbscn_min_SHIFT 0 296144fd7fe3SJames Smart #define lpfc_mbx_rd_conf_bbscn_min_MASK 0x0000000F 296244fd7fe3SJames Smart #define lpfc_mbx_rd_conf_bbscn_min_WORD word8 296344fd7fe3SJames Smart #define lpfc_mbx_rd_conf_bbscn_max_SHIFT 4 296444fd7fe3SJames Smart #define lpfc_mbx_rd_conf_bbscn_max_MASK 0x0000000F 296544fd7fe3SJames Smart #define lpfc_mbx_rd_conf_bbscn_max_WORD word8 296644fd7fe3SJames Smart #define lpfc_mbx_rd_conf_bbscn_def_SHIFT 8 296744fd7fe3SJames Smart #define lpfc_mbx_rd_conf_bbscn_def_MASK 0x0000000F 296844fd7fe3SJames Smart #define lpfc_mbx_rd_conf_bbscn_def_WORD word8 2969da0436e9SJames Smart uint32_t word9; 2970da0436e9SJames Smart #define lpfc_mbx_rd_conf_lmt_SHIFT 0 2971da0436e9SJames Smart #define lpfc_mbx_rd_conf_lmt_MASK 0x0000FFFF 2972da0436e9SJames Smart #define lpfc_mbx_rd_conf_lmt_WORD word9 29736d368e53SJames Smart uint32_t rsvd_10; 29746d368e53SJames Smart uint32_t rsvd_11; 2975da0436e9SJames Smart uint32_t word12; 2976da0436e9SJames Smart #define lpfc_mbx_rd_conf_xri_base_SHIFT 0 2977da0436e9SJames Smart #define lpfc_mbx_rd_conf_xri_base_MASK 0x0000FFFF 2978da0436e9SJames Smart #define lpfc_mbx_rd_conf_xri_base_WORD word12 2979da0436e9SJames Smart #define lpfc_mbx_rd_conf_xri_count_SHIFT 16 2980da0436e9SJames Smart #define lpfc_mbx_rd_conf_xri_count_MASK 0x0000FFFF 2981da0436e9SJames Smart #define lpfc_mbx_rd_conf_xri_count_WORD word12 2982da0436e9SJames Smart uint32_t word13; 2983da0436e9SJames Smart #define lpfc_mbx_rd_conf_rpi_base_SHIFT 0 2984da0436e9SJames Smart #define lpfc_mbx_rd_conf_rpi_base_MASK 0x0000FFFF 2985da0436e9SJames Smart #define lpfc_mbx_rd_conf_rpi_base_WORD word13 2986da0436e9SJames Smart #define lpfc_mbx_rd_conf_rpi_count_SHIFT 16 2987da0436e9SJames Smart #define lpfc_mbx_rd_conf_rpi_count_MASK 0x0000FFFF 2988da0436e9SJames Smart #define lpfc_mbx_rd_conf_rpi_count_WORD word13 2989da0436e9SJames Smart uint32_t word14; 2990da0436e9SJames Smart #define lpfc_mbx_rd_conf_vpi_base_SHIFT 0 2991da0436e9SJames Smart #define lpfc_mbx_rd_conf_vpi_base_MASK 0x0000FFFF 2992da0436e9SJames Smart #define lpfc_mbx_rd_conf_vpi_base_WORD word14 2993da0436e9SJames Smart #define lpfc_mbx_rd_conf_vpi_count_SHIFT 16 2994da0436e9SJames Smart #define lpfc_mbx_rd_conf_vpi_count_MASK 0x0000FFFF 2995da0436e9SJames Smart #define lpfc_mbx_rd_conf_vpi_count_WORD word14 2996da0436e9SJames Smart uint32_t word15; 2997da0436e9SJames Smart #define lpfc_mbx_rd_conf_vfi_base_SHIFT 0 2998da0436e9SJames Smart #define lpfc_mbx_rd_conf_vfi_base_MASK 0x0000FFFF 2999da0436e9SJames Smart #define lpfc_mbx_rd_conf_vfi_base_WORD word15 3000da0436e9SJames Smart #define lpfc_mbx_rd_conf_vfi_count_SHIFT 16 3001da0436e9SJames Smart #define lpfc_mbx_rd_conf_vfi_count_MASK 0x0000FFFF 3002da0436e9SJames Smart #define lpfc_mbx_rd_conf_vfi_count_WORD word15 3003da0436e9SJames Smart uint32_t word16; 3004da0436e9SJames Smart #define lpfc_mbx_rd_conf_fcfi_count_SHIFT 16 3005da0436e9SJames Smart #define lpfc_mbx_rd_conf_fcfi_count_MASK 0x0000FFFF 3006da0436e9SJames Smart #define lpfc_mbx_rd_conf_fcfi_count_WORD word16 3007da0436e9SJames Smart uint32_t word17; 3008da0436e9SJames Smart #define lpfc_mbx_rd_conf_rq_count_SHIFT 0 3009da0436e9SJames Smart #define lpfc_mbx_rd_conf_rq_count_MASK 0x0000FFFF 3010da0436e9SJames Smart #define lpfc_mbx_rd_conf_rq_count_WORD word17 3011da0436e9SJames Smart #define lpfc_mbx_rd_conf_eq_count_SHIFT 16 3012da0436e9SJames Smart #define lpfc_mbx_rd_conf_eq_count_MASK 0x0000FFFF 3013da0436e9SJames Smart #define lpfc_mbx_rd_conf_eq_count_WORD word17 3014da0436e9SJames Smart uint32_t word18; 3015da0436e9SJames Smart #define lpfc_mbx_rd_conf_wq_count_SHIFT 0 3016da0436e9SJames Smart #define lpfc_mbx_rd_conf_wq_count_MASK 0x0000FFFF 3017da0436e9SJames Smart #define lpfc_mbx_rd_conf_wq_count_WORD word18 3018da0436e9SJames Smart #define lpfc_mbx_rd_conf_cq_count_SHIFT 16 3019da0436e9SJames Smart #define lpfc_mbx_rd_conf_cq_count_MASK 0x0000FFFF 3020da0436e9SJames Smart #define lpfc_mbx_rd_conf_cq_count_WORD word18 3021da0436e9SJames Smart }; 3022da0436e9SJames Smart 3023da0436e9SJames Smart struct lpfc_mbx_request_features { 3024da0436e9SJames Smart uint32_t word1; 3025da0436e9SJames Smart #define lpfc_mbx_rq_ftr_qry_SHIFT 0 3026da0436e9SJames Smart #define lpfc_mbx_rq_ftr_qry_MASK 0x00000001 3027da0436e9SJames Smart #define lpfc_mbx_rq_ftr_qry_WORD word1 3028da0436e9SJames Smart uint32_t word2; 3029da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rq_iaab_SHIFT 0 3030da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rq_iaab_MASK 0x00000001 3031da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rq_iaab_WORD word2 3032da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rq_npiv_SHIFT 1 3033da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rq_npiv_MASK 0x00000001 3034da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rq_npiv_WORD word2 3035da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rq_dif_SHIFT 2 3036da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rq_dif_MASK 0x00000001 3037da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rq_dif_WORD word2 3038da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rq_vf_SHIFT 3 3039da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rq_vf_MASK 0x00000001 3040da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rq_vf_WORD word2 3041da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rq_fcpi_SHIFT 4 3042da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rq_fcpi_MASK 0x00000001 3043da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rq_fcpi_WORD word2 3044da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rq_fcpt_SHIFT 5 3045da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rq_fcpt_MASK 0x00000001 3046da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rq_fcpt_WORD word2 3047da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rq_fcpc_SHIFT 6 3048da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rq_fcpc_MASK 0x00000001 3049da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rq_fcpc_WORD word2 3050da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rq_ifip_SHIFT 7 3051da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rq_ifip_MASK 0x00000001 3052da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rq_ifip_WORD word2 305386c67379SJames Smart #define lpfc_mbx_rq_ftr_rq_iaar_SHIFT 9 305486c67379SJames Smart #define lpfc_mbx_rq_ftr_rq_iaar_MASK 0x00000001 305586c67379SJames Smart #define lpfc_mbx_rq_ftr_rq_iaar_WORD word2 3056fedd3b7bSJames Smart #define lpfc_mbx_rq_ftr_rq_perfh_SHIFT 11 3057fedd3b7bSJames Smart #define lpfc_mbx_rq_ftr_rq_perfh_MASK 0x00000001 3058fedd3b7bSJames Smart #define lpfc_mbx_rq_ftr_rq_perfh_WORD word2 30592d7dbc4cSJames Smart #define lpfc_mbx_rq_ftr_rq_mrqp_SHIFT 16 30602d7dbc4cSJames Smart #define lpfc_mbx_rq_ftr_rq_mrqp_MASK 0x00000001 30612d7dbc4cSJames Smart #define lpfc_mbx_rq_ftr_rq_mrqp_WORD word2 30625e633302SGaurav Srivastava #define lpfc_mbx_rq_ftr_rq_ashdr_SHIFT 17 30635e633302SGaurav Srivastava #define lpfc_mbx_rq_ftr_rq_ashdr_MASK 0x00000001 30645e633302SGaurav Srivastava #define lpfc_mbx_rq_ftr_rq_ashdr_WORD word2 3065da0436e9SJames Smart uint32_t word3; 3066da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rsp_iaab_SHIFT 0 3067da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rsp_iaab_MASK 0x00000001 3068da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rsp_iaab_WORD word3 3069da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rsp_npiv_SHIFT 1 3070da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rsp_npiv_MASK 0x00000001 3071da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rsp_npiv_WORD word3 3072da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rsp_dif_SHIFT 2 3073da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rsp_dif_MASK 0x00000001 3074da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rsp_dif_WORD word3 3075da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rsp_vf_SHIFT 3 3076da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rsp_vf__MASK 0x00000001 3077da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rsp_vf_WORD word3 3078da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rsp_fcpi_SHIFT 4 3079da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rsp_fcpi_MASK 0x00000001 3080da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rsp_fcpi_WORD word3 3081da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rsp_fcpt_SHIFT 5 3082da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rsp_fcpt_MASK 0x00000001 3083da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rsp_fcpt_WORD word3 3084da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rsp_fcpc_SHIFT 6 3085da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rsp_fcpc_MASK 0x00000001 3086da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rsp_fcpc_WORD word3 3087da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rsp_ifip_SHIFT 7 3088da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rsp_ifip_MASK 0x00000001 3089da0436e9SJames Smart #define lpfc_mbx_rq_ftr_rsp_ifip_WORD word3 3090fedd3b7bSJames Smart #define lpfc_mbx_rq_ftr_rsp_perfh_SHIFT 11 3091fedd3b7bSJames Smart #define lpfc_mbx_rq_ftr_rsp_perfh_MASK 0x00000001 3092fedd3b7bSJames Smart #define lpfc_mbx_rq_ftr_rsp_perfh_WORD word3 30932d7dbc4cSJames Smart #define lpfc_mbx_rq_ftr_rsp_mrqp_SHIFT 16 30942d7dbc4cSJames Smart #define lpfc_mbx_rq_ftr_rsp_mrqp_MASK 0x00000001 30952d7dbc4cSJames Smart #define lpfc_mbx_rq_ftr_rsp_mrqp_WORD word3 30965e633302SGaurav Srivastava #define lpfc_mbx_rq_ftr_rsp_ashdr_SHIFT 17 30975e633302SGaurav Srivastava #define lpfc_mbx_rq_ftr_rsp_ashdr_MASK 0x00000001 30985e633302SGaurav Srivastava #define lpfc_mbx_rq_ftr_rsp_ashdr_WORD word3 3099da0436e9SJames Smart }; 3100da0436e9SJames Smart 310186478875SJames Smart struct lpfc_mbx_memory_dump_type3 { 310286478875SJames Smart uint32_t word1; 310386478875SJames Smart #define lpfc_mbx_memory_dump_type3_type_SHIFT 0 310486478875SJames Smart #define lpfc_mbx_memory_dump_type3_type_MASK 0x0000000f 310586478875SJames Smart #define lpfc_mbx_memory_dump_type3_type_WORD word1 310686478875SJames Smart #define lpfc_mbx_memory_dump_type3_link_SHIFT 24 310786478875SJames Smart #define lpfc_mbx_memory_dump_type3_link_MASK 0x000000ff 310886478875SJames Smart #define lpfc_mbx_memory_dump_type3_link_WORD word1 310986478875SJames Smart uint32_t word2; 311086478875SJames Smart #define lpfc_mbx_memory_dump_type3_page_no_SHIFT 0 311186478875SJames Smart #define lpfc_mbx_memory_dump_type3_page_no_MASK 0x0000ffff 311286478875SJames Smart #define lpfc_mbx_memory_dump_type3_page_no_WORD word2 311386478875SJames Smart #define lpfc_mbx_memory_dump_type3_offset_SHIFT 16 311486478875SJames Smart #define lpfc_mbx_memory_dump_type3_offset_MASK 0x0000ffff 311586478875SJames Smart #define lpfc_mbx_memory_dump_type3_offset_WORD word2 311686478875SJames Smart uint32_t word3; 311786478875SJames Smart #define lpfc_mbx_memory_dump_type3_length_SHIFT 0 311886478875SJames Smart #define lpfc_mbx_memory_dump_type3_length_MASK 0x00ffffff 311986478875SJames Smart #define lpfc_mbx_memory_dump_type3_length_WORD word3 312086478875SJames Smart uint32_t addr_lo; 312186478875SJames Smart uint32_t addr_hi; 312286478875SJames Smart uint32_t return_len; 312386478875SJames Smart }; 312486478875SJames Smart 312586478875SJames Smart #define DMP_PAGE_A0 0xa0 312686478875SJames Smart #define DMP_PAGE_A2 0xa2 312786478875SJames Smart #define DMP_SFF_PAGE_A0_SIZE 256 312886478875SJames Smart #define DMP_SFF_PAGE_A2_SIZE 256 312986478875SJames Smart 313086478875SJames Smart #define SFP_WAVELENGTH_LC1310 1310 313186478875SJames Smart #define SFP_WAVELENGTH_LL1550 1550 313286478875SJames Smart 313386478875SJames Smart 313486478875SJames Smart /* 313586478875SJames Smart * * SFF-8472 TABLE 3.4 313686478875SJames Smart * */ 313786478875SJames Smart #define SFF_PG0_CONNECTOR_UNKNOWN 0x00 /* Unknown */ 313886478875SJames Smart #define SFF_PG0_CONNECTOR_SC 0x01 /* SC */ 313986478875SJames Smart #define SFF_PG0_CONNECTOR_FC_COPPER1 0x02 /* FC style 1 copper connector */ 314086478875SJames Smart #define SFF_PG0_CONNECTOR_FC_COPPER2 0x03 /* FC style 2 copper connector */ 314186478875SJames Smart #define SFF_PG0_CONNECTOR_BNC 0x04 /* BNC / TNC */ 314286478875SJames Smart #define SFF_PG0_CONNECTOR__FC_COAX 0x05 /* FC coaxial headers */ 314386478875SJames Smart #define SFF_PG0_CONNECTOR_FIBERJACK 0x06 /* FiberJack */ 314486478875SJames Smart #define SFF_PG0_CONNECTOR_LC 0x07 /* LC */ 314586478875SJames Smart #define SFF_PG0_CONNECTOR_MT 0x08 /* MT - RJ */ 314686478875SJames Smart #define SFF_PG0_CONNECTOR_MU 0x09 /* MU */ 314786478875SJames Smart #define SFF_PG0_CONNECTOR_SF 0x0A /* SG */ 314886478875SJames Smart #define SFF_PG0_CONNECTOR_OPTICAL_PIGTAIL 0x0B /* Optical pigtail */ 314986478875SJames Smart #define SFF_PG0_CONNECTOR_OPTICAL_PARALLEL 0x0C /* MPO Parallel Optic */ 315086478875SJames Smart #define SFF_PG0_CONNECTOR_HSSDC_II 0x20 /* HSSDC II */ 315186478875SJames Smart #define SFF_PG0_CONNECTOR_COPPER_PIGTAIL 0x21 /* Copper pigtail */ 315286478875SJames Smart #define SFF_PG0_CONNECTOR_RJ45 0x22 /* RJ45 */ 315386478875SJames Smart 315486478875SJames Smart /* SFF-8472 Table 3.1 Diagnostics: Data Fields Address/Page A0 */ 315586478875SJames Smart 315686478875SJames Smart #define SSF_IDENTIFIER 0 315786478875SJames Smart #define SSF_EXT_IDENTIFIER 1 315886478875SJames Smart #define SSF_CONNECTOR 2 315986478875SJames Smart #define SSF_TRANSCEIVER_CODE_B0 3 316086478875SJames Smart #define SSF_TRANSCEIVER_CODE_B1 4 316186478875SJames Smart #define SSF_TRANSCEIVER_CODE_B2 5 316286478875SJames Smart #define SSF_TRANSCEIVER_CODE_B3 6 316386478875SJames Smart #define SSF_TRANSCEIVER_CODE_B4 7 316486478875SJames Smart #define SSF_TRANSCEIVER_CODE_B5 8 316586478875SJames Smart #define SSF_TRANSCEIVER_CODE_B6 9 316686478875SJames Smart #define SSF_TRANSCEIVER_CODE_B7 10 316786478875SJames Smart #define SSF_ENCODING 11 316886478875SJames Smart #define SSF_BR_NOMINAL 12 316986478875SJames Smart #define SSF_RATE_IDENTIFIER 13 317086478875SJames Smart #define SSF_LENGTH_9UM_KM 14 317186478875SJames Smart #define SSF_LENGTH_9UM 15 317286478875SJames Smart #define SSF_LENGTH_50UM_OM2 16 317386478875SJames Smart #define SSF_LENGTH_62UM_OM1 17 317486478875SJames Smart #define SFF_LENGTH_COPPER 18 317586478875SJames Smart #define SSF_LENGTH_50UM_OM3 19 317686478875SJames Smart #define SSF_VENDOR_NAME 20 3177479b0917SJustin Tee #define SSF_TRANSCEIVER2 36 3178479b0917SJustin Tee #define SSF_VENDOR_OUI 37 317986478875SJames Smart #define SSF_VENDOR_PN 40 318086478875SJames Smart #define SSF_VENDOR_REV 56 318186478875SJames Smart #define SSF_WAVELENGTH_B1 60 318286478875SJames Smart #define SSF_WAVELENGTH_B0 61 318386478875SJames Smart #define SSF_CC_BASE 63 318486478875SJames Smart #define SSF_OPTIONS_B1 64 318586478875SJames Smart #define SSF_OPTIONS_B0 65 318686478875SJames Smart #define SSF_BR_MAX 66 318786478875SJames Smart #define SSF_BR_MIN 67 318886478875SJames Smart #define SSF_VENDOR_SN 68 318986478875SJames Smart #define SSF_DATE_CODE 84 319086478875SJames Smart #define SSF_MONITORING_TYPEDIAGNOSTIC 92 319186478875SJames Smart #define SSF_ENHANCED_OPTIONS 93 319286478875SJames Smart #define SFF_8472_COMPLIANCE 94 319386478875SJames Smart #define SSF_CC_EXT 95 319486478875SJames Smart #define SSF_A0_VENDOR_SPECIFIC 96 319586478875SJames Smart 319686478875SJames Smart /* SFF-8472 Table 3.1a Diagnostics: Data Fields Address/Page A2 */ 319786478875SJames Smart 319856204984SJames Smart #define SSF_TEMP_HIGH_ALARM 0 319956204984SJames Smart #define SSF_TEMP_LOW_ALARM 2 320056204984SJames Smart #define SSF_TEMP_HIGH_WARNING 4 320156204984SJames Smart #define SSF_TEMP_LOW_WARNING 6 320256204984SJames Smart #define SSF_VOLTAGE_HIGH_ALARM 8 320356204984SJames Smart #define SSF_VOLTAGE_LOW_ALARM 10 320456204984SJames Smart #define SSF_VOLTAGE_HIGH_WARNING 12 320556204984SJames Smart #define SSF_VOLTAGE_LOW_WARNING 14 320656204984SJames Smart #define SSF_BIAS_HIGH_ALARM 16 320756204984SJames Smart #define SSF_BIAS_LOW_ALARM 18 320856204984SJames Smart #define SSF_BIAS_HIGH_WARNING 20 320956204984SJames Smart #define SSF_BIAS_LOW_WARNING 22 321056204984SJames Smart #define SSF_TXPOWER_HIGH_ALARM 24 321156204984SJames Smart #define SSF_TXPOWER_LOW_ALARM 26 321256204984SJames Smart #define SSF_TXPOWER_HIGH_WARNING 28 321356204984SJames Smart #define SSF_TXPOWER_LOW_WARNING 30 321456204984SJames Smart #define SSF_RXPOWER_HIGH_ALARM 32 321556204984SJames Smart #define SSF_RXPOWER_LOW_ALARM 34 321656204984SJames Smart #define SSF_RXPOWER_HIGH_WARNING 36 321756204984SJames Smart #define SSF_RXPOWER_LOW_WARNING 38 321886478875SJames Smart #define SSF_EXT_CAL_CONSTANTS 56 321986478875SJames Smart #define SSF_CC_DMI 95 322086478875SJames Smart #define SFF_TEMPERATURE_B1 96 322186478875SJames Smart #define SFF_TEMPERATURE_B0 97 322286478875SJames Smart #define SFF_VCC_B1 98 322386478875SJames Smart #define SFF_VCC_B0 99 322486478875SJames Smart #define SFF_TX_BIAS_CURRENT_B1 100 322586478875SJames Smart #define SFF_TX_BIAS_CURRENT_B0 101 322686478875SJames Smart #define SFF_TXPOWER_B1 102 322786478875SJames Smart #define SFF_TXPOWER_B0 103 322886478875SJames Smart #define SFF_RXPOWER_B1 104 322986478875SJames Smart #define SFF_RXPOWER_B0 105 323086478875SJames Smart #define SSF_STATUS_CONTROL 110 3231310429efSJames Smart #define SSF_ALARM_FLAGS 112 3232310429efSJames Smart #define SSF_WARNING_FLAGS 116 323386478875SJames Smart #define SSF_EXT_TATUS_CONTROL_B1 118 323486478875SJames Smart #define SSF_EXT_TATUS_CONTROL_B0 119 323586478875SJames Smart #define SSF_A2_VENDOR_SPECIFIC 120 323686478875SJames Smart #define SSF_USER_EEPROM 128 323786478875SJames Smart #define SSF_VENDOR_CONTROL 148 323886478875SJames Smart 323986478875SJames Smart 324086478875SJames Smart /* 324186478875SJames Smart * Tranceiver codes Fibre Channel SFF-8472 324286478875SJames Smart * Table 3.5. 324386478875SJames Smart */ 324486478875SJames Smart 324586478875SJames Smart struct sff_trasnceiver_codes_byte0 { 324686478875SJames Smart uint8_t inifiband:4; 324786478875SJames Smart uint8_t teng_ethernet:4; 324886478875SJames Smart }; 324986478875SJames Smart 325086478875SJames Smart struct sff_trasnceiver_codes_byte1 { 325186478875SJames Smart uint8_t sonet:6; 325286478875SJames Smart uint8_t escon:2; 325386478875SJames Smart }; 325486478875SJames Smart 325586478875SJames Smart struct sff_trasnceiver_codes_byte2 { 325686478875SJames Smart uint8_t soNet:8; 325786478875SJames Smart }; 325886478875SJames Smart 325986478875SJames Smart struct sff_trasnceiver_codes_byte3 { 326086478875SJames Smart uint8_t ethernet:8; 326186478875SJames Smart }; 326286478875SJames Smart 326386478875SJames Smart struct sff_trasnceiver_codes_byte4 { 326486478875SJames Smart uint8_t fc_el_lo:1; 326586478875SJames Smart uint8_t fc_lw_laser:1; 326686478875SJames Smart uint8_t fc_sw_laser:1; 326786478875SJames Smart uint8_t fc_md_distance:1; 326886478875SJames Smart uint8_t fc_lg_distance:1; 326986478875SJames Smart uint8_t fc_int_distance:1; 327086478875SJames Smart uint8_t fc_short_distance:1; 327186478875SJames Smart uint8_t fc_vld_distance:1; 327286478875SJames Smart }; 327386478875SJames Smart 327486478875SJames Smart struct sff_trasnceiver_codes_byte5 { 327586478875SJames Smart uint8_t reserved1:1; 327686478875SJames Smart uint8_t reserved2:1; 327786478875SJames Smart uint8_t fc_sfp_active:1; /* Active cable */ 327886478875SJames Smart uint8_t fc_sfp_passive:1; /* Passive cable */ 327986478875SJames Smart uint8_t fc_lw_laser:1; /* Longwave laser */ 328086478875SJames Smart uint8_t fc_sw_laser_sl:1; 328186478875SJames Smart uint8_t fc_sw_laser_sn:1; 328286478875SJames Smart uint8_t fc_el_hi:1; /* Electrical enclosure high bit */ 328386478875SJames Smart }; 328486478875SJames Smart 328586478875SJames Smart struct sff_trasnceiver_codes_byte6 { 328686478875SJames Smart uint8_t fc_tm_sm:1; /* Single Mode */ 328786478875SJames Smart uint8_t reserved:1; 328886478875SJames Smart uint8_t fc_tm_m6:1; /* Multimode, 62.5um (M6) */ 328986478875SJames Smart uint8_t fc_tm_tv:1; /* Video Coax (TV) */ 329086478875SJames Smart uint8_t fc_tm_mi:1; /* Miniature Coax (MI) */ 329186478875SJames Smart uint8_t fc_tm_tp:1; /* Twisted Pair (TP) */ 329286478875SJames Smart uint8_t fc_tm_tw:1; /* Twin Axial Pair */ 329386478875SJames Smart }; 329486478875SJames Smart 329586478875SJames Smart struct sff_trasnceiver_codes_byte7 { 329686478875SJames Smart uint8_t fc_sp_100MB:1; /* 100 MB/sec */ 3297479b0917SJustin Tee uint8_t speed_chk_ecc:1; 329886478875SJames Smart uint8_t fc_sp_200mb:1; /* 200 MB/sec */ 329986478875SJames Smart uint8_t fc_sp_3200MB:1; /* 3200 MB/sec */ 330086478875SJames Smart uint8_t fc_sp_400MB:1; /* 400 MB/sec */ 330186478875SJames Smart uint8_t fc_sp_1600MB:1; /* 1600 MB/sec */ 330286478875SJames Smart uint8_t fc_sp_800MB:1; /* 800 MB/sec */ 330386478875SJames Smart uint8_t fc_sp_1200MB:1; /* 1200 MB/sec */ 330486478875SJames Smart }; 330586478875SJames Smart 330686478875SJames Smart /* User writable non-volatile memory, SFF-8472 Table 3.20 */ 330786478875SJames Smart struct user_eeprom { 330886478875SJames Smart uint8_t vendor_name[16]; 330986478875SJames Smart uint8_t vendor_oui[3]; 331086478875SJames Smart uint8_t vendor_pn[816]; 331186478875SJames Smart uint8_t vendor_rev[4]; 331286478875SJames Smart uint8_t vendor_sn[16]; 331386478875SJames Smart uint8_t datecode[6]; 331486478875SJames Smart uint8_t lot_code[2]; 331586478875SJames Smart uint8_t reserved191[57]; 331686478875SJames Smart }; 331786478875SJames Smart 33189589b062SJames Smart #define SLI4_PAGE_ALIGN(addr) (((addr)+((SLI4_PAGE_SIZE)-1)) \ 33199589b062SJames Smart &(~((SLI4_PAGE_SIZE)-1))) 332028baac74SJames Smart 3321fedd3b7bSJames Smart struct lpfc_sli4_parameters { 3322fedd3b7bSJames Smart uint32_t word0; 3323fedd3b7bSJames Smart #define cfg_prot_type_SHIFT 0 3324fedd3b7bSJames Smart #define cfg_prot_type_MASK 0x000000FF 3325fedd3b7bSJames Smart #define cfg_prot_type_WORD word0 3326fedd3b7bSJames Smart uint32_t word1; 3327fedd3b7bSJames Smart #define cfg_ft_SHIFT 0 3328fedd3b7bSJames Smart #define cfg_ft_MASK 0x00000001 3329fedd3b7bSJames Smart #define cfg_ft_WORD word1 3330fedd3b7bSJames Smart #define cfg_sli_rev_SHIFT 4 3331fedd3b7bSJames Smart #define cfg_sli_rev_MASK 0x0000000f 3332fedd3b7bSJames Smart #define cfg_sli_rev_WORD word1 3333fedd3b7bSJames Smart #define cfg_sli_family_SHIFT 8 3334fedd3b7bSJames Smart #define cfg_sli_family_MASK 0x0000000f 3335fedd3b7bSJames Smart #define cfg_sli_family_WORD word1 3336fedd3b7bSJames Smart #define cfg_if_type_SHIFT 12 3337fedd3b7bSJames Smart #define cfg_if_type_MASK 0x0000000f 3338fedd3b7bSJames Smart #define cfg_if_type_WORD word1 3339fedd3b7bSJames Smart #define cfg_sli_hint_1_SHIFT 16 3340fedd3b7bSJames Smart #define cfg_sli_hint_1_MASK 0x000000ff 3341fedd3b7bSJames Smart #define cfg_sli_hint_1_WORD word1 3342fedd3b7bSJames Smart #define cfg_sli_hint_2_SHIFT 24 3343fedd3b7bSJames Smart #define cfg_sli_hint_2_MASK 0x0000001f 3344fedd3b7bSJames Smart #define cfg_sli_hint_2_WORD word1 3345fedd3b7bSJames Smart uint32_t word2; 33467365f6fdSJames Smart #define cfg_eqav_SHIFT 31 33477365f6fdSJames Smart #define cfg_eqav_MASK 0x00000001 33487365f6fdSJames Smart #define cfg_eqav_WORD word2 3349fedd3b7bSJames Smart uint32_t word3; 3350fedd3b7bSJames Smart uint32_t word4; 3351fedd3b7bSJames Smart #define cfg_cqv_SHIFT 14 3352fedd3b7bSJames Smart #define cfg_cqv_MASK 0x00000003 3353fedd3b7bSJames Smart #define cfg_cqv_WORD word4 3354c176ffa0SJames Smart #define cfg_cqpsize_SHIFT 16 3355c176ffa0SJames Smart #define cfg_cqpsize_MASK 0x000000ff 3356c176ffa0SJames Smart #define cfg_cqpsize_WORD word4 33577365f6fdSJames Smart #define cfg_cqav_SHIFT 31 33587365f6fdSJames Smart #define cfg_cqav_MASK 0x00000001 33597365f6fdSJames Smart #define cfg_cqav_WORD word4 3360fedd3b7bSJames Smart uint32_t word5; 3361fedd3b7bSJames Smart uint32_t word6; 3362fedd3b7bSJames Smart #define cfg_mqv_SHIFT 14 3363fedd3b7bSJames Smart #define cfg_mqv_MASK 0x00000003 3364fedd3b7bSJames Smart #define cfg_mqv_WORD word6 3365fedd3b7bSJames Smart uint32_t word7; 3366fedd3b7bSJames Smart uint32_t word8; 3367895427bdSJames Smart #define cfg_wqpcnt_SHIFT 0 3368895427bdSJames Smart #define cfg_wqpcnt_MASK 0x0000000f 3369895427bdSJames Smart #define cfg_wqpcnt_WORD word8 33700c651878SJames Smart #define cfg_wqsize_SHIFT 8 33710c651878SJames Smart #define cfg_wqsize_MASK 0x0000000f 33720c651878SJames Smart #define cfg_wqsize_WORD word8 3373fedd3b7bSJames Smart #define cfg_wqv_SHIFT 14 3374fedd3b7bSJames Smart #define cfg_wqv_MASK 0x00000003 3375fedd3b7bSJames Smart #define cfg_wqv_WORD word8 3376895427bdSJames Smart #define cfg_wqpsize_SHIFT 16 3377895427bdSJames Smart #define cfg_wqpsize_MASK 0x000000ff 3378895427bdSJames Smart #define cfg_wqpsize_WORD word8 3379fedd3b7bSJames Smart uint32_t word9; 3380fedd3b7bSJames Smart uint32_t word10; 3381fedd3b7bSJames Smart #define cfg_rqv_SHIFT 14 3382fedd3b7bSJames Smart #define cfg_rqv_MASK 0x00000003 3383fedd3b7bSJames Smart #define cfg_rqv_WORD word10 3384fedd3b7bSJames Smart uint32_t word11; 3385fedd3b7bSJames Smart #define cfg_rq_db_window_SHIFT 28 3386fedd3b7bSJames Smart #define cfg_rq_db_window_MASK 0x0000000f 3387fedd3b7bSJames Smart #define cfg_rq_db_window_WORD word11 3388fedd3b7bSJames Smart uint32_t word12; 3389fedd3b7bSJames Smart #define cfg_fcoe_SHIFT 0 3390fedd3b7bSJames Smart #define cfg_fcoe_MASK 0x00000001 3391fedd3b7bSJames Smart #define cfg_fcoe_WORD word12 33926d368e53SJames Smart #define cfg_ext_SHIFT 1 33936d368e53SJames Smart #define cfg_ext_MASK 0x00000001 33946d368e53SJames Smart #define cfg_ext_WORD word12 33956d368e53SJames Smart #define cfg_hdrr_SHIFT 2 33966d368e53SJames Smart #define cfg_hdrr_MASK 0x00000001 33976d368e53SJames Smart #define cfg_hdrr_WORD word12 3398fedd3b7bSJames Smart #define cfg_phwq_SHIFT 15 3399fedd3b7bSJames Smart #define cfg_phwq_MASK 0x00000001 3400fedd3b7bSJames Smart #define cfg_phwq_WORD word12 34011ba981fdSJames Smart #define cfg_oas_SHIFT 25 34021ba981fdSJames Smart #define cfg_oas_MASK 0x00000001 34031ba981fdSJames Smart #define cfg_oas_WORD word12 3404fedd3b7bSJames Smart #define cfg_loopbk_scope_SHIFT 28 3405fedd3b7bSJames Smart #define cfg_loopbk_scope_MASK 0x0000000f 3406fedd3b7bSJames Smart #define cfg_loopbk_scope_WORD word12 3407fedd3b7bSJames Smart uint32_t sge_supp_len; 3408fedd3b7bSJames Smart uint32_t word14; 3409fedd3b7bSJames Smart #define cfg_sgl_page_cnt_SHIFT 0 3410fedd3b7bSJames Smart #define cfg_sgl_page_cnt_MASK 0x0000000f 3411fedd3b7bSJames Smart #define cfg_sgl_page_cnt_WORD word14 3412fedd3b7bSJames Smart #define cfg_sgl_page_size_SHIFT 8 3413fedd3b7bSJames Smart #define cfg_sgl_page_size_MASK 0x000000ff 3414fedd3b7bSJames Smart #define cfg_sgl_page_size_WORD word14 3415fedd3b7bSJames Smart #define cfg_sgl_pp_align_SHIFT 16 3416fedd3b7bSJames Smart #define cfg_sgl_pp_align_MASK 0x000000ff 3417fedd3b7bSJames Smart #define cfg_sgl_pp_align_WORD word14 3418fedd3b7bSJames Smart uint32_t word15; 3419fedd3b7bSJames Smart uint32_t word16; 3420fedd3b7bSJames Smart uint32_t word17; 3421fedd3b7bSJames Smart uint32_t word18; 3422fedd3b7bSJames Smart uint32_t word19; 3423b5c53958SJames Smart #define cfg_ext_embed_cb_SHIFT 0 3424b5c53958SJames Smart #define cfg_ext_embed_cb_MASK 0x00000001 3425b5c53958SJames Smart #define cfg_ext_embed_cb_WORD word19 34267bdedb34SJames Smart #define cfg_mds_diags_SHIFT 1 34277bdedb34SJames Smart #define cfg_mds_diags_MASK 0x00000001 34287bdedb34SJames Smart #define cfg_mds_diags_WORD word19 3429895427bdSJames Smart #define cfg_nvme_SHIFT 3 3430895427bdSJames Smart #define cfg_nvme_MASK 0x00000001 3431895427bdSJames Smart #define cfg_nvme_WORD word19 3432895427bdSJames Smart #define cfg_xib_SHIFT 4 3433895427bdSJames Smart #define cfg_xib_MASK 0x00000001 3434895427bdSJames Smart #define cfg_xib_WORD word19 3435d79c9e9dSJames Smart #define cfg_xpsgl_SHIFT 6 3436d79c9e9dSJames Smart #define cfg_xpsgl_MASK 0x00000001 3437d79c9e9dSJames Smart #define cfg_xpsgl_WORD word19 34380cf07f84SJames Smart #define cfg_eqdr_SHIFT 8 34390cf07f84SJames Smart #define cfg_eqdr_MASK 0x00000001 34400cf07f84SJames Smart #define cfg_eqdr_WORD word19 344120aefac3SJames Smart #define cfg_nosr_SHIFT 9 344220aefac3SJames Smart #define cfg_nosr_MASK 0x00000001 344320aefac3SJames Smart #define cfg_nosr_WORD word19 344466e9e6bfSJames Smart #define cfg_bv1s_SHIFT 10 344566e9e6bfSJames Smart #define cfg_bv1s_MASK 0x00000001 344666e9e6bfSJames Smart #define cfg_bv1s_WORD word19 344766e9e6bfSJames Smart 34480d8af096SJames Smart #define cfg_nsler_SHIFT 12 34490d8af096SJames Smart #define cfg_nsler_MASK 0x00000001 34500d8af096SJames Smart #define cfg_nsler_WORD word19 3451137ddf03SJames Smart #define cfg_pvl_SHIFT 13 3452137ddf03SJames Smart #define cfg_pvl_MASK 0x00000001 3453137ddf03SJames Smart #define cfg_pvl_WORD word19 3454137ddf03SJames Smart 3455137ddf03SJames Smart #define cfg_pbde_SHIFT 20 3456137ddf03SJames Smart #define cfg_pbde_MASK 0x00000001 3457137ddf03SJames Smart #define cfg_pbde_WORD word19 34580d8af096SJames Smart 345966e9e6bfSJames Smart uint32_t word20; 346066e9e6bfSJames Smart #define cfg_max_tow_xri_SHIFT 0 346166e9e6bfSJames Smart #define cfg_max_tow_xri_MASK 0x0000ffff 346266e9e6bfSJames Smart #define cfg_max_tow_xri_WORD word20 346366e9e6bfSJames Smart 34648aaa7bcfSJames Smart uint32_t word21; 34658aaa7bcfSJames Smart #define cfg_mi_ver_SHIFT 0 34668aaa7bcfSJames Smart #define cfg_mi_ver_MASK 0x0000ffff 34678aaa7bcfSJames Smart #define cfg_mi_ver_WORD word21 3468daebf93fSJames Smart #define cfg_cmf_SHIFT 24 3469daebf93fSJames Smart #define cfg_cmf_MASK 0x000000ff 3470daebf93fSJames Smart #define cfg_cmf_WORD word21 3471daebf93fSJames Smart 34728aaa7bcfSJames Smart uint32_t mib_size; 347366e9e6bfSJames Smart uint32_t word23; /* RESERVED */ 347466e9e6bfSJames Smart 347566e9e6bfSJames Smart uint32_t word24; 347666e9e6bfSJames Smart #define cfg_frag_field_offset_SHIFT 0 347766e9e6bfSJames Smart #define cfg_frag_field_offset_MASK 0x0000ffff 347866e9e6bfSJames Smart #define cfg_frag_field_offset_WORD word24 347966e9e6bfSJames Smart 348066e9e6bfSJames Smart #define cfg_frag_field_size_SHIFT 16 348166e9e6bfSJames Smart #define cfg_frag_field_size_MASK 0x0000ffff 348266e9e6bfSJames Smart #define cfg_frag_field_size_WORD word24 348366e9e6bfSJames Smart 348466e9e6bfSJames Smart uint32_t word25; 348566e9e6bfSJames Smart #define cfg_sgl_field_offset_SHIFT 0 348666e9e6bfSJames Smart #define cfg_sgl_field_offset_MASK 0x0000ffff 348766e9e6bfSJames Smart #define cfg_sgl_field_offset_WORD word25 348866e9e6bfSJames Smart 348966e9e6bfSJames Smart #define cfg_sgl_field_size_SHIFT 16 349066e9e6bfSJames Smart #define cfg_sgl_field_size_MASK 0x0000ffff 349166e9e6bfSJames Smart #define cfg_sgl_field_size_WORD word25 349266e9e6bfSJames Smart 349366e9e6bfSJames Smart uint32_t word26; /* Chain SGE initial value LOW */ 349466e9e6bfSJames Smart uint32_t word27; /* Chain SGE initial value HIGH */ 34950cf07f84SJames Smart #define LPFC_NODELAY_MAX_IO 32 3496fedd3b7bSJames Smart }; 3497fedd3b7bSJames Smart 349865791f1fSJames Smart #define LPFC_SET_UE_RECOVERY 0x10 3499c93764a6SDick Kennedy #define LPFC_SET_MDS_DIAGS 0x12 3500171f6c41SJames Smart #define LPFC_SET_DUAL_DUMP 0x1e 3501dbb1e2ffSJames Smart #define LPFC_SET_CGN_SIGNAL 0x1f 3502c6a5c747SJames Smart #define LPFC_SET_ENABLE_MI 0x21 3503dbb1e2ffSJames Smart #define LPFC_SET_LD_SIGNAL 0x23 3504daebf93fSJames Smart #define LPFC_SET_ENABLE_CMF 0x24 350565791f1fSJames Smart struct lpfc_mbx_set_feature { 350665791f1fSJames Smart struct mbox_header header; 350765791f1fSJames Smart uint32_t feature; 350865791f1fSJames Smart uint32_t param_len; 350965791f1fSJames Smart uint32_t word6; 351065791f1fSJames Smart #define lpfc_mbx_set_feature_UER_SHIFT 0 351165791f1fSJames Smart #define lpfc_mbx_set_feature_UER_MASK 0x00000001 351265791f1fSJames Smart #define lpfc_mbx_set_feature_UER_WORD word6 35138cdc5a22SDick Kennedy #define lpfc_mbx_set_feature_mds_SHIFT 2 35147bdedb34SJames Smart #define lpfc_mbx_set_feature_mds_MASK 0x00000001 35157bdedb34SJames Smart #define lpfc_mbx_set_feature_mds_WORD word6 35167bdedb34SJames Smart #define lpfc_mbx_set_feature_mds_deep_loopbk_SHIFT 1 35177bdedb34SJames Smart #define lpfc_mbx_set_feature_mds_deep_loopbk_MASK 0x00000001 35187bdedb34SJames Smart #define lpfc_mbx_set_feature_mds_deep_loopbk_WORD word6 35199064aeb2SJames Smart #define lpfc_mbx_set_feature_CGN_warn_freq_SHIFT 0 35209064aeb2SJames Smart #define lpfc_mbx_set_feature_CGN_warn_freq_MASK 0x0000ffff 35219064aeb2SJames Smart #define lpfc_mbx_set_feature_CGN_warn_freq_WORD word6 3522171f6c41SJames Smart #define lpfc_mbx_set_feature_dd_SHIFT 0 3523171f6c41SJames Smart #define lpfc_mbx_set_feature_dd_MASK 0x00000001 3524171f6c41SJames Smart #define lpfc_mbx_set_feature_dd_WORD word6 3525171f6c41SJames Smart #define lpfc_mbx_set_feature_ddquery_SHIFT 1 3526171f6c41SJames Smart #define lpfc_mbx_set_feature_ddquery_MASK 0x00000001 3527171f6c41SJames Smart #define lpfc_mbx_set_feature_ddquery_WORD word6 3528171f6c41SJames Smart #define LPFC_DISABLE_DUAL_DUMP 0 3529171f6c41SJames Smart #define LPFC_ENABLE_DUAL_DUMP 1 3530171f6c41SJames Smart #define LPFC_QUERY_OP_DUAL_DUMP 2 3531daebf93fSJames Smart #define lpfc_mbx_set_feature_cmf_SHIFT 0 3532daebf93fSJames Smart #define lpfc_mbx_set_feature_cmf_MASK 0x00000001 3533daebf93fSJames Smart #define lpfc_mbx_set_feature_cmf_WORD word6 3534dbb1e2ffSJames Smart #define lpfc_mbx_set_feature_lds_qry_SHIFT 0 3535dbb1e2ffSJames Smart #define lpfc_mbx_set_feature_lds_qry_MASK 0x00000001 3536dbb1e2ffSJames Smart #define lpfc_mbx_set_feature_lds_qry_WORD word6 3537dbb1e2ffSJames Smart #define LPFC_QUERY_LDS_OP 1 3538c6a5c747SJames Smart #define lpfc_mbx_set_feature_mi_SHIFT 0 3539c6a5c747SJames Smart #define lpfc_mbx_set_feature_mi_MASK 0x0000ffff 3540c6a5c747SJames Smart #define lpfc_mbx_set_feature_mi_WORD word6 3541c6a5c747SJames Smart #define lpfc_mbx_set_feature_milunq_SHIFT 16 3542c6a5c747SJames Smart #define lpfc_mbx_set_feature_milunq_MASK 0x0000ffff 3543c6a5c747SJames Smart #define lpfc_mbx_set_feature_milunq_WORD word6 3544dbb1e2ffSJames Smart u32 word7; 354565791f1fSJames Smart #define lpfc_mbx_set_feature_UERP_SHIFT 0 354665791f1fSJames Smart #define lpfc_mbx_set_feature_UERP_MASK 0x0000ffff 354765791f1fSJames Smart #define lpfc_mbx_set_feature_UERP_WORD word7 354865791f1fSJames Smart #define lpfc_mbx_set_feature_UESR_SHIFT 16 354965791f1fSJames Smart #define lpfc_mbx_set_feature_UESR_MASK 0x0000ffff 355065791f1fSJames Smart #define lpfc_mbx_set_feature_UESR_WORD word7 35519064aeb2SJames Smart #define lpfc_mbx_set_feature_CGN_alarm_freq_SHIFT 0 35529064aeb2SJames Smart #define lpfc_mbx_set_feature_CGN_alarm_freq_MASK 0x0000ffff 35539064aeb2SJames Smart #define lpfc_mbx_set_feature_CGN_alarm_freq_WORD word7 35549064aeb2SJames Smart u32 word8; 35559064aeb2SJames Smart #define lpfc_mbx_set_feature_CGN_acqe_freq_SHIFT 0 35569064aeb2SJames Smart #define lpfc_mbx_set_feature_CGN_acqe_freq_MASK 0x000000ff 35579064aeb2SJames Smart #define lpfc_mbx_set_feature_CGN_acqe_freq_WORD word8 3558dbb1e2ffSJames Smart u32 word9; 3559dbb1e2ffSJames Smart u32 word10; 356065791f1fSJames Smart }; 356165791f1fSJames Smart 356265791f1fSJames Smart 356361bda8f7SJames Smart #define LPFC_SET_HOST_OS_DRIVER_VERSION 0x2 35643b0009c8SJames Smart #define LPFC_SET_HOST_DATE_TIME 0x4 35653b0009c8SJames Smart 35663b0009c8SJames Smart struct lpfc_mbx_set_host_date_time { 35673b0009c8SJames Smart uint32_t word6; 35683b0009c8SJames Smart #define lpfc_mbx_set_host_month_WORD word6 35693b0009c8SJames Smart #define lpfc_mbx_set_host_month_SHIFT 16 35703b0009c8SJames Smart #define lpfc_mbx_set_host_month_MASK 0xFF 35713b0009c8SJames Smart #define lpfc_mbx_set_host_day_WORD word6 35723b0009c8SJames Smart #define lpfc_mbx_set_host_day_SHIFT 8 35733b0009c8SJames Smart #define lpfc_mbx_set_host_day_MASK 0xFF 35743b0009c8SJames Smart #define lpfc_mbx_set_host_year_WORD word6 35753b0009c8SJames Smart #define lpfc_mbx_set_host_year_SHIFT 0 35763b0009c8SJames Smart #define lpfc_mbx_set_host_year_MASK 0xFF 35773b0009c8SJames Smart uint32_t word7; 35783b0009c8SJames Smart #define lpfc_mbx_set_host_hour_WORD word7 35793b0009c8SJames Smart #define lpfc_mbx_set_host_hour_SHIFT 16 35803b0009c8SJames Smart #define lpfc_mbx_set_host_hour_MASK 0xFF 35813b0009c8SJames Smart #define lpfc_mbx_set_host_min_WORD word7 35823b0009c8SJames Smart #define lpfc_mbx_set_host_min_SHIFT 8 35833b0009c8SJames Smart #define lpfc_mbx_set_host_min_MASK 0xFF 35843b0009c8SJames Smart #define lpfc_mbx_set_host_sec_WORD word7 35853b0009c8SJames Smart #define lpfc_mbx_set_host_sec_SHIFT 0 35863b0009c8SJames Smart #define lpfc_mbx_set_host_sec_MASK 0xFF 35873b0009c8SJames Smart }; 35883b0009c8SJames Smart 358961bda8f7SJames Smart struct lpfc_mbx_set_host_data { 359061bda8f7SJames Smart #define LPFC_HOST_OS_DRIVER_VERSION_SIZE 48 359161bda8f7SJames Smart struct mbox_header header; 359261bda8f7SJames Smart uint32_t param_id; 359361bda8f7SJames Smart uint32_t param_len; 35943b0009c8SJames Smart union { 359561bda8f7SJames Smart uint8_t data[LPFC_HOST_OS_DRIVER_VERSION_SIZE]; 35963b0009c8SJames Smart struct lpfc_mbx_set_host_date_time tm; 35973b0009c8SJames Smart } un; 359861bda8f7SJames Smart }; 359961bda8f7SJames Smart 36001dc5ec24SJames Smart struct lpfc_mbx_set_trunk_mode { 36011dc5ec24SJames Smart struct mbox_header header; 36021dc5ec24SJames Smart uint32_t word0; 36031dc5ec24SJames Smart #define lpfc_mbx_set_trunk_mode_WORD word0 36041dc5ec24SJames Smart #define lpfc_mbx_set_trunk_mode_SHIFT 0 36051dc5ec24SJames Smart #define lpfc_mbx_set_trunk_mode_MASK 0xFF 36061dc5ec24SJames Smart uint32_t word1; 36071dc5ec24SJames Smart uint32_t word2; 36081dc5ec24SJames Smart }; 360961bda8f7SJames Smart 3610fedd3b7bSJames Smart struct lpfc_mbx_get_sli4_parameters { 3611fedd3b7bSJames Smart struct mbox_header header; 3612fedd3b7bSJames Smart struct lpfc_sli4_parameters sli4_parameters; 3613fedd3b7bSJames Smart }; 3614fedd3b7bSJames Smart 36158c42a65cSJames Smart struct lpfc_mbx_reg_congestion_buf { 36168c42a65cSJames Smart struct mbox_header header; 36178c42a65cSJames Smart uint32_t word0; 36188c42a65cSJames Smart #define lpfc_mbx_reg_cgn_buf_type_WORD word0 36198c42a65cSJames Smart #define lpfc_mbx_reg_cgn_buf_type_SHIFT 0 36208c42a65cSJames Smart #define lpfc_mbx_reg_cgn_buf_type_MASK 0xFF 36218c42a65cSJames Smart #define lpfc_mbx_reg_cgn_buf_cnt_WORD word0 36228c42a65cSJames Smart #define lpfc_mbx_reg_cgn_buf_cnt_SHIFT 16 36238c42a65cSJames Smart #define lpfc_mbx_reg_cgn_buf_cnt_MASK 0xFF 36248c42a65cSJames Smart uint32_t word1; 36258c42a65cSJames Smart uint32_t length; 36268c42a65cSJames Smart uint32_t addr_lo; 36278c42a65cSJames Smart uint32_t addr_hi; 36288c42a65cSJames Smart }; 36298c42a65cSJames Smart 3630912e3acdSJames Smart struct lpfc_rscr_desc_generic { 36318aa134a8SJames Smart #define LPFC_RSRC_DESC_WSIZE 22 3632912e3acdSJames Smart uint32_t desc[LPFC_RSRC_DESC_WSIZE]; 3633912e3acdSJames Smart }; 3634912e3acdSJames Smart 3635912e3acdSJames Smart struct lpfc_rsrc_desc_pcie { 3636912e3acdSJames Smart uint32_t word0; 3637912e3acdSJames Smart #define lpfc_rsrc_desc_pcie_type_SHIFT 0 3638912e3acdSJames Smart #define lpfc_rsrc_desc_pcie_type_MASK 0x000000ff 3639912e3acdSJames Smart #define lpfc_rsrc_desc_pcie_type_WORD word0 3640912e3acdSJames Smart #define LPFC_RSRC_DESC_TYPE_PCIE 0x40 36418aa134a8SJames Smart #define lpfc_rsrc_desc_pcie_length_SHIFT 8 36428aa134a8SJames Smart #define lpfc_rsrc_desc_pcie_length_MASK 0x000000ff 36438aa134a8SJames Smart #define lpfc_rsrc_desc_pcie_length_WORD word0 3644912e3acdSJames Smart uint32_t word1; 3645912e3acdSJames Smart #define lpfc_rsrc_desc_pcie_pfnum_SHIFT 0 3646912e3acdSJames Smart #define lpfc_rsrc_desc_pcie_pfnum_MASK 0x000000ff 3647912e3acdSJames Smart #define lpfc_rsrc_desc_pcie_pfnum_WORD word1 3648912e3acdSJames Smart uint32_t reserved; 3649912e3acdSJames Smart uint32_t word3; 3650912e3acdSJames Smart #define lpfc_rsrc_desc_pcie_sriov_sta_SHIFT 0 3651912e3acdSJames Smart #define lpfc_rsrc_desc_pcie_sriov_sta_MASK 0x000000ff 3652912e3acdSJames Smart #define lpfc_rsrc_desc_pcie_sriov_sta_WORD word3 3653912e3acdSJames Smart #define lpfc_rsrc_desc_pcie_pf_sta_SHIFT 8 3654912e3acdSJames Smart #define lpfc_rsrc_desc_pcie_pf_sta_MASK 0x000000ff 3655912e3acdSJames Smart #define lpfc_rsrc_desc_pcie_pf_sta_WORD word3 3656912e3acdSJames Smart #define lpfc_rsrc_desc_pcie_pf_type_SHIFT 16 3657912e3acdSJames Smart #define lpfc_rsrc_desc_pcie_pf_type_MASK 0x000000ff 3658912e3acdSJames Smart #define lpfc_rsrc_desc_pcie_pf_type_WORD word3 3659912e3acdSJames Smart uint32_t word4; 3660912e3acdSJames Smart #define lpfc_rsrc_desc_pcie_nr_virtfn_SHIFT 0 3661912e3acdSJames Smart #define lpfc_rsrc_desc_pcie_nr_virtfn_MASK 0x0000ffff 3662912e3acdSJames Smart #define lpfc_rsrc_desc_pcie_nr_virtfn_WORD word4 3663912e3acdSJames Smart }; 3664912e3acdSJames Smart 3665912e3acdSJames Smart struct lpfc_rsrc_desc_fcfcoe { 3666912e3acdSJames Smart uint32_t word0; 3667912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_type_SHIFT 0 3668912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_type_MASK 0x000000ff 3669912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_type_WORD word0 3670912e3acdSJames Smart #define LPFC_RSRC_DESC_TYPE_FCFCOE 0x43 36718aa134a8SJames Smart #define lpfc_rsrc_desc_fcfcoe_length_SHIFT 8 36728aa134a8SJames Smart #define lpfc_rsrc_desc_fcfcoe_length_MASK 0x000000ff 36738aa134a8SJames Smart #define lpfc_rsrc_desc_fcfcoe_length_WORD word0 36748aa134a8SJames Smart #define LPFC_RSRC_DESC_TYPE_FCFCOE_V0_RSVD 0 36758aa134a8SJames Smart #define LPFC_RSRC_DESC_TYPE_FCFCOE_V0_LENGTH 72 36768aa134a8SJames Smart #define LPFC_RSRC_DESC_TYPE_FCFCOE_V1_LENGTH 88 3677912e3acdSJames Smart uint32_t word1; 3678912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_vfnum_SHIFT 0 3679912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_vfnum_MASK 0x000000ff 3680912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_vfnum_WORD word1 3681912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_pfnum_SHIFT 16 3682912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_pfnum_MASK 0x000007ff 3683912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_pfnum_WORD word1 3684912e3acdSJames Smart uint32_t word2; 3685912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_rpi_cnt_SHIFT 0 3686912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_rpi_cnt_MASK 0x0000ffff 3687912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_rpi_cnt_WORD word2 3688912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_xri_cnt_SHIFT 16 3689912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_xri_cnt_MASK 0x0000ffff 3690912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_xri_cnt_WORD word2 3691912e3acdSJames Smart uint32_t word3; 3692912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_wq_cnt_SHIFT 0 3693912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_wq_cnt_MASK 0x0000ffff 3694912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_wq_cnt_WORD word3 3695912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_rq_cnt_SHIFT 16 3696912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_rq_cnt_MASK 0x0000ffff 3697912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_rq_cnt_WORD word3 3698912e3acdSJames Smart uint32_t word4; 3699912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_cq_cnt_SHIFT 0 3700912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_cq_cnt_MASK 0x0000ffff 3701912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_cq_cnt_WORD word4 3702912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_vpi_cnt_SHIFT 16 3703912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_vpi_cnt_MASK 0x0000ffff 3704912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_vpi_cnt_WORD word4 3705912e3acdSJames Smart uint32_t word5; 3706912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_fcfi_cnt_SHIFT 0 3707912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_fcfi_cnt_MASK 0x0000ffff 3708912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_fcfi_cnt_WORD word5 3709912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_vfi_cnt_SHIFT 16 3710912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_vfi_cnt_MASK 0x0000ffff 3711912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_vfi_cnt_WORD word5 3712912e3acdSJames Smart uint32_t word6; 3713912e3acdSJames Smart uint32_t word7; 3714912e3acdSJames Smart uint32_t word8; 3715912e3acdSJames Smart uint32_t word9; 3716912e3acdSJames Smart uint32_t word10; 3717912e3acdSJames Smart uint32_t word11; 3718912e3acdSJames Smart uint32_t word12; 3719912e3acdSJames Smart uint32_t word13; 3720912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_lnk_nr_SHIFT 0 3721912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_lnk_nr_MASK 0x0000003f 3722912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_lnk_nr_WORD word13 3723912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_lnk_tp_SHIFT 6 3724912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_lnk_tp_MASK 0x00000003 3725912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_lnk_tp_WORD word13 3726912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_lmc_SHIFT 8 3727912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_lmc_MASK 0x00000001 3728912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_lmc_WORD word13 3729912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_lld_SHIFT 9 3730912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_lld_MASK 0x00000001 3731912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_lld_WORD word13 3732912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_eq_cnt_SHIFT 16 3733912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_eq_cnt_MASK 0x0000ffff 3734912e3acdSJames Smart #define lpfc_rsrc_desc_fcfcoe_eq_cnt_WORD word13 37358aa134a8SJames Smart /* extended FC/FCoE Resource Descriptor when length = 88 bytes */ 37368aa134a8SJames Smart uint32_t bw_min; 37378aa134a8SJames Smart uint32_t bw_max; 37388aa134a8SJames Smart uint32_t iops_min; 37398aa134a8SJames Smart uint32_t iops_max; 37408aa134a8SJames Smart uint32_t reserved[4]; 3741912e3acdSJames Smart }; 3742912e3acdSJames Smart 3743912e3acdSJames Smart struct lpfc_func_cfg { 3744912e3acdSJames Smart #define LPFC_RSRC_DESC_MAX_NUM 2 3745912e3acdSJames Smart uint32_t rsrc_desc_count; 3746912e3acdSJames Smart struct lpfc_rscr_desc_generic desc[LPFC_RSRC_DESC_MAX_NUM]; 3747912e3acdSJames Smart }; 3748912e3acdSJames Smart 3749912e3acdSJames Smart struct lpfc_mbx_get_func_cfg { 3750912e3acdSJames Smart struct mbox_header header; 3751912e3acdSJames Smart #define LPFC_CFG_TYPE_PERSISTENT_OVERRIDE 0x0 3752912e3acdSJames Smart #define LPFC_CFG_TYPE_FACTURY_DEFAULT 0x1 3753912e3acdSJames Smart #define LPFC_CFG_TYPE_CURRENT_ACTIVE 0x2 3754912e3acdSJames Smart struct lpfc_func_cfg func_cfg; 3755912e3acdSJames Smart }; 3756912e3acdSJames Smart 3757912e3acdSJames Smart struct lpfc_prof_cfg { 3758912e3acdSJames Smart #define LPFC_RSRC_DESC_MAX_NUM 2 3759912e3acdSJames Smart uint32_t rsrc_desc_count; 3760912e3acdSJames Smart struct lpfc_rscr_desc_generic desc[LPFC_RSRC_DESC_MAX_NUM]; 3761912e3acdSJames Smart }; 3762912e3acdSJames Smart 3763912e3acdSJames Smart struct lpfc_mbx_get_prof_cfg { 3764912e3acdSJames Smart struct mbox_header header; 3765912e3acdSJames Smart #define LPFC_CFG_TYPE_PERSISTENT_OVERRIDE 0x0 3766912e3acdSJames Smart #define LPFC_CFG_TYPE_FACTURY_DEFAULT 0x1 3767912e3acdSJames Smart #define LPFC_CFG_TYPE_CURRENT_ACTIVE 0x2 3768912e3acdSJames Smart union { 3769912e3acdSJames Smart struct { 3770912e3acdSJames Smart uint32_t word10; 3771912e3acdSJames Smart #define lpfc_mbx_get_prof_cfg_prof_id_SHIFT 0 3772912e3acdSJames Smart #define lpfc_mbx_get_prof_cfg_prof_id_MASK 0x000000ff 3773912e3acdSJames Smart #define lpfc_mbx_get_prof_cfg_prof_id_WORD word10 3774912e3acdSJames Smart #define lpfc_mbx_get_prof_cfg_prof_tp_SHIFT 8 3775912e3acdSJames Smart #define lpfc_mbx_get_prof_cfg_prof_tp_MASK 0x00000003 3776912e3acdSJames Smart #define lpfc_mbx_get_prof_cfg_prof_tp_WORD word10 3777912e3acdSJames Smart } request; 3778912e3acdSJames Smart struct { 3779912e3acdSJames Smart struct lpfc_prof_cfg prof_cfg; 3780912e3acdSJames Smart } response; 3781912e3acdSJames Smart } u; 3782912e3acdSJames Smart }; 3783912e3acdSJames Smart 3784cd1c8301SJames Smart struct lpfc_controller_attribute { 3785cd1c8301SJames Smart uint32_t version_string[8]; 3786cd1c8301SJames Smart uint32_t manufacturer_name[8]; 378791b91309SJustin Tee uint32_t rsvd16; 3788cd1c8301SJames Smart uint32_t word17; 378916a93e83SJames Smart #define lpfc_cntl_attr_flash_id_SHIFT 16 379016a93e83SJames Smart #define lpfc_cntl_attr_flash_id_MASK 0x000000ff 379116a93e83SJames Smart #define lpfc_cntl_attr_flash_id_WORD word17 379291b91309SJustin Tee #define lpfc_cntl_attr_boot_enable_SHIFT 24 379391b91309SJustin Tee #define lpfc_cntl_attr_boot_enable_MASK 0x00000001 379491b91309SJustin Tee #define lpfc_cntl_attr_boot_enable_WORD word17 379591b91309SJustin Tee uint32_t rsvd18[2]; 3796cd1c8301SJames Smart uint32_t ncsi_ver_str[3]; 379791b91309SJustin Tee uint32_t rsvd23; 3798cd1c8301SJames Smart uint32_t model_number[8]; 3799cd1c8301SJames Smart uint32_t description[16]; 3800cd1c8301SJames Smart uint32_t serial_number[8]; 380191b91309SJustin Tee uint32_t ipl_name[5]; 380291b91309SJustin Tee uint32_t rsvd61[3]; 3803cd1c8301SJames Smart uint32_t fw_ver_str[8]; 3804cd1c8301SJames Smart uint32_t bios_ver_str[8]; 3805cd1c8301SJames Smart uint32_t redboot_ver_str[8]; 3806cd1c8301SJames Smart uint32_t driver_ver_str[8]; 3807cd1c8301SJames Smart uint32_t flash_fw_ver_str[8]; 3808cd1c8301SJames Smart uint32_t functionality; 3809cd1c8301SJames Smart uint32_t word105; 3810cd1c8301SJames Smart #define lpfc_cntl_attr_asic_rev_SHIFT 16 3811cd1c8301SJames Smart #define lpfc_cntl_attr_asic_rev_MASK 0x000000ff 3812cd1c8301SJames Smart #define lpfc_cntl_attr_asic_rev_WORD word105 381391b91309SJustin Tee uint32_t rsvd106[3]; 3814cd1c8301SJames Smart uint32_t word109; 3815cd1c8301SJames Smart #define lpfc_cntl_attr_hba_port_cnt_SHIFT 24 3816cd1c8301SJames Smart #define lpfc_cntl_attr_hba_port_cnt_MASK 0x000000ff 3817cd1c8301SJames Smart #define lpfc_cntl_attr_hba_port_cnt_WORD word109 381891b91309SJustin Tee uint32_t rsvd110; 3819cd1c8301SJames Smart uint32_t word111; 3820cd1c8301SJames Smart #define lpfc_cntl_attr_hba_status_SHIFT 8 3821cd1c8301SJames Smart #define lpfc_cntl_attr_hba_status_MASK 0x000000ff 3822cd1c8301SJames Smart #define lpfc_cntl_attr_hba_status_WORD word111 3823cd1c8301SJames Smart #define lpfc_cntl_attr_lnk_numb_SHIFT 24 3824cd1c8301SJames Smart #define lpfc_cntl_attr_lnk_numb_MASK 0x0000003f 3825cd1c8301SJames Smart #define lpfc_cntl_attr_lnk_numb_WORD word111 3826cd1c8301SJames Smart #define lpfc_cntl_attr_lnk_type_SHIFT 30 3827cd1c8301SJames Smart #define lpfc_cntl_attr_lnk_type_MASK 0x00000003 3828cd1c8301SJames Smart #define lpfc_cntl_attr_lnk_type_WORD word111 382991b91309SJustin Tee uint32_t rsvd112[9]; 3830cd1c8301SJames Smart uint32_t word121; 383191b91309SJustin Tee #define lpfc_cntl_attr_asic_gen_SHIFT 8 383291b91309SJustin Tee #define lpfc_cntl_attr_asic_gen_MASK 0x000000ff 383391b91309SJustin Tee #define lpfc_cntl_attr_asic_gen_WORD word121 383491b91309SJustin Tee uint32_t rsvd122[3]; 3835cd1c8301SJames Smart uint32_t word125; 3836cd1c8301SJames Smart #define lpfc_cntl_attr_pci_vendor_id_SHIFT 0 3837cd1c8301SJames Smart #define lpfc_cntl_attr_pci_vendor_id_MASK 0x0000ffff 3838cd1c8301SJames Smart #define lpfc_cntl_attr_pci_vendor_id_WORD word125 3839cd1c8301SJames Smart #define lpfc_cntl_attr_pci_device_id_SHIFT 16 3840cd1c8301SJames Smart #define lpfc_cntl_attr_pci_device_id_MASK 0x0000ffff 3841cd1c8301SJames Smart #define lpfc_cntl_attr_pci_device_id_WORD word125 3842cd1c8301SJames Smart uint32_t word126; 3843cd1c8301SJames Smart #define lpfc_cntl_attr_pci_subvdr_id_SHIFT 0 3844cd1c8301SJames Smart #define lpfc_cntl_attr_pci_subvdr_id_MASK 0x0000ffff 3845cd1c8301SJames Smart #define lpfc_cntl_attr_pci_subvdr_id_WORD word126 3846cd1c8301SJames Smart #define lpfc_cntl_attr_pci_subsys_id_SHIFT 16 3847cd1c8301SJames Smart #define lpfc_cntl_attr_pci_subsys_id_MASK 0x0000ffff 3848cd1c8301SJames Smart #define lpfc_cntl_attr_pci_subsys_id_WORD word126 3849cd1c8301SJames Smart uint32_t word127; 3850cd1c8301SJames Smart #define lpfc_cntl_attr_pci_bus_num_SHIFT 0 3851cd1c8301SJames Smart #define lpfc_cntl_attr_pci_bus_num_MASK 0x000000ff 3852cd1c8301SJames Smart #define lpfc_cntl_attr_pci_bus_num_WORD word127 3853cd1c8301SJames Smart #define lpfc_cntl_attr_pci_dev_num_SHIFT 8 3854cd1c8301SJames Smart #define lpfc_cntl_attr_pci_dev_num_MASK 0x000000ff 3855cd1c8301SJames Smart #define lpfc_cntl_attr_pci_dev_num_WORD word127 3856cd1c8301SJames Smart #define lpfc_cntl_attr_pci_fnc_num_SHIFT 16 3857cd1c8301SJames Smart #define lpfc_cntl_attr_pci_fnc_num_MASK 0x000000ff 3858cd1c8301SJames Smart #define lpfc_cntl_attr_pci_fnc_num_WORD word127 385991b91309SJustin Tee uint32_t rsvd128[7]; 3860cd1c8301SJames Smart }; 3861cd1c8301SJames Smart 3862cd1c8301SJames Smart struct lpfc_mbx_get_cntl_attributes { 3863cd1c8301SJames Smart union lpfc_sli4_cfg_shdr cfg_shdr; 3864cd1c8301SJames Smart struct lpfc_controller_attribute cntl_attr; 3865cd1c8301SJames Smart }; 3866cd1c8301SJames Smart 3867cd1c8301SJames Smart struct lpfc_mbx_get_port_name { 3868cd1c8301SJames Smart struct mbox_header header; 3869cd1c8301SJames Smart union { 3870cd1c8301SJames Smart struct { 3871cd1c8301SJames Smart uint32_t word4; 3872cd1c8301SJames Smart #define lpfc_mbx_get_port_name_lnk_type_SHIFT 0 3873cd1c8301SJames Smart #define lpfc_mbx_get_port_name_lnk_type_MASK 0x00000003 3874cd1c8301SJames Smart #define lpfc_mbx_get_port_name_lnk_type_WORD word4 3875cd1c8301SJames Smart } request; 3876cd1c8301SJames Smart struct { 3877cd1c8301SJames Smart uint32_t word4; 3878cd1c8301SJames Smart #define lpfc_mbx_get_port_name_name0_SHIFT 0 3879cd1c8301SJames Smart #define lpfc_mbx_get_port_name_name0_MASK 0x000000FF 3880cd1c8301SJames Smart #define lpfc_mbx_get_port_name_name0_WORD word4 3881cd1c8301SJames Smart #define lpfc_mbx_get_port_name_name1_SHIFT 8 3882cd1c8301SJames Smart #define lpfc_mbx_get_port_name_name1_MASK 0x000000FF 3883cd1c8301SJames Smart #define lpfc_mbx_get_port_name_name1_WORD word4 3884cd1c8301SJames Smart #define lpfc_mbx_get_port_name_name2_SHIFT 16 3885cd1c8301SJames Smart #define lpfc_mbx_get_port_name_name2_MASK 0x000000FF 3886cd1c8301SJames Smart #define lpfc_mbx_get_port_name_name2_WORD word4 3887cd1c8301SJames Smart #define lpfc_mbx_get_port_name_name3_SHIFT 24 3888cd1c8301SJames Smart #define lpfc_mbx_get_port_name_name3_MASK 0x000000FF 3889cd1c8301SJames Smart #define lpfc_mbx_get_port_name_name3_WORD word4 3890cd1c8301SJames Smart #define LPFC_LINK_NUMBER_0 0 3891cd1c8301SJames Smart #define LPFC_LINK_NUMBER_1 1 3892cd1c8301SJames Smart #define LPFC_LINK_NUMBER_2 2 3893cd1c8301SJames Smart #define LPFC_LINK_NUMBER_3 3 3894cd1c8301SJames Smart } response; 3895cd1c8301SJames Smart } u; 3896cd1c8301SJames Smart }; 3897cd1c8301SJames Smart 3898da0436e9SJames Smart /* Mailbox Completion Queue Error Messages */ 3899da0436e9SJames Smart #define MB_CQE_STATUS_SUCCESS 0x0 3900da0436e9SJames Smart #define MB_CQE_STATUS_INSUFFICIENT_PRIVILEGES 0x1 3901da0436e9SJames Smart #define MB_CQE_STATUS_INVALID_PARAMETER 0x2 3902da0436e9SJames Smart #define MB_CQE_STATUS_INSUFFICIENT_RESOURCES 0x3 3903da0436e9SJames Smart #define MB_CEQ_STATUS_QUEUE_FLUSHING 0x4 3904da0436e9SJames Smart #define MB_CQE_STATUS_DMA_FAILED 0x5 3905da0436e9SJames Smart 390674a7baa2SJames Smart 3907184fc2b9SDick Kennedy #define LPFC_MBX_WR_CONFIG_MAX_BDE 1 390852d52440SJames Smart struct lpfc_mbx_wr_object { 390952d52440SJames Smart struct mbox_header header; 391052d52440SJames Smart union { 391152d52440SJames Smart struct { 391252d52440SJames Smart uint32_t word4; 391352d52440SJames Smart #define lpfc_wr_object_eof_SHIFT 31 391452d52440SJames Smart #define lpfc_wr_object_eof_MASK 0x00000001 391552d52440SJames Smart #define lpfc_wr_object_eof_WORD word4 39165021267aSJames Smart #define lpfc_wr_object_eas_SHIFT 29 39175021267aSJames Smart #define lpfc_wr_object_eas_MASK 0x00000001 39185021267aSJames Smart #define lpfc_wr_object_eas_WORD word4 391952d52440SJames Smart #define lpfc_wr_object_write_length_SHIFT 0 392052d52440SJames Smart #define lpfc_wr_object_write_length_MASK 0x00FFFFFF 392152d52440SJames Smart #define lpfc_wr_object_write_length_WORD word4 392252d52440SJames Smart uint32_t write_offset; 392374a7baa2SJames Smart uint32_t object_name[LPFC_MBX_OBJECT_NAME_LEN_DW]; 392452d52440SJames Smart uint32_t bde_count; 392552d52440SJames Smart struct ulp_bde64 bde[LPFC_MBX_WR_CONFIG_MAX_BDE]; 392652d52440SJames Smart } request; 392752d52440SJames Smart struct { 392852d52440SJames Smart uint32_t actual_write_length; 39295021267aSJames Smart uint32_t word5; 39305021267aSJames Smart #define lpfc_wr_object_change_status_SHIFT 0 39315021267aSJames Smart #define lpfc_wr_object_change_status_MASK 0x000000FF 39325021267aSJames Smart #define lpfc_wr_object_change_status_WORD word5 39335021267aSJames Smart #define LPFC_CHANGE_STATUS_NO_RESET_NEEDED 0x00 39345021267aSJames Smart #define LPFC_CHANGE_STATUS_PHYS_DEV_RESET 0x01 39355021267aSJames Smart #define LPFC_CHANGE_STATUS_FW_RESET 0x02 39365021267aSJames Smart #define LPFC_CHANGE_STATUS_PORT_MIGRATION 0x04 39375021267aSJames Smart #define LPFC_CHANGE_STATUS_PCI_RESET 0x05 3938f3d0a8acSJames Smart #define lpfc_wr_object_csf_SHIFT 8 3939f3d0a8acSJames Smart #define lpfc_wr_object_csf_MASK 0x00000001 3940f3d0a8acSJames Smart #define lpfc_wr_object_csf_WORD word5 394152d52440SJames Smart } response; 394252d52440SJames Smart } u; 394352d52440SJames Smart }; 394452d52440SJames Smart 3945da0436e9SJames Smart /* mailbox queue entry structure */ 3946da0436e9SJames Smart struct lpfc_mqe { 3947da0436e9SJames Smart uint32_t word0; 3948da0436e9SJames Smart #define lpfc_mqe_status_SHIFT 16 3949da0436e9SJames Smart #define lpfc_mqe_status_MASK 0x0000FFFF 3950da0436e9SJames Smart #define lpfc_mqe_status_WORD word0 3951da0436e9SJames Smart #define lpfc_mqe_command_SHIFT 8 3952da0436e9SJames Smart #define lpfc_mqe_command_MASK 0x000000FF 3953da0436e9SJames Smart #define lpfc_mqe_command_WORD word0 3954da0436e9SJames Smart union { 3955da0436e9SJames Smart uint32_t mb_words[LPFC_SLI4_MB_WORD_COUNT - 1]; 3956da0436e9SJames Smart /* sli4 mailbox commands */ 3957da0436e9SJames Smart struct lpfc_mbx_sli4_config sli4_config; 3958da0436e9SJames Smart struct lpfc_mbx_init_vfi init_vfi; 3959da0436e9SJames Smart struct lpfc_mbx_reg_vfi reg_vfi; 3960da0436e9SJames Smart struct lpfc_mbx_reg_vfi unreg_vfi; 3961da0436e9SJames Smart struct lpfc_mbx_init_vpi init_vpi; 3962da0436e9SJames Smart struct lpfc_mbx_resume_rpi resume_rpi; 3963da0436e9SJames Smart struct lpfc_mbx_read_fcf_tbl read_fcf_tbl; 3964da0436e9SJames Smart struct lpfc_mbx_add_fcf_tbl_entry add_fcf_entry; 3965da0436e9SJames Smart struct lpfc_mbx_del_fcf_tbl_entry del_fcf_entry; 3966ecfd03c6SJames Smart struct lpfc_mbx_redisc_fcf_tbl redisc_fcf_tbl; 3967da0436e9SJames Smart struct lpfc_mbx_reg_fcfi reg_fcfi; 39682d7dbc4cSJames Smart struct lpfc_mbx_reg_fcfi_mrq reg_fcfi_mrq; 3969da0436e9SJames Smart struct lpfc_mbx_unreg_fcfi unreg_fcfi; 3970da0436e9SJames Smart struct lpfc_mbx_mq_create mq_create; 3971b19a061aSJames Smart struct lpfc_mbx_mq_create_ext mq_create_ext; 397272df8a45SJames Smart struct lpfc_mbx_read_object read_object; 3973da0436e9SJames Smart struct lpfc_mbx_eq_create eq_create; 3974173edbb2SJames Smart struct lpfc_mbx_modify_eq_delay eq_delay; 3975da0436e9SJames Smart struct lpfc_mbx_cq_create cq_create; 39762d7dbc4cSJames Smart struct lpfc_mbx_cq_create_set cq_create_set; 3977da0436e9SJames Smart struct lpfc_mbx_wq_create wq_create; 3978da0436e9SJames Smart struct lpfc_mbx_rq_create rq_create; 39792d7dbc4cSJames Smart struct lpfc_mbx_rq_create_v2 rq_create_v2; 3980da0436e9SJames Smart struct lpfc_mbx_mq_destroy mq_destroy; 3981da0436e9SJames Smart struct lpfc_mbx_eq_destroy eq_destroy; 3982da0436e9SJames Smart struct lpfc_mbx_cq_destroy cq_destroy; 3983da0436e9SJames Smart struct lpfc_mbx_wq_destroy wq_destroy; 3984da0436e9SJames Smart struct lpfc_mbx_rq_destroy rq_destroy; 39856d368e53SJames Smart struct lpfc_mbx_get_rsrc_extent_info rsrc_extent_info; 39866d368e53SJames Smart struct lpfc_mbx_alloc_rsrc_extents alloc_rsrc_extents; 39876d368e53SJames Smart struct lpfc_mbx_dealloc_rsrc_extents dealloc_rsrc_extents; 3988da0436e9SJames Smart struct lpfc_mbx_post_sgl_pages post_sgl_pages; 3989da0436e9SJames Smart struct lpfc_mbx_nembed_cmd nembed_cmd; 3990da0436e9SJames Smart struct lpfc_mbx_read_rev read_rev; 3991da0436e9SJames Smart struct lpfc_mbx_read_vpi read_vpi; 3992da0436e9SJames Smart struct lpfc_mbx_read_config rd_config; 3993da0436e9SJames Smart struct lpfc_mbx_request_features req_ftrs; 3994da0436e9SJames Smart struct lpfc_mbx_post_hdr_tmpl hdr_tmpl; 3995962bc51bSJames Smart struct lpfc_mbx_query_fw_config query_fw_cfg; 39968b017a30SJames Smart struct lpfc_mbx_set_beacon_config beacon_config; 3997fedd3b7bSJames Smart struct lpfc_mbx_get_sli4_parameters get_sli4_parameters; 39988c42a65cSJames Smart struct lpfc_mbx_reg_congestion_buf reg_congestion_buf; 39997ad20aa9SJames Smart struct lpfc_mbx_set_link_diag_state link_diag_state; 40007ad20aa9SJames Smart struct lpfc_mbx_set_link_diag_loopback link_diag_loopback; 40017ad20aa9SJames Smart struct lpfc_mbx_run_link_diag_test link_diag_test; 4002912e3acdSJames Smart struct lpfc_mbx_get_func_cfg get_func_cfg; 4003912e3acdSJames Smart struct lpfc_mbx_get_prof_cfg get_prof_cfg; 400452d52440SJames Smart struct lpfc_mbx_wr_object wr_object; 4005cd1c8301SJames Smart struct lpfc_mbx_get_port_name get_port_name; 400665791f1fSJames Smart struct lpfc_mbx_set_feature set_feature; 400786478875SJames Smart struct lpfc_mbx_memory_dump_type3 mem_dump_type3; 400861bda8f7SJames Smart struct lpfc_mbx_set_host_data set_host_data; 40091dc5ec24SJames Smart struct lpfc_mbx_set_trunk_mode set_trunk_mode; 4010cd1c8301SJames Smart struct lpfc_mbx_nop nop; 4011d2cc9bcdSJames Smart struct lpfc_mbx_set_ras_fwlog ras_fwlog; 4012da0436e9SJames Smart } un; 4013da0436e9SJames Smart }; 4014da0436e9SJames Smart 4015da0436e9SJames Smart struct lpfc_mcqe { 4016da0436e9SJames Smart uint32_t word0; 4017da0436e9SJames Smart #define lpfc_mcqe_status_SHIFT 0 4018da0436e9SJames Smart #define lpfc_mcqe_status_MASK 0x0000FFFF 4019da0436e9SJames Smart #define lpfc_mcqe_status_WORD word0 4020da0436e9SJames Smart #define lpfc_mcqe_ext_status_SHIFT 16 4021da0436e9SJames Smart #define lpfc_mcqe_ext_status_MASK 0x0000FFFF 4022da0436e9SJames Smart #define lpfc_mcqe_ext_status_WORD word0 4023da0436e9SJames Smart uint32_t mcqe_tag0; 4024da0436e9SJames Smart uint32_t mcqe_tag1; 4025da0436e9SJames Smart uint32_t trailer; 4026da0436e9SJames Smart #define lpfc_trailer_valid_SHIFT 31 4027da0436e9SJames Smart #define lpfc_trailer_valid_MASK 0x00000001 4028da0436e9SJames Smart #define lpfc_trailer_valid_WORD trailer 4029da0436e9SJames Smart #define lpfc_trailer_async_SHIFT 30 4030da0436e9SJames Smart #define lpfc_trailer_async_MASK 0x00000001 4031da0436e9SJames Smart #define lpfc_trailer_async_WORD trailer 4032da0436e9SJames Smart #define lpfc_trailer_hpi_SHIFT 29 4033da0436e9SJames Smart #define lpfc_trailer_hpi_MASK 0x00000001 4034da0436e9SJames Smart #define lpfc_trailer_hpi_WORD trailer 4035da0436e9SJames Smart #define lpfc_trailer_completed_SHIFT 28 4036da0436e9SJames Smart #define lpfc_trailer_completed_MASK 0x00000001 4037da0436e9SJames Smart #define lpfc_trailer_completed_WORD trailer 4038da0436e9SJames Smart #define lpfc_trailer_consumed_SHIFT 27 4039da0436e9SJames Smart #define lpfc_trailer_consumed_MASK 0x00000001 4040da0436e9SJames Smart #define lpfc_trailer_consumed_WORD trailer 4041da0436e9SJames Smart #define lpfc_trailer_type_SHIFT 16 4042da0436e9SJames Smart #define lpfc_trailer_type_MASK 0x000000FF 4043da0436e9SJames Smart #define lpfc_trailer_type_WORD trailer 4044da0436e9SJames Smart #define lpfc_trailer_code_SHIFT 8 4045da0436e9SJames Smart #define lpfc_trailer_code_MASK 0x000000FF 4046da0436e9SJames Smart #define lpfc_trailer_code_WORD trailer 4047da0436e9SJames Smart #define LPFC_TRAILER_CODE_LINK 0x1 4048da0436e9SJames Smart #define LPFC_TRAILER_CODE_FCOE 0x2 4049da0436e9SJames Smart #define LPFC_TRAILER_CODE_DCBX 0x3 4050b19a061aSJames Smart #define LPFC_TRAILER_CODE_GRP5 0x5 405176a95d75SJames Smart #define LPFC_TRAILER_CODE_FC 0x10 405270f3c073SJames Smart #define LPFC_TRAILER_CODE_SLI 0x11 4053da0436e9SJames Smart }; 4054da0436e9SJames Smart 4055da0436e9SJames Smart struct lpfc_acqe_link { 4056da0436e9SJames Smart uint32_t word0; 4057da0436e9SJames Smart #define lpfc_acqe_link_speed_SHIFT 24 4058da0436e9SJames Smart #define lpfc_acqe_link_speed_MASK 0x000000FF 4059da0436e9SJames Smart #define lpfc_acqe_link_speed_WORD word0 4060da0436e9SJames Smart #define LPFC_ASYNC_LINK_SPEED_ZERO 0x0 4061da0436e9SJames Smart #define LPFC_ASYNC_LINK_SPEED_10MBPS 0x1 4062da0436e9SJames Smart #define LPFC_ASYNC_LINK_SPEED_100MBPS 0x2 4063da0436e9SJames Smart #define LPFC_ASYNC_LINK_SPEED_1GBPS 0x3 4064da0436e9SJames Smart #define LPFC_ASYNC_LINK_SPEED_10GBPS 0x4 406526d830ecSJames Smart #define LPFC_ASYNC_LINK_SPEED_20GBPS 0x5 406626d830ecSJames Smart #define LPFC_ASYNC_LINK_SPEED_25GBPS 0x6 406726d830ecSJames Smart #define LPFC_ASYNC_LINK_SPEED_40GBPS 0x7 4068a085e87cSJames Smart #define LPFC_ASYNC_LINK_SPEED_100GBPS 0x8 4069da0436e9SJames Smart #define lpfc_acqe_link_duplex_SHIFT 16 4070da0436e9SJames Smart #define lpfc_acqe_link_duplex_MASK 0x000000FF 4071da0436e9SJames Smart #define lpfc_acqe_link_duplex_WORD word0 4072da0436e9SJames Smart #define LPFC_ASYNC_LINK_DUPLEX_NONE 0x0 4073da0436e9SJames Smart #define LPFC_ASYNC_LINK_DUPLEX_HALF 0x1 4074da0436e9SJames Smart #define LPFC_ASYNC_LINK_DUPLEX_FULL 0x2 4075da0436e9SJames Smart #define lpfc_acqe_link_status_SHIFT 8 4076da0436e9SJames Smart #define lpfc_acqe_link_status_MASK 0x000000FF 4077da0436e9SJames Smart #define lpfc_acqe_link_status_WORD word0 4078da0436e9SJames Smart #define LPFC_ASYNC_LINK_STATUS_DOWN 0x0 4079da0436e9SJames Smart #define LPFC_ASYNC_LINK_STATUS_UP 0x1 4080da0436e9SJames Smart #define LPFC_ASYNC_LINK_STATUS_LOGICAL_DOWN 0x2 4081da0436e9SJames Smart #define LPFC_ASYNC_LINK_STATUS_LOGICAL_UP 0x3 408270f3c073SJames Smart #define lpfc_acqe_link_type_SHIFT 6 408370f3c073SJames Smart #define lpfc_acqe_link_type_MASK 0x00000003 408470f3c073SJames Smart #define lpfc_acqe_link_type_WORD word0 408570f3c073SJames Smart #define lpfc_acqe_link_number_SHIFT 0 408670f3c073SJames Smart #define lpfc_acqe_link_number_MASK 0x0000003F 408770f3c073SJames Smart #define lpfc_acqe_link_number_WORD word0 4088da0436e9SJames Smart uint32_t word1; 4089da0436e9SJames Smart #define lpfc_acqe_link_fault_SHIFT 0 4090da0436e9SJames Smart #define lpfc_acqe_link_fault_MASK 0x000000FF 4091da0436e9SJames Smart #define lpfc_acqe_link_fault_WORD word1 4092da0436e9SJames Smart #define LPFC_ASYNC_LINK_FAULT_NONE 0x0 4093da0436e9SJames Smart #define LPFC_ASYNC_LINK_FAULT_LOCAL 0x1 4094da0436e9SJames Smart #define LPFC_ASYNC_LINK_FAULT_REMOTE 0x2 409523288b78SJames Smart #define LPFC_ASYNC_LINK_FAULT_LR_LRR 0x3 409670f3c073SJames Smart #define lpfc_acqe_logical_link_speed_SHIFT 16 409770f3c073SJames Smart #define lpfc_acqe_logical_link_speed_MASK 0x0000FFFF 409870f3c073SJames Smart #define lpfc_acqe_logical_link_speed_WORD word1 4099da0436e9SJames Smart uint32_t event_tag; 4100da0436e9SJames Smart uint32_t trailer; 410170f3c073SJames Smart #define LPFC_LINK_EVENT_TYPE_PHYSICAL 0x0 410270f3c073SJames Smart #define LPFC_LINK_EVENT_TYPE_VIRTUAL 0x1 4103da0436e9SJames Smart }; 4104da0436e9SJames Smart 410570f3c073SJames Smart struct lpfc_acqe_fip { 41066669f9bbSJames Smart uint32_t index; 4107da0436e9SJames Smart uint32_t word1; 410870f3c073SJames Smart #define lpfc_acqe_fip_fcf_count_SHIFT 0 410970f3c073SJames Smart #define lpfc_acqe_fip_fcf_count_MASK 0x0000FFFF 411070f3c073SJames Smart #define lpfc_acqe_fip_fcf_count_WORD word1 411170f3c073SJames Smart #define lpfc_acqe_fip_event_type_SHIFT 16 411270f3c073SJames Smart #define lpfc_acqe_fip_event_type_MASK 0x0000FFFF 411370f3c073SJames Smart #define lpfc_acqe_fip_event_type_WORD word1 4114da0436e9SJames Smart uint32_t event_tag; 4115da0436e9SJames Smart uint32_t trailer; 411670f3c073SJames Smart #define LPFC_FIP_EVENT_TYPE_NEW_FCF 0x1 411770f3c073SJames Smart #define LPFC_FIP_EVENT_TYPE_FCF_TABLE_FULL 0x2 411870f3c073SJames Smart #define LPFC_FIP_EVENT_TYPE_FCF_DEAD 0x3 411970f3c073SJames Smart #define LPFC_FIP_EVENT_TYPE_CVL 0x4 412070f3c073SJames Smart #define LPFC_FIP_EVENT_TYPE_FCF_PARAM_MOD 0x5 4121da0436e9SJames Smart }; 4122da0436e9SJames Smart 4123da0436e9SJames Smart struct lpfc_acqe_dcbx { 4124da0436e9SJames Smart uint32_t tlv_ttl; 4125da0436e9SJames Smart uint32_t reserved; 4126da0436e9SJames Smart uint32_t event_tag; 4127da0436e9SJames Smart uint32_t trailer; 4128da0436e9SJames Smart }; 4129da0436e9SJames Smart 4130b19a061aSJames Smart struct lpfc_acqe_grp5 { 4131b19a061aSJames Smart uint32_t word0; 413270f3c073SJames Smart #define lpfc_acqe_grp5_type_SHIFT 6 413370f3c073SJames Smart #define lpfc_acqe_grp5_type_MASK 0x00000003 413470f3c073SJames Smart #define lpfc_acqe_grp5_type_WORD word0 413570f3c073SJames Smart #define lpfc_acqe_grp5_number_SHIFT 0 413670f3c073SJames Smart #define lpfc_acqe_grp5_number_MASK 0x0000003F 413770f3c073SJames Smart #define lpfc_acqe_grp5_number_WORD word0 4138b19a061aSJames Smart uint32_t word1; 4139b19a061aSJames Smart #define lpfc_acqe_grp5_llink_spd_SHIFT 16 4140b19a061aSJames Smart #define lpfc_acqe_grp5_llink_spd_MASK 0x0000FFFF 4141b19a061aSJames Smart #define lpfc_acqe_grp5_llink_spd_WORD word1 4142b19a061aSJames Smart uint32_t event_tag; 4143b19a061aSJames Smart uint32_t trailer; 4144b19a061aSJames Smart }; 4145b19a061aSJames Smart 4146a73cb814SBart Van Assche extern const char *const trunk_errmsg[]; 41471dc5ec24SJames Smart 414870f3c073SJames Smart struct lpfc_acqe_fc_la { 414970f3c073SJames Smart uint32_t word0; 415070f3c073SJames Smart #define lpfc_acqe_fc_la_speed_SHIFT 24 415170f3c073SJames Smart #define lpfc_acqe_fc_la_speed_MASK 0x000000FF 415270f3c073SJames Smart #define lpfc_acqe_fc_la_speed_WORD word0 415326d830ecSJames Smart #define LPFC_FC_LA_SPEED_UNKNOWN 0x0 415470f3c073SJames Smart #define LPFC_FC_LA_SPEED_1G 0x1 415570f3c073SJames Smart #define LPFC_FC_LA_SPEED_2G 0x2 415670f3c073SJames Smart #define LPFC_FC_LA_SPEED_4G 0x4 415770f3c073SJames Smart #define LPFC_FC_LA_SPEED_8G 0x8 415870f3c073SJames Smart #define LPFC_FC_LA_SPEED_10G 0xA 415970f3c073SJames Smart #define LPFC_FC_LA_SPEED_16G 0x10 416086478875SJames Smart #define LPFC_FC_LA_SPEED_32G 0x20 4161fbd8a6baSJames Smart #define LPFC_FC_LA_SPEED_64G 0x21 4162fbd8a6baSJames Smart #define LPFC_FC_LA_SPEED_128G 0x22 4163fbd8a6baSJames Smart #define LPFC_FC_LA_SPEED_256G 0x23 416470f3c073SJames Smart #define lpfc_acqe_fc_la_topology_SHIFT 16 416570f3c073SJames Smart #define lpfc_acqe_fc_la_topology_MASK 0x000000FF 416670f3c073SJames Smart #define lpfc_acqe_fc_la_topology_WORD word0 416770f3c073SJames Smart #define LPFC_FC_LA_TOP_UNKOWN 0x0 416870f3c073SJames Smart #define LPFC_FC_LA_TOP_P2P 0x1 416970f3c073SJames Smart #define LPFC_FC_LA_TOP_FCAL 0x2 417070f3c073SJames Smart #define LPFC_FC_LA_TOP_INTERNAL_LOOP 0x3 417170f3c073SJames Smart #define LPFC_FC_LA_TOP_SERDES_LOOP 0x4 417270f3c073SJames Smart #define lpfc_acqe_fc_la_att_type_SHIFT 8 417370f3c073SJames Smart #define lpfc_acqe_fc_la_att_type_MASK 0x000000FF 417470f3c073SJames Smart #define lpfc_acqe_fc_la_att_type_WORD word0 417570f3c073SJames Smart #define LPFC_FC_LA_TYPE_LINK_UP 0x1 417670f3c073SJames Smart #define LPFC_FC_LA_TYPE_LINK_DOWN 0x2 417770f3c073SJames Smart #define LPFC_FC_LA_TYPE_NO_HARD_ALPA 0x3 41787bdedb34SJames Smart #define LPFC_FC_LA_TYPE_MDS_LINK_DOWN 0x4 41797bdedb34SJames Smart #define LPFC_FC_LA_TYPE_MDS_LOOPBACK 0x5 4180aeb3c817SJames Smart #define LPFC_FC_LA_TYPE_UNEXP_WWPN 0x6 41811dc5ec24SJames Smart #define LPFC_FC_LA_TYPE_TRUNKING_EVENT 0x7 418296fb8c34SJustin Tee #define LPFC_FC_LA_TYPE_ACTIVATE_FAIL 0x8 418396fb8c34SJustin Tee #define LPFC_FC_LA_TYPE_LINK_RESET_PRTCL_EVT 0x9 418470f3c073SJames Smart #define lpfc_acqe_fc_la_port_type_SHIFT 6 418570f3c073SJames Smart #define lpfc_acqe_fc_la_port_type_MASK 0x00000003 418670f3c073SJames Smart #define lpfc_acqe_fc_la_port_type_WORD word0 418770f3c073SJames Smart #define LPFC_LINK_TYPE_ETHERNET 0x0 418870f3c073SJames Smart #define LPFC_LINK_TYPE_FC 0x1 418970f3c073SJames Smart #define lpfc_acqe_fc_la_port_number_SHIFT 0 419070f3c073SJames Smart #define lpfc_acqe_fc_la_port_number_MASK 0x0000003F 419170f3c073SJames Smart #define lpfc_acqe_fc_la_port_number_WORD word0 41921dc5ec24SJames Smart 41931dc5ec24SJames Smart /* Attention Type is 0x07 (Trunking Event) word0 */ 41941dc5ec24SJames Smart #define lpfc_acqe_fc_la_trunk_link_status_port0_SHIFT 16 41951dc5ec24SJames Smart #define lpfc_acqe_fc_la_trunk_link_status_port0_MASK 0x0000001 41961dc5ec24SJames Smart #define lpfc_acqe_fc_la_trunk_link_status_port0_WORD word0 41971dc5ec24SJames Smart #define lpfc_acqe_fc_la_trunk_link_status_port1_SHIFT 17 41981dc5ec24SJames Smart #define lpfc_acqe_fc_la_trunk_link_status_port1_MASK 0x0000001 41991dc5ec24SJames Smart #define lpfc_acqe_fc_la_trunk_link_status_port1_WORD word0 42001dc5ec24SJames Smart #define lpfc_acqe_fc_la_trunk_link_status_port2_SHIFT 18 42011dc5ec24SJames Smart #define lpfc_acqe_fc_la_trunk_link_status_port2_MASK 0x0000001 42021dc5ec24SJames Smart #define lpfc_acqe_fc_la_trunk_link_status_port2_WORD word0 42031dc5ec24SJames Smart #define lpfc_acqe_fc_la_trunk_link_status_port3_SHIFT 19 42041dc5ec24SJames Smart #define lpfc_acqe_fc_la_trunk_link_status_port3_MASK 0x0000001 42051dc5ec24SJames Smart #define lpfc_acqe_fc_la_trunk_link_status_port3_WORD word0 42061dc5ec24SJames Smart #define lpfc_acqe_fc_la_trunk_config_port0_SHIFT 20 42071dc5ec24SJames Smart #define lpfc_acqe_fc_la_trunk_config_port0_MASK 0x0000001 42081dc5ec24SJames Smart #define lpfc_acqe_fc_la_trunk_config_port0_WORD word0 42091dc5ec24SJames Smart #define lpfc_acqe_fc_la_trunk_config_port1_SHIFT 21 42101dc5ec24SJames Smart #define lpfc_acqe_fc_la_trunk_config_port1_MASK 0x0000001 42111dc5ec24SJames Smart #define lpfc_acqe_fc_la_trunk_config_port1_WORD word0 42121dc5ec24SJames Smart #define lpfc_acqe_fc_la_trunk_config_port2_SHIFT 22 42131dc5ec24SJames Smart #define lpfc_acqe_fc_la_trunk_config_port2_MASK 0x0000001 42141dc5ec24SJames Smart #define lpfc_acqe_fc_la_trunk_config_port2_WORD word0 42151dc5ec24SJames Smart #define lpfc_acqe_fc_la_trunk_config_port3_SHIFT 23 42161dc5ec24SJames Smart #define lpfc_acqe_fc_la_trunk_config_port3_MASK 0x0000001 42171dc5ec24SJames Smart #define lpfc_acqe_fc_la_trunk_config_port3_WORD word0 421870f3c073SJames Smart uint32_t word1; 421970f3c073SJames Smart #define lpfc_acqe_fc_la_llink_spd_SHIFT 16 422070f3c073SJames Smart #define lpfc_acqe_fc_la_llink_spd_MASK 0x0000FFFF 422170f3c073SJames Smart #define lpfc_acqe_fc_la_llink_spd_WORD word1 422270f3c073SJames Smart #define lpfc_acqe_fc_la_fault_SHIFT 0 422370f3c073SJames Smart #define lpfc_acqe_fc_la_fault_MASK 0x000000FF 422470f3c073SJames Smart #define lpfc_acqe_fc_la_fault_WORD word1 422596fb8c34SJustin Tee #define lpfc_acqe_fc_la_link_status_SHIFT 8 422696fb8c34SJustin Tee #define lpfc_acqe_fc_la_link_status_MASK 0x0000007F 422796fb8c34SJustin Tee #define lpfc_acqe_fc_la_link_status_WORD word1 42281dc5ec24SJames Smart #define lpfc_acqe_fc_la_trunk_fault_SHIFT 0 42291dc5ec24SJames Smart #define lpfc_acqe_fc_la_trunk_fault_MASK 0x0000000F 42301dc5ec24SJames Smart #define lpfc_acqe_fc_la_trunk_fault_WORD word1 42311dc5ec24SJames Smart #define lpfc_acqe_fc_la_trunk_linkmask_SHIFT 4 42321dc5ec24SJames Smart #define lpfc_acqe_fc_la_trunk_linkmask_MASK 0x000000F 42331dc5ec24SJames Smart #define lpfc_acqe_fc_la_trunk_linkmask_WORD word1 423470f3c073SJames Smart #define LPFC_FC_LA_FAULT_NONE 0x0 423570f3c073SJames Smart #define LPFC_FC_LA_FAULT_LOCAL 0x1 423670f3c073SJames Smart #define LPFC_FC_LA_FAULT_REMOTE 0x2 423770f3c073SJames Smart uint32_t event_tag; 423870f3c073SJames Smart uint32_t trailer; 423970f3c073SJames Smart #define LPFC_FC_LA_EVENT_TYPE_FC_LINK 0x1 424070f3c073SJames Smart #define LPFC_FC_LA_EVENT_TYPE_SHARED_LINK 0x2 424170f3c073SJames Smart }; 424270f3c073SJames Smart 42434b8bae08SJames Smart struct lpfc_acqe_misconfigured_event { 42444b8bae08SJames Smart struct { 42454b8bae08SJames Smart uint32_t word0; 4246448193b5SJames Smart #define lpfc_sli_misconfigured_port0_state_SHIFT 0 4247448193b5SJames Smart #define lpfc_sli_misconfigured_port0_state_MASK 0x000000FF 4248448193b5SJames Smart #define lpfc_sli_misconfigured_port0_state_WORD word0 4249448193b5SJames Smart #define lpfc_sli_misconfigured_port1_state_SHIFT 8 4250448193b5SJames Smart #define lpfc_sli_misconfigured_port1_state_MASK 0x000000FF 4251448193b5SJames Smart #define lpfc_sli_misconfigured_port1_state_WORD word0 4252448193b5SJames Smart #define lpfc_sli_misconfigured_port2_state_SHIFT 16 4253448193b5SJames Smart #define lpfc_sli_misconfigured_port2_state_MASK 0x000000FF 4254448193b5SJames Smart #define lpfc_sli_misconfigured_port2_state_WORD word0 4255448193b5SJames Smart #define lpfc_sli_misconfigured_port3_state_SHIFT 24 4256448193b5SJames Smart #define lpfc_sli_misconfigured_port3_state_MASK 0x000000FF 4257448193b5SJames Smart #define lpfc_sli_misconfigured_port3_state_WORD word0 4258448193b5SJames Smart uint32_t word1; 4259448193b5SJames Smart #define lpfc_sli_misconfigured_port0_op_SHIFT 0 4260448193b5SJames Smart #define lpfc_sli_misconfigured_port0_op_MASK 0x00000001 4261448193b5SJames Smart #define lpfc_sli_misconfigured_port0_op_WORD word1 4262448193b5SJames Smart #define lpfc_sli_misconfigured_port0_severity_SHIFT 1 4263448193b5SJames Smart #define lpfc_sli_misconfigured_port0_severity_MASK 0x00000003 4264448193b5SJames Smart #define lpfc_sli_misconfigured_port0_severity_WORD word1 4265448193b5SJames Smart #define lpfc_sli_misconfigured_port1_op_SHIFT 8 4266448193b5SJames Smart #define lpfc_sli_misconfigured_port1_op_MASK 0x00000001 4267448193b5SJames Smart #define lpfc_sli_misconfigured_port1_op_WORD word1 4268448193b5SJames Smart #define lpfc_sli_misconfigured_port1_severity_SHIFT 9 4269448193b5SJames Smart #define lpfc_sli_misconfigured_port1_severity_MASK 0x00000003 4270448193b5SJames Smart #define lpfc_sli_misconfigured_port1_severity_WORD word1 4271448193b5SJames Smart #define lpfc_sli_misconfigured_port2_op_SHIFT 16 4272448193b5SJames Smart #define lpfc_sli_misconfigured_port2_op_MASK 0x00000001 4273448193b5SJames Smart #define lpfc_sli_misconfigured_port2_op_WORD word1 4274448193b5SJames Smart #define lpfc_sli_misconfigured_port2_severity_SHIFT 17 4275448193b5SJames Smart #define lpfc_sli_misconfigured_port2_severity_MASK 0x00000003 4276448193b5SJames Smart #define lpfc_sli_misconfigured_port2_severity_WORD word1 4277448193b5SJames Smart #define lpfc_sli_misconfigured_port3_op_SHIFT 24 4278448193b5SJames Smart #define lpfc_sli_misconfigured_port3_op_MASK 0x00000001 4279448193b5SJames Smart #define lpfc_sli_misconfigured_port3_op_WORD word1 4280448193b5SJames Smart #define lpfc_sli_misconfigured_port3_severity_SHIFT 25 4281448193b5SJames Smart #define lpfc_sli_misconfigured_port3_severity_MASK 0x00000003 4282448193b5SJames Smart #define lpfc_sli_misconfigured_port3_severity_WORD word1 42834b8bae08SJames Smart } theEvent; 42844b8bae08SJames Smart #define LPFC_SLI_EVENT_STATUS_VALID 0x00 42854b8bae08SJames Smart #define LPFC_SLI_EVENT_STATUS_NOT_PRESENT 0x01 42864b8bae08SJames Smart #define LPFC_SLI_EVENT_STATUS_WRONG_TYPE 0x02 42874b8bae08SJames Smart #define LPFC_SLI_EVENT_STATUS_UNSUPPORTED 0x03 4288448193b5SJames Smart #define LPFC_SLI_EVENT_STATUS_UNQUALIFIED 0x04 4289448193b5SJames Smart #define LPFC_SLI_EVENT_STATUS_UNCERTIFIED 0x05 42904b8bae08SJames Smart }; 42914b8bae08SJames Smart 42929064aeb2SJames Smart struct lpfc_acqe_cgn_signal { 42939064aeb2SJames Smart u32 word0; 42949064aeb2SJames Smart #define lpfc_warn_acqe_SHIFT 0 42959064aeb2SJames Smart #define lpfc_warn_acqe_MASK 0x7FFFFFFF 42969064aeb2SJames Smart #define lpfc_warn_acqe_WORD word0 42979064aeb2SJames Smart #define lpfc_imm_acqe_SHIFT 31 42989064aeb2SJames Smart #define lpfc_imm_acqe_MASK 0x1 42999064aeb2SJames Smart #define lpfc_imm_acqe_WORD word0 43009064aeb2SJames Smart u32 alarm_cnt; 43019064aeb2SJames Smart u32 word2; 43029064aeb2SJames Smart u32 trailer; 43039064aeb2SJames Smart }; 43049064aeb2SJames Smart 430570f3c073SJames Smart struct lpfc_acqe_sli { 430670f3c073SJames Smart uint32_t event_data1; 430770f3c073SJames Smart uint32_t event_data2; 4308dbb1e2ffSJames Smart uint32_t event_data3; 430970f3c073SJames Smart uint32_t trailer; 431070f3c073SJames Smart #define LPFC_SLI_EVENT_TYPE_PORT_ERROR 0x1 431170f3c073SJames Smart #define LPFC_SLI_EVENT_TYPE_OVER_TEMP 0x2 431270f3c073SJames Smart #define LPFC_SLI_EVENT_TYPE_NORM_TEMP 0x3 431370f3c073SJames Smart #define LPFC_SLI_EVENT_TYPE_NVLOG_POST 0x4 431470f3c073SJames Smart #define LPFC_SLI_EVENT_TYPE_DIAG_DUMP 0x5 43154b8bae08SJames Smart #define LPFC_SLI_EVENT_TYPE_MISCONFIGURED 0x9 4316946727dcSJames Smart #define LPFC_SLI_EVENT_TYPE_REMOTE_DPORT 0xA 4317daebf93fSJames Smart #define LPFC_SLI_EVENT_TYPE_PORT_PARAMS_CHG 0xE 4318e7d85952SJames Smart #define LPFC_SLI_EVENT_TYPE_MISCONF_FAWWN 0xF 4319d11ed16dSJames Smart #define LPFC_SLI_EVENT_TYPE_EEPROM_FAILURE 0x10 43209064aeb2SJames Smart #define LPFC_SLI_EVENT_TYPE_CGN_SIGNAL 0x11 4321dbb1e2ffSJames Smart #define LPFC_SLI_EVENT_TYPE_RD_SIGNAL 0x12 4322140bd888SJustin Tee #define LPFC_SLI_EVENT_TYPE_RESET_CM_STATS 0x13 432370f3c073SJames Smart }; 432470f3c073SJames Smart 4325da0436e9SJames Smart /* 4326da0436e9SJames Smart * Define the bootstrap mailbox (bmbx) region used to communicate 4327da0436e9SJames Smart * mailbox command between the host and port. The mailbox consists 4328da0436e9SJames Smart * of a payload area of 256 bytes and a completion queue of length 4329da0436e9SJames Smart * 16 bytes. 4330da0436e9SJames Smart */ 4331da0436e9SJames Smart struct lpfc_bmbx_create { 4332da0436e9SJames Smart struct lpfc_mqe mqe; 4333da0436e9SJames Smart struct lpfc_mcqe mcqe; 4334da0436e9SJames Smart }; 4335da0436e9SJames Smart 4336da0436e9SJames Smart #define SGL_ALIGN_SZ 64 4337da0436e9SJames Smart #define SGL_PAGE_SIZE 4096 4338da0436e9SJames Smart /* align SGL addr on a size boundary - adjust address up */ 43396d368e53SJames Smart #define NO_XRI 0xffff 43405ffc266eSJames Smart 4341da0436e9SJames Smart struct wqe_common { 4342da0436e9SJames Smart uint32_t word6; 43436669f9bbSJames Smart #define wqe_xri_tag_SHIFT 0 43446669f9bbSJames Smart #define wqe_xri_tag_MASK 0x0000FFFF 43456669f9bbSJames Smart #define wqe_xri_tag_WORD word6 4346da0436e9SJames Smart #define wqe_ctxt_tag_SHIFT 16 4347da0436e9SJames Smart #define wqe_ctxt_tag_MASK 0x0000FFFF 4348da0436e9SJames Smart #define wqe_ctxt_tag_WORD word6 4349da0436e9SJames Smart uint32_t word7; 4350f9bb2da1SJames Smart #define wqe_dif_SHIFT 0 4351f9bb2da1SJames Smart #define wqe_dif_MASK 0x00000003 4352f9bb2da1SJames Smart #define wqe_dif_WORD word7 43538012cc38SJames Smart #define LPFC_WQE_DIF_PASSTHRU 1 43548012cc38SJames Smart #define LPFC_WQE_DIF_STRIP 2 43558012cc38SJames Smart #define LPFC_WQE_DIF_INSERT 3 4356da0436e9SJames Smart #define wqe_ct_SHIFT 2 4357da0436e9SJames Smart #define wqe_ct_MASK 0x00000003 4358da0436e9SJames Smart #define wqe_ct_WORD word7 4359da0436e9SJames Smart #define wqe_status_SHIFT 4 4360da0436e9SJames Smart #define wqe_status_MASK 0x0000000f 4361da0436e9SJames Smart #define wqe_status_WORD word7 4362da0436e9SJames Smart #define wqe_cmnd_SHIFT 8 4363da0436e9SJames Smart #define wqe_cmnd_MASK 0x000000ff 4364da0436e9SJames Smart #define wqe_cmnd_WORD word7 4365da0436e9SJames Smart #define wqe_class_SHIFT 16 4366da0436e9SJames Smart #define wqe_class_MASK 0x00000007 4367da0436e9SJames Smart #define wqe_class_WORD word7 4368f9bb2da1SJames Smart #define wqe_ar_SHIFT 19 4369f9bb2da1SJames Smart #define wqe_ar_MASK 0x00000001 4370f9bb2da1SJames Smart #define wqe_ar_WORD word7 4371f9bb2da1SJames Smart #define wqe_ag_SHIFT wqe_ar_SHIFT 4372f9bb2da1SJames Smart #define wqe_ag_MASK wqe_ar_MASK 4373f9bb2da1SJames Smart #define wqe_ag_WORD wqe_ar_WORD 4374da0436e9SJames Smart #define wqe_pu_SHIFT 20 4375da0436e9SJames Smart #define wqe_pu_MASK 0x00000003 4376da0436e9SJames Smart #define wqe_pu_WORD word7 4377da0436e9SJames Smart #define wqe_erp_SHIFT 22 4378da0436e9SJames Smart #define wqe_erp_MASK 0x00000001 4379da0436e9SJames Smart #define wqe_erp_WORD word7 4380f9bb2da1SJames Smart #define wqe_conf_SHIFT wqe_erp_SHIFT 4381f9bb2da1SJames Smart #define wqe_conf_MASK wqe_erp_MASK 4382f9bb2da1SJames Smart #define wqe_conf_WORD wqe_erp_WORD 4383da0436e9SJames Smart #define wqe_lnk_SHIFT 23 4384da0436e9SJames Smart #define wqe_lnk_MASK 0x00000001 4385da0436e9SJames Smart #define wqe_lnk_WORD word7 4386da0436e9SJames Smart #define wqe_tmo_SHIFT 24 4387da0436e9SJames Smart #define wqe_tmo_MASK 0x000000ff 4388da0436e9SJames Smart #define wqe_tmo_WORD word7 4389da0436e9SJames Smart uint32_t abort_tag; /* word 8 in WQE */ 4390da0436e9SJames Smart uint32_t word9; 4391da0436e9SJames Smart #define wqe_reqtag_SHIFT 0 4392da0436e9SJames Smart #define wqe_reqtag_MASK 0x0000FFFF 4393da0436e9SJames Smart #define wqe_reqtag_WORD word9 4394c31098ceSJames Smart #define wqe_temp_rpi_SHIFT 16 4395c31098ceSJames Smart #define wqe_temp_rpi_MASK 0x0000FFFF 4396c31098ceSJames Smart #define wqe_temp_rpi_WORD word9 4397da0436e9SJames Smart #define wqe_rcvoxid_SHIFT 16 4398da0436e9SJames Smart #define wqe_rcvoxid_MASK 0x0000FFFF 4399da0436e9SJames Smart #define wqe_rcvoxid_WORD word9 4400e62245d9SJames Smart #define wqe_sof_SHIFT 24 4401e62245d9SJames Smart #define wqe_sof_MASK 0x000000FF 4402e62245d9SJames Smart #define wqe_sof_WORD word9 4403e62245d9SJames Smart #define wqe_eof_SHIFT 16 4404e62245d9SJames Smart #define wqe_eof_MASK 0x000000FF 4405e62245d9SJames Smart #define wqe_eof_WORD word9 4406da0436e9SJames Smart uint32_t word10; 4407f0d9bcccSJames Smart #define wqe_ebde_cnt_SHIFT 0 44082fcee4bfSJames Smart #define wqe_ebde_cnt_MASK 0x0000000f 4409f0d9bcccSJames Smart #define wqe_ebde_cnt_WORD word10 4410b101eb27SJames Smart #define wqe_xchg_SHIFT 4 4411b101eb27SJames Smart #define wqe_xchg_MASK 0x00000001 4412b101eb27SJames Smart #define wqe_xchg_WORD word10 4413b101eb27SJames Smart #define LPFC_SCSI_XCHG 0x0 4414b101eb27SJames Smart #define LPFC_NVME_XCHG 0x1 44155e633302SGaurav Srivastava #define wqe_appid_SHIFT 5 44165e633302SGaurav Srivastava #define wqe_appid_MASK 0x00000001 44175e633302SGaurav Srivastava #define wqe_appid_WORD word10 44181ba981fdSJames Smart #define wqe_oas_SHIFT 6 44191ba981fdSJames Smart #define wqe_oas_MASK 0x00000001 44201ba981fdSJames Smart #define wqe_oas_WORD word10 4421f0d9bcccSJames Smart #define wqe_lenloc_SHIFT 7 4422f0d9bcccSJames Smart #define wqe_lenloc_MASK 0x00000003 4423f0d9bcccSJames Smart #define wqe_lenloc_WORD word10 4424f0d9bcccSJames Smart #define LPFC_WQE_LENLOC_NONE 0 4425f0d9bcccSJames Smart #define LPFC_WQE_LENLOC_WORD3 1 4426f0d9bcccSJames Smart #define LPFC_WQE_LENLOC_WORD12 2 4427f0d9bcccSJames Smart #define LPFC_WQE_LENLOC_WORD4 3 4428f0d9bcccSJames Smart #define wqe_qosd_SHIFT 9 4429f0d9bcccSJames Smart #define wqe_qosd_MASK 0x00000001 4430f0d9bcccSJames Smart #define wqe_qosd_WORD word10 4431f0d9bcccSJames Smart #define wqe_xbl_SHIFT 11 4432f0d9bcccSJames Smart #define wqe_xbl_MASK 0x00000001 4433f0d9bcccSJames Smart #define wqe_xbl_WORD word10 4434f0d9bcccSJames Smart #define wqe_iod_SHIFT 13 4435f0d9bcccSJames Smart #define wqe_iod_MASK 0x00000001 4436f0d9bcccSJames Smart #define wqe_iod_WORD word10 44375fd11085SJames Smart #define LPFC_WQE_IOD_NONE 0 4438f0d9bcccSJames Smart #define LPFC_WQE_IOD_WRITE 0 4439f0d9bcccSJames Smart #define LPFC_WQE_IOD_READ 1 4440f0d9bcccSJames Smart #define wqe_dbde_SHIFT 14 4441f0d9bcccSJames Smart #define wqe_dbde_MASK 0x00000001 4442f0d9bcccSJames Smart #define wqe_dbde_WORD word10 4443f0d9bcccSJames Smart #define wqe_wqes_SHIFT 15 4444f0d9bcccSJames Smart #define wqe_wqes_MASK 0x00000001 4445f0d9bcccSJames Smart #define wqe_wqes_WORD word10 4446fedd3b7bSJames Smart /* Note that this field overlaps above fields */ 4447fedd3b7bSJames Smart #define wqe_wqid_SHIFT 1 44489589b062SJames Smart #define wqe_wqid_MASK 0x00007fff 4449fedd3b7bSJames Smart #define wqe_wqid_WORD word10 4450da0436e9SJames Smart #define wqe_pri_SHIFT 16 4451da0436e9SJames Smart #define wqe_pri_MASK 0x00000007 4452da0436e9SJames Smart #define wqe_pri_WORD word10 4453da0436e9SJames Smart #define wqe_pv_SHIFT 19 4454da0436e9SJames Smart #define wqe_pv_MASK 0x00000001 4455da0436e9SJames Smart #define wqe_pv_WORD word10 4456da0436e9SJames Smart #define wqe_xc_SHIFT 21 4457da0436e9SJames Smart #define wqe_xc_MASK 0x00000001 4458da0436e9SJames Smart #define wqe_xc_WORD word10 4459f9bb2da1SJames Smart #define wqe_sr_SHIFT 22 4460f9bb2da1SJames Smart #define wqe_sr_MASK 0x00000001 4461f9bb2da1SJames Smart #define wqe_sr_WORD word10 4462da0436e9SJames Smart #define wqe_ccpe_SHIFT 23 4463da0436e9SJames Smart #define wqe_ccpe_MASK 0x00000001 4464da0436e9SJames Smart #define wqe_ccpe_WORD word10 4465da0436e9SJames Smart #define wqe_ccp_SHIFT 24 4466da0436e9SJames Smart #define wqe_ccp_MASK 0x000000ff 4467da0436e9SJames Smart #define wqe_ccp_WORD word10 4468da0436e9SJames Smart uint32_t word11; 4469da0436e9SJames Smart #define wqe_cmd_type_SHIFT 0 4470da0436e9SJames Smart #define wqe_cmd_type_MASK 0x0000000f 4471da0436e9SJames Smart #define wqe_cmd_type_WORD word11 4472f0d9bcccSJames Smart #define wqe_els_id_SHIFT 4 4473fd4a0c6dSJames Smart #define wqe_els_id_MASK 0x00000007 4474f0d9bcccSJames Smart #define wqe_els_id_WORD word11 4475f358dd0cSJames Smart #define wqe_irsp_SHIFT 4 4476f358dd0cSJames Smart #define wqe_irsp_MASK 0x00000001 4477f358dd0cSJames Smart #define wqe_irsp_WORD word11 44780bc2b7c5SJames Smart #define wqe_pbde_SHIFT 5 44790bc2b7c5SJames Smart #define wqe_pbde_MASK 0x00000001 44800bc2b7c5SJames Smart #define wqe_pbde_WORD word11 4481f358dd0cSJames Smart #define wqe_sup_SHIFT 6 4482f358dd0cSJames Smart #define wqe_sup_MASK 0x00000001 4483f358dd0cSJames Smart #define wqe_sup_WORD word11 44842e7e9c0cSJames Smart #define wqe_ffrq_SHIFT 6 44852e7e9c0cSJames Smart #define wqe_ffrq_MASK 0x00000001 44862e7e9c0cSJames Smart #define wqe_ffrq_WORD word11 4487da0436e9SJames Smart #define wqe_wqec_SHIFT 7 4488da0436e9SJames Smart #define wqe_wqec_MASK 0x00000001 4489da0436e9SJames Smart #define wqe_wqec_WORD word11 4490f358dd0cSJames Smart #define wqe_irsplen_SHIFT 8 4491f358dd0cSJames Smart #define wqe_irsplen_MASK 0x0000000f 4492f358dd0cSJames Smart #define wqe_irsplen_WORD word11 4493da0436e9SJames Smart #define wqe_cqid_SHIFT 16 44946669f9bbSJames Smart #define wqe_cqid_MASK 0x0000ffff 4495da0436e9SJames Smart #define wqe_cqid_WORD word11 4496f0d9bcccSJames Smart #define LPFC_WQE_CQ_ID_DEFAULT 0xffff 4497da0436e9SJames Smart }; 4498da0436e9SJames Smart 4499da0436e9SJames Smart struct wqe_did { 4500da0436e9SJames Smart uint32_t word5; 4501da0436e9SJames Smart #define wqe_els_did_SHIFT 0 4502da0436e9SJames Smart #define wqe_els_did_MASK 0x00FFFFFF 4503da0436e9SJames Smart #define wqe_els_did_WORD word5 45046669f9bbSJames Smart #define wqe_xmit_bls_pt_SHIFT 28 45056669f9bbSJames Smart #define wqe_xmit_bls_pt_MASK 0x00000003 45066669f9bbSJames Smart #define wqe_xmit_bls_pt_WORD word5 4507da0436e9SJames Smart #define wqe_xmit_bls_ar_SHIFT 30 4508da0436e9SJames Smart #define wqe_xmit_bls_ar_MASK 0x00000001 4509da0436e9SJames Smart #define wqe_xmit_bls_ar_WORD word5 4510da0436e9SJames Smart #define wqe_xmit_bls_xo_SHIFT 31 4511da0436e9SJames Smart #define wqe_xmit_bls_xo_MASK 0x00000001 4512da0436e9SJames Smart #define wqe_xmit_bls_xo_WORD word5 4513da0436e9SJames Smart }; 4514da0436e9SJames Smart 4515f0d9bcccSJames Smart struct lpfc_wqe_generic{ 4516f0d9bcccSJames Smart struct ulp_bde64 bde; 4517f0d9bcccSJames Smart uint32_t word3; 4518f0d9bcccSJames Smart uint32_t word4; 4519f0d9bcccSJames Smart uint32_t word5; 4520f0d9bcccSJames Smart struct wqe_common wqe_com; 4521f0d9bcccSJames Smart uint32_t payload[4]; 4522f0d9bcccSJames Smart }; 4523f0d9bcccSJames Smart 4524fd4a0c6dSJames Smart enum els_request64_wqe_word11 { 4525fd4a0c6dSJames Smart LPFC_ELS_ID_DEFAULT, 4526fd4a0c6dSJames Smart LPFC_ELS_ID_LOGO, 4527fd4a0c6dSJames Smart LPFC_ELS_ID_FDISC, 4528fd4a0c6dSJames Smart LPFC_ELS_ID_FLOGI, 4529fd4a0c6dSJames Smart LPFC_ELS_ID_PLOGI, 4530fd4a0c6dSJames Smart }; 4531fd4a0c6dSJames Smart 4532da0436e9SJames Smart struct els_request64_wqe { 4533da0436e9SJames Smart struct ulp_bde64 bde; 4534da0436e9SJames Smart uint32_t payload_len; 4535da0436e9SJames Smart uint32_t word4; 4536da0436e9SJames Smart #define els_req64_sid_SHIFT 0 4537da0436e9SJames Smart #define els_req64_sid_MASK 0x00FFFFFF 4538da0436e9SJames Smart #define els_req64_sid_WORD word4 4539da0436e9SJames Smart #define els_req64_sp_SHIFT 24 4540da0436e9SJames Smart #define els_req64_sp_MASK 0x00000001 4541da0436e9SJames Smart #define els_req64_sp_WORD word4 4542da0436e9SJames Smart #define els_req64_vf_SHIFT 25 4543da0436e9SJames Smart #define els_req64_vf_MASK 0x00000001 4544da0436e9SJames Smart #define els_req64_vf_WORD word4 4545da0436e9SJames Smart struct wqe_did wqe_dest; 4546da0436e9SJames Smart struct wqe_common wqe_com; /* words 6-11 */ 4547da0436e9SJames Smart uint32_t word12; 4548da0436e9SJames Smart #define els_req64_vfid_SHIFT 1 4549da0436e9SJames Smart #define els_req64_vfid_MASK 0x00000FFF 4550da0436e9SJames Smart #define els_req64_vfid_WORD word12 4551da0436e9SJames Smart #define els_req64_pri_SHIFT 13 4552da0436e9SJames Smart #define els_req64_pri_MASK 0x00000007 4553da0436e9SJames Smart #define els_req64_pri_WORD word12 4554da0436e9SJames Smart uint32_t word13; 4555da0436e9SJames Smart #define els_req64_hopcnt_SHIFT 24 4556da0436e9SJames Smart #define els_req64_hopcnt_MASK 0x000000ff 4557da0436e9SJames Smart #define els_req64_hopcnt_WORD word13 4558af22741cSJames Smart uint32_t word14; 4559af22741cSJames Smart uint32_t max_response_payload_len; 4560da0436e9SJames Smart }; 4561da0436e9SJames Smart 4562da0436e9SJames Smart struct xmit_els_rsp64_wqe { 4563da0436e9SJames Smart struct ulp_bde64 bde; 4564f0d9bcccSJames Smart uint32_t response_payload_len; 4565939723a4SJames Smart uint32_t word4; 4566939723a4SJames Smart #define els_rsp64_sid_SHIFT 0 4567939723a4SJames Smart #define els_rsp64_sid_MASK 0x00FFFFFF 4568939723a4SJames Smart #define els_rsp64_sid_WORD word4 4569939723a4SJames Smart #define els_rsp64_sp_SHIFT 24 4570939723a4SJames Smart #define els_rsp64_sp_MASK 0x00000001 4571939723a4SJames Smart #define els_rsp64_sp_WORD word4 4572da0436e9SJames Smart struct wqe_did wqe_dest; 4573da0436e9SJames Smart struct wqe_common wqe_com; /* words 6-11 */ 4574c31098ceSJames Smart uint32_t word12; 4575c31098ceSJames Smart #define wqe_rsp_temp_rpi_SHIFT 0 4576c31098ceSJames Smart #define wqe_rsp_temp_rpi_MASK 0x0000FFFF 4577c31098ceSJames Smart #define wqe_rsp_temp_rpi_WORD word12 4578c31098ceSJames Smart uint32_t rsvd_13_15[3]; 4579da0436e9SJames Smart }; 4580da0436e9SJames Smart 4581da0436e9SJames Smart struct xmit_bls_rsp64_wqe { 4582da0436e9SJames Smart uint32_t payload0; 45836669f9bbSJames Smart /* Payload0 for BA_ACC */ 45846669f9bbSJames Smart #define xmit_bls_rsp64_acc_seq_id_SHIFT 16 45856669f9bbSJames Smart #define xmit_bls_rsp64_acc_seq_id_MASK 0x000000ff 45866669f9bbSJames Smart #define xmit_bls_rsp64_acc_seq_id_WORD payload0 45876669f9bbSJames Smart #define xmit_bls_rsp64_acc_seq_id_vald_SHIFT 24 45886669f9bbSJames Smart #define xmit_bls_rsp64_acc_seq_id_vald_MASK 0x000000ff 45896669f9bbSJames Smart #define xmit_bls_rsp64_acc_seq_id_vald_WORD payload0 45906669f9bbSJames Smart /* Payload0 for BA_RJT */ 45916669f9bbSJames Smart #define xmit_bls_rsp64_rjt_vspec_SHIFT 0 45926669f9bbSJames Smart #define xmit_bls_rsp64_rjt_vspec_MASK 0x000000ff 45936669f9bbSJames Smart #define xmit_bls_rsp64_rjt_vspec_WORD payload0 45946669f9bbSJames Smart #define xmit_bls_rsp64_rjt_expc_SHIFT 8 45956669f9bbSJames Smart #define xmit_bls_rsp64_rjt_expc_MASK 0x000000ff 45966669f9bbSJames Smart #define xmit_bls_rsp64_rjt_expc_WORD payload0 45976669f9bbSJames Smart #define xmit_bls_rsp64_rjt_rsnc_SHIFT 16 45986669f9bbSJames Smart #define xmit_bls_rsp64_rjt_rsnc_MASK 0x000000ff 45996669f9bbSJames Smart #define xmit_bls_rsp64_rjt_rsnc_WORD payload0 4600da0436e9SJames Smart uint32_t word1; 4601da0436e9SJames Smart #define xmit_bls_rsp64_rxid_SHIFT 0 4602da0436e9SJames Smart #define xmit_bls_rsp64_rxid_MASK 0x0000ffff 4603da0436e9SJames Smart #define xmit_bls_rsp64_rxid_WORD word1 4604da0436e9SJames Smart #define xmit_bls_rsp64_oxid_SHIFT 16 4605da0436e9SJames Smart #define xmit_bls_rsp64_oxid_MASK 0x0000ffff 4606da0436e9SJames Smart #define xmit_bls_rsp64_oxid_WORD word1 4607da0436e9SJames Smart uint32_t word2; 46086669f9bbSJames Smart #define xmit_bls_rsp64_seqcnthi_SHIFT 0 4609da0436e9SJames Smart #define xmit_bls_rsp64_seqcnthi_MASK 0x0000ffff 4610da0436e9SJames Smart #define xmit_bls_rsp64_seqcnthi_WORD word2 46116669f9bbSJames Smart #define xmit_bls_rsp64_seqcntlo_SHIFT 16 46126669f9bbSJames Smart #define xmit_bls_rsp64_seqcntlo_MASK 0x0000ffff 46136669f9bbSJames Smart #define xmit_bls_rsp64_seqcntlo_WORD word2 4614da0436e9SJames Smart uint32_t rsrvd3; 4615da0436e9SJames Smart uint32_t rsrvd4; 4616da0436e9SJames Smart struct wqe_did wqe_dest; 4617da0436e9SJames Smart struct wqe_common wqe_com; /* words 6-11 */ 46186b5151fdSJames Smart uint32_t word12; 46196b5151fdSJames Smart #define xmit_bls_rsp64_temprpi_SHIFT 0 46206b5151fdSJames Smart #define xmit_bls_rsp64_temprpi_MASK 0x0000ffff 46216b5151fdSJames Smart #define xmit_bls_rsp64_temprpi_WORD word12 46226b5151fdSJames Smart uint32_t rsvd_13_15[3]; 4623da0436e9SJames Smart }; 46246669f9bbSJames Smart 4625da0436e9SJames Smart struct wqe_rctl_dfctl { 4626da0436e9SJames Smart uint32_t word5; 4627da0436e9SJames Smart #define wqe_si_SHIFT 2 4628da0436e9SJames Smart #define wqe_si_MASK 0x000000001 4629da0436e9SJames Smart #define wqe_si_WORD word5 4630da0436e9SJames Smart #define wqe_la_SHIFT 3 4631da0436e9SJames Smart #define wqe_la_MASK 0x000000001 4632da0436e9SJames Smart #define wqe_la_WORD word5 46331b51197dSJames Smart #define wqe_xo_SHIFT 6 46341b51197dSJames Smart #define wqe_xo_MASK 0x000000001 46351b51197dSJames Smart #define wqe_xo_WORD word5 4636da0436e9SJames Smart #define wqe_ls_SHIFT 7 4637da0436e9SJames Smart #define wqe_ls_MASK 0x000000001 4638da0436e9SJames Smart #define wqe_ls_WORD word5 4639da0436e9SJames Smart #define wqe_dfctl_SHIFT 8 4640da0436e9SJames Smart #define wqe_dfctl_MASK 0x0000000ff 4641da0436e9SJames Smart #define wqe_dfctl_WORD word5 4642da0436e9SJames Smart #define wqe_type_SHIFT 16 4643da0436e9SJames Smart #define wqe_type_MASK 0x0000000ff 4644da0436e9SJames Smart #define wqe_type_WORD word5 4645da0436e9SJames Smart #define wqe_rctl_SHIFT 24 4646da0436e9SJames Smart #define wqe_rctl_MASK 0x0000000ff 4647da0436e9SJames Smart #define wqe_rctl_WORD word5 4648da0436e9SJames Smart }; 4649da0436e9SJames Smart 4650da0436e9SJames Smart struct xmit_seq64_wqe { 4651da0436e9SJames Smart struct ulp_bde64 bde; 4652f0d9bcccSJames Smart uint32_t rsvd3; 4653da0436e9SJames Smart uint32_t relative_offset; 4654da0436e9SJames Smart struct wqe_rctl_dfctl wge_ctl; 4655da0436e9SJames Smart struct wqe_common wqe_com; /* words 6-11 */ 4656da0436e9SJames Smart uint32_t xmit_len; 4657da0436e9SJames Smart uint32_t rsvd_12_15[3]; 4658da0436e9SJames Smart }; 4659da0436e9SJames Smart struct xmit_bcast64_wqe { 4660da0436e9SJames Smart struct ulp_bde64 bde; 4661f0d9bcccSJames Smart uint32_t seq_payload_len; 4662da0436e9SJames Smart uint32_t rsvd4; 4663da0436e9SJames Smart struct wqe_rctl_dfctl wge_ctl; /* word 5 */ 4664da0436e9SJames Smart struct wqe_common wqe_com; /* words 6-11 */ 4665da0436e9SJames Smart uint32_t rsvd_12_15[4]; 4666da0436e9SJames Smart }; 4667da0436e9SJames Smart 4668da0436e9SJames Smart struct gen_req64_wqe { 4669da0436e9SJames Smart struct ulp_bde64 bde; 4670f0d9bcccSJames Smart uint32_t request_payload_len; 4671f0d9bcccSJames Smart uint32_t relative_offset; 4672da0436e9SJames Smart struct wqe_rctl_dfctl wge_ctl; /* word 5 */ 4673da0436e9SJames Smart struct wqe_common wqe_com; /* words 6-11 */ 4674af22741cSJames Smart uint32_t rsvd_12_14[3]; 4675af22741cSJames Smart uint32_t max_response_payload_len; 4676da0436e9SJames Smart }; 4677da0436e9SJames Smart 4678a0f2d3efSJames Smart /* Define NVME PRLI request to fabric. NVME is a 4679a0f2d3efSJames Smart * fabric-only protocol. 4680a0f2d3efSJames Smart * Updated to red-lined v1.08 on Sept 16, 2016 4681a0f2d3efSJames Smart */ 4682a0f2d3efSJames Smart struct lpfc_nvme_prli { 4683a0f2d3efSJames Smart uint32_t word1; 4684a0f2d3efSJames Smart /* The Response Code is defined in the FCP PRLI lpfc_hw.h */ 4685a0f2d3efSJames Smart #define prli_acc_rsp_code_SHIFT 8 4686a0f2d3efSJames Smart #define prli_acc_rsp_code_MASK 0x0000000f 4687a0f2d3efSJames Smart #define prli_acc_rsp_code_WORD word1 4688a0f2d3efSJames Smart #define prli_estabImagePair_SHIFT 13 4689a0f2d3efSJames Smart #define prli_estabImagePair_MASK 0x00000001 4690a0f2d3efSJames Smart #define prli_estabImagePair_WORD word1 4691a0f2d3efSJames Smart #define prli_type_code_ext_SHIFT 16 4692a0f2d3efSJames Smart #define prli_type_code_ext_MASK 0x000000ff 4693a0f2d3efSJames Smart #define prli_type_code_ext_WORD word1 4694a0f2d3efSJames Smart #define prli_type_code_SHIFT 24 4695a0f2d3efSJames Smart #define prli_type_code_MASK 0x000000ff 4696a0f2d3efSJames Smart #define prli_type_code_WORD word1 4697a0f2d3efSJames Smart uint32_t word_rsvd2; 4698a0f2d3efSJames Smart uint32_t word_rsvd3; 46990d8af096SJames Smart 4700a0f2d3efSJames Smart uint32_t word4; 4701a0f2d3efSJames Smart #define prli_fba_SHIFT 0 4702a0f2d3efSJames Smart #define prli_fba_MASK 0x00000001 4703a0f2d3efSJames Smart #define prli_fba_WORD word4 4704a0f2d3efSJames Smart #define prli_disc_SHIFT 3 4705a0f2d3efSJames Smart #define prli_disc_MASK 0x00000001 4706a0f2d3efSJames Smart #define prli_disc_WORD word4 4707a0f2d3efSJames Smart #define prli_tgt_SHIFT 4 4708a0f2d3efSJames Smart #define prli_tgt_MASK 0x00000001 4709a0f2d3efSJames Smart #define prli_tgt_WORD word4 4710a0f2d3efSJames Smart #define prli_init_SHIFT 5 4711a0f2d3efSJames Smart #define prli_init_MASK 0x00000001 4712a0f2d3efSJames Smart #define prli_init_WORD word4 4713a5ff0681SJames Smart #define prli_conf_SHIFT 7 4714a5ff0681SJames Smart #define prli_conf_MASK 0x00000001 4715a5ff0681SJames Smart #define prli_conf_WORD word4 47160d8af096SJames Smart #define prli_nsler_SHIFT 8 47170d8af096SJames Smart #define prli_nsler_MASK 0x00000001 47180d8af096SJames Smart #define prli_nsler_WORD word4 4719a0f2d3efSJames Smart uint32_t word5; 4720a0f2d3efSJames Smart #define prli_fb_sz_SHIFT 0 4721a0f2d3efSJames Smart #define prli_fb_sz_MASK 0x0000ffff 4722a0f2d3efSJames Smart #define prli_fb_sz_WORD word5 47232d7dbc4cSJames Smart #define LPFC_NVMET_FB_SZ_MAX 65536 /* Driver target mode only. */ 4724a0f2d3efSJames Smart }; 4725a0f2d3efSJames Smart 4726da0436e9SJames Smart struct create_xri_wqe { 4727da0436e9SJames Smart uint32_t rsrvd[5]; /* words 0-4 */ 4728da0436e9SJames Smart struct wqe_did wqe_dest; /* word 5 */ 4729da0436e9SJames Smart struct wqe_common wqe_com; /* words 6-11 */ 4730da0436e9SJames Smart uint32_t rsvd_12_15[4]; /* word 12-15 */ 4731da0436e9SJames Smart }; 4732da0436e9SJames Smart 4733da0436e9SJames Smart #define T_REQUEST_TAG 3 4734da0436e9SJames Smart #define T_XRI_TAG 1 4735da0436e9SJames Smart 4736daebf93fSJames Smart struct cmf_sync_wqe { 4737daebf93fSJames Smart uint32_t rsrvd[3]; 4738daebf93fSJames Smart uint32_t word3; 4739daebf93fSJames Smart #define cmf_sync_interval_SHIFT 0 4740daebf93fSJames Smart #define cmf_sync_interval_MASK 0x00000ffff 4741daebf93fSJames Smart #define cmf_sync_interval_WORD word3 4742daebf93fSJames Smart #define cmf_sync_afpin_SHIFT 16 4743daebf93fSJames Smart #define cmf_sync_afpin_MASK 0x000000001 4744daebf93fSJames Smart #define cmf_sync_afpin_WORD word3 4745daebf93fSJames Smart #define cmf_sync_asig_SHIFT 17 4746daebf93fSJames Smart #define cmf_sync_asig_MASK 0x000000001 4747daebf93fSJames Smart #define cmf_sync_asig_WORD word3 4748daebf93fSJames Smart #define cmf_sync_op_SHIFT 20 4749daebf93fSJames Smart #define cmf_sync_op_MASK 0x00000000f 4750daebf93fSJames Smart #define cmf_sync_op_WORD word3 4751daebf93fSJames Smart #define cmf_sync_ver_SHIFT 24 4752daebf93fSJames Smart #define cmf_sync_ver_MASK 0x0000000ff 4753daebf93fSJames Smart #define cmf_sync_ver_WORD word3 4754daebf93fSJames Smart #define LPFC_CMF_SYNC_VER 1 4755daebf93fSJames Smart uint32_t event_tag; 4756daebf93fSJames Smart uint32_t word5; 4757daebf93fSJames Smart #define cmf_sync_wsigmax_SHIFT 0 4758daebf93fSJames Smart #define cmf_sync_wsigmax_MASK 0x00000ffff 4759daebf93fSJames Smart #define cmf_sync_wsigmax_WORD word5 4760daebf93fSJames Smart #define cmf_sync_wsigcnt_SHIFT 16 4761daebf93fSJames Smart #define cmf_sync_wsigcnt_MASK 0x00000ffff 4762daebf93fSJames Smart #define cmf_sync_wsigcnt_WORD word5 4763daebf93fSJames Smart uint32_t word6; 4764daebf93fSJames Smart uint32_t word7; 4765daebf93fSJames Smart #define cmf_sync_cmnd_SHIFT 8 4766daebf93fSJames Smart #define cmf_sync_cmnd_MASK 0x0000000ff 4767daebf93fSJames Smart #define cmf_sync_cmnd_WORD word7 4768daebf93fSJames Smart uint32_t word8; 4769daebf93fSJames Smart uint32_t word9; 4770daebf93fSJames Smart #define cmf_sync_reqtag_SHIFT 0 4771daebf93fSJames Smart #define cmf_sync_reqtag_MASK 0x00000ffff 4772daebf93fSJames Smart #define cmf_sync_reqtag_WORD word9 4773daebf93fSJames Smart #define cmf_sync_wfpinmax_SHIFT 16 4774daebf93fSJames Smart #define cmf_sync_wfpinmax_MASK 0x0000000ff 4775daebf93fSJames Smart #define cmf_sync_wfpinmax_WORD word9 4776daebf93fSJames Smart #define cmf_sync_wfpincnt_SHIFT 24 4777daebf93fSJames Smart #define cmf_sync_wfpincnt_MASK 0x0000000ff 4778daebf93fSJames Smart #define cmf_sync_wfpincnt_WORD word9 4779daebf93fSJames Smart uint32_t word10; 4780daebf93fSJames Smart #define cmf_sync_qosd_SHIFT 9 4781daebf93fSJames Smart #define cmf_sync_qosd_MASK 0x00000001 4782daebf93fSJames Smart #define cmf_sync_qosd_WORD word10 4783daebf93fSJames Smart uint32_t word11; 4784daebf93fSJames Smart #define cmf_sync_cmd_type_SHIFT 0 4785daebf93fSJames Smart #define cmf_sync_cmd_type_MASK 0x0000000f 4786daebf93fSJames Smart #define cmf_sync_cmd_type_WORD word11 4787daebf93fSJames Smart #define cmf_sync_wqec_SHIFT 7 4788daebf93fSJames Smart #define cmf_sync_wqec_MASK 0x00000001 4789daebf93fSJames Smart #define cmf_sync_wqec_WORD word11 4790daebf93fSJames Smart #define cmf_sync_cqid_SHIFT 16 4791daebf93fSJames Smart #define cmf_sync_cqid_MASK 0x0000ffff 4792daebf93fSJames Smart #define cmf_sync_cqid_WORD word11 4793daebf93fSJames Smart uint32_t read_bytes; 4794daebf93fSJames Smart uint32_t word13; 4795779d61dfSJustin Tee #define cmf_sync_period_SHIFT 24 4796779d61dfSJustin Tee #define cmf_sync_period_MASK 0x000000ff 479771ddeeafSJames Smart #define cmf_sync_period_WORD word13 4798daebf93fSJames Smart uint32_t word14; 4799daebf93fSJames Smart uint32_t word15; 4800daebf93fSJames Smart }; 4801daebf93fSJames Smart 4802da0436e9SJames Smart struct abort_cmd_wqe { 4803da0436e9SJames Smart uint32_t rsrvd[3]; 4804da0436e9SJames Smart uint32_t word3; 4805da0436e9SJames Smart #define abort_cmd_ia_SHIFT 0 4806da0436e9SJames Smart #define abort_cmd_ia_MASK 0x000000001 4807da0436e9SJames Smart #define abort_cmd_ia_WORD word3 4808da0436e9SJames Smart #define abort_cmd_criteria_SHIFT 8 4809da0436e9SJames Smart #define abort_cmd_criteria_MASK 0x0000000ff 4810da0436e9SJames Smart #define abort_cmd_criteria_WORD word3 4811da0436e9SJames Smart uint32_t rsrvd4; 4812da0436e9SJames Smart uint32_t rsrvd5; 4813da0436e9SJames Smart struct wqe_common wqe_com; /* words 6-11 */ 4814da0436e9SJames Smart uint32_t rsvd_12_15[4]; /* word 12-15 */ 4815da0436e9SJames Smart }; 4816da0436e9SJames Smart 4817da0436e9SJames Smart struct fcp_iwrite64_wqe { 4818da0436e9SJames Smart struct ulp_bde64 bde; 48190ba4b219SJames Smart uint32_t word3; 48200ba4b219SJames Smart #define cmd_buff_len_SHIFT 16 48210ba4b219SJames Smart #define cmd_buff_len_MASK 0x00000ffff 48220ba4b219SJames Smart #define cmd_buff_len_WORD word3 482305ab4e78SJustin Tee /* Note: payload_offset_len field depends on ASIC support */ 48240ba4b219SJames Smart #define payload_offset_len_SHIFT 0 48250ba4b219SJames Smart #define payload_offset_len_MASK 0x0000ffff 48260ba4b219SJames Smart #define payload_offset_len_WORD word3 4827da0436e9SJames Smart uint32_t total_xfer_len; 4828da0436e9SJames Smart uint32_t initial_xfer_len; 4829da0436e9SJames Smart struct wqe_common wqe_com; /* words 6-11 */ 4830fedd3b7bSJames Smart uint32_t rsrvd12; 4831fedd3b7bSJames Smart struct ulp_bde64 ph_bde; /* words 13-15 */ 4832da0436e9SJames Smart }; 4833da0436e9SJames Smart 4834da0436e9SJames Smart struct fcp_iread64_wqe { 4835da0436e9SJames Smart struct ulp_bde64 bde; 48360ba4b219SJames Smart uint32_t word3; 48370ba4b219SJames Smart #define cmd_buff_len_SHIFT 16 48380ba4b219SJames Smart #define cmd_buff_len_MASK 0x00000ffff 48390ba4b219SJames Smart #define cmd_buff_len_WORD word3 484005ab4e78SJustin Tee /* Note: payload_offset_len field depends on ASIC support */ 48410ba4b219SJames Smart #define payload_offset_len_SHIFT 0 48420ba4b219SJames Smart #define payload_offset_len_MASK 0x0000ffff 48430ba4b219SJames Smart #define payload_offset_len_WORD word3 4844da0436e9SJames Smart uint32_t total_xfer_len; /* word 4 */ 4845da0436e9SJames Smart uint32_t rsrvd5; /* word 5 */ 4846da0436e9SJames Smart struct wqe_common wqe_com; /* words 6-11 */ 4847fedd3b7bSJames Smart uint32_t rsrvd12; 4848fedd3b7bSJames Smart struct ulp_bde64 ph_bde; /* words 13-15 */ 4849da0436e9SJames Smart }; 4850da0436e9SJames Smart 4851da0436e9SJames Smart struct fcp_icmnd64_wqe { 4852da0436e9SJames Smart struct ulp_bde64 bde; /* words 0-2 */ 48530ba4b219SJames Smart uint32_t word3; 48540ba4b219SJames Smart #define cmd_buff_len_SHIFT 16 48550ba4b219SJames Smart #define cmd_buff_len_MASK 0x00000ffff 48560ba4b219SJames Smart #define cmd_buff_len_WORD word3 485705ab4e78SJustin Tee /* Note: payload_offset_len field depends on ASIC support */ 48580ba4b219SJames Smart #define payload_offset_len_SHIFT 0 48590ba4b219SJames Smart #define payload_offset_len_MASK 0x0000ffff 48600ba4b219SJames Smart #define payload_offset_len_WORD word3 4861f0d9bcccSJames Smart uint32_t rsrvd4; /* word 4 */ 4862f0d9bcccSJames Smart uint32_t rsrvd5; /* word 5 */ 4863da0436e9SJames Smart struct wqe_common wqe_com; /* words 6-11 */ 4864da0436e9SJames Smart uint32_t rsvd_12_15[4]; /* word 12-15 */ 4865da0436e9SJames Smart }; 4866da0436e9SJames Smart 4867f358dd0cSJames Smart struct fcp_trsp64_wqe { 4868f358dd0cSJames Smart struct ulp_bde64 bde; 4869f358dd0cSJames Smart uint32_t response_len; 4870f358dd0cSJames Smart uint32_t rsvd_4_5[2]; 4871f358dd0cSJames Smart struct wqe_common wqe_com; /* words 6-11 */ 4872f358dd0cSJames Smart uint32_t rsvd_12_15[4]; /* word 12-15 */ 4873f358dd0cSJames Smart }; 4874f358dd0cSJames Smart 4875f358dd0cSJames Smart struct fcp_tsend64_wqe { 4876f358dd0cSJames Smart struct ulp_bde64 bde; 4877f358dd0cSJames Smart uint32_t payload_offset_len; 4878f358dd0cSJames Smart uint32_t relative_offset; 4879f358dd0cSJames Smart uint32_t reserved; 4880f358dd0cSJames Smart struct wqe_common wqe_com; /* words 6-11 */ 4881f358dd0cSJames Smart uint32_t fcp_data_len; /* word 12 */ 4882f358dd0cSJames Smart uint32_t rsvd_13_15[3]; /* word 13-15 */ 4883f358dd0cSJames Smart }; 4884f358dd0cSJames Smart 4885f358dd0cSJames Smart struct fcp_treceive64_wqe { 4886f358dd0cSJames Smart struct ulp_bde64 bde; 4887f358dd0cSJames Smart uint32_t payload_offset_len; 4888f358dd0cSJames Smart uint32_t relative_offset; 4889f358dd0cSJames Smart uint32_t reserved; 4890f358dd0cSJames Smart struct wqe_common wqe_com; /* words 6-11 */ 4891f358dd0cSJames Smart uint32_t fcp_data_len; /* word 12 */ 4892f358dd0cSJames Smart uint32_t rsvd_13_15[3]; /* word 13-15 */ 4893f358dd0cSJames Smart }; 4894f358dd0cSJames Smart #define TXRDY_PAYLOAD_LEN 12 4895f358dd0cSJames Smart 4896ae9e28f3SJames Smart #define CMD_SEND_FRAME 0xE1 4897ae9e28f3SJames Smart 4898ae9e28f3SJames Smart struct send_frame_wqe { 4899ae9e28f3SJames Smart struct ulp_bde64 bde; /* words 0-2 */ 4900ae9e28f3SJames Smart uint32_t frame_len; /* word 3 */ 4901ae9e28f3SJames Smart uint32_t fc_hdr_wd0; /* word 4 */ 4902ae9e28f3SJames Smart uint32_t fc_hdr_wd1; /* word 5 */ 4903ae9e28f3SJames Smart struct wqe_common wqe_com; /* words 6-11 */ 4904ae9e28f3SJames Smart uint32_t fc_hdr_wd2; /* word 12 */ 4905ae9e28f3SJames Smart uint32_t fc_hdr_wd3; /* word 13 */ 4906ae9e28f3SJames Smart uint32_t fc_hdr_wd4; /* word 14 */ 4907ae9e28f3SJames Smart uint32_t fc_hdr_wd5; /* word 15 */ 4908ae9e28f3SJames Smart }; 4909da0436e9SJames Smart 4910441f6b5bSJames Smart #define ELS_RDF_REG_TAG_CNT 4 4911df3fe766SJames Smart struct lpfc_els_rdf_reg_desc { 4912df3fe766SJames Smart struct fc_df_desc_fpin_reg reg_desc; /* descriptor header */ 4913df3fe766SJames Smart __be32 desc_tags[ELS_RDF_REG_TAG_CNT]; 4914df3fe766SJames Smart /* tags in reg_desc */ 4915df3fe766SJames Smart }; 4916df3fe766SJames Smart 4917df3fe766SJames Smart struct lpfc_els_rdf_req { 4918df3fe766SJames Smart struct fc_els_rdf rdf; /* hdr up to descriptors */ 4919df3fe766SJames Smart struct lpfc_els_rdf_reg_desc reg_d1; /* 1st descriptor */ 4920df3fe766SJames Smart }; 4921df3fe766SJames Smart 4922df3fe766SJames Smart struct lpfc_els_rdf_rsp { 4923df3fe766SJames Smart struct fc_els_rdf_resp rdf_resp; /* hdr up to descriptors */ 4924df3fe766SJames Smart struct lpfc_els_rdf_reg_desc reg_d1; /* 1st descriptor */ 4925df3fe766SJames Smart }; 4926df3fe766SJames Smart 4927da0436e9SJames Smart union lpfc_wqe { 4928da0436e9SJames Smart uint32_t words[16]; 4929da0436e9SJames Smart struct lpfc_wqe_generic generic; 4930da0436e9SJames Smart struct fcp_icmnd64_wqe fcp_icmd; 4931da0436e9SJames Smart struct fcp_iread64_wqe fcp_iread; 4932da0436e9SJames Smart struct fcp_iwrite64_wqe fcp_iwrite; 4933da0436e9SJames Smart struct abort_cmd_wqe abort_cmd; 4934daebf93fSJames Smart struct cmf_sync_wqe cmf_sync; 4935da0436e9SJames Smart struct create_xri_wqe create_xri; 4936da0436e9SJames Smart struct xmit_bcast64_wqe xmit_bcast64; 4937da0436e9SJames Smart struct xmit_seq64_wqe xmit_sequence; 4938da0436e9SJames Smart struct xmit_bls_rsp64_wqe xmit_bls_rsp; 4939da0436e9SJames Smart struct xmit_els_rsp64_wqe xmit_els_rsp; 4940da0436e9SJames Smart struct els_request64_wqe els_req; 4941da0436e9SJames Smart struct gen_req64_wqe gen_req; 4942f358dd0cSJames Smart struct fcp_trsp64_wqe fcp_trsp; 4943f358dd0cSJames Smart struct fcp_tsend64_wqe fcp_tsend; 4944f358dd0cSJames Smart struct fcp_treceive64_wqe fcp_treceive; 4945ae9e28f3SJames Smart struct send_frame_wqe send_frame; 4946da0436e9SJames Smart }; 4947da0436e9SJames Smart 49480c651878SJames Smart union lpfc_wqe128 { 49490c651878SJames Smart uint32_t words[32]; 49500c651878SJames Smart struct lpfc_wqe_generic generic; 4951b5c53958SJames Smart struct fcp_icmnd64_wqe fcp_icmd; 4952b5c53958SJames Smart struct fcp_iread64_wqe fcp_iread; 4953b5c53958SJames Smart struct fcp_iwrite64_wqe fcp_iwrite; 4954205e8240SJames Smart struct abort_cmd_wqe abort_cmd; 4955daebf93fSJames Smart struct cmf_sync_wqe cmf_sync; 4956205e8240SJames Smart struct create_xri_wqe create_xri; 4957205e8240SJames Smart struct xmit_bcast64_wqe xmit_bcast64; 4958205e8240SJames Smart struct xmit_seq64_wqe xmit_sequence; 4959205e8240SJames Smart struct xmit_bls_rsp64_wqe xmit_bls_rsp; 4960205e8240SJames Smart struct xmit_els_rsp64_wqe xmit_els_rsp; 4961205e8240SJames Smart struct els_request64_wqe els_req; 4962205e8240SJames Smart struct gen_req64_wqe gen_req; 4963f358dd0cSJames Smart struct fcp_trsp64_wqe fcp_trsp; 4964f358dd0cSJames Smart struct fcp_tsend64_wqe fcp_tsend; 4965f358dd0cSJames Smart struct fcp_treceive64_wqe fcp_treceive; 4966205e8240SJames Smart struct send_frame_wqe send_frame; 49670c651878SJames Smart }; 49680c651878SJames Smart 49695792a0e8SJames Smart #define MAGIC_NUMBER_G6 0xFEAA0003 49705792a0e8SJames Smart #define MAGIC_NUMBER_G7 0xFEAA0005 4971f6c5e6c4SJames Smart #define MAGIC_NUMBER_G7P 0xFEAA0020 4972a72d56b2SJames Smart 497352d52440SJames Smart struct lpfc_grp_hdr { 497452d52440SJames Smart uint32_t size; 497552d52440SJames Smart uint32_t magic_number; 497652d52440SJames Smart uint32_t word2; 497752d52440SJames Smart #define lpfc_grp_hdr_file_type_SHIFT 24 497852d52440SJames Smart #define lpfc_grp_hdr_file_type_MASK 0x000000FF 497952d52440SJames Smart #define lpfc_grp_hdr_file_type_WORD word2 498052d52440SJames Smart #define lpfc_grp_hdr_id_SHIFT 16 498152d52440SJames Smart #define lpfc_grp_hdr_id_MASK 0x000000FF 498252d52440SJames Smart #define lpfc_grp_hdr_id_WORD word2 498352d52440SJames Smart uint8_t rev_name[128]; 498488a2cfbbSJames Smart uint8_t date[12]; 498588a2cfbbSJames Smart uint8_t revision[32]; 498652d52440SJames Smart }; 498752d52440SJames Smart 4988895427bdSJames Smart /* Defines for WQE command type */ 4989da0436e9SJames Smart #define FCP_COMMAND 0x0 4990895427bdSJames Smart #define NVME_READ_CMD 0x0 4991da0436e9SJames Smart #define FCP_COMMAND_DATA_OUT 0x1 4992895427bdSJames Smart #define NVME_WRITE_CMD 0x1 4993b101eb27SJames Smart #define COMMAND_DATA_IN 0x0 4994b101eb27SJames Smart #define COMMAND_DATA_OUT 0x1 4995895427bdSJames Smart #define FCP_COMMAND_TRECEIVE 0x2 4996895427bdSJames Smart #define FCP_COMMAND_TRSP 0x3 4997895427bdSJames Smart #define FCP_COMMAND_TSEND 0x7 4998895427bdSJames Smart #define OTHER_COMMAND 0x8 4999daebf93fSJames Smart #define CMF_SYNC_COMMAND 0xA 5000da0436e9SJames Smart #define ELS_COMMAND_NON_FIP 0xC 5001da0436e9SJames Smart #define ELS_COMMAND_FIP 0xD 5002895427bdSJames Smart 5003895427bdSJames Smart #define LPFC_NVME_EMBED_CMD 0x0 5004895427bdSJames Smart #define LPFC_NVME_EMBED_WRITE 0x1 5005895427bdSJames Smart #define LPFC_NVME_EMBED_READ 0x2 5006895427bdSJames Smart 5007895427bdSJames Smart /* WQE Commands */ 5008895427bdSJames Smart #define CMD_ABORT_XRI_WQE 0x0F 5009895427bdSJames Smart #define CMD_XMIT_SEQUENCE64_WQE 0x82 5010895427bdSJames Smart #define CMD_XMIT_BCAST64_WQE 0x84 5011895427bdSJames Smart #define CMD_ELS_REQUEST64_WQE 0x8A 5012895427bdSJames Smart #define CMD_XMIT_ELS_RSP64_WQE 0x95 5013895427bdSJames Smart #define CMD_XMIT_BLS_RSP64_WQE 0x97 5014895427bdSJames Smart #define CMD_FCP_IWRITE64_WQE 0x98 5015895427bdSJames Smart #define CMD_FCP_IREAD64_WQE 0x9A 5016895427bdSJames Smart #define CMD_FCP_ICMND64_WQE 0x9C 5017895427bdSJames Smart #define CMD_FCP_TSEND64_WQE 0x9F 5018895427bdSJames Smart #define CMD_FCP_TRECEIVE64_WQE 0xA1 5019895427bdSJames Smart #define CMD_FCP_TRSP64_WQE 0xA3 5020895427bdSJames Smart #define CMD_GEN_REQUEST64_WQE 0xC2 5021daebf93fSJames Smart #define CMD_CMF_SYNC_WQE 0xE8 5022895427bdSJames Smart 5023895427bdSJames Smart #define CMD_WQE_MASK 0xff 5024895427bdSJames Smart 5025da0436e9SJames Smart 502652d52440SJames Smart #define LPFC_FW_DUMP 1 502752d52440SJames Smart #define LPFC_FW_RESET 2 502852d52440SJames Smart #define LPFC_DV_RESET 3 5029428569e6SJames Smart 50309064aeb2SJames Smart /* On some kernels, enum fc_ls_tlv_dtag does not have 50319064aeb2SJames Smart * these 2 enums defined, on other kernels it does. 50329064aeb2SJames Smart * To get aound this we need to add these 2 defines here. 50339064aeb2SJames Smart */ 50349064aeb2SJames Smart #ifndef ELS_DTAG_LNK_FAULT_CAP 50359064aeb2SJames Smart #define ELS_DTAG_LNK_FAULT_CAP 0x0001000D 50369064aeb2SJames Smart #endif 50379064aeb2SJames Smart #ifndef ELS_DTAG_CG_SIGNAL_CAP 50389064aeb2SJames Smart #define ELS_DTAG_CG_SIGNAL_CAP 0x0001000F 50399064aeb2SJames Smart #endif 50409064aeb2SJames Smart 5041428569e6SJames Smart /* 5042428569e6SJames Smart * Initializer useful for decoding FPIN string table. 5043428569e6SJames Smart */ 5044428569e6SJames Smart #define FC_FPIN_CONGN_SEVERITY_INIT { \ 5045428569e6SJames Smart { FPIN_CONGN_SEVERITY_WARNING, "Warning" }, \ 5046428569e6SJames Smart { FPIN_CONGN_SEVERITY_ERROR, "Alarm" }, \ 5047428569e6SJames Smart } 5048428569e6SJames Smart 5049428569e6SJames Smart /* Used for logging FPIN messages */ 5050428569e6SJames Smart #define LPFC_FPIN_WWPN_LINE_SZ 128 5051428569e6SJames Smart #define LPFC_FPIN_WWPN_LINE_CNT 6 5052428569e6SJames Smart #define LPFC_FPIN_WWPN_NUM_LINE 6 5053