aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnx2x
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2x')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x.h2
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h120
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c41
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_mfw_req.h168
4 files changed, 208 insertions, 123 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
index 7211cb07426..362d16f1d25 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
@@ -51,6 +51,7 @@
51 51
52#include "bnx2x_reg.h" 52#include "bnx2x_reg.h"
53#include "bnx2x_fw_defs.h" 53#include "bnx2x_fw_defs.h"
54#include "bnx2x_mfw_req.h"
54#include "bnx2x_hsi.h" 55#include "bnx2x_hsi.h"
55#include "bnx2x_link.h" 56#include "bnx2x_link.h"
56#include "bnx2x_sp.h" 57#include "bnx2x_sp.h"
@@ -1317,6 +1318,7 @@ struct bnx2x {
1317#define NO_ISCSI_FLAG (1 << 14) 1318#define NO_ISCSI_FLAG (1 << 14)
1318#define NO_FCOE_FLAG (1 << 15) 1319#define NO_FCOE_FLAG (1 << 15)
1319#define BC_SUPPORTS_PFC_STATS (1 << 17) 1320#define BC_SUPPORTS_PFC_STATS (1 << 17)
1321#define BC_SUPPORTS_FCOE_FEATURES (1 << 19)
1320#define USING_SINGLE_MSIX_FLAG (1 << 20) 1322#define USING_SINGLE_MSIX_FLAG (1 << 20)
1321#define BC_SUPPORTS_DCBX_MSG_NON_PMF (1 << 21) 1323#define BC_SUPPORTS_DCBX_MSG_NON_PMF (1 << 21)
1322 1324
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h
index e7c390c66b2..76b6e65790f 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h
@@ -10,6 +10,7 @@
10#define BNX2X_HSI_H 10#define BNX2X_HSI_H
11 11
12#include "bnx2x_fw_defs.h" 12#include "bnx2x_fw_defs.h"
13#include "bnx2x_mfw_req.h"
13 14
14#define FW_ENCODE_32BIT_PATTERN 0x1e1e1e1e 15#define FW_ENCODE_32BIT_PATTERN 0x1e1e1e1e
15 16
@@ -33,12 +34,6 @@ struct license_key {
33 u32 reserved_b[4]; 34 u32 reserved_b[4];
34}; 35};
35 36
36
37#define PORT_0 0
38#define PORT_1 1
39#define PORT_MAX 2
40#define NVM_PATH_MAX 2
41
42/**************************************************************************** 37/****************************************************************************
43 * Shared HW configuration * 38 * Shared HW configuration *
44 ****************************************************************************/ 39 ****************************************************************************/
@@ -1252,6 +1247,7 @@ struct drv_func_mb {
1252 #define REQ_BC_VER_4_VRFY_AFEX_SUPPORTED 0x00070002 1247 #define REQ_BC_VER_4_VRFY_AFEX_SUPPORTED 0x00070002
1253 #define REQ_BC_VER_4_SFP_TX_DISABLE_SUPPORTED 0x00070014 1248 #define REQ_BC_VER_4_SFP_TX_DISABLE_SUPPORTED 0x00070014
1254 #define REQ_BC_VER_4_PFC_STATS_SUPPORTED 0x00070201 1249 #define REQ_BC_VER_4_PFC_STATS_SUPPORTED 0x00070201
1250 #define REQ_BC_VER_4_FCOE_FEATURES 0x00070209
1255 1251
1256 #define DRV_MSG_CODE_DCBX_ADMIN_PMF_MSG 0xb0000000 1252 #define DRV_MSG_CODE_DCBX_ADMIN_PMF_MSG 0xb0000000
1257 #define DRV_MSG_CODE_DCBX_PMF_DRV_OK 0xb2000000 1253 #define DRV_MSG_CODE_DCBX_PMF_DRV_OK 0xb2000000
@@ -2700,118 +2696,6 @@ struct host_func_stats {
2700/* VIC definitions */ 2696/* VIC definitions */
2701#define VICSTATST_UIF_INDEX 2 2697#define VICSTATST_UIF_INDEX 2
2702 2698
2703/* current drv_info version */
2704#define DRV_INFO_CUR_VER 1
2705
2706/* drv_info op codes supported */
2707enum drv_info_opcode {
2708 ETH_STATS_OPCODE,
2709 FCOE_STATS_OPCODE,
2710 ISCSI_STATS_OPCODE
2711};
2712
2713#define ETH_STAT_INFO_VERSION_LEN 12
2714/* Per PCI Function Ethernet Statistics required from the driver */
2715struct eth_stats_info {
2716 /* Function's Driver Version. padded to 12 */
2717 u8 version[ETH_STAT_INFO_VERSION_LEN];
2718 /* Locally Admin Addr. BigEndian EIU48. Actual size is 6 bytes */
2719 u8 mac_local[8];
2720 u8 mac_add1[8]; /* Additional Programmed MAC Addr 1. */
2721 u8 mac_add2[8]; /* Additional Programmed MAC Addr 2. */
2722 u32 mtu_size; /* MTU Size. Note : Negotiated MTU */
2723 u32 feature_flags; /* Feature_Flags. */
2724#define FEATURE_ETH_CHKSUM_OFFLOAD_MASK 0x01
2725#define FEATURE_ETH_LSO_MASK 0x02
2726#define FEATURE_ETH_BOOTMODE_MASK 0x1C
2727#define FEATURE_ETH_BOOTMODE_SHIFT 2
2728#define FEATURE_ETH_BOOTMODE_NONE (0x0 << 2)
2729#define FEATURE_ETH_BOOTMODE_PXE (0x1 << 2)
2730#define FEATURE_ETH_BOOTMODE_ISCSI (0x2 << 2)
2731#define FEATURE_ETH_BOOTMODE_FCOE (0x3 << 2)
2732#define FEATURE_ETH_TOE_MASK 0x20
2733 u32 lso_max_size; /* LSO MaxOffloadSize. */
2734 u32 lso_min_seg_cnt; /* LSO MinSegmentCount. */
2735 /* Num Offloaded Connections TCP_IPv4. */
2736 u32 ipv4_ofld_cnt;
2737 /* Num Offloaded Connections TCP_IPv6. */
2738 u32 ipv6_ofld_cnt;
2739 u32 promiscuous_mode; /* Promiscuous Mode. non-zero true */
2740 u32 txq_size; /* TX Descriptors Queue Size */
2741 u32 rxq_size; /* RX Descriptors Queue Size */
2742 /* TX Descriptor Queue Avg Depth. % Avg Queue Depth since last poll */
2743 u32 txq_avg_depth;
2744 /* RX Descriptors Queue Avg Depth. % Avg Queue Depth since last poll */
2745 u32 rxq_avg_depth;
2746 /* IOV_Offload. 0=none; 1=MultiQueue, 2=VEB 3= VEPA*/
2747 u32 iov_offload;
2748 /* Number of NetQueue/VMQ Config'd. */
2749 u32 netq_cnt;
2750 u32 vf_cnt; /* Num VF assigned to this PF. */
2751};
2752
2753/* Per PCI Function FCOE Statistics required from the driver */
2754struct fcoe_stats_info {
2755 u8 version[12]; /* Function's Driver Version. */
2756 u8 mac_local[8]; /* Locally Admin Addr. */
2757 u8 mac_add1[8]; /* Additional Programmed MAC Addr 1. */
2758 u8 mac_add2[8]; /* Additional Programmed MAC Addr 2. */
2759 /* QoS Priority (per 802.1p). 0-7255 */
2760 u32 qos_priority;
2761 u32 txq_size; /* FCoE TX Descriptors Queue Size. */
2762 u32 rxq_size; /* FCoE RX Descriptors Queue Size. */
2763 /* FCoE TX Descriptor Queue Avg Depth. */
2764 u32 txq_avg_depth;
2765 /* FCoE RX Descriptors Queue Avg Depth. */
2766 u32 rxq_avg_depth;
2767 u32 rx_frames_lo; /* FCoE RX Frames received. */
2768 u32 rx_frames_hi; /* FCoE RX Frames received. */
2769 u32 rx_bytes_lo; /* FCoE RX Bytes received. */
2770 u32 rx_bytes_hi; /* FCoE RX Bytes received. */
2771 u32 tx_frames_lo; /* FCoE TX Frames sent. */
2772 u32 tx_frames_hi; /* FCoE TX Frames sent. */
2773 u32 tx_bytes_lo; /* FCoE TX Bytes sent. */
2774 u32 tx_bytes_hi; /* FCoE TX Bytes sent. */
2775};
2776
2777/* Per PCI Function iSCSI Statistics required from the driver*/
2778struct iscsi_stats_info {
2779 u8 version[12]; /* Function's Driver Version. */
2780 u8 mac_local[8]; /* Locally Admin iSCSI MAC Addr. */
2781 u8 mac_add1[8]; /* Additional Programmed MAC Addr 1. */
2782 /* QoS Priority (per 802.1p). 0-7255 */
2783 u32 qos_priority;
2784 u8 initiator_name[64]; /* iSCSI Boot Initiator Node name. */
2785 u8 ww_port_name[64]; /* iSCSI World wide port name */
2786 u8 boot_target_name[64];/* iSCSI Boot Target Name. */
2787 u8 boot_target_ip[16]; /* iSCSI Boot Target IP. */
2788 u32 boot_target_portal; /* iSCSI Boot Target Portal. */
2789 u8 boot_init_ip[16]; /* iSCSI Boot Initiator IP Address. */
2790 u32 max_frame_size; /* Max Frame Size. bytes */
2791 u32 txq_size; /* PDU TX Descriptors Queue Size. */
2792 u32 rxq_size; /* PDU RX Descriptors Queue Size. */
2793 u32 txq_avg_depth; /* PDU TX Descriptor Queue Avg Depth. */
2794 u32 rxq_avg_depth; /* PDU RX Descriptors Queue Avg Depth. */
2795 u32 rx_pdus_lo; /* iSCSI PDUs received. */
2796 u32 rx_pdus_hi; /* iSCSI PDUs received. */
2797 u32 rx_bytes_lo; /* iSCSI RX Bytes received. */
2798 u32 rx_bytes_hi; /* iSCSI RX Bytes received. */
2799 u32 tx_pdus_lo; /* iSCSI PDUs sent. */
2800 u32 tx_pdus_hi; /* iSCSI PDUs sent. */
2801 u32 tx_bytes_lo; /* iSCSI PDU TX Bytes sent. */
2802 u32 tx_bytes_hi; /* iSCSI PDU TX Bytes sent. */
2803 u32 pcp_prior_map_tbl; /* C-PCP to S-PCP Priority MapTable.
2804 * 9 nibbles, the position of each nibble
2805 * represents the C-PCP value, the value
2806 * of the nibble = S-PCP value.
2807 */
2808};
2809
2810union drv_info_to_mcp {
2811 struct eth_stats_info ether_stat;
2812 struct fcoe_stats_info fcoe_stat;
2813 struct iscsi_stats_info iscsi_stat;
2814};
2815 2699
2816/* stats collected for afex. 2700/* stats collected for afex.
2817 * NOTE: structure is exactly as expected to be received by the switch. 2701 * NOTE: structure is exactly as expected to be received by the switch.
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 8ddc78e0d94..5b8b521bdbc 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -74,6 +74,8 @@
74#define FW_FILE_NAME_E1H "bnx2x/bnx2x-e1h-" FW_FILE_VERSION ".fw" 74#define FW_FILE_NAME_E1H "bnx2x/bnx2x-e1h-" FW_FILE_VERSION ".fw"
75#define FW_FILE_NAME_E2 "bnx2x/bnx2x-e2-" FW_FILE_VERSION ".fw" 75#define FW_FILE_NAME_E2 "bnx2x/bnx2x-e2-" FW_FILE_VERSION ".fw"
76 76
77#define MAC_LEADING_ZERO_CNT (ALIGN(ETH_ALEN, sizeof(u32)) - ETH_ALEN)
78
77/* Time in jiffies before concluding the transmitter is hung */ 79/* Time in jiffies before concluding the transmitter is hung */
78#define TX_TIMEOUT (5*HZ) 80#define TX_TIMEOUT (5*HZ)
79 81
@@ -3060,7 +3062,8 @@ static void bnx2x_drv_info_fcoe_stat(struct bnx2x *bp)
3060 struct fcoe_stats_info *fcoe_stat = 3062 struct fcoe_stats_info *fcoe_stat =
3061 &bp->slowpath->drv_info_to_mcp.fcoe_stat; 3063 &bp->slowpath->drv_info_to_mcp.fcoe_stat;
3062 3064
3063 memcpy(fcoe_stat->mac_local, bp->fip_mac, ETH_ALEN); 3065 memcpy(fcoe_stat->mac_local + MAC_LEADING_ZERO_CNT,
3066 bp->fip_mac, ETH_ALEN);
3064 3067
3065 fcoe_stat->qos_priority = 3068 fcoe_stat->qos_priority =
3066 app->traffic_type_priority[LLFC_TRAFFIC_TYPE_FCOE]; 3069 app->traffic_type_priority[LLFC_TRAFFIC_TYPE_FCOE];
@@ -3151,7 +3154,8 @@ static void bnx2x_drv_info_iscsi_stat(struct bnx2x *bp)
3151 struct iscsi_stats_info *iscsi_stat = 3154 struct iscsi_stats_info *iscsi_stat =
3152 &bp->slowpath->drv_info_to_mcp.iscsi_stat; 3155 &bp->slowpath->drv_info_to_mcp.iscsi_stat;
3153 3156
3154 memcpy(iscsi_stat->mac_local, bp->cnic_eth_dev.iscsi_mac, ETH_ALEN); 3157 memcpy(iscsi_stat->mac_local + MAC_LEADING_ZERO_CNT,
3158 bp->cnic_eth_dev.iscsi_mac, ETH_ALEN);
3155 3159
3156 iscsi_stat->qos_priority = 3160 iscsi_stat->qos_priority =
3157 app->traffic_type_priority[LLFC_TRAFFIC_TYPE_ISCSI]; 3161 app->traffic_type_priority[LLFC_TRAFFIC_TYPE_ISCSI];
@@ -9732,6 +9736,9 @@ static void __devinit bnx2x_get_common_hwinfo(struct bnx2x *bp)
9732 bp->flags |= (val >= REQ_BC_VER_4_PFC_STATS_SUPPORTED) ? 9736 bp->flags |= (val >= REQ_BC_VER_4_PFC_STATS_SUPPORTED) ?
9733 BC_SUPPORTS_PFC_STATS : 0; 9737 BC_SUPPORTS_PFC_STATS : 0;
9734 9738
9739 bp->flags |= (val >= REQ_BC_VER_4_FCOE_FEATURES) ?
9740 BC_SUPPORTS_FCOE_FEATURES : 0;
9741
9735 bp->flags |= (val >= REQ_BC_VER_4_DCBX_ADMIN_MSG_NON_PMF) ? 9742 bp->flags |= (val >= REQ_BC_VER_4_DCBX_ADMIN_MSG_NON_PMF) ?
9736 BC_SUPPORTS_DCBX_MSG_NON_PMF : 0; 9743 BC_SUPPORTS_DCBX_MSG_NON_PMF : 0;
9737 boot_mode = SHMEM_RD(bp, 9744 boot_mode = SHMEM_RD(bp,
@@ -12548,21 +12555,45 @@ static int bnx2x_drv_ctl(struct net_device *dev, struct drv_ctl_info *ctl)
12548 break; 12555 break;
12549 } 12556 }
12550 case DRV_CTL_ULP_REGISTER_CMD: { 12557 case DRV_CTL_ULP_REGISTER_CMD: {
12551 int ulp_type = ctl->data.ulp_type; 12558 int ulp_type = ctl->data.register_data.ulp_type;
12552 12559
12553 if (CHIP_IS_E3(bp)) { 12560 if (CHIP_IS_E3(bp)) {
12554 int idx = BP_FW_MB_IDX(bp); 12561 int idx = BP_FW_MB_IDX(bp);
12555 u32 cap; 12562 u32 cap = SHMEM2_RD(bp, drv_capabilities_flag[idx]);
12563 int path = BP_PATH(bp);
12564 int port = BP_PORT(bp);
12565 int i;
12566 u32 scratch_offset;
12567 u32 *host_addr;
12556 12568
12557 cap = SHMEM2_RD(bp, drv_capabilities_flag[idx]); 12569 /* first write capability to shmem2 */
12558 if (ulp_type == CNIC_ULP_ISCSI) 12570 if (ulp_type == CNIC_ULP_ISCSI)
12559 cap |= DRV_FLAGS_CAPABILITIES_LOADED_ISCSI; 12571 cap |= DRV_FLAGS_CAPABILITIES_LOADED_ISCSI;
12560 else if (ulp_type == CNIC_ULP_FCOE) 12572 else if (ulp_type == CNIC_ULP_FCOE)
12561 cap |= DRV_FLAGS_CAPABILITIES_LOADED_FCOE; 12573 cap |= DRV_FLAGS_CAPABILITIES_LOADED_FCOE;
12562 SHMEM2_WR(bp, drv_capabilities_flag[idx], cap); 12574 SHMEM2_WR(bp, drv_capabilities_flag[idx], cap);
12575
12576 if ((ulp_type != CNIC_ULP_FCOE) ||
12577 (!SHMEM2_HAS(bp, ncsi_oem_data_addr)) ||
12578 (!(bp->flags & BC_SUPPORTS_FCOE_FEATURES)))
12579 break;
12580
12581 /* if reached here - should write fcoe capabilities */
12582 scratch_offset = SHMEM2_RD(bp, ncsi_oem_data_addr);
12583 if (!scratch_offset)
12584 break;
12585 scratch_offset += offsetof(struct glob_ncsi_oem_data,
12586 fcoe_features[path][port]);
12587 host_addr = (u32 *) &(ctl->data.register_data.
12588 fcoe_features);
12589 for (i = 0; i < sizeof(struct fcoe_capabilities);
12590 i += 4)
12591 REG_WR(bp, scratch_offset + i,
12592 *(host_addr + i/4));
12563 } 12593 }
12564 break; 12594 break;
12565 } 12595 }
12596
12566 case DRV_CTL_ULP_UNREGISTER_CMD: { 12597 case DRV_CTL_ULP_UNREGISTER_CMD: {
12567 int ulp_type = ctl->data.ulp_type; 12598 int ulp_type = ctl->data.ulp_type;
12568 12599
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_mfw_req.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_mfw_req.h
new file mode 100644
index 00000000000..ddd5106ad2f
--- /dev/null
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_mfw_req.h
@@ -0,0 +1,168 @@
1/* bnx2x_mfw_req.h: Broadcom Everest network driver.
2 *
3 * Copyright (c) 2012 Broadcom Corporation
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation.
8 */
9
10#ifndef BNX2X_MFW_REQ_H
11#define BNX2X_MFW_REQ_H
12
13#define PORT_0 0
14#define PORT_1 1
15#define PORT_MAX 2
16#define NVM_PATH_MAX 2
17
18/* FCoE capabilities required from the driver */
19struct fcoe_capabilities {
20 u32 capability1;
21 /* Maximum number of I/Os per connection */
22 #define FCOE_IOS_PER_CONNECTION_MASK 0x0000ffff
23 #define FCOE_IOS_PER_CONNECTION_SHIFT 0
24 /* Maximum number of Logins per port */
25 #define FCOE_LOGINS_PER_PORT_MASK 0xffff0000
26 #define FCOE_LOGINS_PER_PORT_SHIFT 16
27
28 u32 capability2;
29 /* Maximum number of exchanges */
30 #define FCOE_NUMBER_OF_EXCHANGES_MASK 0x0000ffff
31 #define FCOE_NUMBER_OF_EXCHANGES_SHIFT 0
32 /* Maximum NPIV WWN per port */
33 #define FCOE_NPIV_WWN_PER_PORT_MASK 0xffff0000
34 #define FCOE_NPIV_WWN_PER_PORT_SHIFT 16
35
36 u32 capability3;
37 /* Maximum number of targets supported */
38 #define FCOE_TARGETS_SUPPORTED_MASK 0x0000ffff
39 #define FCOE_TARGETS_SUPPORTED_SHIFT 0
40 /* Maximum number of outstanding commands across all connections */
41 #define FCOE_OUTSTANDING_COMMANDS_MASK 0xffff0000
42 #define FCOE_OUTSTANDING_COMMANDS_SHIFT 16
43
44 u32 capability4;
45 #define FCOE_CAPABILITY4_STATEFUL 0x00000001
46 #define FCOE_CAPABILITY4_STATELESS 0x00000002
47 #define FCOE_CAPABILITY4_CAPABILITIES_REPORTED_VALID 0x00000004
48};
49
50struct glob_ncsi_oem_data {
51 u32 driver_version;
52 u32 unused[3];
53 struct fcoe_capabilities fcoe_features[NVM_PATH_MAX][PORT_MAX];
54};
55
56/* current drv_info version */
57#define DRV_INFO_CUR_VER 2
58
59/* drv_info op codes supported */
60enum drv_info_opcode {
61 ETH_STATS_OPCODE,
62 FCOE_STATS_OPCODE,
63 ISCSI_STATS_OPCODE
64};
65
66#define ETH_STAT_INFO_VERSION_LEN 12
67/* Per PCI Function Ethernet Statistics required from the driver */
68struct eth_stats_info {
69 /* Function's Driver Version. padded to 12 */
70 u8 version[ETH_STAT_INFO_VERSION_LEN];
71 /* Locally Admin Addr. BigEndian EIU48. Actual size is 6 bytes */
72 u8 mac_local[8];
73 u8 mac_add1[8]; /* Additional Programmed MAC Addr 1. */
74 u8 mac_add2[8]; /* Additional Programmed MAC Addr 2. */
75 u32 mtu_size; /* MTU Size. Note : Negotiated MTU */
76 u32 feature_flags; /* Feature_Flags. */
77#define FEATURE_ETH_CHKSUM_OFFLOAD_MASK 0x01
78#define FEATURE_ETH_LSO_MASK 0x02
79#define FEATURE_ETH_BOOTMODE_MASK 0x1C
80#define FEATURE_ETH_BOOTMODE_SHIFT 2
81#define FEATURE_ETH_BOOTMODE_NONE (0x0 << 2)
82#define FEATURE_ETH_BOOTMODE_PXE (0x1 << 2)
83#define FEATURE_ETH_BOOTMODE_ISCSI (0x2 << 2)
84#define FEATURE_ETH_BOOTMODE_FCOE (0x3 << 2)
85#define FEATURE_ETH_TOE_MASK 0x20
86 u32 lso_max_size; /* LSO MaxOffloadSize. */
87 u32 lso_min_seg_cnt; /* LSO MinSegmentCount. */
88 /* Num Offloaded Connections TCP_IPv4. */
89 u32 ipv4_ofld_cnt;
90 /* Num Offloaded Connections TCP_IPv6. */
91 u32 ipv6_ofld_cnt;
92 u32 promiscuous_mode; /* Promiscuous Mode. non-zero true */
93 u32 txq_size; /* TX Descriptors Queue Size */
94 u32 rxq_size; /* RX Descriptors Queue Size */
95 /* TX Descriptor Queue Avg Depth. % Avg Queue Depth since last poll */
96 u32 txq_avg_depth;
97 /* RX Descriptors Queue Avg Depth. % Avg Queue Depth since last poll */
98 u32 rxq_avg_depth;
99 /* IOV_Offload. 0=none; 1=MultiQueue, 2=VEB 3= VEPA*/
100 u32 iov_offload;
101 /* Number of NetQueue/VMQ Config'd. */
102 u32 netq_cnt;
103 u32 vf_cnt; /* Num VF assigned to this PF. */
104};
105
106/* Per PCI Function FCOE Statistics required from the driver */
107struct fcoe_stats_info {
108 u8 version[12]; /* Function's Driver Version. */
109 u8 mac_local[8]; /* Locally Admin Addr. */
110 u8 mac_add1[8]; /* Additional Programmed MAC Addr 1. */
111 u8 mac_add2[8]; /* Additional Programmed MAC Addr 2. */
112 /* QoS Priority (per 802.1p). 0-7255 */
113 u32 qos_priority;
114 u32 txq_size; /* FCoE TX Descriptors Queue Size. */
115 u32 rxq_size; /* FCoE RX Descriptors Queue Size. */
116 /* FCoE TX Descriptor Queue Avg Depth. */
117 u32 txq_avg_depth;
118 /* FCoE RX Descriptors Queue Avg Depth. */
119 u32 rxq_avg_depth;
120 u32 rx_frames_lo; /* FCoE RX Frames received. */
121 u32 rx_frames_hi; /* FCoE RX Frames received. */
122 u32 rx_bytes_lo; /* FCoE RX Bytes received. */
123 u32 rx_bytes_hi; /* FCoE RX Bytes received. */
124 u32 tx_frames_lo; /* FCoE TX Frames sent. */
125 u32 tx_frames_hi; /* FCoE TX Frames sent. */
126 u32 tx_bytes_lo; /* FCoE TX Bytes sent. */
127 u32 tx_bytes_hi; /* FCoE TX Bytes sent. */
128};
129
130/* Per PCI Function iSCSI Statistics required from the driver*/
131struct iscsi_stats_info {
132 u8 version[12]; /* Function's Driver Version. */
133 u8 mac_local[8]; /* Locally Admin iSCSI MAC Addr. */
134 u8 mac_add1[8]; /* Additional Programmed MAC Addr 1. */
135 /* QoS Priority (per 802.1p). 0-7255 */
136 u32 qos_priority;
137 u8 initiator_name[64]; /* iSCSI Boot Initiator Node name. */
138 u8 ww_port_name[64]; /* iSCSI World wide port name */
139 u8 boot_target_name[64];/* iSCSI Boot Target Name. */
140 u8 boot_target_ip[16]; /* iSCSI Boot Target IP. */
141 u32 boot_target_portal; /* iSCSI Boot Target Portal. */
142 u8 boot_init_ip[16]; /* iSCSI Boot Initiator IP Address. */
143 u32 max_frame_size; /* Max Frame Size. bytes */
144 u32 txq_size; /* PDU TX Descriptors Queue Size. */
145 u32 rxq_size; /* PDU RX Descriptors Queue Size. */
146 u32 txq_avg_depth; /* PDU TX Descriptor Queue Avg Depth. */
147 u32 rxq_avg_depth; /* PDU RX Descriptors Queue Avg Depth. */
148 u32 rx_pdus_lo; /* iSCSI PDUs received. */
149 u32 rx_pdus_hi; /* iSCSI PDUs received. */
150 u32 rx_bytes_lo; /* iSCSI RX Bytes received. */
151 u32 rx_bytes_hi; /* iSCSI RX Bytes received. */
152 u32 tx_pdus_lo; /* iSCSI PDUs sent. */
153 u32 tx_pdus_hi; /* iSCSI PDUs sent. */
154 u32 tx_bytes_lo; /* iSCSI PDU TX Bytes sent. */
155 u32 tx_bytes_hi; /* iSCSI PDU TX Bytes sent. */
156 u32 pcp_prior_map_tbl; /* C-PCP to S-PCP Priority MapTable.
157 * 9 nibbles, the position of each nibble
158 * represents the C-PCP value, the value
159 * of the nibble = S-PCP value.
160 */
161};
162
163union drv_info_to_mcp {
164 struct eth_stats_info ether_stat;
165 struct fcoe_stats_info fcoe_stat;
166 struct iscsi_stats_info iscsi_stat;
167};
168#endif /* BNX2X_MFW_REQ_H */