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
This commit is contained in:
sephe 2016-09-19 07:07:23 +00:00
parent 948205c949
commit 80dd1ec11d

View File

@ -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;