1# 2# This file and its contents are supplied under the terms of the 3# Common Development and Distribution License ("CDDL"), version 1.0. 4# You may only use this file in accordance with the terms of version 5# 1.0 of the CDDL. 6# 7# A full copy of the text of the CDDL should have accompanied this 8# source. A copy of the CDDL is also available via the Internet at 9# http://www.illumos.org/license/CDDL. 10# 11 12This directory contains files extracted from the Intel ixl-1.6.10 driver for 13FreeBSD with the following modifications/differences. The following two 14changes each modified the common code. 15 169805 i40e should read SFP data when firmware supports it 179601 Divide by zero in i40e_get_available_resources() 18 19The following diff was originally applied to add support for Studio and the 2032-bit kernel: 21 22--- ixl-1.6.10/src/i40e_common.c 23+++ illumos-gate/usr/src/uts/common/io/i40e/core/i40e_common.c 24@@ -4037,8 +4037,8 @@ 25 26 cmd->type = mib_type; 27 cmd->length = CPU_TO_LE16(buff_size); 28- cmd->address_high = CPU_TO_LE32(I40E_HI_WORD((u64)buff)); 29- cmd->address_low = CPU_TO_LE32(I40E_LO_DWORD((u64)buff)); 30+ cmd->address_high = CPU_TO_LE32(I40E_HI_WORD((uintptr_t)buff)); 31+ cmd->address_low = CPU_TO_LE32(I40E_LO_DWORD((uintptr_t)buff)); 32 33 status = i40e_asq_send_command(hw, &desc, buff, buff_size, cmd_details); 34 return status; 35@@ -6585,9 +6585,9 @@ 36 i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_set_proxy_config); 37 38 desc.params.external.addr_high = 39- CPU_TO_LE32(I40E_HI_DWORD((u64)proxy_config)); 40+ CPU_TO_LE32(I40E_HI_DWORD((uintptr_t)proxy_config)); 41 desc.params.external.addr_low = 42- CPU_TO_LE32(I40E_LO_DWORD((u64)proxy_config)); 43+ CPU_TO_LE32(I40E_LO_DWORD((uintptr_t)proxy_config)); 44 45 status = i40e_asq_send_command(hw, &desc, proxy_config, 46 sizeof(struct i40e_aqc_arp_proxy_data), 47@@ -6619,9 +6619,9 @@ 48 i40e_aqc_opc_set_ns_proxy_table_entry); 49 50 desc.params.external.addr_high = 51- CPU_TO_LE32(I40E_HI_DWORD((u64)ns_proxy_table_entry)); 52+ CPU_TO_LE32(I40E_HI_DWORD((uintptr_t)ns_proxy_table_entry)); 53 desc.params.external.addr_low = 54- CPU_TO_LE32(I40E_LO_DWORD((u64)ns_proxy_table_entry)); 55+ CPU_TO_LE32(I40E_LO_DWORD((uintptr_t)ns_proxy_table_entry)); 56 57 status = i40e_asq_send_command(hw, &desc, ns_proxy_table_entry, 58 sizeof(struct i40e_aqc_ns_proxy_data), 59@@ -6681,8 +6681,8 @@ 60 valid_flags |= I40E_AQC_SET_WOL_FILTER_NO_TCO_ACTION_VALID; 61 cmd->valid_flags = CPU_TO_LE16(valid_flags); 62 63- cmd->address_high = CPU_TO_LE32(I40E_HI_DWORD((u64)filter)); 64- cmd->address_low = CPU_TO_LE32(I40E_LO_DWORD((u64)filter)); 65+ cmd->address_high = CPU_TO_LE32(I40E_HI_DWORD((uintptr_t)filter)); 66+ cmd->address_low = CPU_TO_LE32(I40E_LO_DWORD((uintptr_t)filter)); 67 68 status = i40e_asq_send_command(hw, &desc, filter, 69 buff_len, cmd_details); 70--- ixl-1.6.10/src/i40e_register.h 71+++ illumos-gate/usr/src/uts/common/io/i40e/core/i40e_register.h 72@@ -113,7 +113,7 @@ 73 #define I40E_PF_ATQLEN_ATQCRIT_SHIFT 30 74 #define I40E_PF_ATQLEN_ATQCRIT_MASK I40E_MASK(0x1, I40E_PF_ATQLEN_ATQCRIT_SHIFT) 75 #define I40E_PF_ATQLEN_ATQENABLE_SHIFT 31 76-#define I40E_PF_ATQLEN_ATQENABLE_MASK I40E_MASK(0x1, I40E_PF_ATQLEN_ATQENABLE_SHIFT) 77+#define I40E_PF_ATQLEN_ATQENABLE_MASK I40E_MASK(0x1UL, I40E_PF_ATQLEN_ATQENABLE_SHIFT) 78 #define I40E_PF_ATQT 0x00080400 /* Reset: EMPR */ 79 #define I40E_PF_ATQT_ATQT_SHIFT 0 80 #define I40E_PF_ATQT_ATQT_MASK I40E_MASK(0x3FF, I40E_PF_ATQT_ATQT_SHIFT) 81--- ixl-1.6.10/src/i40e_type.h 82+++ illumos-gate/usr/src/uts/common/io/i40e/core/i40e_type.h 83@@ -49,7 +49,7 @@ 84 85 #ifndef I40E_MASK 86 /* I40E_MASK is a macro used on 32 bit registers */ 87-#define I40E_MASK(mask, shift) (mask << shift) 88+#define I40E_MASK(mask, shift) (((uint32_t)(mask)) << ((uint32_t)(shift))) 89 #endif 90 91 #define I40E_MAX_PF 16 92