Module Name:    src
Committed By:   msaitoh
Date:           Wed Feb  8 03:59:12 UTC 2017

Modified Files:
        src/sys/dev/pci/ixgbe: ixgbe.c ixv.c

Log Message:
 Set ifm_active to IFM_NONE when the physical interface's link is down.
Now ifconfig shows "media: Ethernet autoselect '(none)'".


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/pci/ixgbe/ixv.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.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.67 src/sys/dev/pci/ixgbe/ixgbe.c:1.68
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.67	Wed Feb  1 10:47:13 2017
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Wed Feb  8 03:59:12 2017
@@ -59,7 +59,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 /*$FreeBSD: head/sys/dev/ixgbe/if_ix.c 302384 2016-07-07 03:39:18Z sbruno $*/
-/*$NetBSD: ixgbe.c,v 1.67 2017/02/01 10:47:13 msaitoh Exp $*/
+/*$NetBSD: ixgbe.c,v 1.68 2017/02/08 03:59:12 msaitoh Exp $*/
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -1879,6 +1879,7 @@ ixgbe_media_status(struct ifnet * ifp, s
 	ifmr->ifm_active = IFM_ETHER;
 
 	if (!adapter->link_active) {
+		ifmr->ifm_active |= IFM_NONE;
 		IXGBE_CORE_UNLOCK(adapter);
 		return;
 	}

Index: src/sys/dev/pci/ixgbe/ixv.c
diff -u src/sys/dev/pci/ixgbe/ixv.c:1.38 src/sys/dev/pci/ixgbe/ixv.c:1.39
--- src/sys/dev/pci/ixgbe/ixv.c:1.38	Tue Feb  7 04:27:43 2017
+++ src/sys/dev/pci/ixgbe/ixv.c	Wed Feb  8 03:59:12 2017
@@ -31,7 +31,7 @@
 
 ******************************************************************************/
 /*$FreeBSD: head/sys/dev/ixgbe/if_ixv.c 302384 2016-07-07 03:39:18Z sbruno $*/
-/*$NetBSD: ixv.c,v 1.38 2017/02/07 04:27:43 msaitoh Exp $*/
+/*$NetBSD: ixv.c,v 1.39 2017/02/08 03:59:12 msaitoh Exp $*/
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -1020,6 +1020,7 @@ ixv_media_status(struct ifnet * ifp, str
 	ifmr->ifm_active = IFM_ETHER;
 
 	if (!adapter->link_active) {
+		ifmr->ifm_active |= IFM_NONE;
 		IXGBE_CORE_UNLOCK(adapter);
 		return;
 	}

Reply via email to