Date: Tue, 17 Oct 2017 09:36:02 -0500 From: Lewis Donzis <lew@perftech.com> To: freebsd-net@freebsd.org Subject: vmxnet3 driver bug? Message-ID: <0536294F-3709-4E38-AD7C-1A809AAD13A6@perftech.com> References: <398971232.399523.1508250252244.JavaMail.zimbra@perftech.com>
next in thread | previous in thread | raw e-mail | index | archive | help
The VMXNET3 driver appears to have a bug that prevents it from correctly reporting when the link goes down.
There are two lines of code that should be deleted in /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:
@@ -3619,8 +3619,6 @@ vmxnet3_media_status(struct ifnet *ifp, struct ifmediareq *ifmr)
VMXNET3_CORE_LOCK(sc);
if (vmxnet3_link_is_up(sc) != 0)
ifmr->ifm_status |= IFM_ACTIVE;
- else
- ifmr->ifm_status |= IFM_NONE;
VMXNET3_CORE_UNLOCK(sc);
}
IFM_NONE doesn’t belong in the status flags and, coincidentally, is defined with an identical value as IFM_ACTIVE, so it indicates that link is always active.
Thanks,
lew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0536294F-3709-4E38-AD7C-1A809AAD13A6>
