FreeBSD/sys/dev/ixgbe/if_ixv.c
/*
** Note: this routine updates the OS on the link state
**	the real check of the hardware only happens with
**	a link interrupt.
*/
this routine updates the OS on the link state
the real check of the hardware only happens with
a link interrupt.
this routine updates the OS on the link state the real check of the hardware only happens with a link interrupt .
static void
ixv_update_link_status(struct adapter *adapter)
{
	struct ifnet	*ifp = adapter->ifp;
	device_t dev = adapter->dev;
	if (adapter->link_up){ 
		if (adapter->link_active == FALSE) {
			if (bootverbose)
				device_printf(dev,"Link is up %d Gbps %s \n",
				    ((adapter->link_speed == 128)? 10:1),
				    "Full Duplex");
			adapter->link_active = TRUE;
			if_link_state_change(ifp, LINK_STATE_UP);
		}
	} else { 
		if (adapter->link_active == TRUE) {
			if (bootverbose)
				device_printf(dev,"Link is Down\n");
			if_link_state_change(ifp, LINK_STATE_DOWN);
			adapter->link_active = FALSE;
		}
	}
	return;
}
static void ixv_update_link_status ( struct adapter * adapter ) { struct ifnet * ifp = adapter -> ifp ; device_t dev = adapter -> dev ; if ( adapter -> link_up ) { if ( adapter -> link_active == FALSE ) { if ( bootverbose ) device_printf ( dev , " \n " , ( ( adapter -> link_speed == 128 ) ? 10 : 1 ) , " " ) ; adapter -> link_active = TRUE ; if_link_state_change ( ifp , LINK_STATE_UP ) ; } } else { if ( adapter -> link_active == TRUE ) { if ( bootverbose ) device_printf ( dev , " \n " ) ; if_link_state_change ( ifp , LINK_STATE_DOWN ) ; adapter -> link_active = FALSE ; } } return ; }
Note: this routine updates the OS on the link state
the real check of the hardware only happens with
a link interrupt.
Note : this routine updates the OS on the link state the real check of the hardware only happens with a link interrupt .
/* Link down */