FreeBSD/sys/dev/ntb/ntb_hw/ntb_hw.c
/**
 * ntb_link_is_up() - get the current ntb link state
 * @ntb:        NTB device context
 * @speed:      OUT - The link speed expressed as PCIe generation number
 * @width:      OUT - The link width expressed as the number of PCIe lanes
 *
 * RETURNS: true or false based on the hardware link state
 */
get the current ntb link state
@ntb:        NTB device context
@speed:      OUT - The link speed expressed as PCIe generation number
@width:      OUT - The link width expressed as the number of PCIe lanes

true or false based on the hardware link state
get the current ntb link state @ntb : NTB device context @speed : OUT - The link speed expressed as PCIe generation number @width : OUT - The link width expressed as the number of PCIe lanes true or false based on the hardware link state
bool
ntb_link_is_up(struct ntb_softc *ntb, enum ntb_speed *speed,
    enum ntb_width *width)
{
	if (speed != NULL)
		*speed = ntb_link_sta_speed(ntb);
	if (width != NULL)
		*width = ntb_link_sta_width(ntb);
	return (link_is_up(ntb));
}
bool ntb_link_is_up ( struct ntb_softc * ntb , enum ntb_speed * speed , enum ntb_width * width ) { if ( speed != NULL ) * speed = ntb_link_sta_speed ( ntb ) ; if ( width != NULL ) * width = ntb_link_sta_width ( ntb ) ; return ( link_is_up ( ntb ) ) ; }
ntb_link_is_up() - get the current ntb link state
 @ntb:        NTB device context
 @speed:      OUT - The link speed expressed as PCIe generation number
 @width:      OUT - The link width expressed as the number of PCIe lanes
ntb_link_is_up () - get the current ntb link state @ntb : NTB device context @speed : OUT - The link speed expressed as PCIe generation number @width : OUT - The link width expressed as the number of PCIe lanes