| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: ixgbe_common.c,v 1.27 2020/02/05 07:45:46 msaitoh Exp $ */ | | 1 | /* $NetBSD: ixgbe_common.c,v 1.28 2020/08/27 03:57:52 msaitoh Exp $ */ |
2 | | | 2 | |
3 | /****************************************************************************** | | 3 | /****************************************************************************** |
4 | SPDX-License-Identifier: BSD-3-Clause | | 4 | SPDX-License-Identifier: BSD-3-Clause |
5 | | | 5 | |
6 | Copyright (c) 2001-2017, Intel Corporation | | 6 | Copyright (c) 2001-2017, Intel Corporation |
7 | All rights reserved. | | 7 | All rights reserved. |
8 | | | 8 | |
9 | Redistribution and use in source and binary forms, with or without | | 9 | Redistribution and use in source and binary forms, with or without |
10 | modification, are permitted provided that the following conditions are met: | | 10 | modification, are permitted provided that the following conditions are met: |
11 | | | 11 | |
12 | 1. Redistributions of source code must retain the above copyright notice, | | 12 | 1. Redistributions of source code must retain the above copyright notice, |
13 | this list of conditions and the following disclaimer. | | 13 | this list of conditions and the following disclaimer. |
14 | | | 14 | |
| @@ -5224,27 +5224,27 @@ void ixgbe_get_orom_version(struct ixgbe | | | @@ -5224,27 +5224,27 @@ void ixgbe_get_orom_version(struct ixgbe |
5224 | * @nvm_ver: pointer to output structure | | 5224 | * @nvm_ver: pointer to output structure |
5225 | * | | 5225 | * |
5226 | * if valid OEM product version, nvm_ver->oem_valid set to TRUE | | 5226 | * if valid OEM product version, nvm_ver->oem_valid set to TRUE |
5227 | * else nvm_ver->oem_valid is FALSE. | | 5227 | * else nvm_ver->oem_valid is FALSE. |
5228 | **/ | | 5228 | **/ |
5229 | void ixgbe_get_oem_prod_version(struct ixgbe_hw *hw, | | 5229 | void ixgbe_get_oem_prod_version(struct ixgbe_hw *hw, |
5230 | struct ixgbe_nvm_version *nvm_ver) | | 5230 | struct ixgbe_nvm_version *nvm_ver) |
5231 | { | | 5231 | { |
5232 | u16 rel_num, prod_ver, mod_len, cap, offset; | | 5232 | u16 rel_num, prod_ver, mod_len, cap, offset; |
5233 | | | 5233 | |
5234 | nvm_ver->oem_valid = FALSE; | | 5234 | nvm_ver->oem_valid = FALSE; |
5235 | hw->eeprom.ops.read(hw, NVM_OEM_PROD_VER_PTR, &offset); | | 5235 | hw->eeprom.ops.read(hw, NVM_OEM_PROD_VER_PTR, &offset); |
5236 | | | 5236 | |
5237 | /* Return is offset to OEM Product Version block is invalid */ | | 5237 | /* Return if offset to OEM Product Version block is invalid */ |
5238 | if (offset == 0x0 || offset == NVM_INVALID_PTR) | | 5238 | if (offset == 0x0 || offset == NVM_INVALID_PTR) |
5239 | return; | | 5239 | return; |
5240 | | | 5240 | |
5241 | /* Read product version block */ | | 5241 | /* Read product version block */ |
5242 | hw->eeprom.ops.read(hw, offset, &mod_len); | | 5242 | hw->eeprom.ops.read(hw, offset, &mod_len); |
5243 | hw->eeprom.ops.read(hw, offset + NVM_OEM_PROD_VER_CAP_OFF, &cap); | | 5243 | hw->eeprom.ops.read(hw, offset + NVM_OEM_PROD_VER_CAP_OFF, &cap); |
5244 | | | 5244 | |
5245 | /* Return if OEM product version block is invalid */ | | 5245 | /* Return if OEM product version block is invalid */ |
5246 | if (mod_len != NVM_OEM_PROD_VER_MOD_LEN || | | 5246 | if (mod_len != NVM_OEM_PROD_VER_MOD_LEN || |
5247 | (cap & NVM_OEM_PROD_VER_CAP_MASK) != 0x0) | | 5247 | (cap & NVM_OEM_PROD_VER_CAP_MASK) != 0x0) |
5248 | return; | | 5248 | return; |
5249 | | | 5249 | |
5250 | hw->eeprom.ops.read(hw, offset + NVM_OEM_PROD_VER_OFF_L, &prod_ver); | | 5250 | hw->eeprom.ops.read(hw, offset + NVM_OEM_PROD_VER_OFF_L, &prod_ver); |