ixgbe_82598.c (302408) | ixgbe_82598.c (320897) |
---|---|
1/****************************************************************************** 2 | 1/****************************************************************************** 2 |
3 Copyright (c) 2001-2015, Intel Corporation | 3 Copyright (c) 2001-2017, Intel Corporation |
4 All rights reserved. | 4 All rights reserved. |
5 6 Redistribution and use in source and binary forms, with or without | 5 6 Redistribution and use in source and binary forms, with or without |
7 modification, are permitted provided that the following conditions are met: | 7 modification, are permitted provided that the following conditions are met: |
8 9 1. Redistributions of source code must retain the above copyright notice, | 8 9 1. Redistributions of source code must retain the above copyright notice, |
10 this list of conditions and the following disclaimer. | 10 this list of conditions and the following disclaimer. |
11 12 2. Redistributions in binary form must reproduce the above copyright 13 notice, this list of conditions and the following disclaimer in the | 11 12 2. Redistributions in binary form must reproduce the above copyright 13 notice, this list of conditions and the following disclaimer in the |
14 documentation and/or other materials provided with the distribution. | 14 documentation and/or other materials provided with the distribution. |
15 16 3. Neither the name of the Intel Corporation nor the names of its 17 contributors may be used to endorse or promote products derived from | 15 16 3. Neither the name of the Intel Corporation nor the names of its 17 contributors may be used to endorse or promote products derived from |
18 this software without specific prior written permission. | 18 this software without specific prior written permission. |
19 | 19 |
20 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | 20 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
21 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 24 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 21 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 24 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
29 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 POSSIBILITY OF SUCH DAMAGE. 31 32******************************************************************************/ | 29 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 POSSIBILITY OF SUCH DAMAGE. 31 32******************************************************************************/ |
33/*$FreeBSD: stable/11/sys/dev/ixgbe/ixgbe_82598.c 292674 2015-12-23 22:45:17Z sbruno $*/ | 33/*$FreeBSD: stable/11/sys/dev/ixgbe/ixgbe_82598.c 320897 2017-07-11 21:25:07Z erj $*/ |
34 35#include "ixgbe_type.h" 36#include "ixgbe_82598.h" 37#include "ixgbe_api.h" 38#include "ixgbe_common.h" 39#include "ixgbe_phy.h" 40 41#define IXGBE_82598_MAX_TX_QUEUES 32 --- 949 unchanged lines hidden (view full) --- 991} 992 993/** 994 * ixgbe_set_vfta_82598 - Set VLAN filter table 995 * @hw: pointer to hardware structure 996 * @vlan: VLAN id to write to VLAN filter 997 * @vind: VMDq output index that maps queue to VLAN id in VFTA 998 * @vlan_on: boolean flag to turn on/off VLAN in VFTA | 34 35#include "ixgbe_type.h" 36#include "ixgbe_82598.h" 37#include "ixgbe_api.h" 38#include "ixgbe_common.h" 39#include "ixgbe_phy.h" 40 41#define IXGBE_82598_MAX_TX_QUEUES 32 --- 949 unchanged lines hidden (view full) --- 991} 992 993/** 994 * ixgbe_set_vfta_82598 - Set VLAN filter table 995 * @hw: pointer to hardware structure 996 * @vlan: VLAN id to write to VLAN filter 997 * @vind: VMDq output index that maps queue to VLAN id in VFTA 998 * @vlan_on: boolean flag to turn on/off VLAN in VFTA |
999 * @vlvf_bypass: boolean flag - unused |
|
999 * 1000 * Turn on/off specified VLAN in the VLAN filter table. 1001 **/ 1002s32 ixgbe_set_vfta_82598(struct ixgbe_hw *hw, u32 vlan, u32 vind, | 1000 * 1001 * Turn on/off specified VLAN in the VLAN filter table. 1002 **/ 1003s32 ixgbe_set_vfta_82598(struct ixgbe_hw *hw, u32 vlan, u32 vind, |
1003 bool vlan_on) | 1004 bool vlan_on, bool vlvf_bypass) |
1004{ 1005 u32 regindex; 1006 u32 bitindex; 1007 u32 bits; 1008 u32 vftabyte; 1009 | 1005{ 1006 u32 regindex; 1007 u32 bitindex; 1008 u32 bits; 1009 u32 vftabyte; 1010 |
1011 UNREFERENCED_1PARAMETER(vlvf_bypass); 1012 |
|
1010 DEBUGFUNC("ixgbe_set_vfta_82598"); 1011 1012 if (vlan > 4095) 1013 return IXGBE_ERR_PARAM; 1014 1015 /* Determine 32-bit word position in array */ 1016 regindex = (vlan >> 5) & 0x7F; /* upper seven bits */ 1017 --- 197 unchanged lines hidden (view full) --- 1215} 1216 1217/** 1218 * ixgbe_get_supported_physical_layer_82598 - Returns physical layer type 1219 * @hw: pointer to hardware structure 1220 * 1221 * Determines physical layer capabilities of the current configuration. 1222 **/ | 1013 DEBUGFUNC("ixgbe_set_vfta_82598"); 1014 1015 if (vlan > 4095) 1016 return IXGBE_ERR_PARAM; 1017 1018 /* Determine 32-bit word position in array */ 1019 regindex = (vlan >> 5) & 0x7F; /* upper seven bits */ 1020 --- 197 unchanged lines hidden (view full) --- 1218} 1219 1220/** 1221 * ixgbe_get_supported_physical_layer_82598 - Returns physical layer type 1222 * @hw: pointer to hardware structure 1223 * 1224 * Determines physical layer capabilities of the current configuration. 1225 **/ |
1223u32 ixgbe_get_supported_physical_layer_82598(struct ixgbe_hw *hw) | 1226u64 ixgbe_get_supported_physical_layer_82598(struct ixgbe_hw *hw) |
1224{ | 1227{ |
1225 u32 physical_layer = IXGBE_PHYSICAL_LAYER_UNKNOWN; | 1228 u64 physical_layer = IXGBE_PHYSICAL_LAYER_UNKNOWN; |
1226 u32 autoc = IXGBE_READ_REG(hw, IXGBE_AUTOC); 1227 u32 pma_pmd_10g = autoc & IXGBE_AUTOC_10G_PMA_PMD_MASK; 1228 u32 pma_pmd_1g = autoc & IXGBE_AUTOC_1G_PMA_PMD_MASK; 1229 u16 ext_ability = 0; 1230 1231 DEBUGFUNC("ixgbe_get_supported_physical_layer_82598"); 1232 1233 hw->phy.ops.identify(hw); --- 204 unchanged lines hidden --- | 1229 u32 autoc = IXGBE_READ_REG(hw, IXGBE_AUTOC); 1230 u32 pma_pmd_10g = autoc & IXGBE_AUTOC_10G_PMA_PMD_MASK; 1231 u32 pma_pmd_1g = autoc & IXGBE_AUTOC_1G_PMA_PMD_MASK; 1232 u16 ext_ability = 0; 1233 1234 DEBUGFUNC("ixgbe_get_supported_physical_layer_82598"); 1235 1236 hw->phy.ops.identify(hw); --- 204 unchanged lines hidden --- |