hyperv/hn: Removed unused netvsc_init()
Submitted by: Dexuan Cui <decui microsoft com> Reviewed by: me, adrian, royger, Hongjiang Zhang <honzhan microsoft com> Approved by: adrian (mentor) Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D4594
This commit is contained in:
parent
c48d20d7c7
commit
4f8f2d4274
@ -148,14 +148,6 @@ __FBSDID("$FreeBSD$");
|
||||
((hiwat) >= HN_LRO_HIWAT_MTULIM((sc)->hn_ifp) || \
|
||||
(hiwat) <= HN_LRO_HIWAT_MAX)
|
||||
|
||||
/*
|
||||
* Data types
|
||||
*/
|
||||
|
||||
struct hv_netvsc_driver_context {
|
||||
uint32_t drv_inited;
|
||||
};
|
||||
|
||||
/*
|
||||
* Be aware that this sleepable mutex will exhibit WITNESS errors when
|
||||
* certain TCP and ARP code paths are taken. This appears to be a
|
||||
@ -178,9 +170,6 @@ struct hv_netvsc_driver_context {
|
||||
|
||||
int hv_promisc_mode = 0; /* normal mode by default */
|
||||
|
||||
/* The one and only one */
|
||||
static struct hv_netvsc_driver_context g_netvsc_drv;
|
||||
|
||||
/* Trust tcp segements verification on host side. */
|
||||
static int hn_trust_hosttcp = 0;
|
||||
TUNABLE_INT("dev.hn.trust_hosttcp", &hn_trust_hosttcp);
|
||||
@ -289,37 +278,6 @@ hn_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr)
|
||||
ifmr->ifm_active |= IFM_10G_T | IFM_FDX;
|
||||
}
|
||||
|
||||
/*
|
||||
* NetVsc driver initialization
|
||||
* Note: Filter init is no longer required
|
||||
*/
|
||||
static int
|
||||
netvsc_drv_init(void)
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* NetVsc global initialization entry point
|
||||
*/
|
||||
static void
|
||||
netvsc_init(void)
|
||||
{
|
||||
if (bootverbose)
|
||||
printf("Netvsc initializing... ");
|
||||
|
||||
/*
|
||||
* XXXKYS: cleanup initialization
|
||||
*/
|
||||
if (!cold && !g_netvsc_drv.drv_inited) {
|
||||
g_netvsc_drv.drv_inited = 1;
|
||||
netvsc_drv_init();
|
||||
if (bootverbose)
|
||||
printf("done!\n");
|
||||
} else if (bootverbose)
|
||||
printf("Already initialized!\n");
|
||||
}
|
||||
|
||||
/* {F8615163-DF3E-46c5-913F-F2D2F965ED0E} */
|
||||
static const hv_guid g_net_vsc_device_type = {
|
||||
.data = {0x63, 0x51, 0x61, 0xF8, 0x3E, 0xDF, 0xc5, 0x46,
|
||||
@ -365,8 +323,6 @@ netvsc_attach(device_t dev)
|
||||
struct sysctl_ctx_list *ctx;
|
||||
int ret;
|
||||
|
||||
netvsc_init();
|
||||
|
||||
sc = device_get_softc(dev);
|
||||
if (sc == NULL) {
|
||||
return (ENOMEM);
|
||||
@ -1608,6 +1564,3 @@ static devclass_t netvsc_devclass;
|
||||
DRIVER_MODULE(hn, vmbus, netvsc_driver, netvsc_devclass, 0, 0);
|
||||
MODULE_VERSION(hn, 1);
|
||||
MODULE_DEPEND(hn, vmbus, 1, 1, 1);
|
||||
SYSINIT(netvsc_initx, SI_SUB_KTHREAD_IDLE, SI_ORDER_MIDDLE + 1, netvsc_init,
|
||||
NULL);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user