Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/hyperv/netvsc/if_hn.c
Show First 20 Lines • Show All 574 Lines • ▼ Show 20 Lines | hn_rss_key_default[NDIS_HASH_KEYSIZE_TOEPLITZ] = { | ||||
0x6d, 0x5a, 0x56, 0xda, 0x25, 0x5b, 0x0e, 0xc2, | 0x6d, 0x5a, 0x56, 0xda, 0x25, 0x5b, 0x0e, 0xc2, | ||||
0x41, 0x67, 0x25, 0x3d, 0x43, 0xa3, 0x8f, 0xb0, | 0x41, 0x67, 0x25, 0x3d, 0x43, 0xa3, 0x8f, 0xb0, | ||||
0xd0, 0xca, 0x2b, 0xcb, 0xae, 0x7b, 0x30, 0xb4, | 0xd0, 0xca, 0x2b, 0xcb, 0xae, 0x7b, 0x30, 0xb4, | ||||
0x77, 0xcb, 0x2d, 0xa3, 0x80, 0x30, 0xf2, 0x0c, | 0x77, 0xcb, 0x2d, 0xa3, 0x80, 0x30, 0xf2, 0x0c, | ||||
0x6a, 0x42, 0xb7, 0x3b, 0xbe, 0xac, 0x01, 0xfa | 0x6a, 0x42, 0xb7, 0x3b, 0xbe, 0xac, 0x01, 0xfa | ||||
}; | }; | ||||
#endif /* !RSS */ | #endif /* !RSS */ | ||||
static const struct hyperv_guid hn_guid = { | |||||
.hv_guid = { | |||||
0x63, 0x51, 0x61, 0xf8, 0x3e, 0xdf, 0xc5, 0x46, | |||||
0x91, 0x3f, 0xf2, 0xd2, 0xf9, 0x65, 0xed, 0x0e } | |||||
}; | |||||
static device_method_t hn_methods[] = { | static device_method_t hn_methods[] = { | ||||
/* Device interface */ | /* Device interface */ | ||||
DEVMETHOD(device_probe, hn_probe), | DEVMETHOD(device_probe, hn_probe), | ||||
DEVMETHOD(device_attach, hn_attach), | DEVMETHOD(device_attach, hn_attach), | ||||
DEVMETHOD(device_detach, hn_detach), | DEVMETHOD(device_detach, hn_detach), | ||||
DEVMETHOD(device_shutdown, hn_shutdown), | DEVMETHOD(device_shutdown, hn_shutdown), | ||||
DEVMETHOD_END | DEVMETHOD_END | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 1,115 Lines • ▼ Show 20 Lines | |||||
hn_ifnet_lnkevent(void *xsc, struct ifnet *ifp, int link_state) | hn_ifnet_lnkevent(void *xsc, struct ifnet *ifp, int link_state) | ||||
{ | { | ||||
struct hn_softc *sc = xsc; | struct hn_softc *sc = xsc; | ||||
if (sc->hn_vf_ifp == ifp) | if (sc->hn_vf_ifp == ifp) | ||||
if_link_state_change(sc->hn_ifp, link_state); | if_link_state_change(sc->hn_ifp, link_state); | ||||
} | } | ||||
/* {F8615163-DF3E-46c5-913F-F2D2F965ED0E} */ | |||||
static const struct hyperv_guid g_net_vsc_device_type = { | |||||
.hv_guid = {0x63, 0x51, 0x61, 0xF8, 0x3E, 0xDF, 0xc5, 0x46, | |||||
0x91, 0x3F, 0xF2, 0xD2, 0xF9, 0x65, 0xED, 0x0E} | |||||
}; | |||||
static int | static int | ||||
hn_probe(device_t dev) | hn_probe(device_t dev) | ||||
{ | { | ||||
if (VMBUS_PROBE_GUID(device_get_parent(dev), dev, | if (VMBUS_PROBE_GUID(device_get_parent(dev), dev, &hn_guid) == 0) { | ||||
&g_net_vsc_device_type) == 0) { | |||||
device_set_desc(dev, "Hyper-V Network Interface"); | device_set_desc(dev, "Hyper-V Network Interface"); | ||||
return BUS_PROBE_DEFAULT; | return BUS_PROBE_DEFAULT; | ||||
} | } | ||||
return ENXIO; | return ENXIO; | ||||
} | } | ||||
static int | static int | ||||
hn_attach(device_t dev) | hn_attach(device_t dev) | ||||
▲ Show 20 Lines • Show All 5,274 Lines • Show Last 20 Lines |