Files
@ bd21c8aa7237
Branch filter:
Location: vmkdrivers/vmkdrivers/src_9/drivers/net/nx_nic/include/unm_nic_ioctl.h
bd21c8aa7237
5.5 KiB
text/x-chdr
ESXi-6.0.0b
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 | /*
* Copyright (C) 2003 - 2009 NetXen, Inc.
* Copyright (C) 2009 - QLogic Corporation.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston,
* MA 02111-1307, USA.
*
* The full GNU General Public License is included in this distribution
* in the file called LICENSE.
*
*/
#ifndef __UNM_NIC_IOCTL_H__
#define __UNM_NIC_IOCTL_H__
#ifndef SOLARIS
#include <linux/sockios.h>
#endif
#ifdef SOLARIS
#include"solaris.h"
#endif
/* ioctl's dealing with PCI read/writes */
#define UNM_CMD_START SIOCDEVPRIVATE
#define UNM_NIC_CMD (UNM_CMD_START + 1)
#define UNM_NIC_NAME (UNM_CMD_START + 2)
#define UNM_NIC_SEND_TEST (UNM_CMD_START + 3)
//#define UNM_NIC_IP_FILTER (UNM_CMD_START + 4)
#define UNM_NIC_IRQ_TEST (UNM_CMD_START + 5)
#define UNM_NIC_ILB_TEST (UNM_CMD_START + 6)
#define UNM_NIC_ELB_TEST (UNM_CMD_START + 7)
#define UNM_NIC_LINK_TEST (UNM_CMD_START + 8)
#define UNM_NIC_HW_TEST (UNM_CMD_START + 9)
#define UNM_NIC_CIS_TEST (UNM_CMD_START + 10)
#define UNM_NIC_CR_TEST (UNM_CMD_START + 11)
#define UNM_NIC_PROTSTATS (UNM_CMD_START + 12)
#define UNM_NIC_LED_TEST (UNM_CMD_START + 13)
#define UNM_NIC_NAME_LEN 16
#define UNM_NIC_NAME_RSP "NETXEN"
#pragma pack(1)
/* Error codes - loopback test */
enum {
LB_TEST_OK,
LB_UCOPY_PARAM_ERR,
LB_UCOPY_DATA_ERR,
LB_NOMEM_ERR,
LB_TX_NOSKB_ERR,
LB_SHORT_DATA_ERR,
LB_SEQUENCE_ERR,
LB_DATA_ERR,
LB_ERRCNT,
LB_NOT_SUPPORTED
};
/* Error codes - CR test */
enum {
CR_TEST_OK,
CR_ERROR,
CR_ERRCNT
};
/* Error codes - CIS test */
enum {
CIS_TEST_OK,
CIS_WMARK,
CIS_ERRCNT
};
/* Error Codes - LED Test */
enum{
LED_TEST_OK,
LED_TEST_ERR,
LED_TEST_UNKNOWN_PHY,
LED_TEST_NOT_SUPPORTED
};
enum{
LED_OFF=2,
LED_ON
};
typedef struct {
__uint32_t state;
__uint32_t rate;
}led_params_t;
/* Error Codes - INTERRUPT Test */
enum {
INT_TEST_OK,
INT_TEST_ERR,
INT_NOT_SUPPORTED
};
/* Error codes - HW test */
enum {
HW_TEST_OK,
HW_DMA_BZ_0,
HW_DMA_BZ_1,
HW_DMA_BZ_2,
HW_DMA_BZ_3,
HW_SRE_PBI_HALT,
HW_SRE_L1IPQ,
HW_SRE_L2IFQ,
HW_SRE_FREEBUF,
HW_IPQ,
HW_PQ_W_PAUSE,
HW_PQ_W_FULL,
HW_IFQ_W_PAUSE,
HW_IFQ_W_FULL,
HW_MEN_BP_TOUT,
HW_DOWN_BP_TOUT,
HW_FBUFF_POOL_WM,
HW_PBUF_ERR,
HW_FM_MSG_HDR,
HW_FM_MSG,
HW_EPG_CTRL_Q,
HW_EPG_MSG_BUF,
HW_EPG_QREAD_TOUT,
HW_EPG_QWRITE_TOUT,
HW_EPG_CQ_W_FULL,
HW_EPG_MSG_CHKSM,
HW_EPG_MTLQ_TOUT,
HW_PEG0,
HW_PEG1,
HW_PEG2,
HW_PEG3,
HW_ERRCNT
};
struct sections
{
long long is_bss_flag;
long long file_offset;
long long size;
long long load_offset;
};
struct driverimg_header
{
long long no_of_sections;
struct sections sec[1];
};
#define UNM_NIC_CMD_NONE 0
#define UNM_NIC_CMD_PCI_READ 1
#define UNM_NIC_CMD_PCI_WRITE 2
#define UNM_NIC_CMD_PCI_MEM_READ 3
#define UNM_NIC_CMD_PCI_MEM_WRITE 4
#define UNM_NIC_CMD_PCI_CONFIG_READ 5
#define UNM_NIC_CMD_PCI_CONFIG_WRITE 6
#define UNM_NIC_CMD_GET_VERSION 9
#define UNM_NIC_CMD_SET_LED_CONFIG 10
#define UNM_NIC_CMD_GET_PHY_TYPE 11
#define UNM_NIC_CMD_EFUSE_CHIP_ID 12
#define UNM_NIC_CMD_GET_LIC_FINGERPRINT 13
#define UNM_NIC_CMD_LIC_INSTALL 14
#define UNM_NIC_CMD_GET_LIC_FEATURES 15
#define UNM_NIC_CMD_SET_PID_TRAP 16
#define UNM_NIC_CMD_FLASH_READ 50
#define UNM_NIC_CMD_FLASH_WRITE 51
#define UNM_NIC_CMD_FLASH_SE 52
#define UNM_NIC_CMD_TRCBUF_READ 53
#define UNM_NIC_CMD_FWLOG_GET 54
#define UNM_NIC_CMD_MINIDUMP_SIZE 55
#define UNM_NIC_CMD_MINIDUMP_READ 56
#define UNM_NIC_CMD_FWLOG_GET_SIZE 57
#define UNM_NIC_CMD_FORCE_MINIDUMP 58
#define UNM_FLASH_READ_SIZE 4
#define UNM_FLASH_WRITE_SIZE 4
typedef struct {
__uint32_t cmd;
__uint32_t unused1;
__uint64_t off;
__uint32_t size;
__uint32_t rv;
char u[64];
__uint64_t ptr;
} unm_nic_ioctl_data_t;
#if 0
/* FIXME vijo, not used for now */
/* ioctl's dealing w. interrupt counts */
#define UNM_INTR_CMD 3
typedef enum {
unm_intr_cmd_none = 0,
unm_intr_cmd_clear,
unm_intr_cmd_get
} unm_intr_cmd_t;
typedef enum {
unm_intr_src_unspecified = -1,
unm_intr_src_min = 0,
unm_intr_src_dma_0 = 0,
unm_intr_src_dma_1 = 1,
unm_intr_src_i2q = 2,
unm_intr_src_dma_2 = 3,
unm_intr_src_dma_3 = 4,
unm_intr_src_rc = 5,
unm_intr_src_mega_err = 6,
unm_intr_src_target0 = 7,
unm_intr_src_target1 = 8,
unm_intr_src_target2 = 9,
unm_intr_src_target3 = 10,
unm_intr_src_target4 = 11,
unm_intr_src_target5 = 12,
unm_intr_src_target6 = 13,
unm_intr_src_target7 = 14,
unm_intr_src_max = 15
} unm_intr_src_t;
typedef struct {
unm_intr_cmd_t cmd;
unm_intr_src_t int_src;
int data;
} unm_intr_data_t;
#endif
typedef enum {
UNM_TX_START = 1,
UNM_TX_STOP,
UNM_TX_SET_PARAM,
UNM_TX_SET_PACKET,
UNM_LOOPBACK_START,
UNM_LOOPBACK_STOP
} unm_send_test_cmd_t;
typedef struct {
unm_send_test_cmd_t cmd;
__uint64_t ifg;
__uint32_t count;
} unm_send_test_t;
#pragma pack()
#endif
|