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:
Sepherosa Ziehau 2016-09-19 07:07:23 +00:00
parent b3ef7604b9
commit 363b7d88f6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=305962

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;