New upstream version 18.11-rc1
[deb_dpdk.git] / drivers / net / bnx2x / ecore_hsi.h
index 5808e1a..1192e5d 100644 (file)
@@ -1,15 +1,13 @@
-/*-
- * Copyright (c) 2007-2013 QLogic Corporation. All rights reserved.
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright (c) 2007-2013 Broadcom Corporation.
  *
  * Eric Davis        <edavis@broadcom.com>
  * David Christensen <davidch@broadcom.com>
  * Gary Zambrano     <zambrano@broadcom.com>
  *
- * Copyright (c) 2014-2015 QLogic Corporation.
+ * Copyright (c) 2014-2018 Cavium Inc.
  * All rights reserved.
- * www.qlogic.com
- *
- * See LICENSE.bnx2x_pmd for copyright and licensing details.
+ * www.cavium.com
  */
 
 #ifndef ECORE_HSI_H
@@ -502,6 +500,18 @@ struct port_hw_cfg {                   /* port 0: 0x12c  port 1: 0x2bc */
        #define PORT_HW_CFG_TX_DRV_BROADCAST_MASK                     0x000F0000
        #define PORT_HW_CFG_TX_DRV_BROADCAST_SHIFT                    16
 
+       /*  Set non-default values for TXFIR in SFP mode. */
+       #define PORT_HW_CFG_TX_DRV_IFIR_MASK                          0x00F00000
+       #define PORT_HW_CFG_TX_DRV_IFIR_SHIFT                         20
+
+       /*  Set non-default values for IPREDRIVER in SFP mode. */
+       #define PORT_HW_CFG_TX_DRV_IPREDRIVER_MASK                    0x0F000000
+       #define PORT_HW_CFG_TX_DRV_IPREDRIVER_SHIFT                   24
+
+       /*  Set non-default values for POST2 in SFP mode. */
+       #define PORT_HW_CFG_TX_DRV_POST2_MASK                         0xF0000000
+       #define PORT_HW_CFG_TX_DRV_POST2_SHIFT                        28
+
        uint32_t reserved0[5];                              /* 0x17c */
 
        uint32_t aeu_int_mask;                              /* 0x190 */
@@ -785,6 +795,7 @@ struct port_hw_cfg {                    /* port 0: 0x12c  port 1: 0x2bc */
                #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BNX2X8722        0x00000f00
                #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BNX2X54616       0x00001000
                #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BNX2X84834       0x00001100
+               #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BNX2X84858     0x00001200
                #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_DIRECT_WC      0x0000fc00
                #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_FAILURE        0x0000fd00
                #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_NOT_CONN       0x0000ff00
@@ -2499,7 +2510,7 @@ struct shmem2_region {
         * SHMEM_EEE_XXX_ADV definitions (where XXX is replaced by speed).
         * bit 28 when 1'b1 EEE was requested.
         * bit 29 when 1'b1 tx lpi was requested.
-        * bit 30 when 1'b1 EEE was negotiated. Tx lpi will be asserted iff
+        * bit 30 when 1'b1 EEE was negotiated. Tx lpi will be asserted if
         * 30:29 are 2'b11.
         * bit 31 when 1'b0 bits 15:0 contain a PORT_FEAT_CFG_EEE_ define as
         * value. When 1'b1 those bits contains a value times 16 microseconds.
@@ -2534,7 +2545,12 @@ struct shmem2_region {
        uint32_t drv_func_info_addr;                    /* Offset 0x14C */
        uint32_t drv_func_info_size;                    /* Offset 0x150 */
        uint32_t link_attr_sync[PORT_MAX];              /* Offset 0x154 */
-       #define LINK_ATTR_SYNC_KR2_ENABLE       (1<<0)
+       #define LINK_ATTR_SYNC_KR2_ENABLE       0x00000001
+       #define LINK_ATTR_84858                 0x00000002
+       #define LINK_SFP_EEPROM_COMP_CODE_MASK  0x0000ff00
+       #define LINK_SFP_EEPROM_COMP_CODE_SHIFT          8
+
+       uint32_t link_change_count[PORT_MAX];           /* Offset 0x160-0x164 */
 };
 
 
@@ -3911,7 +3927,7 @@ struct client_init_rx_data
        uint16_t bd_pause_thr_high /* number of remaining bds above which, we send un-pause message */;
        uint16_t sge_pause_thr_low /* number of remaining sges under which, we send pause message */;
        uint16_t sge_pause_thr_high /* number of remaining sges above which, we send un-pause message */;
-       uint16_t rx_cos_mask /* the bits that will be set on pfc/ safc paket whith will be genratet when this ring is full. for regular flow control set this to 1 */;
+       uint16_t rx_cos_mask /* the bits that will be set on pfc/ safc paket with will be genratet when this ring is full. for regular flow control set this to 1 */;
        uint16_t silent_vlan_value /* The vlan to compare, in case, silent vlan is set */;
        uint16_t silent_vlan_mask /* The vlan mask, in case, silent vlan is set */;
        uint32_t reserved6[2];
@@ -4903,7 +4919,7 @@ enum eth_tx_vlan_type
  */
 enum eth_vlan_filter_mode
 {
-       ETH_VLAN_FILTER_ANY_VLAN /* Dont filter by vlan */,
+       ETH_VLAN_FILTER_ANY_VLAN /* Don't filter by vlan */,
        ETH_VLAN_FILTER_SPECIFIC_VLAN /* Only the vlan_id is allowed */,
        ETH_VLAN_FILTER_CLASSIFY /* Vlan will be added to CAM for classification */,
        MAX_ETH_VLAN_FILTER_MODE};
@@ -4937,7 +4953,7 @@ struct mac_configuration_entry
 #define MAC_CONFIGURATION_ENTRY_RDMA_MAC_SHIFT 1
 #define MAC_CONFIGURATION_ENTRY_VLAN_FILTERING_MODE (0x3<<2) /* BitField flags  (use enum eth_vlan_filter_mode) */
 #define MAC_CONFIGURATION_ENTRY_VLAN_FILTERING_MODE_SHIFT 2
-#define MAC_CONFIGURATION_ENTRY_OVERRIDE_VLAN_REMOVAL (0x1<<4) /* BitField flags       BitField flags  0 - cant remove vlan 1 - can remove vlan. relevant only to everest1 */
+#define MAC_CONFIGURATION_ENTRY_OVERRIDE_VLAN_REMOVAL (0x1<<4) /* BitField flags       BitField flags  0 - can't remove vlan 1 - can remove vlan. relevant only to everest1 */
 #define MAC_CONFIGURATION_ENTRY_OVERRIDE_VLAN_REMOVAL_SHIFT 4
 #define MAC_CONFIGURATION_ENTRY_BROADCAST (0x1<<5) /* BitField flags   BitField flags   0 - not broadcast 1 - broadcast. relevant only to everest1 */
 #define MAC_CONFIGURATION_ENTRY_BROADCAST_SHIFT 5
@@ -5024,7 +5040,7 @@ struct tstorm_eth_function_common_config
 #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_IPV6_TCP_CAPABILITY_SHIFT 3
 #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_MODE (0x7<<4) /* BitField config_flagsGeneral configuration flags        RSS mode of operation (use enum eth_rss_mode) */
 #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_MODE_SHIFT 4
-#define TSTORM_ETH_FUNCTION_COMMON_CONFIG_VLAN_FILTERING_ENABLE (0x1<<7) /* BitField config_flagsGeneral configuration flags   0 - Dont filter by vlan, 1 - Filter according to the vlans specificied in mac_filter_config */
+#define TSTORM_ETH_FUNCTION_COMMON_CONFIG_VLAN_FILTERING_ENABLE (0x1<<7) /* BitField config_flagsGeneral configuration flags   0 - Don't filter by vlan, 1 - Filter according to the vlans specificied in mac_filter_config */
 #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_VLAN_FILTERING_ENABLE_SHIFT 7
 #define __TSTORM_ETH_FUNCTION_COMMON_CONFIG_RESERVED0 (0xFF<<8) /* BitField config_flagsGeneral configuration flags     */
 #define __TSTORM_ETH_FUNCTION_COMMON_CONFIG_RESERVED0_SHIFT 8
@@ -5634,7 +5650,7 @@ struct flow_control_configuration
 struct function_start_data
 {
        uint8_t function_mode /* the function mode */;
-       uint8_t allow_npar_tx_switching /* If set, inter-pf tx switching is allowed in Switch Independant function mode. (E2/E3 Only) */;
+       uint8_t allow_npar_tx_switching /* If set, inter-pf tx switching is allowed in Switch Independent function mode. (E2/E3 Only) */;
        uint16_t sd_vlan_tag /* value of Vlan in case of switch depended multi-function mode */;
        uint16_t vif_id /* value of VIF id in case of NIV multi-function mode */;
        uint8_t path_id;