FreeBSD/sys/dev/ntb/if_ntb/if_ntb.c
/* Link commanded down */
/**
 * ntb_transport_link_down - Notify NTB transport to no longer enqueue data
 * @qp: NTB transport layer queue to be disabled
 *
 * Notify NTB transport layer of client's desire to no longer receive data on
 * transport queue specified.  It is the client's responsibility to ensure all
 * entries on queue are purged or otherwise handled appropriately.
 */
Link commanded down
ntb_transport_link_down - Notify NTB transport to no longer enqueue data
@qp: NTB transport layer queue to be disabled

Notify NTB transport layer of client's desire to no longer receive data on
transport queue specified.  It is the client's responsibility to ensure all
entries on queue are purged or otherwise handled appropriately.
Link commanded down ntb_transport_link_down - Notify NTB transport to no longer enqueue data @qp : NTB transport layer queue to be disabled Notify NTB transport layer of client ' s desire to no longer receive data on transport queue specified . It is the client ' s responsibility to ensure all entries on queue are purged or otherwise handled appropriately .
static void
ntb_transport_link_down(struct ntb_transport_qp *qp)
{
	uint32_t val;
	if (qp == NULL)
		return;
	qp->client_ready = false;
	ntb_spad_read(qp->ntb, IF_NTB_QP_LINKS, &val);
	ntb_peer_spad_write(qp->ntb, IF_NTB_QP_LINKS,
	   val & ~(1 << qp->qp_num));
	if (qp->link_is_up)
		ntb_send_link_down(qp);
	else
		callout_drain(&qp->link_work);
}
static void ntb_transport_link_down ( struct ntb_transport_qp * qp ) { uint32_t val ; if ( qp == NULL ) return ; qp -> client_ready = false ; ntb_spad_read ( qp -> ntb , IF_NTB_QP_LINKS , & val ) ; ntb_peer_spad_write ( qp -> ntb , IF_NTB_QP_LINKS , val & ~ ( 1 << qp -> qp_num ) ) ; if ( qp -> link_is_up ) ntb_send_link_down ( qp ) ; else callout_drain ( & qp -> link_work ) ; }
Link commanded down
 ntb_transport_link_down - Notify NTB transport to no longer enqueue data
 @qp: NTB transport layer queue to be disabled
Link commanded down ntb_transport_link_down - Notify NTB transport to no longer enqueue data @qp : NTB transport layer queue to be disabled