Lines Matching refs:mw
153 struct ntb_transport_mw mw[NTB_NUM_MW]; member
481 WARN_ON(nt->mw[mw_num].virt_addr == NULL); in ntb_transport_setup_qp_mw()
488 rx_size = (unsigned int) nt->mw[mw_num].size / num_qps_mw; in ntb_transport_setup_qp_mw()
489 qp->remote_rx_info = nt->mw[mw_num].virt_addr + in ntb_transport_setup_qp_mw()
515 struct ntb_transport_mw *mw = &nt->mw[num_mw]; in ntb_free_mw() local
518 if (!mw->virt_addr) in ntb_free_mw()
521 dma_free_coherent(&pdev->dev, mw->size, mw->virt_addr, mw->dma_addr); in ntb_free_mw()
522 mw->virt_addr = NULL; in ntb_free_mw()
527 struct ntb_transport_mw *mw = &nt->mw[num_mw]; in ntb_set_mw() local
531 if (mw->size == ALIGN(size, 4096)) in ntb_set_mw()
534 if (mw->size != 0) in ntb_set_mw()
538 mw->size = ALIGN(size, 4096); in ntb_set_mw()
540 mw->virt_addr = dma_alloc_coherent(&pdev->dev, mw->size, &mw->dma_addr, in ntb_set_mw()
542 if (!mw->virt_addr) { in ntb_set_mw()
543 mw->size = 0; in ntb_set_mw()
545 (int) mw->size); in ntb_set_mw()
550 ntb_set_mw_addr(nt->ndev, num_mw, mw->dma_addr); in ntb_set_mw()