Module Name:    src
Committed By:   msaitoh
Date:           Fri Mar 16 07:54:08 UTC 2018

Modified Files:
        src/sys/dev/pci/ixgbe: ixgbe_common.c ixgbe_x550.c

Log Message:
- 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+.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/ixgbe/ixgbe_common.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/ixgbe/ixgbe_x550.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe_common.c
diff -u src/sys/dev/pci/ixgbe/ixgbe_common.c:1.17 src/sys/dev/pci/ixgbe/ixgbe_common.c:1.18
--- src/sys/dev/pci/ixgbe/ixgbe_common.c:1.17	Thu Mar 15 06:48:51 2018
+++ src/sys/dev/pci/ixgbe/ixgbe_common.c	Fri Mar 16 07:54:08 2018
@@ -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 @@ void ixgbe_get_oem_prod_version(struct i
 	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 */

Index: src/sys/dev/pci/ixgbe/ixgbe_x550.c
diff -u src/sys/dev/pci/ixgbe/ixgbe_x550.c:1.8 src/sys/dev/pci/ixgbe/ixgbe_x550.c:1.9
--- src/sys/dev/pci/ixgbe/ixgbe_x550.c:1.8	Thu Mar 15 06:48:51 2018
+++ src/sys/dev/pci/ixgbe/ixgbe_x550.c	Fri Mar 16 07:54:08 2018
@@ -2945,9 +2945,9 @@ s32 ixgbe_setup_mac_link_sfp_x550a(struc
 				 (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);
 

Reply via email to