Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci/ixgbe - Check offset correctly in ixgbe_get_oem_...
details: https://anonhg.NetBSD.org/src/rev/cfea0acb37c9
branches: trunk
changeset: 360541:cfea0acb37c9
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Fri Mar 16 07:54:08 2018 +0000
description:
- Check offset correctly in ixgbe_get_oem_prod_version(). Note that this
function is not used.
- Set PHY correctly in ixgbe_setup_mac_link_sfp_x550a() if a device is a
C3000 KR SFP+.
diffstat:
sys/dev/pci/ixgbe/ixgbe_common.c | 4 ++--
sys/dev/pci/ixgbe/ixgbe_x550.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diffs (33 lines):
diff -r 27cbddcfb20e -r cfea0acb37c9 sys/dev/pci/ixgbe/ixgbe_common.c
--- a/sys/dev/pci/ixgbe/ixgbe_common.c Fri Mar 16 04:48:19 2018 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_common.c Fri Mar 16 07:54:08 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_common.c,v 1.17 2018/03/15 06:48:51 msaitoh Exp $ */
+/* $NetBSD: ixgbe_common.c,v 1.18 2018/03/16 07:54:08 msaitoh Exp $ */
/******************************************************************************
SPDX-License-Identifier: BSD-3-Clause
@@ -5126,7 +5126,7 @@
hw->eeprom.ops.read(hw, NVM_OEM_PROD_VER_PTR, &offset);
/* Return is offset to OEM Product Version block is invalid */
- if (offset == 0x0 && offset == NVM_INVALID_PTR)
+ if (offset == 0x0 || offset == NVM_INVALID_PTR)
return;
/* Read product version block */
diff -r 27cbddcfb20e -r cfea0acb37c9 sys/dev/pci/ixgbe/ixgbe_x550.c
--- a/sys/dev/pci/ixgbe/ixgbe_x550.c Fri Mar 16 04:48:19 2018 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_x550.c Fri Mar 16 07:54:08 2018 +0000
@@ -2945,9 +2945,9 @@
(IXGBE_CS4227_EDC_MODE_SR << 1));
if (setup_linear)
- reg_phy_ext = (IXGBE_CS4227_EDC_MODE_CX1 << 1) | 0x1;
+ reg_phy_ext |= (IXGBE_CS4227_EDC_MODE_CX1 << 1) | 0x1;
else
- reg_phy_ext = (IXGBE_CS4227_EDC_MODE_SR << 1) | 0x1;
+ reg_phy_ext |= (IXGBE_CS4227_EDC_MODE_SR << 1) | 0x1;
ret_val = hw->phy.ops.write_reg(hw, reg_slice,
IXGBE_MDIO_ZERO_DEV_TYPE, reg_phy_ext);
Home |
Main Index |
Thread Index |
Old Index