FreeBSD/sys/dev/ixl/if_ixlv.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 .
void
ixlv_update_link_status(struct ixlv_sc *sc)
{
	struct ixl_vsi		*vsi = &sc->vsi;
	struct ifnet		*ifp = vsi->ifp;
	if (sc->link_up){ 
		if (vsi->link_active == FALSE) {
			if (bootverbose)
				if_printf(ifp,"Link is Up, %d Gbps\n",
				    (sc->link_speed == I40E_LINK_SPEED_40GB) ? 40:10);
			vsi->link_active = TRUE;
			if_link_state_change(ifp, LINK_STATE_UP);
		}
	} else { 
		if (vsi->link_active == TRUE) {
			if (bootverbose)
				if_printf(ifp,"Link is Down\n");
			if_link_state_change(ifp, LINK_STATE_DOWN);
			vsi->link_active = FALSE;
		}
	}
	return;
}
void ixlv_update_link_status ( struct ixlv_sc * sc ) { struct ixl_vsi * vsi = & sc -> vsi ; struct ifnet * ifp = vsi -> ifp ; if ( sc -> link_up ) { if ( vsi -> link_active == FALSE ) { if ( bootverbose ) if_printf ( ifp , " \n " , ( sc -> link_speed == I40E_LINK_SPEED_40GB ) ? 40 : 10 ) ; vsi -> link_active = TRUE ; if_link_state_change ( ifp , LINK_STATE_UP ) ; } } else { if ( vsi -> link_active == TRUE ) { if ( bootverbose ) if_printf ( ifp , " \n " ) ; if_link_state_change ( ifp , LINK_STATE_DOWN ) ; vsi -> 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 */