/** * 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); }
/** * 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 appropraitely. */ static void ntb_transport_link_down(struct ntb_transport_qp *qp) { int rc, val; if (qp == NULL) return; qp->client_ready = NTB_LINK_DOWN; rc = ntb_read_remote_spad(qp->ntb, IF_NTB_QP_LINKS, &val); if (rc != 0) return; rc = ntb_write_remote_spad(qp->ntb, IF_NTB_QP_LINKS, val & ~(1 << qp->qp_num)); if (qp->qp_link == NTB_LINK_UP) ntb_send_link_down(qp); else callout_drain(&qp->link_work); }