Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/e1000/e1000_api.c
/****************************************************************************** | /****************************************************************************** | ||||
SPDX-License-Identifier: BSD-3-Clause | SPDX-License-Identifier: BSD-3-Clause | ||||
Copyright (c) 2001-2015, Intel Corporation | Copyright (c) 2001-2020, Intel Corporation | ||||
All rights reserved. | All rights reserved. | ||||
Redistribution and use in source and binary forms, with or without | Redistribution and use in source and binary forms, with or without | ||||
modification, are permitted provided that the following conditions are met: | modification, are permitted provided that the following conditions are met: | ||||
1. Redistributions of source code must retain the above copyright notice, | 1. Redistributions of source code must retain the above copyright notice, | ||||
this list of conditions and the following disclaimer. | this list of conditions and the following disclaimer. | ||||
2. Redistributions in binary form must reproduce the above copyright | 2. Redistributions in binary form must reproduce the above copyright | ||||
notice, this list of conditions and the following disclaimer in the | notice, this list of conditions and the following disclaimer in the | ||||
documentation and/or other materials provided with the distribution. | documentation and/or other materials provided with the distribution. | ||||
3. Neither the name of the Intel Corporation nor the names of its | 3. Neither the name of the Intel Corporation nor the names of its | ||||
contributors may be used to endorse or promote products derived from | contributors may be used to endorse or promote products derived from | ||||
this software without specific prior written permission. | this software without specific prior written permission. | ||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
POSSIBILITY OF SUCH DAMAGE. | POSSIBILITY OF SUCH DAMAGE. | ||||
******************************************************************************/ | ******************************************************************************/ | ||||
/*$FreeBSD$*/ | /*$FreeBSD$*/ | ||||
#include "e1000_api.h" | #include "e1000_api.h" | ||||
▲ Show 20 Lines • Show All 340 Lines • ▼ Show 20 Lines | s32 e1000_set_mac_type(struct e1000_hw *hw) | ||||
case E1000_DEV_ID_I350_FIBER: | case E1000_DEV_ID_I350_FIBER: | ||||
case E1000_DEV_ID_I350_SERDES: | case E1000_DEV_ID_I350_SERDES: | ||||
case E1000_DEV_ID_I350_SGMII: | case E1000_DEV_ID_I350_SGMII: | ||||
case E1000_DEV_ID_I350_DA4: | case E1000_DEV_ID_I350_DA4: | ||||
mac->type = e1000_i350; | mac->type = e1000_i350; | ||||
break; | break; | ||||
case E1000_DEV_ID_I210_COPPER_FLASHLESS: | case E1000_DEV_ID_I210_COPPER_FLASHLESS: | ||||
case E1000_DEV_ID_I210_SERDES_FLASHLESS: | case E1000_DEV_ID_I210_SERDES_FLASHLESS: | ||||
case E1000_DEV_ID_I210_SGMII_FLASHLESS: | |||||
case E1000_DEV_ID_I210_COPPER: | case E1000_DEV_ID_I210_COPPER: | ||||
case E1000_DEV_ID_I210_COPPER_OEM1: | case E1000_DEV_ID_I210_COPPER_OEM1: | ||||
case E1000_DEV_ID_I210_COPPER_IT: | case E1000_DEV_ID_I210_COPPER_IT: | ||||
case E1000_DEV_ID_I210_FIBER: | case E1000_DEV_ID_I210_FIBER: | ||||
case E1000_DEV_ID_I210_SERDES: | case E1000_DEV_ID_I210_SERDES: | ||||
case E1000_DEV_ID_I210_SGMII: | case E1000_DEV_ID_I210_SGMII: | ||||
mac->type = e1000_i210; | mac->type = e1000_i210; | ||||
break; | break; | ||||
▲ Show 20 Lines • Show All 867 Lines • ▼ Show 20 Lines | |||||
* Reads the product board assembly (PBA) number length from the EEPROM and | * Reads the product board assembly (PBA) number length from the EEPROM and | ||||
* stores the value in pba_num. | * stores the value in pba_num. | ||||
* Currently no func pointer exists and all implementations are handled in the | * Currently no func pointer exists and all implementations are handled in the | ||||
* generic version of this function. | * generic version of this function. | ||||
**/ | **/ | ||||
s32 e1000_read_pba_length(struct e1000_hw *hw, u32 *pba_num_size) | s32 e1000_read_pba_length(struct e1000_hw *hw, u32 *pba_num_size) | ||||
{ | { | ||||
return e1000_read_pba_length_generic(hw, pba_num_size); | return e1000_read_pba_length_generic(hw, pba_num_size); | ||||
} | |||||
/** | |||||
* e1000_read_pba_num - Read device part number | |||||
* @hw: pointer to the HW structure | |||||
* @pba_num: pointer to device part number | |||||
* | |||||
* Reads the product board assembly (PBA) number from the EEPROM and stores | |||||
* the value in pba_num. | |||||
* Currently no func pointer exists and all implementations are handled in the | |||||
* generic version of this function. | |||||
**/ | |||||
s32 e1000_read_pba_num(struct e1000_hw *hw, u32 *pba_num) | |||||
{ | |||||
return e1000_read_pba_num_generic(hw, pba_num); | |||||
} | } | ||||
/** | /** | ||||
* e1000_validate_nvm_checksum - Verifies NVM (EEPROM) checksum | * e1000_validate_nvm_checksum - Verifies NVM (EEPROM) checksum | ||||
* @hw: pointer to the HW structure | * @hw: pointer to the HW structure | ||||
* | * | ||||
* Validates the NVM checksum is correct. This is a function pointer entry | * Validates the NVM checksum is correct. This is a function pointer entry | ||||
* point called by drivers. | * point called by drivers. | ||||
▲ Show 20 Lines • Show All 141 Lines • Show Last 20 Lines |