Lines Matching refs:iue
27 struct iu_entry *iue; in srp_iu_pool_alloc() local
40 for (i = 0, iue = q->items; i < max; i++) { in srp_iu_pool_alloc()
41 kfifo_in(&q->queue, (void *)&iue, sizeof(void *)); in srp_iu_pool_alloc()
42 iue->sbuf = ring[i]; in srp_iu_pool_alloc()
43 iue++; in srp_iu_pool_alloc()
140 struct iu_entry *iue = NULL; in srp_iu_get() local
142 if (kfifo_out_locked(&target->iu_queue.queue, (void *)&iue, in srp_iu_get()
148 if (!iue) in srp_iu_get()
149 return iue; in srp_iu_get()
150 iue->target = target; in srp_iu_get()
151 iue->flags = 0; in srp_iu_get()
152 return iue; in srp_iu_get()
155 void srp_iu_put(struct iu_entry *iue) in srp_iu_put() argument
157 kfifo_in_locked(&iue->target->iu_queue.queue, (void *)&iue, in srp_iu_put()
158 sizeof(void *), &iue->target->iu_queue.lock); in srp_iu_put()
165 struct iu_entry *iue = NULL; in srp_direct_data() local
170 iue = cmd->iue; in srp_direct_data()
172 nsg = dma_map_sg(iue->target->dev, sg, cmd->se_cmd.t_data_nents, in srp_direct_data()
175 pr_err("fail to map %p %d\n", iue, in srp_direct_data()
187 dma_unmap_sg(iue->target->dev, sg, nsg, DMA_BIDIRECTIONAL); in srp_direct_data()
197 struct iu_entry *iue = NULL; in srp_indirect_data() local
205 iue = cmd->iue; in srp_indirect_data()
218 md = dma_alloc_coherent(iue->target->dev, in srp_indirect_data()
243 nsg = dma_map_sg(iue->target->dev, sg, cmd->se_cmd.t_data_nents, in srp_indirect_data()
246 pr_err("fail to map %p %d\n", iue, in srp_indirect_data()
259 dma_unmap_sg(iue->target->dev, sg, nsg, DMA_BIDIRECTIONAL); in srp_indirect_data()
263 dma_free_coherent(iue->target->dev, in srp_indirect_data()