Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Jul 2016 17:31:48 +0000 (UTC)
From:      Sean Bruno <sbruno@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r303032 - head/sys/dev/ixgbe
Message-ID:  <201607191731.u6JHVmew085824@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sbruno
Date: Tue Jul 19 17:31:48 2016
New Revision: 303032
URL: https://svnweb.freebsd.org/changeset/base/303032

Log:
  Fixup DA cable detection routines to not set the cable type to
  unknown if they do not match one of two cable types.
  
  PR:		150249
  Submitted by:	borjam@sarenet.es
  Reviewed by:	erj
  MFC after:	3 days

Modified:
  head/sys/dev/ixgbe/ixgbe_phy.c

Modified: head/sys/dev/ixgbe/ixgbe_phy.c
==============================================================================
--- head/sys/dev/ixgbe/ixgbe_phy.c	Tue Jul 19 17:15:07 2016	(r303031)
+++ head/sys/dev/ixgbe/ixgbe_phy.c	Tue Jul 19 17:31:48 2016	(r303032)
@@ -1534,21 +1534,18 @@ s32 ixgbe_identify_sfp_module_generic(st
 				hw->phy.type = ixgbe_phy_sfp_intel;
 				break;
 			default:
-				if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE)
-					hw->phy.type =
-						 ixgbe_phy_sfp_passive_unknown;
-				else if (cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE)
-					hw->phy.type =
-						ixgbe_phy_sfp_active_unknown;
-				else
-					hw->phy.type = ixgbe_phy_sfp_unknown;
+				hw->phy.type = ixgbe_phy_sfp_unknown;
 				break;
 			}
 		}
 
 		/* Allow any DA cable vendor */
 		if (cable_tech & (IXGBE_SFF_DA_PASSIVE_CABLE |
-		    IXGBE_SFF_DA_ACTIVE_CABLE)) {
+			IXGBE_SFF_DA_ACTIVE_CABLE)) {
+			if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE)
+				hw->phy.type = ixgbe_phy_sfp_passive_unknown;
+			else if (cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE)
+				hw->phy.type = ixgbe_phy_sfp_active_unknown;
 			status = IXGBE_SUCCESS;
 			goto out;
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607191731.u6JHVmew085824>