Lines Matching refs:vnic_sdma

42 	struct hfi1_vnic_sdma *vnic_sdma = tx->sdma;  in vnic_sdma_complete()  local
44 sdma_txclean(vnic_sdma->dd, txreq); in vnic_sdma_complete()
46 kmem_cache_free(vnic_sdma->dd->vnic.txreq_cache, tx); in vnic_sdma_complete()
130 struct hfi1_vnic_sdma *vnic_sdma = &vinfo->sdma[q_idx]; in hfi1_vnic_send_dma() local
131 struct sdma_engine *sde = vnic_sdma->sde; in hfi1_vnic_send_dma()
135 if (unlikely(READ_ONCE(vnic_sdma->state) != HFI1_VNIC_SDMA_Q_ACTIVE)) in hfi1_vnic_send_dma()
147 tx->sdma = vnic_sdma; in hfi1_vnic_send_dma()
155 ret = sdma_send_txreq(sde, iowait_get_ib_work(&vnic_sdma->wait), in hfi1_vnic_send_dma()
156 &tx->txreq, vnic_sdma->pkts_sent); in hfi1_vnic_send_dma()
162 vnic_sdma->pkts_sent = true; in hfi1_vnic_send_dma()
163 iowait_starve_clear(vnic_sdma->pkts_sent, &vnic_sdma->wait); in hfi1_vnic_send_dma()
174 vnic_sdma->pkts_sent = false; in hfi1_vnic_send_dma()
192 struct hfi1_vnic_sdma *vnic_sdma = in hfi1_vnic_sdma_sleep() local
201 vnic_sdma->state = HFI1_VNIC_SDMA_Q_DEFERRED; in hfi1_vnic_sdma_sleep()
202 if (list_empty(&vnic_sdma->wait.list)) { in hfi1_vnic_sdma_sleep()
219 struct hfi1_vnic_sdma *vnic_sdma = in hfi1_vnic_sdma_wakeup() local
221 struct hfi1_vnic_vport_info *vinfo = vnic_sdma->vinfo; in hfi1_vnic_sdma_wakeup()
223 vnic_sdma->state = HFI1_VNIC_SDMA_Q_ACTIVE; in hfi1_vnic_sdma_wakeup()
224 if (__netif_subqueue_stopped(vinfo->netdev, vnic_sdma->q_idx)) in hfi1_vnic_sdma_wakeup()
225 netif_wake_subqueue(vinfo->netdev, vnic_sdma->q_idx); in hfi1_vnic_sdma_wakeup()
231 struct hfi1_vnic_sdma *vnic_sdma = &vinfo->sdma[q_idx]; in hfi1_vnic_sdma_write_avail() local
233 return (READ_ONCE(vnic_sdma->state) == HFI1_VNIC_SDMA_Q_ACTIVE); in hfi1_vnic_sdma_write_avail()
241 struct hfi1_vnic_sdma *vnic_sdma = &vinfo->sdma[i]; in hfi1_vnic_sdma_init() local
243 iowait_init(&vnic_sdma->wait, 0, NULL, NULL, in hfi1_vnic_sdma_init()
246 vnic_sdma->sde = &vinfo->dd->per_sdma[i]; in hfi1_vnic_sdma_init()
247 vnic_sdma->dd = vinfo->dd; in hfi1_vnic_sdma_init()
248 vnic_sdma->vinfo = vinfo; in hfi1_vnic_sdma_init()
249 vnic_sdma->q_idx = i; in hfi1_vnic_sdma_init()
250 vnic_sdma->state = HFI1_VNIC_SDMA_Q_ACTIVE; in hfi1_vnic_sdma_init()
253 if (vnic_sdma->sde->descq_cnt > HFI1_VNIC_SDMA_DESC_WTRMRK) { in hfi1_vnic_sdma_init()
256 INIT_LIST_HEAD(&vnic_sdma->stx.list); in hfi1_vnic_sdma_init()
257 vnic_sdma->stx.num_desc = HFI1_VNIC_SDMA_DESC_WTRMRK; in hfi1_vnic_sdma_init()
258 work = iowait_get_ib_work(&vnic_sdma->wait); in hfi1_vnic_sdma_init()
259 list_add_tail(&vnic_sdma->stx.list, &work->tx_head); in hfi1_vnic_sdma_init()