Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Dec 2017 19:22:44 +0000 (UTC)
From:      Bryan Venteicher <bryanv@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r326751 - stable/11/sys/dev/vmware/vmxnet3
Message-ID:  <201712101922.vBAJMiGb089804@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bryanv
Date: Sun Dec 10 19:22:43 2017
New Revision: 326751
URL: https://svnweb.freebsd.org/changeset/base/326751

Log:
  MFC r326744:
  
  Correctly report the vmxnet3 link down media status

Modified:
  stable/11/sys/dev/vmware/vmxnet3/if_vmx.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/vmware/vmxnet3/if_vmx.c
==============================================================================
--- stable/11/sys/dev/vmware/vmxnet3/if_vmx.c	Sun Dec 10 18:55:42 2017	(r326750)
+++ stable/11/sys/dev/vmware/vmxnet3/if_vmx.c	Sun Dec 10 19:22:43 2017	(r326751)
@@ -3485,14 +3485,15 @@ vmxnet3_media_status(struct ifnet *ifp, struct ifmedia
 
 	sc = ifp->if_softc;
 
-	ifmr->ifm_active = IFM_ETHER | IFM_AUTO;
 	ifmr->ifm_status = IFM_AVALID;
+	ifmr->ifm_active = IFM_ETHER;
 
 	VMXNET3_CORE_LOCK(sc);
-	if (vmxnet3_link_is_up(sc) != 0)
+	if (vmxnet3_link_is_up(sc) != 0) {
 		ifmr->ifm_status |= IFM_ACTIVE;
-	else
-		ifmr->ifm_status |= IFM_NONE;
+		ifmr->ifm_active |= IFM_AUTO;
+	} else
+		ifmr->ifm_active |= IFM_NONE;
 	VMXNET3_CORE_UNLOCK(sc);
 }
 



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