.. | .. |
---|
1 | 1 | /******************************************************************* |
---|
2 | 2 | * This file is part of the Emulex Linux Device Driver for * |
---|
3 | 3 | * Fibre Channel Host Bus Adapters. * |
---|
4 | | - * Copyright (C) 2017-2018 Broadcom. All Rights Reserved. The term * |
---|
| 4 | + * Copyright (C) 2017-2019 Broadcom. All Rights Reserved. The term * |
---|
5 | 5 | * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * |
---|
6 | 6 | * Copyright (C) 2009-2016 Emulex. All rights reserved. * |
---|
7 | 7 | * EMULEX and SLI are trademarks of Emulex. * |
---|
.. | .. |
---|
19 | 19 | * more details, a copy of which can be found in the file COPYING * |
---|
20 | 20 | * included with this package. * |
---|
21 | 21 | *******************************************************************/ |
---|
| 22 | + |
---|
| 23 | +#include <uapi/scsi/fc/fc_els.h> |
---|
22 | 24 | |
---|
23 | 25 | /* Macros to deal with bit fields. Each bit field must have 3 #defines |
---|
24 | 26 | * associated with it (_SHIFT, _MASK, and _WORD). |
---|
.. | .. |
---|
187 | 189 | #define LPFC_CTL_PDEV_CTL_FRL_ALL 0x00 |
---|
188 | 190 | #define LPFC_CTL_PDEV_CTL_FRL_FC_FCOE 0x10 |
---|
189 | 191 | #define LPFC_CTL_PDEV_CTL_FRL_NIC 0x20 |
---|
| 192 | +#define LPFC_CTL_PDEV_CTL_DDL_RAS 0x1000000 |
---|
190 | 193 | |
---|
191 | 194 | #define LPFC_FW_DUMP_REQUEST (LPFC_CTL_PDEV_CTL_DD | LPFC_CTL_PDEV_CTL_FRST) |
---|
192 | 195 | |
---|
.. | .. |
---|
194 | 197 | #define LPFC_ACT_INTR_CNT 4 |
---|
195 | 198 | |
---|
196 | 199 | /* Algrithmns for scheduling FCP commands to WQs */ |
---|
197 | | -#define LPFC_FCP_SCHED_ROUND_ROBIN 0 |
---|
| 200 | +#define LPFC_FCP_SCHED_BY_HDWQ 0 |
---|
198 | 201 | #define LPFC_FCP_SCHED_BY_CPU 1 |
---|
| 202 | + |
---|
| 203 | +/* Algrithmns for NameServer Query after RSCN */ |
---|
| 204 | +#define LPFC_NS_QUERY_GID_FT 0 |
---|
| 205 | +#define LPFC_NS_QUERY_GID_PT 1 |
---|
199 | 206 | |
---|
200 | 207 | /* Delay Multiplier constant */ |
---|
201 | 208 | #define LPFC_DMULT_CONST 651042 |
---|
.. | .. |
---|
204 | 211 | /* Configuration of Interrupts / sec for entire HBA port */ |
---|
205 | 212 | #define LPFC_MIN_IMAX 5000 |
---|
206 | 213 | #define LPFC_MAX_IMAX 5000000 |
---|
207 | | -#define LPFC_DEF_IMAX 150000 |
---|
| 214 | +#define LPFC_DEF_IMAX 0 |
---|
| 215 | + |
---|
| 216 | +#define LPFC_MAX_AUTO_EQ_DELAY 120 |
---|
| 217 | +#define LPFC_EQ_DELAY_STEP 15 |
---|
| 218 | +#define LPFC_EQD_ISR_TRIGGER 20000 |
---|
| 219 | +/* 1s intervals */ |
---|
| 220 | +#define LPFC_EQ_DELAY_MSECS 1000 |
---|
208 | 221 | |
---|
209 | 222 | #define LPFC_MIN_CPU_MAP 0 |
---|
210 | | -#define LPFC_MAX_CPU_MAP 2 |
---|
| 223 | +#define LPFC_MAX_CPU_MAP 1 |
---|
211 | 224 | #define LPFC_HBA_CPU_MAP 1 |
---|
212 | | -#define LPFC_DRIVER_CPU_MAP 2 /* Default */ |
---|
213 | 225 | |
---|
214 | 226 | /* PORT_CAPABILITIES constants. */ |
---|
215 | 227 | #define LPFC_MAX_SUPPORTED_PAGES 8 |
---|
.. | .. |
---|
639 | 651 | #define lpfc_sliport_status_oti_SHIFT 29 |
---|
640 | 652 | #define lpfc_sliport_status_oti_MASK 0x1 |
---|
641 | 653 | #define lpfc_sliport_status_oti_WORD word0 |
---|
| 654 | +#define lpfc_sliport_status_dip_SHIFT 25 |
---|
| 655 | +#define lpfc_sliport_status_dip_MASK 0x1 |
---|
| 656 | +#define lpfc_sliport_status_dip_WORD word0 |
---|
642 | 657 | #define lpfc_sliport_status_rn_SHIFT 24 |
---|
643 | 658 | #define lpfc_sliport_status_rn_MASK 0x1 |
---|
644 | 659 | #define lpfc_sliport_status_rn_WORD word0 |
---|
.. | .. |
---|
965 | 980 | /* Subsystem Definitions */ |
---|
966 | 981 | #define LPFC_MBOX_SUBSYSTEM_NA 0x0 |
---|
967 | 982 | #define LPFC_MBOX_SUBSYSTEM_COMMON 0x1 |
---|
| 983 | +#define LPFC_MBOX_SUBSYSTEM_LOWLEVEL 0xB |
---|
968 | 984 | #define LPFC_MBOX_SUBSYSTEM_FCOE 0xC |
---|
969 | 985 | |
---|
970 | 986 | /* Device Specific Definitions */ |
---|
.. | .. |
---|
1030 | 1046 | #define LPFC_MBOX_OPCODE_FCOE_SET_FCLINK_SETTINGS 0x21 |
---|
1031 | 1047 | #define LPFC_MBOX_OPCODE_FCOE_LINK_DIAG_STATE 0x22 |
---|
1032 | 1048 | #define LPFC_MBOX_OPCODE_FCOE_LINK_DIAG_LOOPBACK 0x23 |
---|
| 1049 | +#define LPFC_MBOX_OPCODE_FCOE_FC_SET_TRUNK_MODE 0x42 |
---|
| 1050 | + |
---|
| 1051 | +/* Low level Opcodes */ |
---|
| 1052 | +#define LPFC_MBOX_OPCODE_SET_DIAG_LOG_OPTION 0x37 |
---|
1033 | 1053 | |
---|
1034 | 1054 | /* Mailbox command structures */ |
---|
1035 | 1055 | struct eq_context { |
---|
.. | .. |
---|
1162 | 1182 | struct mbox_header header; |
---|
1163 | 1183 | uint32_t context[2]; |
---|
1164 | 1184 | }; |
---|
| 1185 | + |
---|
| 1186 | + |
---|
| 1187 | + |
---|
| 1188 | +struct lpfc_mbx_set_ras_fwlog { |
---|
| 1189 | + struct mbox_header header; |
---|
| 1190 | + union { |
---|
| 1191 | + struct { |
---|
| 1192 | + uint32_t word4; |
---|
| 1193 | +#define lpfc_fwlog_enable_SHIFT 0 |
---|
| 1194 | +#define lpfc_fwlog_enable_MASK 0x00000001 |
---|
| 1195 | +#define lpfc_fwlog_enable_WORD word4 |
---|
| 1196 | +#define lpfc_fwlog_loglvl_SHIFT 8 |
---|
| 1197 | +#define lpfc_fwlog_loglvl_MASK 0x0000000F |
---|
| 1198 | +#define lpfc_fwlog_loglvl_WORD word4 |
---|
| 1199 | +#define lpfc_fwlog_ra_SHIFT 15 |
---|
| 1200 | +#define lpfc_fwlog_ra_WORD 0x00000008 |
---|
| 1201 | +#define lpfc_fwlog_buffcnt_SHIFT 16 |
---|
| 1202 | +#define lpfc_fwlog_buffcnt_MASK 0x000000FF |
---|
| 1203 | +#define lpfc_fwlog_buffcnt_WORD word4 |
---|
| 1204 | +#define lpfc_fwlog_buffsz_SHIFT 24 |
---|
| 1205 | +#define lpfc_fwlog_buffsz_MASK 0x000000FF |
---|
| 1206 | +#define lpfc_fwlog_buffsz_WORD word4 |
---|
| 1207 | + uint32_t word5; |
---|
| 1208 | +#define lpfc_fwlog_acqe_SHIFT 0 |
---|
| 1209 | +#define lpfc_fwlog_acqe_MASK 0x0000FFFF |
---|
| 1210 | +#define lpfc_fwlog_acqe_WORD word5 |
---|
| 1211 | +#define lpfc_fwlog_cqid_SHIFT 16 |
---|
| 1212 | +#define lpfc_fwlog_cqid_MASK 0x0000FFFF |
---|
| 1213 | +#define lpfc_fwlog_cqid_WORD word5 |
---|
| 1214 | +#define LPFC_MAX_FWLOG_PAGE 16 |
---|
| 1215 | + struct dma_address lwpd; |
---|
| 1216 | + struct dma_address buff_fwlog[LPFC_MAX_FWLOG_PAGE]; |
---|
| 1217 | + } request; |
---|
| 1218 | + struct { |
---|
| 1219 | + uint32_t word0; |
---|
| 1220 | + } response; |
---|
| 1221 | + } u; |
---|
| 1222 | +}; |
---|
| 1223 | + |
---|
1165 | 1224 | |
---|
1166 | 1225 | struct cq_context { |
---|
1167 | 1226 | uint32_t word0; |
---|
.. | .. |
---|
1840 | 1899 | union { |
---|
1841 | 1900 | struct { |
---|
1842 | 1901 | uint32_t word0; |
---|
1843 | | -#define lpfc_mbx_set_diag_lpbk_type_SHIFT 0 |
---|
1844 | | -#define lpfc_mbx_set_diag_lpbk_type_MASK 0x00000003 |
---|
1845 | | -#define lpfc_mbx_set_diag_lpbk_type_WORD word0 |
---|
1846 | | -#define LPFC_DIAG_LOOPBACK_TYPE_DISABLE 0x0 |
---|
1847 | | -#define LPFC_DIAG_LOOPBACK_TYPE_INTERNAL 0x1 |
---|
1848 | | -#define LPFC_DIAG_LOOPBACK_TYPE_SERDES 0x2 |
---|
1849 | | -#define lpfc_mbx_set_diag_lpbk_link_num_SHIFT 16 |
---|
1850 | | -#define lpfc_mbx_set_diag_lpbk_link_num_MASK 0x0000003F |
---|
1851 | | -#define lpfc_mbx_set_diag_lpbk_link_num_WORD word0 |
---|
1852 | | -#define lpfc_mbx_set_diag_lpbk_link_type_SHIFT 22 |
---|
1853 | | -#define lpfc_mbx_set_diag_lpbk_link_type_MASK 0x00000003 |
---|
1854 | | -#define lpfc_mbx_set_diag_lpbk_link_type_WORD word0 |
---|
| 1902 | +#define lpfc_mbx_set_diag_lpbk_type_SHIFT 0 |
---|
| 1903 | +#define lpfc_mbx_set_diag_lpbk_type_MASK 0x00000003 |
---|
| 1904 | +#define lpfc_mbx_set_diag_lpbk_type_WORD word0 |
---|
| 1905 | +#define LPFC_DIAG_LOOPBACK_TYPE_DISABLE 0x0 |
---|
| 1906 | +#define LPFC_DIAG_LOOPBACK_TYPE_INTERNAL 0x1 |
---|
| 1907 | +#define LPFC_DIAG_LOOPBACK_TYPE_SERDES 0x2 |
---|
| 1908 | +#define LPFC_DIAG_LOOPBACK_TYPE_EXTERNAL_TRUNKED 0x3 |
---|
| 1909 | +#define lpfc_mbx_set_diag_lpbk_link_num_SHIFT 16 |
---|
| 1910 | +#define lpfc_mbx_set_diag_lpbk_link_num_MASK 0x0000003F |
---|
| 1911 | +#define lpfc_mbx_set_diag_lpbk_link_num_WORD word0 |
---|
| 1912 | +#define lpfc_mbx_set_diag_lpbk_link_type_SHIFT 22 |
---|
| 1913 | +#define lpfc_mbx_set_diag_lpbk_link_type_MASK 0x00000003 |
---|
| 1914 | +#define lpfc_mbx_set_diag_lpbk_link_type_WORD word0 |
---|
1855 | 1915 | } req; |
---|
1856 | 1916 | struct { |
---|
1857 | 1917 | uint32_t word0; |
---|
.. | .. |
---|
1993 | 2053 | #define lpfc_sli4_sge_last_MASK 0x00000001 |
---|
1994 | 2054 | #define lpfc_sli4_sge_last_WORD word2 |
---|
1995 | 2055 | uint32_t sge_len; |
---|
| 2056 | +}; |
---|
| 2057 | + |
---|
| 2058 | +struct sli4_hybrid_sgl { |
---|
| 2059 | + struct list_head list_node; |
---|
| 2060 | + struct sli4_sge *dma_sgl; |
---|
| 2061 | + dma_addr_t dma_phys_sgl; |
---|
| 2062 | +}; |
---|
| 2063 | + |
---|
| 2064 | +struct fcp_cmd_rsp_buf { |
---|
| 2065 | + struct list_head list_node; |
---|
| 2066 | + |
---|
| 2067 | + /* for storing cmd/rsp dma alloc'ed virt_addr */ |
---|
| 2068 | + struct fcp_cmnd *fcp_cmnd; |
---|
| 2069 | + struct fcp_rsp *fcp_rsp; |
---|
| 2070 | + |
---|
| 2071 | + /* for storing this cmd/rsp's dma mapped phys addr from per CPU pool */ |
---|
| 2072 | + dma_addr_t fcp_cmd_rsp_dma_handle; |
---|
1996 | 2073 | }; |
---|
1997 | 2074 | |
---|
1998 | 2075 | struct sli4_sge_diseed { /* SLI-4 */ |
---|
.. | .. |
---|
2248 | 2325 | #define ADD_STATUS_OPERATION_ALREADY_ACTIVE 0x67 |
---|
2249 | 2326 | #define ADD_STATUS_FW_NOT_SUPPORTED 0xEB |
---|
2250 | 2327 | #define ADD_STATUS_INVALID_REQUEST 0x4B |
---|
| 2328 | +#define ADD_STATUS_FW_DOWNLOAD_HW_DISABLED 0x58 |
---|
2251 | 2329 | |
---|
2252 | 2330 | struct lpfc_mbx_sli4_config { |
---|
2253 | 2331 | struct mbox_header header; |
---|
.. | .. |
---|
2734 | 2812 | #define lpfc_mbx_rd_conf_lnk_ldv_SHIFT 8 |
---|
2735 | 2813 | #define lpfc_mbx_rd_conf_lnk_ldv_MASK 0x00000001 |
---|
2736 | 2814 | #define lpfc_mbx_rd_conf_lnk_ldv_WORD word2 |
---|
| 2815 | +#define lpfc_mbx_rd_conf_trunk_SHIFT 12 |
---|
| 2816 | +#define lpfc_mbx_rd_conf_trunk_MASK 0x0000000F |
---|
| 2817 | +#define lpfc_mbx_rd_conf_trunk_WORD word2 |
---|
| 2818 | +#define lpfc_mbx_rd_conf_pt_SHIFT 20 |
---|
| 2819 | +#define lpfc_mbx_rd_conf_pt_MASK 0x00000003 |
---|
| 2820 | +#define lpfc_mbx_rd_conf_pt_WORD word2 |
---|
| 2821 | +#define lpfc_mbx_rd_conf_tf_SHIFT 22 |
---|
| 2822 | +#define lpfc_mbx_rd_conf_tf_MASK 0x00000001 |
---|
| 2823 | +#define lpfc_mbx_rd_conf_tf_WORD word2 |
---|
| 2824 | +#define lpfc_mbx_rd_conf_ptv_SHIFT 23 |
---|
| 2825 | +#define lpfc_mbx_rd_conf_ptv_MASK 0x00000001 |
---|
| 2826 | +#define lpfc_mbx_rd_conf_ptv_WORD word2 |
---|
2737 | 2827 | #define lpfc_mbx_rd_conf_topology_SHIFT 24 |
---|
2738 | 2828 | #define lpfc_mbx_rd_conf_topology_MASK 0x000000FF |
---|
2739 | 2829 | #define lpfc_mbx_rd_conf_topology_WORD word2 |
---|
.. | .. |
---|
3220 | 3310 | #define cfg_xib_SHIFT 4 |
---|
3221 | 3311 | #define cfg_xib_MASK 0x00000001 |
---|
3222 | 3312 | #define cfg_xib_WORD word19 |
---|
| 3313 | +#define cfg_xpsgl_SHIFT 6 |
---|
| 3314 | +#define cfg_xpsgl_MASK 0x00000001 |
---|
| 3315 | +#define cfg_xpsgl_WORD word19 |
---|
3223 | 3316 | #define cfg_eqdr_SHIFT 8 |
---|
3224 | 3317 | #define cfg_eqdr_MASK 0x00000001 |
---|
3225 | 3318 | #define cfg_eqdr_WORD word19 |
---|
.. | .. |
---|
3230 | 3323 | #define cfg_bv1s_SHIFT 10 |
---|
3231 | 3324 | #define cfg_bv1s_MASK 0x00000001 |
---|
3232 | 3325 | #define cfg_bv1s_WORD word19 |
---|
| 3326 | +#define cfg_pvl_SHIFT 13 |
---|
| 3327 | +#define cfg_pvl_MASK 0x00000001 |
---|
| 3328 | +#define cfg_pvl_WORD word19 |
---|
| 3329 | + |
---|
| 3330 | +#define cfg_nsler_SHIFT 12 |
---|
| 3331 | +#define cfg_nsler_MASK 0x00000001 |
---|
| 3332 | +#define cfg_nsler_WORD word19 |
---|
3233 | 3333 | |
---|
3234 | 3334 | uint32_t word20; |
---|
3235 | 3335 | #define cfg_max_tow_xri_SHIFT 0 |
---|
.. | .. |
---|
3264 | 3364 | }; |
---|
3265 | 3365 | |
---|
3266 | 3366 | #define LPFC_SET_UE_RECOVERY 0x10 |
---|
3267 | | -#define LPFC_SET_MDS_DIAGS 0x11 |
---|
| 3367 | +#define LPFC_SET_MDS_DIAGS 0x12 |
---|
| 3368 | +#define LPFC_SET_DUAL_DUMP 0x1e |
---|
3268 | 3369 | struct lpfc_mbx_set_feature { |
---|
3269 | 3370 | struct mbox_header header; |
---|
3270 | 3371 | uint32_t feature; |
---|
.. | .. |
---|
3273 | 3374 | #define lpfc_mbx_set_feature_UER_SHIFT 0 |
---|
3274 | 3375 | #define lpfc_mbx_set_feature_UER_MASK 0x00000001 |
---|
3275 | 3376 | #define lpfc_mbx_set_feature_UER_WORD word6 |
---|
3276 | | -#define lpfc_mbx_set_feature_mds_SHIFT 0 |
---|
| 3377 | +#define lpfc_mbx_set_feature_mds_SHIFT 2 |
---|
3277 | 3378 | #define lpfc_mbx_set_feature_mds_MASK 0x00000001 |
---|
3278 | 3379 | #define lpfc_mbx_set_feature_mds_WORD word6 |
---|
3279 | 3380 | #define lpfc_mbx_set_feature_mds_deep_loopbk_SHIFT 1 |
---|
3280 | 3381 | #define lpfc_mbx_set_feature_mds_deep_loopbk_MASK 0x00000001 |
---|
3281 | 3382 | #define lpfc_mbx_set_feature_mds_deep_loopbk_WORD word6 |
---|
| 3383 | +#define lpfc_mbx_set_feature_dd_SHIFT 0 |
---|
| 3384 | +#define lpfc_mbx_set_feature_dd_MASK 0x00000001 |
---|
| 3385 | +#define lpfc_mbx_set_feature_dd_WORD word6 |
---|
| 3386 | +#define lpfc_mbx_set_feature_ddquery_SHIFT 1 |
---|
| 3387 | +#define lpfc_mbx_set_feature_ddquery_MASK 0x00000001 |
---|
| 3388 | +#define lpfc_mbx_set_feature_ddquery_WORD word6 |
---|
| 3389 | +#define LPFC_DISABLE_DUAL_DUMP 0 |
---|
| 3390 | +#define LPFC_ENABLE_DUAL_DUMP 1 |
---|
| 3391 | +#define LPFC_QUERY_OP_DUAL_DUMP 2 |
---|
3282 | 3392 | uint32_t word7; |
---|
3283 | 3393 | #define lpfc_mbx_set_feature_UERP_SHIFT 0 |
---|
3284 | 3394 | #define lpfc_mbx_set_feature_UERP_MASK 0x0000ffff |
---|
.. | .. |
---|
3298 | 3408 | uint8_t data[LPFC_HOST_OS_DRIVER_VERSION_SIZE]; |
---|
3299 | 3409 | }; |
---|
3300 | 3410 | |
---|
| 3411 | +struct lpfc_mbx_set_trunk_mode { |
---|
| 3412 | + struct mbox_header header; |
---|
| 3413 | + uint32_t word0; |
---|
| 3414 | +#define lpfc_mbx_set_trunk_mode_WORD word0 |
---|
| 3415 | +#define lpfc_mbx_set_trunk_mode_SHIFT 0 |
---|
| 3416 | +#define lpfc_mbx_set_trunk_mode_MASK 0xFF |
---|
| 3417 | + uint32_t word1; |
---|
| 3418 | + uint32_t word2; |
---|
| 3419 | +}; |
---|
3301 | 3420 | |
---|
3302 | 3421 | struct lpfc_mbx_get_sli4_parameters { |
---|
3303 | 3422 | struct mbox_header header; |
---|
.. | .. |
---|
3619 | 3738 | #define lpfc_wr_object_eof_SHIFT 31 |
---|
3620 | 3739 | #define lpfc_wr_object_eof_MASK 0x00000001 |
---|
3621 | 3740 | #define lpfc_wr_object_eof_WORD word4 |
---|
| 3741 | +#define lpfc_wr_object_eas_SHIFT 29 |
---|
| 3742 | +#define lpfc_wr_object_eas_MASK 0x00000001 |
---|
| 3743 | +#define lpfc_wr_object_eas_WORD word4 |
---|
3622 | 3744 | #define lpfc_wr_object_write_length_SHIFT 0 |
---|
3623 | 3745 | #define lpfc_wr_object_write_length_MASK 0x00FFFFFF |
---|
3624 | 3746 | #define lpfc_wr_object_write_length_WORD word4 |
---|
.. | .. |
---|
3629 | 3751 | } request; |
---|
3630 | 3752 | struct { |
---|
3631 | 3753 | uint32_t actual_write_length; |
---|
| 3754 | + uint32_t word5; |
---|
| 3755 | +#define lpfc_wr_object_change_status_SHIFT 0 |
---|
| 3756 | +#define lpfc_wr_object_change_status_MASK 0x000000FF |
---|
| 3757 | +#define lpfc_wr_object_change_status_WORD word5 |
---|
| 3758 | +#define LPFC_CHANGE_STATUS_NO_RESET_NEEDED 0x00 |
---|
| 3759 | +#define LPFC_CHANGE_STATUS_PHYS_DEV_RESET 0x01 |
---|
| 3760 | +#define LPFC_CHANGE_STATUS_FW_RESET 0x02 |
---|
| 3761 | +#define LPFC_CHANGE_STATUS_PORT_MIGRATION 0x04 |
---|
| 3762 | +#define LPFC_CHANGE_STATUS_PCI_RESET 0x05 |
---|
| 3763 | +#define lpfc_wr_object_csf_SHIFT 8 |
---|
| 3764 | +#define lpfc_wr_object_csf_MASK 0x00000001 |
---|
| 3765 | +#define lpfc_wr_object_csf_WORD word5 |
---|
3632 | 3766 | } response; |
---|
3633 | 3767 | } u; |
---|
3634 | 3768 | }; |
---|
.. | .. |
---|
3695 | 3829 | struct lpfc_mbx_set_feature set_feature; |
---|
3696 | 3830 | struct lpfc_mbx_memory_dump_type3 mem_dump_type3; |
---|
3697 | 3831 | struct lpfc_mbx_set_host_data set_host_data; |
---|
| 3832 | + struct lpfc_mbx_set_trunk_mode set_trunk_mode; |
---|
3698 | 3833 | struct lpfc_mbx_nop nop; |
---|
| 3834 | + struct lpfc_mbx_set_ras_fwlog ras_fwlog; |
---|
3699 | 3835 | } un; |
---|
3700 | 3836 | }; |
---|
3701 | 3837 | |
---|
.. | .. |
---|
3830 | 3966 | uint32_t trailer; |
---|
3831 | 3967 | }; |
---|
3832 | 3968 | |
---|
| 3969 | +extern const char *const trunk_errmsg[]; |
---|
| 3970 | + |
---|
3833 | 3971 | struct lpfc_acqe_fc_la { |
---|
3834 | 3972 | uint32_t word0; |
---|
3835 | 3973 | #define lpfc_acqe_fc_la_speed_SHIFT 24 |
---|
.. | .. |
---|
3863 | 4001 | #define LPFC_FC_LA_TYPE_MDS_LINK_DOWN 0x4 |
---|
3864 | 4002 | #define LPFC_FC_LA_TYPE_MDS_LOOPBACK 0x5 |
---|
3865 | 4003 | #define LPFC_FC_LA_TYPE_UNEXP_WWPN 0x6 |
---|
| 4004 | +#define LPFC_FC_LA_TYPE_TRUNKING_EVENT 0x7 |
---|
3866 | 4005 | #define lpfc_acqe_fc_la_port_type_SHIFT 6 |
---|
3867 | 4006 | #define lpfc_acqe_fc_la_port_type_MASK 0x00000003 |
---|
3868 | 4007 | #define lpfc_acqe_fc_la_port_type_WORD word0 |
---|
.. | .. |
---|
3871 | 4010 | #define lpfc_acqe_fc_la_port_number_SHIFT 0 |
---|
3872 | 4011 | #define lpfc_acqe_fc_la_port_number_MASK 0x0000003F |
---|
3873 | 4012 | #define lpfc_acqe_fc_la_port_number_WORD word0 |
---|
| 4013 | + |
---|
| 4014 | +/* Attention Type is 0x07 (Trunking Event) word0 */ |
---|
| 4015 | +#define lpfc_acqe_fc_la_trunk_link_status_port0_SHIFT 16 |
---|
| 4016 | +#define lpfc_acqe_fc_la_trunk_link_status_port0_MASK 0x0000001 |
---|
| 4017 | +#define lpfc_acqe_fc_la_trunk_link_status_port0_WORD word0 |
---|
| 4018 | +#define lpfc_acqe_fc_la_trunk_link_status_port1_SHIFT 17 |
---|
| 4019 | +#define lpfc_acqe_fc_la_trunk_link_status_port1_MASK 0x0000001 |
---|
| 4020 | +#define lpfc_acqe_fc_la_trunk_link_status_port1_WORD word0 |
---|
| 4021 | +#define lpfc_acqe_fc_la_trunk_link_status_port2_SHIFT 18 |
---|
| 4022 | +#define lpfc_acqe_fc_la_trunk_link_status_port2_MASK 0x0000001 |
---|
| 4023 | +#define lpfc_acqe_fc_la_trunk_link_status_port2_WORD word0 |
---|
| 4024 | +#define lpfc_acqe_fc_la_trunk_link_status_port3_SHIFT 19 |
---|
| 4025 | +#define lpfc_acqe_fc_la_trunk_link_status_port3_MASK 0x0000001 |
---|
| 4026 | +#define lpfc_acqe_fc_la_trunk_link_status_port3_WORD word0 |
---|
| 4027 | +#define lpfc_acqe_fc_la_trunk_config_port0_SHIFT 20 |
---|
| 4028 | +#define lpfc_acqe_fc_la_trunk_config_port0_MASK 0x0000001 |
---|
| 4029 | +#define lpfc_acqe_fc_la_trunk_config_port0_WORD word0 |
---|
| 4030 | +#define lpfc_acqe_fc_la_trunk_config_port1_SHIFT 21 |
---|
| 4031 | +#define lpfc_acqe_fc_la_trunk_config_port1_MASK 0x0000001 |
---|
| 4032 | +#define lpfc_acqe_fc_la_trunk_config_port1_WORD word0 |
---|
| 4033 | +#define lpfc_acqe_fc_la_trunk_config_port2_SHIFT 22 |
---|
| 4034 | +#define lpfc_acqe_fc_la_trunk_config_port2_MASK 0x0000001 |
---|
| 4035 | +#define lpfc_acqe_fc_la_trunk_config_port2_WORD word0 |
---|
| 4036 | +#define lpfc_acqe_fc_la_trunk_config_port3_SHIFT 23 |
---|
| 4037 | +#define lpfc_acqe_fc_la_trunk_config_port3_MASK 0x0000001 |
---|
| 4038 | +#define lpfc_acqe_fc_la_trunk_config_port3_WORD word0 |
---|
3874 | 4039 | uint32_t word1; |
---|
3875 | 4040 | #define lpfc_acqe_fc_la_llink_spd_SHIFT 16 |
---|
3876 | 4041 | #define lpfc_acqe_fc_la_llink_spd_MASK 0x0000FFFF |
---|
.. | .. |
---|
3878 | 4043 | #define lpfc_acqe_fc_la_fault_SHIFT 0 |
---|
3879 | 4044 | #define lpfc_acqe_fc_la_fault_MASK 0x000000FF |
---|
3880 | 4045 | #define lpfc_acqe_fc_la_fault_WORD word1 |
---|
| 4046 | +#define lpfc_acqe_fc_la_trunk_fault_SHIFT 0 |
---|
| 4047 | +#define lpfc_acqe_fc_la_trunk_fault_MASK 0x0000000F |
---|
| 4048 | +#define lpfc_acqe_fc_la_trunk_fault_WORD word1 |
---|
| 4049 | +#define lpfc_acqe_fc_la_trunk_linkmask_SHIFT 4 |
---|
| 4050 | +#define lpfc_acqe_fc_la_trunk_linkmask_MASK 0x000000F |
---|
| 4051 | +#define lpfc_acqe_fc_la_trunk_linkmask_WORD word1 |
---|
3881 | 4052 | #define LPFC_FC_LA_FAULT_NONE 0x0 |
---|
3882 | 4053 | #define LPFC_FC_LA_FAULT_LOCAL 0x1 |
---|
3883 | 4054 | #define LPFC_FC_LA_FAULT_REMOTE 0x2 |
---|
.. | .. |
---|
3948 | 4119 | #define LPFC_SLI_EVENT_TYPE_DIAG_DUMP 0x5 |
---|
3949 | 4120 | #define LPFC_SLI_EVENT_TYPE_MISCONFIGURED 0x9 |
---|
3950 | 4121 | #define LPFC_SLI_EVENT_TYPE_REMOTE_DPORT 0xA |
---|
| 4122 | +#define LPFC_SLI_EVENT_TYPE_MISCONF_FAWWN 0xF |
---|
| 4123 | +#define LPFC_SLI_EVENT_TYPE_EEPROM_FAILURE 0x10 |
---|
3951 | 4124 | }; |
---|
3952 | 4125 | |
---|
3953 | 4126 | /* |
---|
.. | .. |
---|
4025 | 4198 | #define wqe_rcvoxid_SHIFT 16 |
---|
4026 | 4199 | #define wqe_rcvoxid_MASK 0x0000FFFF |
---|
4027 | 4200 | #define wqe_rcvoxid_WORD word9 |
---|
| 4201 | +#define wqe_sof_SHIFT 24 |
---|
| 4202 | +#define wqe_sof_MASK 0x000000FF |
---|
| 4203 | +#define wqe_sof_WORD word9 |
---|
| 4204 | +#define wqe_eof_SHIFT 16 |
---|
| 4205 | +#define wqe_eof_MASK 0x000000FF |
---|
| 4206 | +#define wqe_eof_WORD word9 |
---|
4028 | 4207 | uint32_t word10; |
---|
4029 | 4208 | #define wqe_ebde_cnt_SHIFT 0 |
---|
4030 | 4209 | #define wqe_ebde_cnt_MASK 0x0000000f |
---|
.. | .. |
---|
4102 | 4281 | #define wqe_sup_SHIFT 6 |
---|
4103 | 4282 | #define wqe_sup_MASK 0x00000001 |
---|
4104 | 4283 | #define wqe_sup_WORD word11 |
---|
| 4284 | +#define wqe_ffrq_SHIFT 6 |
---|
| 4285 | +#define wqe_ffrq_MASK 0x00000001 |
---|
| 4286 | +#define wqe_ffrq_WORD word11 |
---|
4105 | 4287 | #define wqe_wqec_SHIFT 7 |
---|
4106 | 4288 | #define wqe_wqec_MASK 0x00000001 |
---|
4107 | 4289 | #define wqe_wqec_WORD word11 |
---|
.. | .. |
---|
4306 | 4488 | #define prli_type_code_WORD word1 |
---|
4307 | 4489 | uint32_t word_rsvd2; |
---|
4308 | 4490 | uint32_t word_rsvd3; |
---|
| 4491 | + |
---|
4309 | 4492 | uint32_t word4; |
---|
4310 | 4493 | #define prli_fba_SHIFT 0 |
---|
4311 | 4494 | #define prli_fba_MASK 0x00000001 |
---|
.. | .. |
---|
4322 | 4505 | #define prli_conf_SHIFT 7 |
---|
4323 | 4506 | #define prli_conf_MASK 0x00000001 |
---|
4324 | 4507 | #define prli_conf_WORD word4 |
---|
| 4508 | +#define prli_nsler_SHIFT 8 |
---|
| 4509 | +#define prli_nsler_MASK 0x00000001 |
---|
| 4510 | +#define prli_nsler_WORD word4 |
---|
4325 | 4511 | uint32_t word5; |
---|
4326 | 4512 | #define prli_fb_sz_SHIFT 0 |
---|
4327 | 4513 | #define prli_fb_sz_MASK 0x0000ffff |
---|
.. | .. |
---|
4336 | 4522 | uint32_t rsvd_12_15[4]; /* word 12-15 */ |
---|
4337 | 4523 | }; |
---|
4338 | 4524 | |
---|
| 4525 | +#define INHIBIT_ABORT 1 |
---|
4339 | 4526 | #define T_REQUEST_TAG 3 |
---|
4340 | 4527 | #define T_XRI_TAG 1 |
---|
4341 | 4528 | |
---|
.. | .. |
---|
4444 | 4631 | uint32_t fc_hdr_wd5; /* word 15 */ |
---|
4445 | 4632 | }; |
---|
4446 | 4633 | |
---|
| 4634 | +#define ELS_RDF_REG_TAG_CNT 4 |
---|
| 4635 | +struct lpfc_els_rdf_reg_desc { |
---|
| 4636 | + struct fc_df_desc_fpin_reg reg_desc; /* descriptor header */ |
---|
| 4637 | + __be32 desc_tags[ELS_RDF_REG_TAG_CNT]; |
---|
| 4638 | + /* tags in reg_desc */ |
---|
| 4639 | +}; |
---|
| 4640 | + |
---|
| 4641 | +struct lpfc_els_rdf_req { |
---|
| 4642 | + struct fc_els_rdf rdf; /* hdr up to descriptors */ |
---|
| 4643 | + struct lpfc_els_rdf_reg_desc reg_d1; /* 1st descriptor */ |
---|
| 4644 | +}; |
---|
| 4645 | + |
---|
| 4646 | +struct lpfc_els_rdf_rsp { |
---|
| 4647 | + struct fc_els_rdf_resp rdf_resp; /* hdr up to descriptors */ |
---|
| 4648 | + struct lpfc_els_rdf_reg_desc reg_d1; /* 1st descriptor */ |
---|
| 4649 | +}; |
---|
| 4650 | + |
---|
4447 | 4651 | union lpfc_wqe { |
---|
4448 | 4652 | uint32_t words[16]; |
---|
4449 | 4653 | struct lpfc_wqe_generic generic; |
---|
.. | .. |
---|
4484 | 4688 | struct send_frame_wqe send_frame; |
---|
4485 | 4689 | }; |
---|
4486 | 4690 | |
---|
4487 | | -#define MAGIC_NUMER_G6 0xFEAA0003 |
---|
4488 | | -#define MAGIC_NUMER_G7 0xFEAA0005 |
---|
| 4691 | +#define MAGIC_NUMBER_G6 0xFEAA0003 |
---|
| 4692 | +#define MAGIC_NUMBER_G7 0xFEAA0005 |
---|
4489 | 4693 | |
---|
4490 | 4694 | struct lpfc_grp_hdr { |
---|
4491 | 4695 | uint32_t size; |
---|