View | Details | Raw Unified | Return to bug 209427 | Differences between
and this patch

Collapse All | Expand All

(-)if_vtnet.c (-11 / +2 lines)
Lines 2800-2806 Link Here
2800
	VTNET_CORE_LOCK_ASSERT(sc);
2802
	VTNET_CORE_LOCK_ASSERT(sc);
2801
2803
2802
	ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
2804
	ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
2803
	sc->vtnet_link_active = 0;
2805
	vtnet_update_link_status(sc);
2804
	callout_stop(&sc->vtnet_tick_ch);
2806
	callout_stop(&sc->vtnet_tick_ch);
2805
2807
2806
	/* Only advisory. */
2808
	/* Only advisory. */
Lines 3494-3513 Link Here
3494
static int
3496
static int
3495
vtnet_is_link_up(struct vtnet_softc *sc)
3497
vtnet_is_link_up(struct vtnet_softc *sc)
3496
{
3498
{
3497
	device_t dev;
3498
	struct ifnet *ifp;
3499
	struct ifnet *ifp;
3499
	uint16_t status;
3500
3500
3501
	dev = sc->vtnet_dev;
3502
	ifp = sc->vtnet_ifp;
3501
	ifp = sc->vtnet_ifp;
3503
3502
3504
	if ((ifp->if_capabilities & IFCAP_LINKSTATE) == 0)
3503
	return ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0);
3505
		status = VIRTIO_NET_S_LINK_UP;
3506
	else
3507
		status = virtio_read_dev_config_2(dev,
3508
		    offsetof(struct virtio_net_config, status));
3509
3510
	return ((status & VIRTIO_NET_S_LINK_UP) != 0);
3511
}
3504
}
3512
3505
3513
static void
3506
static void

Return to bug 209427