Lines Matching refs:iue
36 struct iu_entry *iue; in srp_iu_pool_alloc() local
49 for (i = 0, iue = q->items; i < max; i++) { in srp_iu_pool_alloc()
50 kfifo_in(&q->queue, (void *)&iue, sizeof(void *)); in srp_iu_pool_alloc()
51 iue->sbuf = ring[i]; in srp_iu_pool_alloc()
52 iue++; in srp_iu_pool_alloc()
149 struct iu_entry *iue = NULL; in srp_iu_get() local
151 if (kfifo_out_locked(&target->iu_queue.queue, (void *)&iue, in srp_iu_get()
157 if (!iue) in srp_iu_get()
158 return iue; in srp_iu_get()
159 iue->target = target; in srp_iu_get()
160 iue->flags = 0; in srp_iu_get()
161 return iue; in srp_iu_get()
164 void srp_iu_put(struct iu_entry *iue) in srp_iu_put() argument
166 kfifo_in_locked(&iue->target->iu_queue.queue, (void *)&iue, in srp_iu_put()
167 sizeof(void *), &iue->target->iu_queue.lock); in srp_iu_put()
174 struct iu_entry *iue = NULL; in srp_direct_data() local
179 iue = cmd->iue; in srp_direct_data()
181 nsg = dma_map_sg(iue->target->dev, sg, cmd->se_cmd.t_data_nents, in srp_direct_data()
184 pr_err("fail to map %p %d\n", iue, in srp_direct_data()
196 dma_unmap_sg(iue->target->dev, sg, nsg, DMA_BIDIRECTIONAL); in srp_direct_data()
206 struct iu_entry *iue = NULL; in srp_indirect_data() local
214 iue = cmd->iue; in srp_indirect_data()
227 md = dma_alloc_coherent(iue->target->dev, in srp_indirect_data()
252 nsg = dma_map_sg(iue->target->dev, sg, cmd->se_cmd.t_data_nents, in srp_indirect_data()
255 pr_err("fail to map %p %d\n", iue, in srp_indirect_data()
268 dma_unmap_sg(iue->target->dev, sg, nsg, DMA_BIDIRECTIONAL); in srp_indirect_data()
272 dma_free_coherent(iue->target->dev, in srp_indirect_data()