Thu Aug 27 03:57:52 2020 UTC ()
Minor change.

 - Print "X550EM X" instead of "X550EM" for Xeon D devices.
 - Fix typo in comment. Same as FreeBSD.


(msaitoh)
diff -r1.245 -r1.246 src/sys/dev/pci/ixgbe/ixgbe.c
diff -r1.27 -r1.28 src/sys/dev/pci/ixgbe/ixgbe_common.c

cvs diff -r1.245 -r1.246 src/sys/dev/pci/ixgbe/ixgbe.c (expand / switch to unified diff)

--- src/sys/dev/pci/ixgbe/ixgbe.c 2020/08/27 00:07:56 1.245
+++ src/sys/dev/pci/ixgbe/ixgbe.c 2020/08/27 03:57:52 1.246
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ixgbe.c,v 1.245 2020/08/27 00:07:56 msaitoh Exp $ */ 1/* $NetBSD: ixgbe.c,v 1.246 2020/08/27 03:57:52 msaitoh Exp $ */
2 2
3/****************************************************************************** 3/******************************************************************************
4 4
5 Copyright (c) 2001-2017, Intel Corporation 5 Copyright (c) 2001-2017, Intel Corporation
6 All rights reserved. 6 All rights reserved.
7 7
8 Redistribution and use in source and binary forms, with or without 8 Redistribution and use in source and binary forms, with or without
9 modification, are permitted provided that the following conditions are met: 9 modification, are permitted provided that the following conditions are met:
10 10
11 1. Redistributions of source code must retain the above copyright notice, 11 1. Redistributions of source code must retain the above copyright notice,
12 this list of conditions and the following disclaimer. 12 this list of conditions and the following disclaimer.
13 13
14 2. Redistributions in binary form must reproduce the above copyright 14 2. Redistributions in binary form must reproduce the above copyright
@@ -890,27 +890,27 @@ ixgbe_attach(device_t parent, device_t d @@ -890,27 +890,27 @@ ixgbe_attach(device_t parent, device_t d
890 case ixgbe_mac_82598EB: 890 case ixgbe_mac_82598EB:
891 str = "82598EB"; 891 str = "82598EB";
892 break; 892 break;
893 case ixgbe_mac_82599EB: 893 case ixgbe_mac_82599EB:
894 str = "82599EB"; 894 str = "82599EB";
895 break; 895 break;
896 case ixgbe_mac_X540: 896 case ixgbe_mac_X540:
897 str = "X540"; 897 str = "X540";
898 break; 898 break;
899 case ixgbe_mac_X550: 899 case ixgbe_mac_X550:
900 str = "X550"; 900 str = "X550";
901 break; 901 break;
902 case ixgbe_mac_X550EM_x: 902 case ixgbe_mac_X550EM_x:
903 str = "X550EM"; 903 str = "X550EM X";
904 break; 904 break;
905 case ixgbe_mac_X550EM_a: 905 case ixgbe_mac_X550EM_a:
906 str = "X550EM A"; 906 str = "X550EM A";
907 break; 907 break;
908 default: 908 default:
909 str = "Unknown"; 909 str = "Unknown";
910 break; 910 break;
911 } 911 }
912 aprint_normal_dev(dev, "device %s\n", str); 912 aprint_normal_dev(dev, "device %s\n", str);
913 913
914 if (hw->mbx.ops.init_params) 914 if (hw->mbx.ops.init_params)
915 hw->mbx.ops.init_params(hw); 915 hw->mbx.ops.init_params(hw);
916 916

cvs diff -r1.27 -r1.28 src/sys/dev/pci/ixgbe/ixgbe_common.c (expand / switch to unified diff)

--- src/sys/dev/pci/ixgbe/ixgbe_common.c 2020/02/05 07:45:46 1.27
+++ src/sys/dev/pci/ixgbe/ixgbe_common.c 2020/08/27 03:57:52 1.28
@@ -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 **/
5229void ixgbe_get_oem_prod_version(struct ixgbe_hw *hw, 5229void 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);