diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/net/enic/vnic_devcmd.h | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'drivers/net/enic/vnic_devcmd.h')
-rw-r--r-- | drivers/net/enic/vnic_devcmd.h | 97 |
1 files changed, 95 insertions, 2 deletions
diff --git a/drivers/net/enic/vnic_devcmd.h b/drivers/net/enic/vnic_devcmd.h index 20661755df6b..c5569bfb47ac 100644 --- a/drivers/net/enic/vnic_devcmd.h +++ b/drivers/net/enic/vnic_devcmd.h | |||
@@ -80,8 +80,34 @@ | |||
80 | enum vnic_devcmd_cmd { | 80 | enum vnic_devcmd_cmd { |
81 | CMD_NONE = _CMDC(_CMD_DIR_NONE, _CMD_VTYPE_NONE, 0), | 81 | CMD_NONE = _CMDC(_CMD_DIR_NONE, _CMD_VTYPE_NONE, 0), |
82 | 82 | ||
83 | /* mcpu fw info in mem: (u64)a0=paddr to struct vnic_devcmd_fw_info */ | 83 | /* |
84 | CMD_MCPU_FW_INFO = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ALL, 1), | 84 | * mcpu fw info in mem: |
85 | * in: | ||
86 | * (u64)a0=paddr to struct vnic_devcmd_fw_info | ||
87 | * action: | ||
88 | * Fills in struct vnic_devcmd_fw_info (128 bytes) | ||
89 | * note: | ||
90 | * An old definition of CMD_MCPU_FW_INFO | ||
91 | */ | ||
92 | CMD_MCPU_FW_INFO_OLD = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ALL, 1), | ||
93 | |||
94 | /* | ||
95 | * mcpu fw info in mem: | ||
96 | * in: | ||
97 | * (u64)a0=paddr to struct vnic_devcmd_fw_info | ||
98 | * (u16)a1=size of the structure | ||
99 | * out: | ||
100 | * (u16)a1=0 for in:a1 = 0, | ||
101 | * data size actually written for other values. | ||
102 | * action: | ||
103 | * Fills in first 128 bytes of vnic_devcmd_fw_info for in:a1 = 0, | ||
104 | * first in:a1 bytes for 0 < in:a1 <= 132, | ||
105 | * 132 bytes for other values of in:a1. | ||
106 | * note: | ||
107 | * CMD_MCPU_FW_INFO and CMD_MCPU_FW_INFO_OLD have the same enum 1 | ||
108 | * for source compatibility. | ||
109 | */ | ||
110 | CMD_MCPU_FW_INFO = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_ALL, 1), | ||
85 | 111 | ||
86 | /* dev-specific block member: | 112 | /* dev-specific block member: |
87 | * in: (u16)a0=offset,(u8)a1=size | 113 | * in: (u16)a0=offset,(u8)a1=size |
@@ -238,8 +264,65 @@ enum vnic_devcmd_cmd { | |||
238 | * out: (u32)a0=status of proxied cmd | 264 | * out: (u32)a0=status of proxied cmd |
239 | * a1-a15=out args of proxied cmd */ | 265 | * a1-a15=out args of proxied cmd */ |
240 | CMD_PROXY_BY_BDF = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_ALL, 42), | 266 | CMD_PROXY_BY_BDF = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_ALL, 42), |
267 | |||
268 | /* | ||
269 | * As for BY_BDF except a0 is index of hvnlink subordinate vnic | ||
270 | * or SR-IOV virtual vnic | ||
271 | */ | ||
272 | CMD_PROXY_BY_INDEX = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_ALL, 43), | ||
273 | |||
274 | /* | ||
275 | * For HPP toggle: | ||
276 | * adapter-info-get | ||
277 | * in: (u64)a0=phsical address of buffer passed in from caller. | ||
278 | * (u16)a1=size of buffer specified in a0. | ||
279 | * out: (u64)a0=phsical address of buffer passed in from caller. | ||
280 | * (u16)a1=actual bytes from VIF-CONFIG-INFO TLV, or | ||
281 | * 0 if no VIF-CONFIG-INFO TLV was ever received. */ | ||
282 | CMD_CONFIG_INFO_GET = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_ALL, 44), | ||
283 | |||
284 | /* init_prov_info2: | ||
285 | * Variant of CMD_INIT_PROV_INFO, where it will not try to enable | ||
286 | * the vnic until CMD_ENABLE2 is issued. | ||
287 | * (u64)a0=paddr of vnic_devcmd_provinfo | ||
288 | * (u32)a1=sizeof provision info */ | ||
289 | CMD_INIT_PROV_INFO2 = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 47), | ||
290 | |||
291 | /* enable2: | ||
292 | * (u32)a0=0 ==> standby | ||
293 | * =CMD_ENABLE2_ACTIVE ==> active | ||
294 | */ | ||
295 | CMD_ENABLE2 = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 48), | ||
296 | |||
297 | /* | ||
298 | * cmd_status: | ||
299 | * Returns the status of the specified command | ||
300 | * Input: | ||
301 | * a0 = command for which status is being queried. | ||
302 | * Possible values are: | ||
303 | * CMD_SOFT_RESET | ||
304 | * CMD_HANG_RESET | ||
305 | * CMD_OPEN | ||
306 | * CMD_INIT | ||
307 | * CMD_INIT_PROV_INFO | ||
308 | * CMD_DEINIT | ||
309 | * CMD_INIT_PROV_INFO2 | ||
310 | * CMD_ENABLE2 | ||
311 | * Output: | ||
312 | * if status == STAT_ERROR | ||
313 | * a0 = ERR_ENOTSUPPORTED - status for command in a0 is | ||
314 | * not supported | ||
315 | * if status == STAT_NONE | ||
316 | * a0 = status of the devcmd specified in a0 as follows. | ||
317 | * ERR_SUCCESS - command in a0 completed successfully | ||
318 | * ERR_EINPROGRESS - command in a0 is still in progress | ||
319 | */ | ||
320 | CMD_STATUS = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_ALL, 49), | ||
241 | }; | 321 | }; |
242 | 322 | ||
323 | /* CMD_ENABLE2 flags */ | ||
324 | #define CMD_ENABLE2_ACTIVE 0x1 | ||
325 | |||
243 | /* flags for CMD_OPEN */ | 326 | /* flags for CMD_OPEN */ |
244 | #define CMD_OPENF_OPROM 0x1 /* open coming from option rom */ | 327 | #define CMD_OPENF_OPROM 0x1 /* open coming from option rom */ |
245 | 328 | ||
@@ -277,13 +360,23 @@ enum vnic_devcmd_error { | |||
277 | ERR_ETIMEDOUT = 8, | 360 | ERR_ETIMEDOUT = 8, |
278 | ERR_ELINKDOWN = 9, | 361 | ERR_ELINKDOWN = 9, |
279 | ERR_EMAXRES = 10, | 362 | ERR_EMAXRES = 10, |
363 | ERR_ENOTSUPPORTED = 11, | ||
364 | ERR_EINPROGRESS = 12, | ||
280 | }; | 365 | }; |
281 | 366 | ||
367 | /* | ||
368 | * note: hw_version and asic_rev refer to the same thing, | ||
369 | * but have different formats. hw_version is | ||
370 | * a 32-byte string (e.g. "A2") and asic_rev is | ||
371 | * a 16-bit integer (e.g. 0xA2). | ||
372 | */ | ||
282 | struct vnic_devcmd_fw_info { | 373 | struct vnic_devcmd_fw_info { |
283 | char fw_version[32]; | 374 | char fw_version[32]; |
284 | char fw_build[32]; | 375 | char fw_build[32]; |
285 | char hw_version[32]; | 376 | char hw_version[32]; |
286 | char hw_serial_number[32]; | 377 | char hw_serial_number[32]; |
378 | u16 asic_type; | ||
379 | u16 asic_rev; | ||
287 | }; | 380 | }; |
288 | 381 | ||
289 | struct vnic_devcmd_notify { | 382 | struct vnic_devcmd_notify { |