Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/hyperv/netvsc/hn_nvs.c
Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | |||||
static void hn_nvs_sent_none(struct hn_nvs_sendctx *, | static void hn_nvs_sent_none(struct hn_nvs_sendctx *, | ||||
struct hn_softc *, struct vmbus_channel *, | struct hn_softc *, struct vmbus_channel *, | ||||
const void *, int); | const void *, int); | ||||
struct hn_nvs_sendctx hn_nvs_sendctx_none = | struct hn_nvs_sendctx hn_nvs_sendctx_none = | ||||
HN_NVS_SENDCTX_INITIALIZER(hn_nvs_sent_none, NULL); | HN_NVS_SENDCTX_INITIALIZER(hn_nvs_sent_none, NULL); | ||||
static const uint32_t hn_nvs_version[] = { | static const uint32_t hn_nvs_version[] = { | ||||
HN_NVS_VERSION_61, | |||||
HN_NVS_VERSION_6, | |||||
HN_NVS_VERSION_5, | HN_NVS_VERSION_5, | ||||
HN_NVS_VERSION_4, | HN_NVS_VERSION_4, | ||||
HN_NVS_VERSION_2, | HN_NVS_VERSION_2, | ||||
HN_NVS_VERSION_1 | HN_NVS_VERSION_1 | ||||
}; | }; | ||||
static const void * | static const void * | ||||
hn_nvs_xact_execute(struct hn_softc *sc, struct vmbus_xact *xact, | hn_nvs_xact_execute(struct hn_softc *sc, struct vmbus_xact *xact, | ||||
▲ Show 20 Lines • Show All 412 Lines • ▼ Show 20 Lines | hn_nvs_conf_ndis(struct hn_softc *sc, int mtu) | ||||
int error; | int error; | ||||
memset(&conf, 0, sizeof(conf)); | memset(&conf, 0, sizeof(conf)); | ||||
conf.nvs_type = HN_NVS_TYPE_NDIS_CONF; | conf.nvs_type = HN_NVS_TYPE_NDIS_CONF; | ||||
conf.nvs_mtu = mtu + ETHER_HDR_LEN; | conf.nvs_mtu = mtu + ETHER_HDR_LEN; | ||||
conf.nvs_caps = HN_NVS_NDIS_CONF_VLAN; | conf.nvs_caps = HN_NVS_NDIS_CONF_VLAN; | ||||
if (sc->hn_nvs_ver >= HN_NVS_VERSION_5) | if (sc->hn_nvs_ver >= HN_NVS_VERSION_5) | ||||
conf.nvs_caps |= HN_NVS_NDIS_CONF_SRIOV; | conf.nvs_caps |= HN_NVS_NDIS_CONF_SRIOV; | ||||
if (sc->hn_nvs_ver >= HN_NVS_VERSION_61) | |||||
conf.nvs_caps |= HN_NVS_NDIS_CONF_RSC; | |||||
/* NOTE: No response. */ | /* NOTE: No response. */ | ||||
error = hn_nvs_req_send(sc, &conf, sizeof(conf)); | error = hn_nvs_req_send(sc, &conf, sizeof(conf)); | ||||
if (error) { | if (error) { | ||||
if_printf(sc->hn_ifp, "send nvs ndis conf failed: %d\n", error); | if_printf(sc->hn_ifp, "send nvs ndis conf failed: %d\n", error); | ||||
return (error); | return (error); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 228 Lines • Show Last 20 Lines |