111e25f0dSDavid C Somayajulu /* 211e25f0dSDavid C Somayajulu * Copyright (c) 2017-2018 Cavium, Inc. 311e25f0dSDavid C Somayajulu * All rights reserved. 411e25f0dSDavid C Somayajulu * 511e25f0dSDavid C Somayajulu * Redistribution and use in source and binary forms, with or without 611e25f0dSDavid C Somayajulu * modification, are permitted provided that the following conditions 711e25f0dSDavid C Somayajulu * are met: 811e25f0dSDavid C Somayajulu * 911e25f0dSDavid C Somayajulu * 1. Redistributions of source code must retain the above copyright 1011e25f0dSDavid C Somayajulu * notice, this list of conditions and the following disclaimer. 1111e25f0dSDavid C Somayajulu * 2. Redistributions in binary form must reproduce the above copyright 1211e25f0dSDavid C Somayajulu * notice, this list of conditions and the following disclaimer in the 1311e25f0dSDavid C Somayajulu * documentation and/or other materials provided with the distribution. 1411e25f0dSDavid C Somayajulu * 1511e25f0dSDavid C Somayajulu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 1611e25f0dSDavid C Somayajulu * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1711e25f0dSDavid C Somayajulu * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1811e25f0dSDavid C Somayajulu * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 1911e25f0dSDavid C Somayajulu * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2011e25f0dSDavid C Somayajulu * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2111e25f0dSDavid C Somayajulu * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2211e25f0dSDavid C Somayajulu * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2311e25f0dSDavid C Somayajulu * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2411e25f0dSDavid C Somayajulu * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 2511e25f0dSDavid C Somayajulu * POSSIBILITY OF SUCH DAMAGE. 2611e25f0dSDavid C Somayajulu * 2711e25f0dSDavid C Somayajulu * $FreeBSD$ 2811e25f0dSDavid C Somayajulu * 2911e25f0dSDavid C Somayajulu */ 3011e25f0dSDavid C Somayajulu 3111e25f0dSDavid C Somayajulu #ifndef _QLNX_IOCTL_H_ 3211e25f0dSDavid C Somayajulu #define _QLNX_IOCTL_H_ 3311e25f0dSDavid C Somayajulu 3411e25f0dSDavid C Somayajulu #include <sys/ioccom.h> 3511e25f0dSDavid C Somayajulu 3611e25f0dSDavid C Somayajulu #define QLNX_MAX_HW_FUNCS 2 3711e25f0dSDavid C Somayajulu 3811e25f0dSDavid C Somayajulu /* 3911e25f0dSDavid C Somayajulu * Read grcdump and grcdump size 4011e25f0dSDavid C Somayajulu */ 4111e25f0dSDavid C Somayajulu 4211e25f0dSDavid C Somayajulu struct qlnx_grcdump { 4311e25f0dSDavid C Somayajulu uint16_t pci_func; 4411e25f0dSDavid C Somayajulu uint32_t grcdump_size[QLNX_MAX_HW_FUNCS]; 4511e25f0dSDavid C Somayajulu void *grcdump[QLNX_MAX_HW_FUNCS]; 4611e25f0dSDavid C Somayajulu uint32_t grcdump_dwords[QLNX_MAX_HW_FUNCS]; 4711e25f0dSDavid C Somayajulu }; 4811e25f0dSDavid C Somayajulu typedef struct qlnx_grcdump qlnx_grcdump_t; 4911e25f0dSDavid C Somayajulu 5011e25f0dSDavid C Somayajulu /* 5111e25f0dSDavid C Somayajulu * Read idle_chk and idle_chk size 5211e25f0dSDavid C Somayajulu */ 5311e25f0dSDavid C Somayajulu struct qlnx_idle_chk { 5411e25f0dSDavid C Somayajulu uint16_t pci_func; 5511e25f0dSDavid C Somayajulu uint32_t idle_chk_size[QLNX_MAX_HW_FUNCS]; 5611e25f0dSDavid C Somayajulu void *idle_chk[QLNX_MAX_HW_FUNCS]; 5711e25f0dSDavid C Somayajulu uint32_t idle_chk_dwords[QLNX_MAX_HW_FUNCS]; 5811e25f0dSDavid C Somayajulu }; 5911e25f0dSDavid C Somayajulu typedef struct qlnx_idle_chk qlnx_idle_chk_t; 6011e25f0dSDavid C Somayajulu 6111e25f0dSDavid C Somayajulu /* 6211e25f0dSDavid C Somayajulu * Retrive traces 6311e25f0dSDavid C Somayajulu */ 6411e25f0dSDavid C Somayajulu struct qlnx_trace { 6511e25f0dSDavid C Somayajulu uint16_t pci_func; 6611e25f0dSDavid C Somayajulu 6711e25f0dSDavid C Somayajulu uint16_t cmd; 6811e25f0dSDavid C Somayajulu #define QLNX_MCP_TRACE 0x01 6911e25f0dSDavid C Somayajulu #define QLNX_REG_FIFO 0x02 7011e25f0dSDavid C Somayajulu #define QLNX_IGU_FIFO 0x03 7111e25f0dSDavid C Somayajulu #define QLNX_PROTECTION_OVERRIDE 0x04 7211e25f0dSDavid C Somayajulu #define QLNX_FW_ASSERTS 0x05 7311e25f0dSDavid C Somayajulu 7411e25f0dSDavid C Somayajulu uint32_t size[QLNX_MAX_HW_FUNCS]; 7511e25f0dSDavid C Somayajulu void *buffer[QLNX_MAX_HW_FUNCS]; 7611e25f0dSDavid C Somayajulu uint32_t dwords[QLNX_MAX_HW_FUNCS]; 7711e25f0dSDavid C Somayajulu }; 7811e25f0dSDavid C Somayajulu typedef struct qlnx_trace qlnx_trace_t; 7911e25f0dSDavid C Somayajulu 8011e25f0dSDavid C Somayajulu 8111e25f0dSDavid C Somayajulu /* 8211e25f0dSDavid C Somayajulu * Read driver info 8311e25f0dSDavid C Somayajulu */ 8411e25f0dSDavid C Somayajulu #define QLNX_DRV_INFO_NAME_LENGTH 32 8511e25f0dSDavid C Somayajulu #define QLNX_DRV_INFO_VERSION_LENGTH 32 8611e25f0dSDavid C Somayajulu #define QLNX_DRV_INFO_MFW_VERSION_LENGTH 32 8711e25f0dSDavid C Somayajulu #define QLNX_DRV_INFO_STORMFW_VERSION_LENGTH 32 8811e25f0dSDavid C Somayajulu #define QLNX_DRV_INFO_BUS_INFO_LENGTH 32 8911e25f0dSDavid C Somayajulu 9011e25f0dSDavid C Somayajulu struct qlnx_drvinfo { 9111e25f0dSDavid C Somayajulu char drv_name[QLNX_DRV_INFO_NAME_LENGTH]; 9211e25f0dSDavid C Somayajulu char drv_version[QLNX_DRV_INFO_VERSION_LENGTH]; 9311e25f0dSDavid C Somayajulu char mfw_version[QLNX_DRV_INFO_MFW_VERSION_LENGTH]; 9411e25f0dSDavid C Somayajulu char stormfw_version[QLNX_DRV_INFO_STORMFW_VERSION_LENGTH]; 9511e25f0dSDavid C Somayajulu uint32_t eeprom_dump_len; /* in bytes */ 9611e25f0dSDavid C Somayajulu uint32_t reg_dump_len; /* in bytes */ 9711e25f0dSDavid C Somayajulu char bus_info[QLNX_DRV_INFO_BUS_INFO_LENGTH]; 9811e25f0dSDavid C Somayajulu }; 9911e25f0dSDavid C Somayajulu typedef struct qlnx_drvinfo qlnx_drvinfo_t; 10011e25f0dSDavid C Somayajulu 10111e25f0dSDavid C Somayajulu /* 10211e25f0dSDavid C Somayajulu * Read Device Setting 10311e25f0dSDavid C Somayajulu */ 10411e25f0dSDavid C Somayajulu struct qlnx_dev_setting { 10511e25f0dSDavid C Somayajulu uint32_t supported; /* Features this interface supports */ 10611e25f0dSDavid C Somayajulu uint32_t advertising; /* Features this interface advertises */ 10711e25f0dSDavid C Somayajulu uint32_t speed; /* The forced speed, 10Mb, 100Mb, gigabit */ 10811e25f0dSDavid C Somayajulu uint32_t duplex; /* Duplex, half or full */ 10911e25f0dSDavid C Somayajulu uint32_t port; /* Which connector port */ 11011e25f0dSDavid C Somayajulu uint32_t phy_address; /* port number*/ 11111e25f0dSDavid C Somayajulu uint32_t autoneg; /* Enable or disable autonegotiation */ 11211e25f0dSDavid C Somayajulu }; 11311e25f0dSDavid C Somayajulu typedef struct qlnx_dev_setting qlnx_dev_setting_t; 11411e25f0dSDavid C Somayajulu 11511e25f0dSDavid C Somayajulu /* 11611e25f0dSDavid C Somayajulu * Get Registers 11711e25f0dSDavid C Somayajulu */ 11811e25f0dSDavid C Somayajulu struct qlnx_get_regs { 11911e25f0dSDavid C Somayajulu void *reg_buf; 12011e25f0dSDavid C Somayajulu uint32_t reg_buf_len; 12111e25f0dSDavid C Somayajulu }; 12211e25f0dSDavid C Somayajulu typedef struct qlnx_get_regs qlnx_get_regs_t; 12311e25f0dSDavid C Somayajulu 12411e25f0dSDavid C Somayajulu /* 12511e25f0dSDavid C Somayajulu * Get/Set NVRAM 12611e25f0dSDavid C Somayajulu */ 12711e25f0dSDavid C Somayajulu struct qlnx_nvram { 12811e25f0dSDavid C Somayajulu uint32_t cmd; 12911e25f0dSDavid C Somayajulu #define QLNX_NVRAM_CMD_WRITE_NVRAM 0x01 13011e25f0dSDavid C Somayajulu #define QLNX_NVRAM_CMD_READ_NVRAM 0x02 13111e25f0dSDavid C Somayajulu #define QLNX_NVRAM_CMD_SET_SECURE_MODE 0x03 13211e25f0dSDavid C Somayajulu #define QLNX_NVRAM_CMD_DEL_FILE 0x04 13311e25f0dSDavid C Somayajulu #define QLNX_NVRAM_CMD_PUT_FILE_BEGIN 0x05 13411e25f0dSDavid C Somayajulu #define QLNX_NVRAM_CMD_GET_NVRAM_RESP 0x06 13511e25f0dSDavid C Somayajulu #define QLNX_NVRAM_CMD_PUT_FILE_DATA 0x07 13611e25f0dSDavid C Somayajulu 13711e25f0dSDavid C Somayajulu void *data; 13811e25f0dSDavid C Somayajulu uint32_t offset; 13911e25f0dSDavid C Somayajulu uint32_t data_len; 14011e25f0dSDavid C Somayajulu uint32_t magic; 14111e25f0dSDavid C Somayajulu }; 14211e25f0dSDavid C Somayajulu typedef struct qlnx_nvram qlnx_nvram_t; 14311e25f0dSDavid C Somayajulu 14411e25f0dSDavid C Somayajulu /* 14511e25f0dSDavid C Somayajulu * Get/Set Device registers 14611e25f0dSDavid C Somayajulu */ 14711e25f0dSDavid C Somayajulu struct qlnx_reg_rd_wr { 14811e25f0dSDavid C Somayajulu uint32_t cmd; 14911e25f0dSDavid C Somayajulu #define QLNX_REG_READ_CMD 0x01 15011e25f0dSDavid C Somayajulu #define QLNX_REG_WRITE_CMD 0x02 15111e25f0dSDavid C Somayajulu 15211e25f0dSDavid C Somayajulu uint32_t addr; 15311e25f0dSDavid C Somayajulu uint32_t val; 15411e25f0dSDavid C Somayajulu 15511e25f0dSDavid C Somayajulu uint32_t access_type; 15611e25f0dSDavid C Somayajulu #define QLNX_REG_ACCESS_DIRECT 0x01 15711e25f0dSDavid C Somayajulu #define QLNX_REG_ACCESS_INDIRECT 0x02 15811e25f0dSDavid C Somayajulu 15911e25f0dSDavid C Somayajulu uint32_t hwfn_index; 16011e25f0dSDavid C Somayajulu }; 16111e25f0dSDavid C Somayajulu typedef struct qlnx_reg_rd_wr qlnx_reg_rd_wr_t; 16211e25f0dSDavid C Somayajulu 16311e25f0dSDavid C Somayajulu /* 16411e25f0dSDavid C Somayajulu * Read/Write PCI Configuration 16511e25f0dSDavid C Somayajulu */ 16611e25f0dSDavid C Somayajulu struct qlnx_pcicfg_rd_wr { 16711e25f0dSDavid C Somayajulu uint32_t cmd; 16811e25f0dSDavid C Somayajulu #define QLNX_PCICFG_READ 0x01 16911e25f0dSDavid C Somayajulu #define QLNX_PCICFG_WRITE 0x02 17011e25f0dSDavid C Somayajulu uint32_t reg; 17111e25f0dSDavid C Somayajulu uint32_t val; 17211e25f0dSDavid C Somayajulu uint32_t width; 17311e25f0dSDavid C Somayajulu }; 17411e25f0dSDavid C Somayajulu typedef struct qlnx_pcicfg_rd_wr qlnx_pcicfg_rd_wr_t; 17511e25f0dSDavid C Somayajulu 17611e25f0dSDavid C Somayajulu /* 17711e25f0dSDavid C Somayajulu * Read MAC address 17811e25f0dSDavid C Somayajulu */ 17911e25f0dSDavid C Somayajulu struct qlnx_perm_mac_addr { 18011e25f0dSDavid C Somayajulu char addr[32]; 18111e25f0dSDavid C Somayajulu }; 18211e25f0dSDavid C Somayajulu typedef struct qlnx_perm_mac_addr qlnx_perm_mac_addr_t; 18311e25f0dSDavid C Somayajulu 18411e25f0dSDavid C Somayajulu 18511e25f0dSDavid C Somayajulu /* 18611e25f0dSDavid C Somayajulu * Read STORM statistics registers 18711e25f0dSDavid C Somayajulu */ 18811e25f0dSDavid C Somayajulu struct qlnx_storm_stats { 18911e25f0dSDavid C Somayajulu 19011e25f0dSDavid C Somayajulu /* xstorm */ 19111e25f0dSDavid C Somayajulu uint32_t xstorm_active_cycles; 19211e25f0dSDavid C Somayajulu uint32_t xstorm_stall_cycles; 19311e25f0dSDavid C Somayajulu uint32_t xstorm_sleeping_cycles; 19411e25f0dSDavid C Somayajulu uint32_t xstorm_inactive_cycles; 19511e25f0dSDavid C Somayajulu 19611e25f0dSDavid C Somayajulu /* ystorm */ 19711e25f0dSDavid C Somayajulu uint32_t ystorm_active_cycles; 19811e25f0dSDavid C Somayajulu uint32_t ystorm_stall_cycles; 19911e25f0dSDavid C Somayajulu uint32_t ystorm_sleeping_cycles; 20011e25f0dSDavid C Somayajulu uint32_t ystorm_inactive_cycles; 20111e25f0dSDavid C Somayajulu 20211e25f0dSDavid C Somayajulu /* pstorm */ 20311e25f0dSDavid C Somayajulu uint32_t pstorm_active_cycles; 20411e25f0dSDavid C Somayajulu uint32_t pstorm_stall_cycles; 20511e25f0dSDavid C Somayajulu uint32_t pstorm_sleeping_cycles; 20611e25f0dSDavid C Somayajulu uint32_t pstorm_inactive_cycles; 20711e25f0dSDavid C Somayajulu 20811e25f0dSDavid C Somayajulu /* tstorm */ 20911e25f0dSDavid C Somayajulu uint32_t tstorm_active_cycles; 21011e25f0dSDavid C Somayajulu uint32_t tstorm_stall_cycles; 21111e25f0dSDavid C Somayajulu uint32_t tstorm_sleeping_cycles; 21211e25f0dSDavid C Somayajulu uint32_t tstorm_inactive_cycles; 21311e25f0dSDavid C Somayajulu 21411e25f0dSDavid C Somayajulu /* mstorm */ 21511e25f0dSDavid C Somayajulu uint32_t mstorm_active_cycles; 21611e25f0dSDavid C Somayajulu uint32_t mstorm_stall_cycles; 21711e25f0dSDavid C Somayajulu uint32_t mstorm_sleeping_cycles; 21811e25f0dSDavid C Somayajulu uint32_t mstorm_inactive_cycles; 21911e25f0dSDavid C Somayajulu 22011e25f0dSDavid C Somayajulu /* ustorm */ 22111e25f0dSDavid C Somayajulu uint32_t ustorm_active_cycles; 22211e25f0dSDavid C Somayajulu uint32_t ustorm_stall_cycles; 22311e25f0dSDavid C Somayajulu uint32_t ustorm_sleeping_cycles; 22411e25f0dSDavid C Somayajulu uint32_t ustorm_inactive_cycles; 22511e25f0dSDavid C Somayajulu }; 22611e25f0dSDavid C Somayajulu 22711e25f0dSDavid C Somayajulu typedef struct qlnx_storm_stats qlnx_storm_stats_t; 22811e25f0dSDavid C Somayajulu 22911e25f0dSDavid C Somayajulu #define QLNX_STORM_STATS_SAMPLES_PER_HWFN (10000) 23011e25f0dSDavid C Somayajulu 23111e25f0dSDavid C Somayajulu #define QLNX_STORM_STATS_BYTES_PER_HWFN (sizeof(qlnx_storm_stats_t) * \ 23211e25f0dSDavid C Somayajulu QLNX_STORM_STATS_SAMPLES_PER_HWFN) 23311e25f0dSDavid C Somayajulu 23411e25f0dSDavid C Somayajulu struct qlnx_storm_stats_dump { 23511e25f0dSDavid C Somayajulu int num_hwfns; 23611e25f0dSDavid C Somayajulu int num_samples; 23711e25f0dSDavid C Somayajulu void *buffer[QLNX_MAX_HW_FUNCS]; 23811e25f0dSDavid C Somayajulu }; 23911e25f0dSDavid C Somayajulu 24011e25f0dSDavid C Somayajulu typedef struct qlnx_storm_stats_dump qlnx_storm_stats_dump_t; 24111e25f0dSDavid C Somayajulu 242*217ec208SDavid C Somayajulu #define QLNX_LLDP_TYPE_END_OF_LLDPDU 0 243*217ec208SDavid C Somayajulu #define QLNX_LLDP_TYPE_CHASSIS_ID 1 244*217ec208SDavid C Somayajulu #define QLNX_LLDP_TYPE_PORT_ID 2 245*217ec208SDavid C Somayajulu #define QLNX_LLDP_TYPE_TTL 3 246*217ec208SDavid C Somayajulu #define QLNX_LLDP_TYPE_PORT_DESC 4 247*217ec208SDavid C Somayajulu #define QLNX_LLDP_TYPE_SYS_NAME 5 248*217ec208SDavid C Somayajulu #define QLNX_LLDP_TYPE_SYS_DESC 6 249*217ec208SDavid C Somayajulu #define QLNX_LLDP_TYPE_SYS_CAPS 7 250*217ec208SDavid C Somayajulu #define QLNX_LLDP_TYPE_MGMT_ADDR 8 251*217ec208SDavid C Somayajulu #define QLNX_LLDP_TYPE_ORG_SPECIFIC 127 252*217ec208SDavid C Somayajulu 253*217ec208SDavid C Somayajulu #define QLNX_LLDP_CHASSIS_ID_SUBTYPE_OCTETS 1 //Subtype is 1 byte 254*217ec208SDavid C Somayajulu #define QLNX_LLDP_CHASSIS_ID_SUBTYPE_MAC 0x04 //Mac Address 255*217ec208SDavid C Somayajulu #define QLNX_LLDP_CHASSIS_ID_MAC_ADDR_LEN 6 // Mac address is 6 bytes 256*217ec208SDavid C Somayajulu #define QLNX_LLDP_CHASSIS_ID_SUBTYPE_IF_NAME 0x06 //Interface Name 257*217ec208SDavid C Somayajulu 258*217ec208SDavid C Somayajulu #define QLNX_LLDP_PORT_ID_SUBTYPE_OCTETS 1 //Subtype is 1 byte 259*217ec208SDavid C Somayajulu #define QLNX_LLDP_PORT_ID_SUBTYPE_MAC 0x03 //Mac Address 260*217ec208SDavid C Somayajulu #define QLNX_LLDP_PORT_ID_MAC_ADDR_LEN 6 // Mac address is 6 bytes 261*217ec208SDavid C Somayajulu #define QLNX_LLDP_PORT_ID_SUBTYPE_IF_NAME 0x05 //Interface Name 262*217ec208SDavid C Somayajulu 263*217ec208SDavid C Somayajulu #define QLNX_LLDP_SYS_TLV_SIZE 256 264*217ec208SDavid C Somayajulu struct qlnx_lldp_sys_tlvs { 265*217ec208SDavid C Somayajulu int discard_mandatory_tlv; 266*217ec208SDavid C Somayajulu uint8_t buf[QLNX_LLDP_SYS_TLV_SIZE]; 267*217ec208SDavid C Somayajulu uint16_t buf_size; 268*217ec208SDavid C Somayajulu }; 269*217ec208SDavid C Somayajulu typedef struct qlnx_lldp_sys_tlvs qlnx_lldp_sys_tlvs_t; 270*217ec208SDavid C Somayajulu 271*217ec208SDavid C Somayajulu 27211e25f0dSDavid C Somayajulu /* 27311e25f0dSDavid C Somayajulu * Read grcdump size 27411e25f0dSDavid C Somayajulu */ 27511e25f0dSDavid C Somayajulu #define QLNX_GRC_DUMP_SIZE _IOWR('q', 1, qlnx_grcdump_t) 27611e25f0dSDavid C Somayajulu 27711e25f0dSDavid C Somayajulu /* 27811e25f0dSDavid C Somayajulu * Read grcdump 27911e25f0dSDavid C Somayajulu */ 28011e25f0dSDavid C Somayajulu #define QLNX_GRC_DUMP _IOWR('q', 2, qlnx_grcdump_t) 28111e25f0dSDavid C Somayajulu 28211e25f0dSDavid C Somayajulu /* 28311e25f0dSDavid C Somayajulu * Read idle_chk size 28411e25f0dSDavid C Somayajulu */ 28511e25f0dSDavid C Somayajulu #define QLNX_IDLE_CHK_SIZE _IOWR('q', 3, qlnx_idle_chk_t) 28611e25f0dSDavid C Somayajulu 28711e25f0dSDavid C Somayajulu /* 28811e25f0dSDavid C Somayajulu * Read idle_chk 28911e25f0dSDavid C Somayajulu */ 29011e25f0dSDavid C Somayajulu #define QLNX_IDLE_CHK _IOWR('q', 4, qlnx_idle_chk_t) 29111e25f0dSDavid C Somayajulu 29211e25f0dSDavid C Somayajulu /* 29311e25f0dSDavid C Somayajulu * Read driver info 29411e25f0dSDavid C Somayajulu */ 29511e25f0dSDavid C Somayajulu #define QLNX_DRV_INFO _IOWR('q', 5, qlnx_drvinfo_t) 29611e25f0dSDavid C Somayajulu 29711e25f0dSDavid C Somayajulu /* 29811e25f0dSDavid C Somayajulu * Read Device Setting 29911e25f0dSDavid C Somayajulu */ 30011e25f0dSDavid C Somayajulu #define QLNX_DEV_SETTING _IOR('q', 6, qlnx_dev_setting_t) 30111e25f0dSDavid C Somayajulu 30211e25f0dSDavid C Somayajulu /* 30311e25f0dSDavid C Somayajulu * Get Registers 30411e25f0dSDavid C Somayajulu */ 30511e25f0dSDavid C Somayajulu #define QLNX_GET_REGS _IOR('q', 7, qlnx_get_regs_t) 30611e25f0dSDavid C Somayajulu 30711e25f0dSDavid C Somayajulu /* 30811e25f0dSDavid C Somayajulu * Get/Set NVRAM 30911e25f0dSDavid C Somayajulu */ 31011e25f0dSDavid C Somayajulu #define QLNX_NVRAM _IOWR('q', 8, qlnx_nvram_t) 31111e25f0dSDavid C Somayajulu 31211e25f0dSDavid C Somayajulu /* 31311e25f0dSDavid C Somayajulu * Get/Set Device registers 31411e25f0dSDavid C Somayajulu */ 31511e25f0dSDavid C Somayajulu #define QLNX_RD_WR_REG _IOWR('q', 9, qlnx_reg_rd_wr_t) 31611e25f0dSDavid C Somayajulu 31711e25f0dSDavid C Somayajulu /* 31811e25f0dSDavid C Somayajulu * Read/Write PCI Configuration 31911e25f0dSDavid C Somayajulu */ 32011e25f0dSDavid C Somayajulu #define QLNX_RD_WR_PCICFG _IOWR('q', 10, qlnx_pcicfg_rd_wr_t) 32111e25f0dSDavid C Somayajulu 32211e25f0dSDavid C Somayajulu /* 32311e25f0dSDavid C Somayajulu * Read MAC address 32411e25f0dSDavid C Somayajulu */ 32511e25f0dSDavid C Somayajulu #define QLNX_MAC_ADDR _IOWR('q', 11, qlnx_perm_mac_addr_t) 32611e25f0dSDavid C Somayajulu 32711e25f0dSDavid C Somayajulu /* 32811e25f0dSDavid C Somayajulu * Read STORM statistics 32911e25f0dSDavid C Somayajulu */ 33011e25f0dSDavid C Somayajulu #define QLNX_STORM_STATS _IOWR('q', 12, qlnx_storm_stats_dump_t) 33111e25f0dSDavid C Somayajulu 33211e25f0dSDavid C Somayajulu /* 33311e25f0dSDavid C Somayajulu * Read trace size 33411e25f0dSDavid C Somayajulu */ 33511e25f0dSDavid C Somayajulu #define QLNX_TRACE_SIZE _IOWR('q', 13, qlnx_trace_t) 33611e25f0dSDavid C Somayajulu 33711e25f0dSDavid C Somayajulu /* 33811e25f0dSDavid C Somayajulu * Read trace 33911e25f0dSDavid C Somayajulu */ 34011e25f0dSDavid C Somayajulu #define QLNX_TRACE _IOWR('q', 14, qlnx_trace_t) 34111e25f0dSDavid C Somayajulu 342*217ec208SDavid C Somayajulu /* 343*217ec208SDavid C Somayajulu * Set LLDP TLVS 344*217ec208SDavid C Somayajulu */ 345*217ec208SDavid C Somayajulu #define QLNX_SET_LLDP_TLVS _IOWR('q', 15, qlnx_lldp_sys_tlvs_t) 34611e25f0dSDavid C Somayajulu 34711e25f0dSDavid C Somayajulu #endif /* #ifndef _QLNX_IOCTL_H_ */ 348