diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_hw.h')
| -rw-r--r-- | drivers/scsi/lpfc/lpfc_hw.h | 324 | 
1 files changed, 197 insertions, 127 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hw.h b/drivers/scsi/lpfc/lpfc_hw.h index 9b833345646..23625925237 100644 --- a/drivers/scsi/lpfc/lpfc_hw.h +++ b/drivers/scsi/lpfc/lpfc_hw.h @@ -1,7 +1,7 @@  /*******************************************************************   * This file is part of the Emulex Linux Device Driver for         *   * Fibre Channel Host Bus Adapters.                                * - * Copyright (C) 2004-2010 Emulex.  All rights reserved.           * + * Copyright (C) 2004-2014 Emulex.  All rights reserved.           *   * EMULEX and SLI are trademarks of Emulex.                        *   * www.emulex.com                                                  *   *                                                                 * @@ -45,6 +45,7 @@  #define LPFC_EXTRA_RING          1	/* ring 1 for other protocols */  #define LPFC_ELS_RING            2	/* ring 2 for ELS commands */  #define LPFC_FCP_NEXT_RING       3 +#define LPFC_FCP_OAS_RING        3  #define SLI2_IOCB_CMD_R0_ENTRIES    172	/* SLI-2 FCP command ring entries */  #define SLI2_IOCB_RSP_R0_ENTRIES    134	/* SLI-2 FCP response ring entries */ @@ -64,10 +65,13 @@  #define SLI3_IOCB_CMD_SIZE	128  #define SLI3_IOCB_RSP_SIZE	64 +#define LPFC_UNREG_ALL_RPIS_VPORT	0xffff +#define LPFC_UNREG_ALL_DFLT_RPIS	0xffffffff  /* vendor ID used in SCSI netlink calls */  #define LPFC_NL_VENDOR_ID (SCSI_NL_VID_TYPE_PCI | PCI_VENDOR_ID_EMULEX) +#define FW_REV_STR_SIZE	32  /* Common Transport structures and definitions */  union CtRevisionId { @@ -341,6 +345,18 @@ struct csp {  	uint8_t bbCreditMsb;  	uint8_t bbCreditlsb;	/* FC Word 0, byte 3 */ +/* + * Word 1 Bit 31 in common service parameter is overloaded. + * Word 1 Bit 31 in FLOGI request is multiple NPort request + * Word 1 Bit 31 in FLOGI response is clean address bit + */ +#define clean_address_bit request_multiple_Nport /* Word 1, bit 31 */ +/* + * Word 1 Bit 30 in common service parameter is overloaded. + * Word 1 Bit 30 in FLOGI request is Virtual Fabrics + * Word 1 Bit 30 in PLOGI request is random offset + */ +#define virtual_fabric_support randomOffset /* Word 1, bit 30 */  #ifdef __BIG_ENDIAN_BITFIELD  	uint16_t request_multiple_Nport:1;	/* FC Word 1, bit 31 */  	uint16_t randomOffset:1;	/* FC Word 1, bit 30 */ @@ -523,6 +539,7 @@ struct fc_vft_header {  #define ELS_CMD_ECHO      0x10000000  #define ELS_CMD_TEST      0x11000000  #define ELS_CMD_RRQ       0x12000000 +#define ELS_CMD_REC       0x13000000  #define ELS_CMD_PRLI      0x20100014  #define ELS_CMD_PRLO      0x21100014  #define ELS_CMD_PRLO_ACC  0x02100014 @@ -559,6 +576,7 @@ struct fc_vft_header {  #define ELS_CMD_ECHO      0x10  #define ELS_CMD_TEST      0x11  #define ELS_CMD_RRQ       0x12 +#define ELS_CMD_REC       0x13  #define ELS_CMD_PRLI      0x14001020  #define ELS_CMD_PRLO      0x14001021  #define ELS_CMD_PRLO_ACC  0x14001002 @@ -880,6 +898,26 @@ struct  RLS_RSP {		/* Structure is in Big Endian format */  	uint32_t crcCnt;  }; +struct RRQ {			/* Structure is in Big Endian format */ +	uint32_t rrq; +#define rrq_rsvd_SHIFT		24 +#define rrq_rsvd_MASK		0x000000ff +#define rrq_rsvd_WORD		rrq +#define rrq_did_SHIFT		0 +#define rrq_did_MASK		0x00ffffff +#define rrq_did_WORD		rrq +	uint32_t rrq_exchg; +#define rrq_oxid_SHIFT		16 +#define rrq_oxid_MASK		0xffff +#define rrq_oxid_WORD		rrq_exchg +#define rrq_rxid_SHIFT		0 +#define rrq_rxid_MASK		0xffff +#define rrq_rxid_WORD		rrq_exchg +}; + +#define LPFC_MAX_VFN_PER_PFN	255 /* Maximum VFs allowed per ARI */ +#define LPFC_DEF_VFN_PER_PFN	0   /* Default VFs due to platform limitation*/ +  struct RTV_RSP {		/* Structure is in Big Endian format */  	uint32_t ratov;  	uint32_t edtov; @@ -978,7 +1016,7 @@ typedef struct _ELS_PKT {	/* Structure is in Big Endian format */  #define  SLI_MGMT_GRPL     0x102	/* Get registered Port list */  #define  SLI_MGMT_GPAT     0x110	/* Get Port attributes */  #define  SLI_MGMT_RHBA     0x200	/* Register HBA */ -#define  SLI_MGMT_RHAT     0x201	/* Register HBA atttributes */ +#define  SLI_MGMT_RHAT     0x201	/* Register HBA attributes */  #define  SLI_MGMT_RPRT     0x210	/* Register Port */  #define  SLI_MGMT_RPA      0x211	/* Register Port attributes */  #define  SLI_MGMT_DHBA     0x300	/* De-register HBA */ @@ -1153,8 +1191,8 @@ typedef struct {   */  /* Number of rings currently used and available. */ -#define MAX_CONFIGURED_RINGS     3 -#define MAX_RINGS                4 +#define MAX_SLI3_CONFIGURED_RINGS     3 +#define MAX_SLI3_RINGS                4  /* IOCB / Mailbox is owned by FireFly */  #define OWN_CHIP        1 @@ -1172,7 +1210,12 @@ typedef struct {  #define PCI_VENDOR_ID_EMULEX        0x10df  #define PCI_DEVICE_ID_FIREFLY       0x1ae5  #define PCI_DEVICE_ID_PROTEUS_VF    0xe100 +#define PCI_DEVICE_ID_BALIUS        0xe131  #define PCI_DEVICE_ID_PROTEUS_PF    0xe180 +#define PCI_DEVICE_ID_LANCER_FC     0xe200 +#define PCI_DEVICE_ID_LANCER_FC_VF  0xe208 +#define PCI_DEVICE_ID_LANCER_FCOE   0xe260 +#define PCI_DEVICE_ID_LANCER_FCOE_VF 0xe268  #define PCI_DEVICE_ID_SAT_SMB       0xf011  #define PCI_DEVICE_ID_SAT_MID       0xf015  #define PCI_DEVICE_ID_RFLY          0xf095 @@ -1189,6 +1232,7 @@ typedef struct {  #define PCI_DEVICE_ID_SAT           0xf100  #define PCI_DEVICE_ID_SAT_SCSP      0xf111  #define PCI_DEVICE_ID_SAT_DCSP      0xf112 +#define PCI_DEVICE_ID_FALCON        0xf180  #define PCI_DEVICE_ID_SUPERFLY      0xf700  #define PCI_DEVICE_ID_DRAGONFLY     0xf800  #define PCI_DEVICE_ID_CENTAUR       0xf900 @@ -1210,8 +1254,8 @@ typedef struct {  #define PCI_VENDOR_ID_SERVERENGINE  0x19a2  #define PCI_DEVICE_ID_TIGERSHARK    0x0704  #define PCI_DEVICE_ID_TOMCAT        0x0714 -#define PCI_DEVICE_ID_FALCON        0xf180 -#define PCI_DEVICE_ID_BALIUS        0xe131 +#define PCI_DEVICE_ID_SKYHAWK       0x0724 +#define PCI_DEVICE_ID_SKYHAWK_VF    0x072c  #define JEDEC_ID_ADDRESS            0x0080001c  #define FIREFLY_JEDEC_ID            0x1ACC @@ -1318,7 +1362,7 @@ typedef struct {		/* FireFly BIU registers */  #define HS_FFER1       0x80000000	/* Bit 31 */  #define HS_CRIT_TEMP   0x00000100	/* Bit 8  */  #define HS_FFERM       0xFF000100	/* Mask for error bits 31:24 and 8 */ - +#define UNPLUG_ERR     0x00000001	/* Indicate pci hot unplug */  /* Host Control Register */  #define HC_REG_OFFSET  12	/* Byte offset from register base address */ @@ -1368,7 +1412,6 @@ typedef struct {		/* FireFly BIU registers */  #define MBX_READ_LNK_STAT   0x12  #define MBX_REG_LOGIN       0x13  #define MBX_UNREG_LOGIN     0x14 -#define MBX_READ_LA         0x15  #define MBX_CLEAR_LA        0x16  #define MBX_DUMP_MEMORY     0x17  #define MBX_DUMP_CONTEXT    0x18 @@ -1402,7 +1445,7 @@ typedef struct {		/* FireFly BIU registers */  #define MBX_READ_SPARM64    0x8D  #define MBX_READ_RPI64      0x8F  #define MBX_REG_LOGIN64     0x93 -#define MBX_READ_LA64       0x95 +#define MBX_READ_TOPOLOGY   0x95  #define MBX_REG_VPI	    0x96  #define MBX_UNREG_VPI	    0x97 @@ -1420,6 +1463,7 @@ typedef struct {		/* FireFly BIU registers */  #define MBX_UNREG_FCFI	    0xA2  #define MBX_INIT_VFI        0xA3  #define MBX_INIT_VPI        0xA4 +#define MBX_ACCESS_VDATA    0xA5  #define MBX_AUTH_PORT       0xF8  #define MBX_SECURITY_MGMT   0xF9 @@ -1624,6 +1668,7 @@ enum lpfc_protgrp_type {  #define	BG_OP_IN_CSUM_OUT_CSUM		0x5  #define	BG_OP_IN_CRC_OUT_CSUM		0x6  #define	BG_OP_IN_CSUM_OUT_CRC		0x7 +#define	BG_OP_RAW_MODE			0x8  struct lpfc_pde5 {  	uint32_t word0; @@ -1688,6 +1733,17 @@ struct lpfc_pde6 {  #define pde6_apptagval_WORD	word2  }; +struct lpfc_pde7 { +	uint32_t word0; +#define pde7_type_SHIFT		24 +#define pde7_type_MASK		0x000000ff +#define pde7_type_WORD		word0 +#define pde7_rsvd0_SHIFT	0 +#define pde7_rsvd0_MASK		0x00ffffff +#define pde7_rsvd0_WORD		word0 +	uint32_t addrHigh; +	uint32_t addrLow; +};  /* Structure for MB Command LOAD_SM and DOWN_LOAD */ @@ -1810,8 +1866,8 @@ typedef struct {  	uint8_t fabric_AL_PA;	/* If using a Fabric Assigned AL_PA */  #endif -#define FLAGS_LOCAL_LB               0x01 /* link_flags (=1) ENDEC loopback */  #define FLAGS_TOPOLOGY_MODE_LOOP_PT  0x00 /* Attempt loop then pt-pt */ +#define FLAGS_LOCAL_LB               0x01 /* link_flags (=1) ENDEC loopback */  #define FLAGS_TOPOLOGY_MODE_PT_PT    0x02 /* Attempt pt-pt only */  #define FLAGS_TOPOLOGY_MODE_LOOP     0x04 /* Attempt loop only */  #define FLAGS_TOPOLOGY_MODE_PT_LOOP  0x06 /* Attempt pt-pt then loop */ @@ -1823,12 +1879,13 @@ typedef struct {  #define FLAGS_IMED_ABORT             0x04000	/* Bit 14 */  	uint32_t link_speed; -#define LINK_SPEED_AUTO 0       /* Auto selection */ -#define LINK_SPEED_1G   1       /* 1 Gigabaud */ -#define LINK_SPEED_2G   2       /* 2 Gigabaud */ -#define LINK_SPEED_4G   4       /* 4 Gigabaud */ -#define LINK_SPEED_8G   8       /* 8 Gigabaud */ -#define LINK_SPEED_10G   16      /* 10 Gigabaud */ +#define LINK_SPEED_AUTO 0x0     /* Auto selection */ +#define LINK_SPEED_1G   0x1     /* 1 Gigabaud */ +#define LINK_SPEED_2G   0x2     /* 2 Gigabaud */ +#define LINK_SPEED_4G   0x4     /* 4 Gigabaud */ +#define LINK_SPEED_8G   0x8     /* 8 Gigabaud */ +#define LINK_SPEED_10G  0x10    /* 10 Gigabaud */ +#define LINK_SPEED_16G  0x11    /* 16 Gigabaud */  } INIT_LINK_VAR; @@ -1999,6 +2056,7 @@ typedef struct {  #define LMT_4Gb       0x040  #define LMT_8Gb       0x080  #define LMT_10Gb      0x100 +#define LMT_16Gb      0x200  	uint32_t rsvd2;  	uint32_t rsvd3;  	uint32_t max_xri; @@ -2394,100 +2452,93 @@ typedef struct {  #endif  } UNREG_D_ID_VAR; -/* Structure for MB Command READ_LA (21) */ -/* Structure for MB Command READ_LA64 (0x95) */ - -typedef struct { +/* Structure for MB Command READ_TOPOLOGY (0x95) */ +struct lpfc_mbx_read_top {  	uint32_t eventTag;	/* Event tag */ -#ifdef __BIG_ENDIAN_BITFIELD -	uint32_t rsvd1:19; -	uint32_t fa:1; -	uint32_t mm:1;		/* Menlo Maintenance mode enabled */ -	uint32_t rx:1; -	uint32_t pb:1; -	uint32_t il:1; -	uint32_t attType:8; -#else	/*  __LITTLE_ENDIAN_BITFIELD */ -	uint32_t attType:8; -	uint32_t il:1; -	uint32_t pb:1; -	uint32_t rx:1; -	uint32_t mm:1; -	uint32_t fa:1; -	uint32_t rsvd1:19; -#endif - -#define AT_RESERVED    0x00	/* Reserved - attType */ -#define AT_LINK_UP     0x01	/* Link is up */ -#define AT_LINK_DOWN   0x02	/* Link is down */ - -#ifdef __BIG_ENDIAN_BITFIELD -	uint8_t granted_AL_PA; -	uint8_t lipAlPs; -	uint8_t lipType; -	uint8_t topology; -#else	/*  __LITTLE_ENDIAN_BITFIELD */ -	uint8_t topology; -	uint8_t lipType; -	uint8_t lipAlPs; -	uint8_t granted_AL_PA; -#endif - -#define TOPOLOGY_PT_PT 0x01	/* Topology is pt-pt / pt-fabric */ -#define TOPOLOGY_LOOP  0x02	/* Topology is FC-AL */ -#define TOPOLOGY_LNK_MENLO_MAINTENANCE 0x05 /* maint mode zephtr to menlo */ - -	union { -		struct ulp_bde lilpBde; /* This BDE points to a 128 byte buffer -					   to */ -		/* store the LILP AL_PA position map into */ -		struct ulp_bde64 lilpBde64; -	} un; - -#ifdef __BIG_ENDIAN_BITFIELD -	uint32_t Dlu:1; -	uint32_t Dtf:1; -	uint32_t Drsvd2:14; -	uint32_t DlnkSpeed:8; -	uint32_t DnlPort:4; -	uint32_t Dtx:2; -	uint32_t Drx:2; -#else	/*  __LITTLE_ENDIAN_BITFIELD */ -	uint32_t Drx:2; -	uint32_t Dtx:2; -	uint32_t DnlPort:4; -	uint32_t DlnkSpeed:8; -	uint32_t Drsvd2:14; -	uint32_t Dtf:1; -	uint32_t Dlu:1; -#endif - -#ifdef __BIG_ENDIAN_BITFIELD -	uint32_t Ulu:1; -	uint32_t Utf:1; -	uint32_t Ursvd2:14; -	uint32_t UlnkSpeed:8; -	uint32_t UnlPort:4; -	uint32_t Utx:2; -	uint32_t Urx:2; -#else	/*  __LITTLE_ENDIAN_BITFIELD */ -	uint32_t Urx:2; -	uint32_t Utx:2; -	uint32_t UnlPort:4; -	uint32_t UlnkSpeed:8; -	uint32_t Ursvd2:14; -	uint32_t Utf:1; -	uint32_t Ulu:1; -#endif - -#define LA_UNKNW_LINK  0x0    /* lnkSpeed */ -#define LA_1GHZ_LINK   0x04   /* lnkSpeed */ -#define LA_2GHZ_LINK   0x08   /* lnkSpeed */ -#define LA_4GHZ_LINK   0x10   /* lnkSpeed */ -#define LA_8GHZ_LINK   0x20   /* lnkSpeed */ -#define LA_10GHZ_LINK  0x40   /* lnkSpeed */ - -} READ_LA_VAR; +	uint32_t word2; +#define lpfc_mbx_read_top_fa_SHIFT		12 +#define lpfc_mbx_read_top_fa_MASK		0x00000001 +#define lpfc_mbx_read_top_fa_WORD		word2 +#define lpfc_mbx_read_top_mm_SHIFT		11 +#define lpfc_mbx_read_top_mm_MASK		0x00000001 +#define lpfc_mbx_read_top_mm_WORD		word2 +#define lpfc_mbx_read_top_pb_SHIFT		9 +#define lpfc_mbx_read_top_pb_MASK		0X00000001 +#define lpfc_mbx_read_top_pb_WORD		word2 +#define lpfc_mbx_read_top_il_SHIFT		8 +#define lpfc_mbx_read_top_il_MASK		0x00000001 +#define lpfc_mbx_read_top_il_WORD		word2 +#define lpfc_mbx_read_top_att_type_SHIFT	0 +#define lpfc_mbx_read_top_att_type_MASK		0x000000FF +#define lpfc_mbx_read_top_att_type_WORD		word2 +#define LPFC_ATT_RESERVED    0x00	/* Reserved - attType */ +#define LPFC_ATT_LINK_UP     0x01	/* Link is up */ +#define LPFC_ATT_LINK_DOWN   0x02	/* Link is down */ +	uint32_t word3; +#define lpfc_mbx_read_top_alpa_granted_SHIFT	24 +#define lpfc_mbx_read_top_alpa_granted_MASK	0x000000FF +#define lpfc_mbx_read_top_alpa_granted_WORD	word3 +#define lpfc_mbx_read_top_lip_alps_SHIFT	16 +#define lpfc_mbx_read_top_lip_alps_MASK		0x000000FF +#define lpfc_mbx_read_top_lip_alps_WORD		word3 +#define lpfc_mbx_read_top_lip_type_SHIFT	8 +#define lpfc_mbx_read_top_lip_type_MASK		0x000000FF +#define lpfc_mbx_read_top_lip_type_WORD		word3 +#define lpfc_mbx_read_top_topology_SHIFT	0 +#define lpfc_mbx_read_top_topology_MASK		0x000000FF +#define lpfc_mbx_read_top_topology_WORD		word3 +#define LPFC_TOPOLOGY_PT_PT 0x01	/* Topology is pt-pt / pt-fabric */ +#define LPFC_TOPOLOGY_LOOP  0x02	/* Topology is FC-AL */ +#define LPFC_TOPOLOGY_MM    0x05	/* maint mode zephtr to menlo */ +	/* store the LILP AL_PA position map into */ +	struct ulp_bde64 lilpBde64; +#define LPFC_ALPA_MAP_SIZE	128 +	uint32_t word7; +#define lpfc_mbx_read_top_ld_lu_SHIFT		31 +#define lpfc_mbx_read_top_ld_lu_MASK		0x00000001 +#define lpfc_mbx_read_top_ld_lu_WORD		word7 +#define lpfc_mbx_read_top_ld_tf_SHIFT		30 +#define lpfc_mbx_read_top_ld_tf_MASK		0x00000001 +#define lpfc_mbx_read_top_ld_tf_WORD		word7 +#define lpfc_mbx_read_top_ld_link_spd_SHIFT	8 +#define lpfc_mbx_read_top_ld_link_spd_MASK	0x000000FF +#define lpfc_mbx_read_top_ld_link_spd_WORD	word7 +#define lpfc_mbx_read_top_ld_nl_port_SHIFT	4 +#define lpfc_mbx_read_top_ld_nl_port_MASK	0x0000000F +#define lpfc_mbx_read_top_ld_nl_port_WORD	word7 +#define lpfc_mbx_read_top_ld_tx_SHIFT		2 +#define lpfc_mbx_read_top_ld_tx_MASK		0x00000003 +#define lpfc_mbx_read_top_ld_tx_WORD		word7 +#define lpfc_mbx_read_top_ld_rx_SHIFT		0 +#define lpfc_mbx_read_top_ld_rx_MASK		0x00000003 +#define lpfc_mbx_read_top_ld_rx_WORD		word7 +	uint32_t word8; +#define lpfc_mbx_read_top_lu_SHIFT		31 +#define lpfc_mbx_read_top_lu_MASK		0x00000001 +#define lpfc_mbx_read_top_lu_WORD		word8 +#define lpfc_mbx_read_top_tf_SHIFT		30 +#define lpfc_mbx_read_top_tf_MASK		0x00000001 +#define lpfc_mbx_read_top_tf_WORD		word8 +#define lpfc_mbx_read_top_link_spd_SHIFT	8 +#define lpfc_mbx_read_top_link_spd_MASK		0x000000FF +#define lpfc_mbx_read_top_link_spd_WORD		word8 +#define lpfc_mbx_read_top_nl_port_SHIFT		4 +#define lpfc_mbx_read_top_nl_port_MASK		0x0000000F +#define lpfc_mbx_read_top_nl_port_WORD		word8 +#define lpfc_mbx_read_top_tx_SHIFT		2 +#define lpfc_mbx_read_top_tx_MASK		0x00000003 +#define lpfc_mbx_read_top_tx_WORD		word8 +#define lpfc_mbx_read_top_rx_SHIFT		0 +#define lpfc_mbx_read_top_rx_MASK		0x00000003 +#define lpfc_mbx_read_top_rx_WORD		word8 +#define LPFC_LINK_SPEED_UNKNOWN	0x0 +#define LPFC_LINK_SPEED_1GHZ	0x04 +#define LPFC_LINK_SPEED_2GHZ	0x08 +#define LPFC_LINK_SPEED_4GHZ	0x10 +#define LPFC_LINK_SPEED_8GHZ	0x20 +#define LPFC_LINK_SPEED_10GHZ	0x40 +#define LPFC_LINK_SPEED_16GHZ	0x80 +};  /* Structure for MB Command CLEAR_LA (22) */ @@ -2524,6 +2575,8 @@ typedef struct {  #define  DMP_MEM_REG             0x1  #define  DMP_NV_PARAMS           0x2 +#define  DMP_LMSD                0x3 /* Link Module Serial Data */ +#define  DMP_WELL_KNOWN          0x4  #define  DMP_REGION_VPD          0xe  #define  DMP_VPD_SIZE            0x400  /* maximum amount of VPD */ @@ -2782,7 +2835,8 @@ typedef struct {  #ifdef __BIG_ENDIAN_BITFIELD  	uint32_t rsvd1     : 19;  /* Reserved                             */  	uint32_t cdss      :  1;  /* Configure Data Security SLI          */ -	uint32_t rsvd2     :  3;  /* Reserved                             */ +	uint32_t casabt    :  1;  /* Configure async abts status notice   */ +	uint32_t rsvd2     :  2;  /* Reserved                             */  	uint32_t cbg       :  1;  /* Configure BlockGuard                 */  	uint32_t cmv       :  1;  /* Configure Max VPIs                   */  	uint32_t ccrp      :  1;  /* Config Command Ring Polling          */ @@ -2802,14 +2856,16 @@ typedef struct {  	uint32_t ccrp      :  1;  /* Config Command Ring Polling          */  	uint32_t cmv	   :  1;  /* Configure Max VPIs                   */  	uint32_t cbg       :  1;  /* Configure BlockGuard                 */ -	uint32_t rsvd2     :  3;  /* Reserved                             */ +	uint32_t rsvd2     :  2;  /* Reserved                             */ +	uint32_t casabt    :  1;  /* Configure async abts status notice   */  	uint32_t cdss      :  1;  /* Configure Data Security SLI          */  	uint32_t rsvd1     : 19;  /* Reserved                             */  #endif  #ifdef __BIG_ENDIAN_BITFIELD  	uint32_t rsvd3     : 19;  /* Reserved                             */  	uint32_t gdss      :  1;  /* Configure Data Security SLI          */ -	uint32_t rsvd4     :  3;  /* Reserved                             */ +	uint32_t gasabt    :  1;  /* Grant async abts status notice       */ +	uint32_t rsvd4     :  2;  /* Reserved                             */  	uint32_t gbg       :  1;  /* Grant BlockGuard                     */  	uint32_t gmv	   :  1;  /* Grant Max VPIs                       */  	uint32_t gcrp	   :  1;  /* Grant Command Ring Polling           */ @@ -2829,7 +2885,8 @@ typedef struct {  	uint32_t gcrp	   :  1;  /* Grant Command Ring Polling           */  	uint32_t gmv	   :  1;  /* Grant Max VPIs                       */  	uint32_t gbg       :  1;  /* Grant BlockGuard                     */ -	uint32_t rsvd4     :  3;  /* Reserved                             */ +	uint32_t rsvd4     :  2;  /* Reserved                             */ +	uint32_t gasabt    :  1;  /* Grant async abts status notice       */  	uint32_t gdss      :  1;  /* Configure Data Security SLI          */  	uint32_t rsvd3     : 19;  /* Reserved                             */  #endif @@ -2918,18 +2975,18 @@ typedef struct _SLI2_RDSC {  typedef struct _PCB {  #ifdef __BIG_ENDIAN_BITFIELD  	uint32_t type:8; -#define TYPE_NATIVE_SLI2       0x01; +#define TYPE_NATIVE_SLI2       0x01  	uint32_t feature:8; -#define FEATURE_INITIAL_SLI2   0x01; +#define FEATURE_INITIAL_SLI2   0x01  	uint32_t rsvd:12;  	uint32_t maxRing:4;  #else	/*  __LITTLE_ENDIAN_BITFIELD */  	uint32_t maxRing:4;  	uint32_t rsvd:12;  	uint32_t feature:8; -#define FEATURE_INITIAL_SLI2   0x01; +#define FEATURE_INITIAL_SLI2   0x01  	uint32_t type:8; -#define TYPE_NATIVE_SLI2       0x01; +#define TYPE_NATIVE_SLI2       0x01  #endif  	uint32_t mailBoxSize; @@ -2941,7 +2998,7 @@ typedef struct _PCB {  	uint32_t pgpAddrLow;  	uint32_t pgpAddrHigh; -	SLI2_RDSC rdsc[MAX_RINGS]; +	SLI2_RDSC rdsc[MAX_SLI3_RINGS];  } PCB_t;  /* NEW_FEATURE */ @@ -2990,7 +3047,7 @@ typedef struct {  #define MAILBOX_EXT_SIZE	(MAILBOX_EXT_WSIZE * sizeof(uint32_t))  #define MAILBOX_HBA_EXT_OFFSET  0x100  /* max mbox xmit size is a page size for sysfs IO operations */ -#define MAILBOX_MAX_XMIT_SIZE   PAGE_SIZE +#define MAILBOX_SYSFS_MAX	4096  typedef union {  	uint32_t varWords[MAILBOX_CMD_WSIZE - 1]; /* first word is type/ @@ -3016,7 +3073,6 @@ typedef union {  	READ_LNK_VAR varRdLnk;		/* cmd = 18 (READ_LNK_STAT)  */  	REG_LOGIN_VAR varRegLogin;	/* cmd = 19 (REG_LOGIN(64))  */  	UNREG_LOGIN_VAR varUnregLogin;	/* cmd = 20 (UNREG_LOGIN)    */ -	READ_LA_VAR varReadLA;		/* cmd = 21 (READ_LA(64))    */  	CLEAR_LA_VAR varClearLA;	/* cmd = 22 (CLEAR_LA)       */  	DUMP_VAR varDmp;		/* Warm Start DUMP mbx cmd   */  	UNREG_D_ID_VAR varUnregDID;	/* cmd = 0x23 (UNREG_D_ID)   */ @@ -3026,6 +3082,7 @@ typedef union {  	struct config_hbq_var varCfgHbq;/* cmd = 0x7c (CONFIG_HBQ)  */  	struct update_cfg_var varUpdateCfg; /* cmd = 0x1B (UPDATE_CFG)*/  	CONFIG_PORT_VAR varCfgPort;	/* cmd = 0x88 (CONFIG_PORT)  */ +	struct lpfc_mbx_read_top varReadTop; /* cmd = 0x95 (READ_TOPOLOGY) */  	REG_VPI_VAR varRegVpi;		/* cmd = 0x96 (REG_VPI) */  	UNREG_VPI_VAR varUnregVpi;	/* cmd = 0x97 (UNREG_VPI) */  	ASYNCEVT_ENABLE_VAR varCfgAsyncEvent; /*cmd = x33 (CONFIG_ASYNC) */ @@ -3051,18 +3108,18 @@ struct lpfc_pgp {  struct sli2_desc {  	uint32_t unused1[16]; -	struct lpfc_hgp host[MAX_RINGS]; -	struct lpfc_pgp port[MAX_RINGS]; +	struct lpfc_hgp host[MAX_SLI3_RINGS]; +	struct lpfc_pgp port[MAX_SLI3_RINGS];  };  struct sli3_desc { -	struct lpfc_hgp host[MAX_RINGS]; +	struct lpfc_hgp host[MAX_SLI3_RINGS];  	uint32_t reserved[8];  	uint32_t hbq_put[16];  };  struct sli3_pgp { -	struct lpfc_pgp port[MAX_RINGS]; +	struct lpfc_pgp port[MAX_SLI3_RINGS];  	uint32_t hbq_get[16];  }; @@ -3184,11 +3241,15 @@ typedef struct {  #define IOERR_SLER_RRQ_RJT_ERR        0x4C  #define IOERR_SLER_RRQ_RETRY_ERR      0x4D  #define IOERR_SLER_ABTS_ERR           0x4E - +#define IOERR_ELXSEC_KEY_UNWRAP_ERROR		0xF0 +#define IOERR_ELXSEC_KEY_UNWRAP_COMPARE_ERROR	0xF1 +#define IOERR_ELXSEC_CRYPTO_ERROR		0xF2 +#define IOERR_ELXSEC_CRYPTO_COMPARE_ERROR	0xF3  #define IOERR_DRVR_MASK               0x100  #define IOERR_SLI_DOWN                0x101  /* ulpStatus  - Driver defined */  #define IOERR_SLI_BRESET              0x102  #define IOERR_SLI_ABORTED             0x103 +#define IOERR_PARAM_MASK              0x1ff  } PARM_ERR;  typedef union { @@ -3321,6 +3382,9 @@ typedef struct {  	WORD5 w5;		/* Header control/status word */  } XMT_SEQ_FIELDS64; +/* This word is remote ports D_ID for XMIT_ELS_RSP64 */ +#define xmit_els_remoteID xrsqRo +  /* IOCB Command template for 64 bit RCV_SEQUENCE64 */  typedef struct {  	struct ulp_bde64 rcvBde; @@ -3425,16 +3489,22 @@ typedef struct {  } ASYNCSTAT_FIELDS;  #define ASYNC_TEMP_WARN		0x100  #define ASYNC_TEMP_SAFE		0x101 +#define ASYNC_STATUS_CN		0x102  /* IOCB Command template for CMD_IOCB_RCV_ELS64_CX (0xB7)     or CMD_IOCB_RCV_SEQ64_CX (0xB5) */  struct rcv_sli3 { -	uint32_t word8Rsvd;  #ifdef __BIG_ENDIAN_BITFIELD +	uint16_t ox_id; +	uint16_t seq_cnt; +  	uint16_t vpi;  	uint16_t word9Rsvd;  #else  /*  __LITTLE_ENDIAN */ +	uint16_t seq_cnt; +	uint16_t ox_id; +  	uint16_t word9Rsvd;  	uint16_t vpi;  #endif @@ -3598,7 +3668,7 @@ typedef struct _IOCB {	/* IOCB structure */  		ASYNCSTAT_FIELDS asyncstat; /* async_status iocb */  		QUE_XRI64_CX_FIELDS quexri64cx; /* que_xri64_cx fields */  		struct rcv_seq64 rcvseq64;	/* RCV_SEQ64 and RCV_CONT64 */ -		struct sli4_bls_acc bls_acc; /* UNSOL ABTS BLS_ACC params */ +		struct sli4_bls_rsp bls_rsp; /* UNSOL ABTS BLS_RSP params */  		uint32_t ulpWord[IOCB_WORD_SZ - 2];	/* generic 6 'words' */  	} un;  	union {  | 
