Lines Matching refs:cptvf

6 #include "cptvf.h"
44 static int setup_sgio_components(struct cpt_vf *cptvf, struct buf_ptr *list,
50 struct pci_dev *pdev = cptvf->pdev;
121 static inline int setup_sgio_list(struct cpt_vf *cptvf,
127 struct pci_dev *pdev = cptvf->pdev;
143 ret = setup_sgio_components(cptvf, req->in,
160 ret = setup_sgio_components(cptvf, req->out,
223 static int send_cpt_command(struct cpt_vf *cptvf, union cpt_inst_s *cmd,
226 struct pci_dev *pdev = cptvf->pdev;
233 if (unlikely(qno >= cptvf->nr_queues)) {
235 qno, cptvf->nr_queues);
239 qinfo = &cptvf->cqinfo;
259 cptvf_write_vq_doorbell(cptvf, 1);
266 static void do_request_cleanup(struct cpt_vf *cptvf,
270 struct pci_dev *pdev = cptvf->pdev;
312 static void do_post_process(struct cpt_vf *cptvf, struct cpt_info_buffer *info)
314 struct pci_dev *pdev = cptvf->pdev;
321 do_request_cleanup(cptvf, info);
324 static inline void process_pending_queue(struct cpt_vf *cptvf,
328 struct pci_dev *pdev = cptvf->pdev;
363 do_request_cleanup(cptvf, info);
377 do_request_cleanup(cptvf, info);
397 do_post_process(info->cptvf, info);
406 int process_request(struct cpt_vf *cptvf, struct cpt_request_info *req)
415 struct pci_dev *pdev = cptvf->pdev;
429 info->cptvf = cptvf;
431 ret = setup_sgio_list(cptvf, info, req);
476 pqueue = &cptvf->pqinfo.queue[queue];
480 process_pending_queue(cptvf, &cptvf->pqinfo, queue);
485 pentry = get_free_pending_entry(pqueue, cptvf->pqinfo.qlen);
489 process_pending_queue(cptvf, &cptvf->pqinfo, queue);
524 ret = send_cpt_command(cptvf, &cptinst, queue);
536 do_request_cleanup(cptvf, info);
541 void vq_post_process(struct cpt_vf *cptvf, u32 qno)
543 struct pci_dev *pdev = cptvf->pdev;
545 if (unlikely(qno > cptvf->nr_queues)) {
551 process_pending_queue(cptvf, &cptvf->pqinfo, qno);
556 struct cpt_vf *cptvf = (struct cpt_vf *)vfdev;
557 struct pci_dev *pdev = cptvf->pdev;
559 if (!cpt_device_ready(cptvf)) {
564 if ((cptvf->vftype == SE_TYPES) && (!req->ctrl.s.se_req)) {
566 cptvf->vfid);
568 } else if ((cptvf->vftype == AE_TYPES) && (req->ctrl.s.se_req)) {
570 cptvf->vfid);
574 return process_request(cptvf, req);