Lines Matching defs:fc_req
356 static void zfcp_fc_ns_gid_pn_eval(struct zfcp_fc_req *fc_req)
358 struct zfcp_fsf_ct_els *ct_els = &fc_req->ct_els;
359 struct zfcp_fc_gid_pn_rsp *gid_pn_rsp = &fc_req->u.gid_pn.rsp;
385 struct zfcp_fc_req *fc_req)
389 struct zfcp_fc_gid_pn_req *gid_pn_req = &fc_req->u.gid_pn.req;
390 struct zfcp_fc_gid_pn_rsp *gid_pn_rsp = &fc_req->u.gid_pn.rsp;
394 fc_req->ct_els.port = port;
395 fc_req->ct_els.handler = zfcp_fc_complete;
396 fc_req->ct_els.handler_data = &completion;
397 fc_req->ct_els.req = &fc_req->sg_req;
398 fc_req->ct_els.resp = &fc_req->sg_rsp;
399 sg_init_one(&fc_req->sg_req, gid_pn_req, sizeof(*gid_pn_req));
400 sg_init_one(&fc_req->sg_rsp, gid_pn_rsp, sizeof(*gid_pn_rsp));
406 ret = zfcp_fsf_send_ct(&adapter->gs->ds, &fc_req->ct_els,
411 zfcp_fc_ns_gid_pn_eval(fc_req);
424 struct zfcp_fc_req *fc_req;
427 fc_req = mempool_alloc(adapter->pool.gid_pn, GFP_ATOMIC);
428 if (!fc_req)
431 memset(fc_req, 0, sizeof(*fc_req));
437 ret = zfcp_fc_ns_gid_pn_request(port, fc_req);
441 mempool_free(fc_req, adapter->pool.gid_pn);
514 struct zfcp_fc_req *fc_req = data;
515 struct zfcp_port *port = fc_req->ct_els.port;
516 struct fc_els_adisc *adisc_resp = &fc_req->u.adisc.rsp;
518 if (fc_req->ct_els.status) {
541 kmem_cache_free(zfcp_fc_req_cache, fc_req);
546 struct zfcp_fc_req *fc_req;
552 fc_req = kmem_cache_zalloc(zfcp_fc_req_cache, GFP_ATOMIC);
553 if (!fc_req)
556 fc_req->ct_els.port = port;
557 fc_req->ct_els.req = &fc_req->sg_req;
558 fc_req->ct_els.resp = &fc_req->sg_rsp;
559 sg_init_one(&fc_req->sg_req, &fc_req->u.adisc.req,
561 sg_init_one(&fc_req->sg_rsp, &fc_req->u.adisc.rsp,
564 fc_req->ct_els.handler = zfcp_fc_adisc_handler;
565 fc_req->ct_els.handler_data = fc_req;
569 fc_req->u.adisc.req.adisc_wwpn = cpu_to_be64(fc_host_port_name(shost));
570 fc_req->u.adisc.req.adisc_wwnn = cpu_to_be64(fc_host_node_name(shost));
571 fc_req->u.adisc.req.adisc_cmd = ELS_ADISC;
572 hton24(fc_req->u.adisc.req.adisc_port_id, fc_host_port_id(shost));
582 ret = zfcp_fsf_send_els(adapter, d_id, &fc_req->ct_els,
585 kmem_cache_free(zfcp_fc_req_cache, fc_req);
675 struct zfcp_fc_req *fc_req;
677 fc_req = kmem_cache_zalloc(zfcp_fc_req_cache, GFP_KERNEL);
678 if (!fc_req)
681 if (zfcp_fc_sg_setup_table(&fc_req->sg_rsp, buf_num)) {
682 kmem_cache_free(zfcp_fc_req_cache, fc_req);
686 sg_init_one(&fc_req->sg_req, &fc_req->u.gpn_ft.req,
689 return fc_req;
692 static int zfcp_fc_send_gpn_ft(struct zfcp_fc_req *fc_req,
695 struct zfcp_fsf_ct_els *ct_els = &fc_req->ct_els;
696 struct zfcp_fc_gpn_ft_req *req = &fc_req->u.gpn_ft.req;
705 ct_els->req = &fc_req->sg_req;
706 ct_els->resp = &fc_req->sg_rsp;
729 static int zfcp_fc_eval_gpn_ft(struct zfcp_fc_req *fc_req,
732 struct zfcp_fsf_ct_els *ct_els = &fc_req->ct_els;
733 struct scatterlist *sg = &fc_req->sg_rsp;
808 struct zfcp_fc_req *fc_req;
825 fc_req = zfcp_fc_alloc_sg_env(buf_num);
826 if (!fc_req)
830 ret = zfcp_fc_send_gpn_ft(fc_req, adapter, max_bytes);
832 ret = zfcp_fc_eval_gpn_ft(fc_req, adapter, max_entries);
839 zfcp_fc_sg_free_table(&fc_req->sg_rsp, buf_num);
840 kmem_cache_free(zfcp_fc_req_cache, fc_req);
846 struct zfcp_fc_req *fc_req)
850 struct zfcp_fsf_ct_els *ct_els = &fc_req->ct_els;
851 struct zfcp_fc_gspn_req *gspn_req = &fc_req->u.gspn.req;
852 struct zfcp_fc_gspn_rsp *gspn_rsp = &fc_req->u.gspn.rsp;
859 sg_init_one(&fc_req->sg_req, gspn_req, sizeof(*gspn_req));
860 sg_init_one(&fc_req->sg_rsp, gspn_rsp, sizeof(*gspn_rsp));
864 ct_els->req = &fc_req->sg_req;
865 ct_els->resp = &fc_req->sg_rsp;
891 struct zfcp_fc_req *fc_req)
895 struct zfcp_fsf_ct_els *ct_els = &fc_req->ct_els;
896 struct zfcp_fc_rspn_req *rspn_req = &fc_req->u.rspn.req;
897 struct fc_ct_hdr *rspn_rsp = &fc_req->u.rspn.rsp;
907 sg_init_one(&fc_req->sg_req, rspn_req, sizeof(*rspn_req));
908 sg_init_one(&fc_req->sg_rsp, rspn_rsp, sizeof(*rspn_rsp));
912 ct_els->req = &fc_req->sg_req;
913 ct_els->resp = &fc_req->sg_rsp;
937 struct zfcp_fc_req *fc_req;
943 fc_req = kmem_cache_zalloc(zfcp_fc_req_cache, GFP_KERNEL);
944 if (!fc_req)
951 ret = zfcp_fc_gspn(adapter, fc_req);
955 memset(fc_req, 0, sizeof(*fc_req));
956 zfcp_fc_rspn(adapter, fc_req);
961 kmem_cache_free(zfcp_fc_req_cache, fc_req);