2 * Copyright (c) 2014-2016 Solarflare Communications Inc.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice,
11 * this list of conditions and the following disclaimer in the documentation
12 * and/or other materials provided with the distribution.
14 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
16 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
18 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
21 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
22 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
23 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
24 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 * The views and conclusions contained in the software and documentation are
27 * those of the authors and should not be interpreted as representing official
28 * policies, either expressed or implied, of the FreeBSD Project.
33 #ifndef _SYS_SFXGE_IOC_H
34 #define _SYS_SFXGE_IOC_H
40 #include <sys/types.h>
42 /* More codes may be added if necessary */
43 enum sfxge_ioc_codes {
49 enum sfxge_nvram_ops {
54 SFXGE_NVRAM_OP_GET_VER,
55 SFXGE_NVRAM_OP_SET_VER
58 enum sfxge_nvram_types {
59 SFXGE_NVRAM_TYPE_BOOTROM,
60 SFXGE_NVRAM_TYPE_BOOTROM_CFG,
62 SFXGE_NVRAM_TYPE_MC_GOLDEN,
64 SFXGE_NVRAM_TYPE_NULL_PHY,
65 SFXGE_NVRAM_TYPE_FPGA,
66 SFXGE_NVRAM_TYPE_FCFW,
67 SFXGE_NVRAM_TYPE_CPLD,
68 SFXGE_NVRAM_TYPE_FPGA_BACKUP,
69 SFXGE_NVRAM_TYPE_DYNAMIC_CFG
73 SFXGE_VPD_OP_GET_KEYWORD,
74 SFXGE_VPD_OP_SET_KEYWORD
77 #define SFXGE_MCDI_MAX_PAYLOAD 0x400
78 #define SFXGE_VPD_MAX_PAYLOAD 0x100
80 typedef struct sfxge_ioc_s {
86 size_t len; /* In and out */
95 uint16_t version[4]; /* get/set_ver */
102 uint16_t len; /* In or out */
106 } __packed sfxge_ioc_t;
112 #endif /* _SYS_SFXGE_IOC_H */