diff options
| -rw-r--r-- | exception_lists/copyright | 1 | ||||
| -rw-r--r-- | exception_lists/wscheck | 7 | ||||
| -rw-r--r-- | usr/src/uts/common/io/i40e/core/README.illumos | 91 | ||||
| -rw-r--r-- | usr/src/uts/common/io/i40e/core/i40e_common.c | 8 |
4 files changed, 101 insertions, 6 deletions
diff --git a/exception_lists/copyright b/exception_lists/copyright index 7fc4834fa2..4123d2a183 100644 --- a/exception_lists/copyright +++ b/exception_lists/copyright @@ -423,6 +423,7 @@ usr/src/uts/common/gssapi/mechs/krb5/mech/util_seed.c usr/src/uts/common/gssapi/mechs/krb5/mech/util_seqnum.c usr/src/uts/common/gssapi/mechs/krb5/mech/val_cred.c usr/src/uts/common/io/cxgbe/* +usr/src/uts/common/io/i40e/core/* usr/src/uts/common/io/iwn/THIRDPARTYLICENSE usr/src/uts/common/io/iwn/THIRDPARTYLICENSE.descrip usr/src/uts/common/io/iwn/fw-iw/THIRDPARTYLICENSE diff --git a/exception_lists/wscheck b/exception_lists/wscheck index 0adee1a9e3..6564081f83 100644 --- a/exception_lists/wscheck +++ b/exception_lists/wscheck @@ -12,9 +12,10 @@ # syntax: glob -usr/src/uts/common/io/qede/* -usr/src/tools/smatch/src/* +usr/src/cmd/smbsrv/testoplock/case*.ref usr/src/data/hwdata/pci.ids usr/src/data/hwdata/usb.ids usr/src/data/perfmon/readme.txt -usr/src/cmd/smbsrv/testoplock/case*.ref +usr/src/tools/smatch/src/* +usr/src/uts/common/io/qede/* +usr/src/uts/common/io/i40e/core/* diff --git a/usr/src/uts/common/io/i40e/core/README.illumos b/usr/src/uts/common/io/i40e/core/README.illumos new file mode 100644 index 0000000000..47cb1fdf2d --- /dev/null +++ b/usr/src/uts/common/io/i40e/core/README.illumos @@ -0,0 +1,91 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +This directory contains files extracted from the Intel ixl-1.6.10 driver for +FreeBSD with the following modifications/differences. The following two +changes each modified the common code. + +9805 i40e should read SFP data when firmware supports it +9601 Divide by zero in i40e_get_available_resources() + +The following diff was originally applied to add support for Studio and the +32-bit kernel: + +--- ixl-1.6.10/src/i40e_common.c ++++ illumos-gate/usr/src/uts/common/io/i40e/core/i40e_common.c +@@ -4037,8 +4037,8 @@ + + cmd->type = mib_type; + cmd->length = CPU_TO_LE16(buff_size); +- cmd->address_high = CPU_TO_LE32(I40E_HI_WORD((u64)buff)); +- cmd->address_low = CPU_TO_LE32(I40E_LO_DWORD((u64)buff)); ++ cmd->address_high = CPU_TO_LE32(I40E_HI_WORD((uintptr_t)buff)); ++ cmd->address_low = CPU_TO_LE32(I40E_LO_DWORD((uintptr_t)buff)); + + status = i40e_asq_send_command(hw, &desc, buff, buff_size, cmd_details); + return status; +@@ -6585,9 +6585,9 @@ + i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_set_proxy_config); + + desc.params.external.addr_high = +- CPU_TO_LE32(I40E_HI_DWORD((u64)proxy_config)); ++ CPU_TO_LE32(I40E_HI_DWORD((uintptr_t)proxy_config)); + desc.params.external.addr_low = +- CPU_TO_LE32(I40E_LO_DWORD((u64)proxy_config)); ++ CPU_TO_LE32(I40E_LO_DWORD((uintptr_t)proxy_config)); + + status = i40e_asq_send_command(hw, &desc, proxy_config, + sizeof(struct i40e_aqc_arp_proxy_data), +@@ -6619,9 +6619,9 @@ + i40e_aqc_opc_set_ns_proxy_table_entry); + + desc.params.external.addr_high = +- CPU_TO_LE32(I40E_HI_DWORD((u64)ns_proxy_table_entry)); ++ CPU_TO_LE32(I40E_HI_DWORD((uintptr_t)ns_proxy_table_entry)); + desc.params.external.addr_low = +- CPU_TO_LE32(I40E_LO_DWORD((u64)ns_proxy_table_entry)); ++ CPU_TO_LE32(I40E_LO_DWORD((uintptr_t)ns_proxy_table_entry)); + + status = i40e_asq_send_command(hw, &desc, ns_proxy_table_entry, + sizeof(struct i40e_aqc_ns_proxy_data), +@@ -6681,8 +6681,8 @@ + valid_flags |= I40E_AQC_SET_WOL_FILTER_NO_TCO_ACTION_VALID; + cmd->valid_flags = CPU_TO_LE16(valid_flags); + +- cmd->address_high = CPU_TO_LE32(I40E_HI_DWORD((u64)filter)); +- cmd->address_low = CPU_TO_LE32(I40E_LO_DWORD((u64)filter)); ++ cmd->address_high = CPU_TO_LE32(I40E_HI_DWORD((uintptr_t)filter)); ++ cmd->address_low = CPU_TO_LE32(I40E_LO_DWORD((uintptr_t)filter)); + + status = i40e_asq_send_command(hw, &desc, filter, + buff_len, cmd_details); +--- ixl-1.6.10/src/i40e_register.h ++++ illumos-gate/usr/src/uts/common/io/i40e/core/i40e_register.h +@@ -113,7 +113,7 @@ + #define I40E_PF_ATQLEN_ATQCRIT_SHIFT 30 + #define I40E_PF_ATQLEN_ATQCRIT_MASK I40E_MASK(0x1, I40E_PF_ATQLEN_ATQCRIT_SHIFT) + #define I40E_PF_ATQLEN_ATQENABLE_SHIFT 31 +-#define I40E_PF_ATQLEN_ATQENABLE_MASK I40E_MASK(0x1, I40E_PF_ATQLEN_ATQENABLE_SHIFT) ++#define I40E_PF_ATQLEN_ATQENABLE_MASK I40E_MASK(0x1UL, I40E_PF_ATQLEN_ATQENABLE_SHIFT) + #define I40E_PF_ATQT 0x00080400 /* Reset: EMPR */ + #define I40E_PF_ATQT_ATQT_SHIFT 0 + #define I40E_PF_ATQT_ATQT_MASK I40E_MASK(0x3FF, I40E_PF_ATQT_ATQT_SHIFT) +--- ixl-1.6.10/src/i40e_type.h ++++ illumos-gate/usr/src/uts/common/io/i40e/core/i40e_type.h +@@ -49,7 +49,7 @@ + + #ifndef I40E_MASK + /* I40E_MASK is a macro used on 32 bit registers */ +-#define I40E_MASK(mask, shift) (mask << shift) ++#define I40E_MASK(mask, shift) (((uint32_t)(mask)) << ((uint32_t)(shift))) + #endif + + #define I40E_MAX_PF 16 diff --git a/usr/src/uts/common/io/i40e/core/i40e_common.c b/usr/src/uts/common/io/i40e/core/i40e_common.c index f4dd8da819..0e0dc285ae 100644 --- a/usr/src/uts/common/io/i40e/core/i40e_common.c +++ b/usr/src/uts/common/io/i40e/core/i40e_common.c @@ -3823,14 +3823,16 @@ static void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff, /* count the enabled ports (aka the "not disabled" ports) */ hw->num_ports = 0; for (i = 0; i < 4; i++) { - u32 port_cfg_reg = I40E_PRTGEN_CNF + (4 * i); + enum i40e_status_code status; + u32 port_cfg_reg = I40E_PRTGEN_STATUS + (4 * i); u64 port_cfg = 0; /* use AQ read to get the physical register offset instead * of the port relative offset */ - i40e_aq_debug_read_register(hw, port_cfg_reg, &port_cfg, NULL); - if (!(port_cfg & I40E_PRTGEN_CNF_PORT_DIS_MASK)) + status = i40e_aq_debug_read_register(hw, port_cfg_reg, &port_cfg, NULL); + if ((status == I40E_SUCCESS) && + (port_cfg & I40E_PRTGEN_STATUS_PORT_VALID_MASK)) hw->num_ports++; } |
