Lines Matching refs:req

123 				  struct cpt_request_info *req)
129 if (req->incnt > MAX_SG_IN_CNT || req->outcnt > MAX_SG_OUT_CNT) {
136 g_sz_bytes = ((req->incnt + 3) / 4) * sizeof(struct sglist_component);
137 info->gather_components = kzalloc(g_sz_bytes, req->may_sleep ? GFP_KERNEL : GFP_ATOMIC);
143 ret = setup_sgio_components(cptvf, req->in,
144 req->incnt,
153 s_sz_bytes = ((req->outcnt + 3) / 4) * sizeof(struct sglist_component);
154 info->scatter_components = kzalloc(s_sz_bytes, req->may_sleep ? GFP_KERNEL : GFP_ATOMIC);
160 ret = setup_sgio_components(cptvf, req->out,
161 req->outcnt,
171 info->in_buffer = kzalloc(info->dlen, req->may_sleep ? GFP_KERNEL : GFP_ATOMIC);
177 ((__be16 *)info->in_buffer)[0] = cpu_to_be16(req->outcnt);
178 ((__be16 *)info->in_buffer)[1] = cpu_to_be16(req->incnt);
198 info->out_buffer = kzalloc(COMPLETION_CODE_SIZE, req->may_sleep ? GFP_KERNEL : GFP_ATOMIC);
275 struct cpt_request_info *req;
289 if (info->req) {
290 req = info->req;
291 for (i = 0; i < req->outcnt; i++) {
292 if (req->out[i].dma_addr)
294 req->out[i].dma_addr,
295 req->out[i].size,
299 for (i = 0; i < req->incnt; i++) {
300 if (req->in[i].dma_addr)
302 req->in[i].dma_addr,
303 req->in[i].size,
410 int process_request(struct cpt_vf *cptvf, struct cpt_request_info *req)
424 info = kzalloc(sizeof(*info), req->may_sleep ? GFP_KERNEL : GFP_ATOMIC);
430 cpt_req = (struct cptvf_request *)&req->req;
431 ctrl = (union ctrl_info *)&req->ctrl;
435 ret = setup_sgio_list(cptvf, info, req);
446 info->completion_addr = kzalloc(sizeof(union cpt_res_s), req->may_sleep ? GFP_KERNEL : GFP_ATOMIC);
506 pentry->callback = req->callback;
507 pentry->callback_arg = req->callback_arg;
515 info->req = req;
558 int cptvf_do_request(void *vfdev, struct cpt_request_info *req)
568 if ((cptvf->vftype == SE_TYPES) && (!req->ctrl.s.se_req)) {
572 } else if ((cptvf->vftype == AE_TYPES) && (req->ctrl.s.se_req)) {
578 return process_request(cptvf, req);