Lines Matching refs:ddp

23 static inline void ixgbe_fcoe_clear_ddp(struct ixgbe_fcoe_ddp *ddp)  in ixgbe_fcoe_clear_ddp()  argument
25 ddp->len = 0; in ixgbe_fcoe_clear_ddp()
26 ddp->err = 1; in ixgbe_fcoe_clear_ddp()
27 ddp->udl = NULL; in ixgbe_fcoe_clear_ddp()
28 ddp->udp = 0UL; in ixgbe_fcoe_clear_ddp()
29 ddp->sgl = NULL; in ixgbe_fcoe_clear_ddp()
30 ddp->sgc = 0; in ixgbe_fcoe_clear_ddp()
49 struct ixgbe_fcoe_ddp *ddp; in ixgbe_fcoe_ddp_put() local
61 ddp = &fcoe->ddp[xid]; in ixgbe_fcoe_ddp_put()
62 if (!ddp->udl) in ixgbe_fcoe_ddp_put()
66 len = ddp->len; in ixgbe_fcoe_ddp_put()
68 if (!ddp->err) in ixgbe_fcoe_ddp_put()
110 if (ddp->sgl) in ixgbe_fcoe_ddp_put()
111 dma_unmap_sg(&adapter->pdev->dev, ddp->sgl, ddp->sgc, in ixgbe_fcoe_ddp_put()
113 if (ddp->pool) { in ixgbe_fcoe_ddp_put()
114 dma_pool_free(ddp->pool, ddp->udl, ddp->udp); in ixgbe_fcoe_ddp_put()
115 ddp->pool = NULL; in ixgbe_fcoe_ddp_put()
118 ixgbe_fcoe_clear_ddp(ddp); in ixgbe_fcoe_ddp_put()
140 struct ixgbe_fcoe_ddp *ddp; in ixgbe_fcoe_ddp_setup() local
168 ddp = &fcoe->ddp[xid]; in ixgbe_fcoe_ddp_setup()
169 if (ddp->sgl) { in ixgbe_fcoe_ddp_setup()
171 xid, ddp->sgl, ddp->sgc); in ixgbe_fcoe_ddp_setup()
174 ixgbe_fcoe_clear_ddp(ddp); in ixgbe_fcoe_ddp_setup()
196 ddp->udl = dma_pool_alloc(ddp_pool->pool, GFP_ATOMIC, &ddp->udp); in ixgbe_fcoe_ddp_setup()
197 if (!ddp->udl) { in ixgbe_fcoe_ddp_setup()
201 ddp->pool = ddp_pool->pool; in ixgbe_fcoe_ddp_setup()
202 ddp->sgl = sgl; in ixgbe_fcoe_ddp_setup()
203 ddp->sgc = sgc; in ixgbe_fcoe_ddp_setup()
234 ddp->udl[j] = (u64)(addr - thisoff); in ixgbe_fcoe_ddp_setup()
256 ddp->udl[j] = (u64)(fcoe->extra_ddp_buffer_dma); in ixgbe_fcoe_ddp_setup()
293 ddp->udp & DMA_BIT_MASK(32)); in ixgbe_fcoe_ddp_setup()
294 IXGBE_WRITE_REG(hw, IXGBE_FCDDC(1, xid), (u64)ddp->udp >> 32); in ixgbe_fcoe_ddp_setup()
305 IXGBE_WRITE_REG(hw, IXGBE_FCPTRL, ddp->udp & DMA_BIT_MASK(32)); in ixgbe_fcoe_ddp_setup()
306 IXGBE_WRITE_REG(hw, IXGBE_FCPTRH, (u64)ddp->udp >> 32); in ixgbe_fcoe_ddp_setup()
320 dma_pool_free(ddp->pool, ddp->udl, ddp->udp); in ixgbe_fcoe_ddp_setup()
321 ixgbe_fcoe_clear_ddp(ddp); in ixgbe_fcoe_ddp_setup()
389 struct ixgbe_fcoe_ddp *ddp; in ixgbe_fcoe_ddp() local
424 ddp = &fcoe->ddp[xid]; in ixgbe_fcoe_ddp()
425 if (!ddp->udl) in ixgbe_fcoe_ddp()
437 ddp->len = le32_to_cpu(rx_desc->wb.lower.hi_dword.rss); in ixgbe_fcoe_ddp()
442 dma_unmap_sg(&adapter->pdev->dev, ddp->sgl, in ixgbe_fcoe_ddp()
443 ddp->sgc, DMA_FROM_DEVICE); in ixgbe_fcoe_ddp()
444 ddp->err = (__force u32)ddp_err; in ixgbe_fcoe_ddp()
445 ddp->sgl = NULL; in ixgbe_fcoe_ddp()
446 ddp->sgc = 0; in ixgbe_fcoe_ddp()
451 ddp->len = le32_to_cpu(rx_desc->wb.lower.hi_dword.rss); in ixgbe_fcoe_ddp()
452 if (ddp->len) in ixgbe_fcoe_ddp()
453 rc = ddp->len; in ixgbe_fcoe_ddp()