Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Jan 2017 10:52:02 +0000 (UTC)
From:      Andrew Rybchenko <arybchik@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r311639 - head/sys/dev/sfxge
Message-ID:  <201701071052.v07Aq2IG035059@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: arybchik
Date: Sat Jan  7 10:52:02 2017
New Revision: 311639
URL: https://svnweb.freebsd.org/changeset/base/311639

Log:
  sfxge(4): treat EFX_LINK_UNKOWN as link down
  
  It is safer to consider EFX_LINK_UNKNOWN as link down.
  link_mode is set to EFX_LINK_UNKNOWN on port stop and fini.
  
  Reviewed by:    philip
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:      2 days
  Differential Revision:  https://reviews.freebsd.org/D9060

Modified:
  head/sys/dev/sfxge/sfxge.h

Modified: head/sys/dev/sfxge/sfxge.h
==============================================================================
--- head/sys/dev/sfxge/sfxge.h	Sat Jan  7 10:51:12 2017	(r311638)
+++ head/sys/dev/sfxge/sfxge.h	Sat Jan  7 10:52:02 2017	(r311639)
@@ -326,7 +326,9 @@ struct sfxge_softc {
 #endif
 };
 
-#define	SFXGE_LINK_UP(sc) ((sc)->port.link_mode != EFX_LINK_DOWN)
+#define	SFXGE_LINK_UP(sc) \
+	((sc)->port.link_mode != EFX_LINK_DOWN && \
+	 (sc)->port.link_mode != EFX_LINK_UNKNOWN)
 #define	SFXGE_RUNNING(sc) ((sc)->ifnet->if_drv_flags & IFF_DRV_RUNNING)
 
 #define	SFXGE_PARAM(_name)	"hw.sfxge." #_name



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