Date: Mon, 19 Sep 2016 07:07:23 +0000 (UTC) From: Sepherosa Ziehau <sephe@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305962 - head/sys/dev/hyperv/netvsc Message-ID: <201609190707.u8J77NWh027643@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sephe Date: Mon Sep 19 07:07:23 2016 New Revision: 305962 URL: https://svnweb.freebsd.org/changeset/base/305962 Log: hyperv/hn: Don't allow NVS and NDIS version change upon reinitailization NVS and NDIS version change would break too much assumption and static configuration. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7919 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.c Mon Sep 19 06:59:17 2016 (r305961) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.c Mon Sep 19 07:07:23 2016 (r305962) @@ -495,6 +495,22 @@ hn_nvs_init(struct hn_softc *sc) { int i; + if (device_is_attached(sc->hn_dev)) { + /* + * NVS version and NDIS version MUST NOT be changed. + */ + if (bootverbose) { + if_printf(sc->hn_ifp, "reinit NVS version 0x%x, " + "NDIS version %u.%u\n", sc->hn_nvs_ver, + HN_NDIS_VERSION_MAJOR(sc->hn_ndis_ver), + HN_NDIS_VERSION_MINOR(sc->hn_ndis_ver)); + } + return (hn_nvs_doinit(sc, sc->hn_nvs_ver)); + } + + /* + * Find the supported NVS version and set NDIS version accordingly. + */ for (i = 0; i < nitems(hn_nvs_version); ++i) { int error;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609190707.u8J77NWh027643>