aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-02 16:38:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-02 16:38:27 -0400
commitaecdc33e111b2c447b622e287c6003726daa1426 (patch)
tree3e7657eae4b785e1a1fb5dfb225dbae0b2f0cfc6 /drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h
parenta20acf99f75e49271381d65db097c9763060a1e8 (diff)
parenta3a6cab5ea10cca64d036851fe0d932448f2fe4f (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking changes from David Miller: 1) GRE now works over ipv6, from Dmitry Kozlov. 2) Make SCTP more network namespace aware, from Eric Biederman. 3) TEAM driver now works with non-ethernet devices, from Jiri Pirko. 4) Make openvswitch network namespace aware, from Pravin B Shelar. 5) IPV6 NAT implementation, from Patrick McHardy. 6) Server side support for TCP Fast Open, from Jerry Chu and others. 7) Packet BPF filter supports MOD and XOR, from Eric Dumazet and Daniel Borkmann. 8) Increate the loopback default MTU to 64K, from Eric Dumazet. 9) Use a per-task rather than per-socket page fragment allocator for outgoing networking traffic. This benefits processes that have very many mostly idle sockets, which is quite common. From Eric Dumazet. 10) Use up to 32K for page fragment allocations, with fallbacks to smaller sizes when higher order page allocations fail. Benefits are a) less segments for driver to process b) less calls to page allocator c) less waste of space. From Eric Dumazet. 11) Allow GRO to be used on GRE tunnels, from Eric Dumazet. 12) VXLAN device driver, one way to handle VLAN issues such as the limitation of 4096 VLAN IDs yet still have some level of isolation. From Stephen Hemminger. 13) As usual there is a large boatload of driver changes, with the scale perhaps tilted towards the wireless side this time around. Fix up various fairly trivial conflicts, mostly caused by the user namespace changes. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1012 commits) hyperv: Add buffer for extended info after the RNDIS response message. hyperv: Report actual status in receive completion packet hyperv: Remove extra allocated space for recv_pkt_list elements hyperv: Fix page buffer handling in rndis_filter_send_request() hyperv: Fix the missing return value in rndis_filter_set_packet_filter() hyperv: Fix the max_xfer_size in RNDIS initialization vxlan: put UDP socket in correct namespace vxlan: Depend on CONFIG_INET sfc: Fix the reported priorities of different filter types sfc: Remove EFX_FILTER_FLAG_RX_OVERRIDE_IP sfc: Fix loopback self-test with separate_tx_channels=1 sfc: Fix MCDI structure field lookup sfc: Add parentheses around use of bitfield macro arguments sfc: Fix null function pointer in efx_sriov_channel_type vxlan: virtual extensible lan igmp: export symbol ip_mc_leave_group netlink: add attributes to fdb interface tg3: unconditionally select HWMON support when tg3 is enabled. Revert "net: ti cpsw ethernet: allow reading phy interface mode from DT" gre: fix sparse warning ...
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h109
1 files changed, 81 insertions, 28 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h
index 76b6e65790f8..18704929e642 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h
@@ -1286,6 +1286,9 @@ struct drv_func_mb {
1286 #define DRV_MSG_CODE_SET_MF_BW_MIN_MASK 0x00ff0000 1286 #define DRV_MSG_CODE_SET_MF_BW_MIN_MASK 0x00ff0000
1287 #define DRV_MSG_CODE_SET_MF_BW_MAX_MASK 0xff000000 1287 #define DRV_MSG_CODE_SET_MF_BW_MAX_MASK 0xff000000
1288 1288
1289 #define DRV_MSG_CODE_UNLOAD_SKIP_LINK_RESET 0x00000002
1290
1291 #define DRV_MSG_CODE_LOAD_REQ_WITH_LFA 0x0000100a
1289 u32 fw_mb_header; 1292 u32 fw_mb_header;
1290 #define FW_MSG_CODE_MASK 0xffff0000 1293 #define FW_MSG_CODE_MASK 0xffff0000
1291 #define FW_MSG_CODE_DRV_LOAD_COMMON 0x10100000 1294 #define FW_MSG_CODE_DRV_LOAD_COMMON 0x10100000
@@ -1909,6 +1912,54 @@ struct lldp_local_mib {
1909}; 1912};
1910/***END OF DCBX STRUCTURES DECLARATIONS***/ 1913/***END OF DCBX STRUCTURES DECLARATIONS***/
1911 1914
1915/***********************************************************/
1916/* Elink section */
1917/***********************************************************/
1918#define SHMEM_LINK_CONFIG_SIZE 2
1919struct shmem_lfa {
1920 u32 req_duplex;
1921 #define REQ_DUPLEX_PHY0_MASK 0x0000ffff
1922 #define REQ_DUPLEX_PHY0_SHIFT 0
1923 #define REQ_DUPLEX_PHY1_MASK 0xffff0000
1924 #define REQ_DUPLEX_PHY1_SHIFT 16
1925 u32 req_flow_ctrl;
1926 #define REQ_FLOW_CTRL_PHY0_MASK 0x0000ffff
1927 #define REQ_FLOW_CTRL_PHY0_SHIFT 0
1928 #define REQ_FLOW_CTRL_PHY1_MASK 0xffff0000
1929 #define REQ_FLOW_CTRL_PHY1_SHIFT 16
1930 u32 req_line_speed; /* Also determine AutoNeg */
1931 #define REQ_LINE_SPD_PHY0_MASK 0x0000ffff
1932 #define REQ_LINE_SPD_PHY0_SHIFT 0
1933 #define REQ_LINE_SPD_PHY1_MASK 0xffff0000
1934 #define REQ_LINE_SPD_PHY1_SHIFT 16
1935 u32 speed_cap_mask[SHMEM_LINK_CONFIG_SIZE];
1936 u32 additional_config;
1937 #define REQ_FC_AUTO_ADV_MASK 0x0000ffff
1938 #define REQ_FC_AUTO_ADV0_SHIFT 0
1939 #define NO_LFA_DUE_TO_DCC_MASK 0x00010000
1940 u32 lfa_sts;
1941 #define LFA_LINK_FLAP_REASON_OFFSET 0
1942 #define LFA_LINK_FLAP_REASON_MASK 0x000000ff
1943 #define LFA_LINK_DOWN 0x1
1944 #define LFA_LOOPBACK_ENABLED 0x2
1945 #define LFA_DUPLEX_MISMATCH 0x3
1946 #define LFA_MFW_IS_TOO_OLD 0x4
1947 #define LFA_LINK_SPEED_MISMATCH 0x5
1948 #define LFA_FLOW_CTRL_MISMATCH 0x6
1949 #define LFA_SPEED_CAP_MISMATCH 0x7
1950 #define LFA_DCC_LFA_DISABLED 0x8
1951 #define LFA_EEE_MISMATCH 0x9
1952
1953 #define LINK_FLAP_AVOIDANCE_COUNT_OFFSET 8
1954 #define LINK_FLAP_AVOIDANCE_COUNT_MASK 0x0000ff00
1955
1956 #define LINK_FLAP_COUNT_OFFSET 16
1957 #define LINK_FLAP_COUNT_MASK 0x00ff0000
1958
1959 #define LFA_FLAGS_MASK 0xff000000
1960 #define SHMEM_LFA_DONT_CLEAR_STAT (1<<24)
1961};
1962
1912struct ncsi_oem_fcoe_features { 1963struct ncsi_oem_fcoe_features {
1913 u32 fcoe_features1; 1964 u32 fcoe_features1;
1914 #define FCOE_FEATURES1_IOS_PER_CONNECTION_MASK 0x0000FFFF 1965 #define FCOE_FEATURES1_IOS_PER_CONNECTION_MASK 0x0000FFFF
@@ -2738,8 +2789,8 @@ struct afex_stats {
2738}; 2789};
2739 2790
2740#define BCM_5710_FW_MAJOR_VERSION 7 2791#define BCM_5710_FW_MAJOR_VERSION 7
2741#define BCM_5710_FW_MINOR_VERSION 2 2792#define BCM_5710_FW_MINOR_VERSION 8
2742#define BCM_5710_FW_REVISION_VERSION 51 2793#define BCM_5710_FW_REVISION_VERSION 2
2743#define BCM_5710_FW_ENGINEERING_VERSION 0 2794#define BCM_5710_FW_ENGINEERING_VERSION 0
2744#define BCM_5710_FW_COMPILE_FLAGS 1 2795#define BCM_5710_FW_COMPILE_FLAGS 1
2745 2796
@@ -3861,10 +3912,8 @@ struct eth_rss_update_ramrod_data {
3861#define ETH_RSS_UPDATE_RAMROD_DATA_IPV6_TCP_CAPABILITY_SHIFT 4 3912#define ETH_RSS_UPDATE_RAMROD_DATA_IPV6_TCP_CAPABILITY_SHIFT 4
3862#define ETH_RSS_UPDATE_RAMROD_DATA_IPV6_UDP_CAPABILITY (0x1<<5) 3913#define ETH_RSS_UPDATE_RAMROD_DATA_IPV6_UDP_CAPABILITY (0x1<<5)
3863#define ETH_RSS_UPDATE_RAMROD_DATA_IPV6_UDP_CAPABILITY_SHIFT 5 3914#define ETH_RSS_UPDATE_RAMROD_DATA_IPV6_UDP_CAPABILITY_SHIFT 5
3864#define ETH_RSS_UPDATE_RAMROD_DATA_UPDATE_RSS_KEY (0x1<<6) 3915#define ETH_RSS_UPDATE_RAMROD_DATA_UPDATE_RSS_KEY (0x1<<7)
3865#define ETH_RSS_UPDATE_RAMROD_DATA_UPDATE_RSS_KEY_SHIFT 6 3916#define ETH_RSS_UPDATE_RAMROD_DATA_UPDATE_RSS_KEY_SHIFT 7
3866#define __ETH_RSS_UPDATE_RAMROD_DATA_RESERVED0 (0x1<<7)
3867#define __ETH_RSS_UPDATE_RAMROD_DATA_RESERVED0_SHIFT 7
3868 u8 rss_result_mask; 3917 u8 rss_result_mask;
3869 u8 rss_mode; 3918 u8 rss_mode;
3870 __le32 __reserved2; 3919 __le32 __reserved2;
@@ -4080,27 +4129,29 @@ struct eth_tx_start_bd {
4080#define ETH_TX_START_BD_HDR_NBDS_SHIFT 0 4129#define ETH_TX_START_BD_HDR_NBDS_SHIFT 0
4081#define ETH_TX_START_BD_FORCE_VLAN_MODE (0x1<<4) 4130#define ETH_TX_START_BD_FORCE_VLAN_MODE (0x1<<4)
4082#define ETH_TX_START_BD_FORCE_VLAN_MODE_SHIFT 4 4131#define ETH_TX_START_BD_FORCE_VLAN_MODE_SHIFT 4
4083#define ETH_TX_START_BD_RESREVED (0x1<<5) 4132#define ETH_TX_START_BD_PARSE_NBDS (0x3<<5)
4084#define ETH_TX_START_BD_RESREVED_SHIFT 5 4133#define ETH_TX_START_BD_PARSE_NBDS_SHIFT 5
4085#define ETH_TX_START_BD_ETH_ADDR_TYPE (0x3<<6) 4134#define ETH_TX_START_BD_RESREVED (0x1<<7)
4086#define ETH_TX_START_BD_ETH_ADDR_TYPE_SHIFT 6 4135#define ETH_TX_START_BD_RESREVED_SHIFT 7
4087}; 4136};
4088 4137
4089/* 4138/*
4090 * Tx parsing BD structure for ETH E1/E1h 4139 * Tx parsing BD structure for ETH E1/E1h
4091 */ 4140 */
4092struct eth_tx_parse_bd_e1x { 4141struct eth_tx_parse_bd_e1x {
4093 u8 global_data; 4142 __le16 global_data;
4094#define ETH_TX_PARSE_BD_E1X_IP_HDR_START_OFFSET_W (0xF<<0) 4143#define ETH_TX_PARSE_BD_E1X_IP_HDR_START_OFFSET_W (0xF<<0)
4095#define ETH_TX_PARSE_BD_E1X_IP_HDR_START_OFFSET_W_SHIFT 0 4144#define ETH_TX_PARSE_BD_E1X_IP_HDR_START_OFFSET_W_SHIFT 0
4096#define ETH_TX_PARSE_BD_E1X_RESERVED0 (0x1<<4) 4145#define ETH_TX_PARSE_BD_E1X_ETH_ADDR_TYPE (0x3<<4)
4097#define ETH_TX_PARSE_BD_E1X_RESERVED0_SHIFT 4 4146#define ETH_TX_PARSE_BD_E1X_ETH_ADDR_TYPE_SHIFT 4
4098#define ETH_TX_PARSE_BD_E1X_PSEUDO_CS_WITHOUT_LEN (0x1<<5) 4147#define ETH_TX_PARSE_BD_E1X_PSEUDO_CS_WITHOUT_LEN (0x1<<6)
4099#define ETH_TX_PARSE_BD_E1X_PSEUDO_CS_WITHOUT_LEN_SHIFT 5 4148#define ETH_TX_PARSE_BD_E1X_PSEUDO_CS_WITHOUT_LEN_SHIFT 6
4100#define ETH_TX_PARSE_BD_E1X_LLC_SNAP_EN (0x1<<6) 4149#define ETH_TX_PARSE_BD_E1X_LLC_SNAP_EN (0x1<<7)
4101#define ETH_TX_PARSE_BD_E1X_LLC_SNAP_EN_SHIFT 6 4150#define ETH_TX_PARSE_BD_E1X_LLC_SNAP_EN_SHIFT 7
4102#define ETH_TX_PARSE_BD_E1X_NS_FLG (0x1<<7) 4151#define ETH_TX_PARSE_BD_E1X_NS_FLG (0x1<<8)
4103#define ETH_TX_PARSE_BD_E1X_NS_FLG_SHIFT 7 4152#define ETH_TX_PARSE_BD_E1X_NS_FLG_SHIFT 8
4153#define ETH_TX_PARSE_BD_E1X_RESERVED0 (0x7F<<9)
4154#define ETH_TX_PARSE_BD_E1X_RESERVED0_SHIFT 9
4104 u8 tcp_flags; 4155 u8 tcp_flags;
4105#define ETH_TX_PARSE_BD_E1X_FIN_FLG (0x1<<0) 4156#define ETH_TX_PARSE_BD_E1X_FIN_FLG (0x1<<0)
4106#define ETH_TX_PARSE_BD_E1X_FIN_FLG_SHIFT 0 4157#define ETH_TX_PARSE_BD_E1X_FIN_FLG_SHIFT 0
@@ -4119,7 +4170,6 @@ struct eth_tx_parse_bd_e1x {
4119#define ETH_TX_PARSE_BD_E1X_CWR_FLG (0x1<<7) 4170#define ETH_TX_PARSE_BD_E1X_CWR_FLG (0x1<<7)
4120#define ETH_TX_PARSE_BD_E1X_CWR_FLG_SHIFT 7 4171#define ETH_TX_PARSE_BD_E1X_CWR_FLG_SHIFT 7
4121 u8 ip_hlen_w; 4172 u8 ip_hlen_w;
4122 s8 reserved;
4123 __le16 total_hlen_w; 4173 __le16 total_hlen_w;
4124 __le16 tcp_pseudo_csum; 4174 __le16 tcp_pseudo_csum;
4125 __le16 lso_mss; 4175 __le16 lso_mss;
@@ -4138,14 +4188,16 @@ struct eth_tx_parse_bd_e2 {
4138 __le16 src_mac_addr_mid; 4188 __le16 src_mac_addr_mid;
4139 __le16 src_mac_addr_hi; 4189 __le16 src_mac_addr_hi;
4140 __le32 parsing_data; 4190 __le32 parsing_data;
4141#define ETH_TX_PARSE_BD_E2_TCP_HDR_START_OFFSET_W (0x1FFF<<0) 4191#define ETH_TX_PARSE_BD_E2_TCP_HDR_START_OFFSET_W (0x7FF<<0)
4142#define ETH_TX_PARSE_BD_E2_TCP_HDR_START_OFFSET_W_SHIFT 0 4192#define ETH_TX_PARSE_BD_E2_TCP_HDR_START_OFFSET_W_SHIFT 0
4143#define ETH_TX_PARSE_BD_E2_TCP_HDR_LENGTH_DW (0xF<<13) 4193#define ETH_TX_PARSE_BD_E2_TCP_HDR_LENGTH_DW (0xF<<11)
4144#define ETH_TX_PARSE_BD_E2_TCP_HDR_LENGTH_DW_SHIFT 13 4194#define ETH_TX_PARSE_BD_E2_TCP_HDR_LENGTH_DW_SHIFT 11
4145#define ETH_TX_PARSE_BD_E2_LSO_MSS (0x3FFF<<17) 4195#define ETH_TX_PARSE_BD_E2_IPV6_WITH_EXT_HDR (0x1<<15)
4146#define ETH_TX_PARSE_BD_E2_LSO_MSS_SHIFT 17 4196#define ETH_TX_PARSE_BD_E2_IPV6_WITH_EXT_HDR_SHIFT 15
4147#define ETH_TX_PARSE_BD_E2_IPV6_WITH_EXT_HDR (0x1<<31) 4197#define ETH_TX_PARSE_BD_E2_LSO_MSS (0x3FFF<<16)
4148#define ETH_TX_PARSE_BD_E2_IPV6_WITH_EXT_HDR_SHIFT 31 4198#define ETH_TX_PARSE_BD_E2_LSO_MSS_SHIFT 16
4199#define ETH_TX_PARSE_BD_E2_ETH_ADDR_TYPE (0x3<<30)
4200#define ETH_TX_PARSE_BD_E2_ETH_ADDR_TYPE_SHIFT 30
4149}; 4201};
4150 4202
4151/* 4203/*
@@ -4913,7 +4965,8 @@ struct flow_control_configuration {
4913 * 4965 *
4914 */ 4966 */
4915struct function_start_data { 4967struct function_start_data {
4916 __le16 function_mode; 4968 u8 function_mode;
4969 u8 reserved;
4917 __le16 sd_vlan_tag; 4970 __le16 sd_vlan_tag;
4918 __le16 vif_id; 4971 __le16 vif_id;
4919 u8 path_id; 4972 u8 path_id;