Lines Matching refs:fc_req
332 static void zfcp_fc_ns_gid_pn_eval(struct zfcp_fc_req *fc_req) in zfcp_fc_ns_gid_pn_eval() argument
334 struct zfcp_fsf_ct_els *ct_els = &fc_req->ct_els; in zfcp_fc_ns_gid_pn_eval()
335 struct zfcp_fc_gid_pn_rsp *gid_pn_rsp = &fc_req->u.gid_pn.rsp; in zfcp_fc_ns_gid_pn_eval()
361 struct zfcp_fc_req *fc_req) in zfcp_fc_ns_gid_pn_request() argument
365 struct zfcp_fc_gid_pn_req *gid_pn_req = &fc_req->u.gid_pn.req; in zfcp_fc_ns_gid_pn_request()
366 struct zfcp_fc_gid_pn_rsp *gid_pn_rsp = &fc_req->u.gid_pn.rsp; in zfcp_fc_ns_gid_pn_request()
370 fc_req->ct_els.port = port; in zfcp_fc_ns_gid_pn_request()
371 fc_req->ct_els.handler = zfcp_fc_complete; in zfcp_fc_ns_gid_pn_request()
372 fc_req->ct_els.handler_data = &completion; in zfcp_fc_ns_gid_pn_request()
373 fc_req->ct_els.req = &fc_req->sg_req; in zfcp_fc_ns_gid_pn_request()
374 fc_req->ct_els.resp = &fc_req->sg_rsp; in zfcp_fc_ns_gid_pn_request()
375 sg_init_one(&fc_req->sg_req, gid_pn_req, sizeof(*gid_pn_req)); in zfcp_fc_ns_gid_pn_request()
376 sg_init_one(&fc_req->sg_rsp, gid_pn_rsp, sizeof(*gid_pn_rsp)); in zfcp_fc_ns_gid_pn_request()
382 ret = zfcp_fsf_send_ct(&adapter->gs->ds, &fc_req->ct_els, in zfcp_fc_ns_gid_pn_request()
387 zfcp_fc_ns_gid_pn_eval(fc_req); in zfcp_fc_ns_gid_pn_request()
400 struct zfcp_fc_req *fc_req; in zfcp_fc_ns_gid_pn() local
403 fc_req = mempool_alloc(adapter->pool.gid_pn, GFP_ATOMIC); in zfcp_fc_ns_gid_pn()
404 if (!fc_req) in zfcp_fc_ns_gid_pn()
407 memset(fc_req, 0, sizeof(*fc_req)); in zfcp_fc_ns_gid_pn()
413 ret = zfcp_fc_ns_gid_pn_request(port, fc_req); in zfcp_fc_ns_gid_pn()
417 mempool_free(fc_req, adapter->pool.gid_pn); in zfcp_fc_ns_gid_pn()
490 struct zfcp_fc_req *fc_req = data; in zfcp_fc_adisc_handler() local
491 struct zfcp_port *port = fc_req->ct_els.port; in zfcp_fc_adisc_handler()
492 struct fc_els_adisc *adisc_resp = &fc_req->u.adisc.rsp; in zfcp_fc_adisc_handler()
494 if (fc_req->ct_els.status) { in zfcp_fc_adisc_handler()
516 kmem_cache_free(zfcp_fc_req_cache, fc_req); in zfcp_fc_adisc_handler()
521 struct zfcp_fc_req *fc_req; in zfcp_fc_adisc() local
526 fc_req = kmem_cache_zalloc(zfcp_fc_req_cache, GFP_ATOMIC); in zfcp_fc_adisc()
527 if (!fc_req) in zfcp_fc_adisc()
530 fc_req->ct_els.port = port; in zfcp_fc_adisc()
531 fc_req->ct_els.req = &fc_req->sg_req; in zfcp_fc_adisc()
532 fc_req->ct_els.resp = &fc_req->sg_rsp; in zfcp_fc_adisc()
533 sg_init_one(&fc_req->sg_req, &fc_req->u.adisc.req, in zfcp_fc_adisc()
535 sg_init_one(&fc_req->sg_rsp, &fc_req->u.adisc.rsp, in zfcp_fc_adisc()
538 fc_req->ct_els.handler = zfcp_fc_adisc_handler; in zfcp_fc_adisc()
539 fc_req->ct_els.handler_data = fc_req; in zfcp_fc_adisc()
543 fc_req->u.adisc.req.adisc_wwpn = cpu_to_be64(fc_host_port_name(shost)); in zfcp_fc_adisc()
544 fc_req->u.adisc.req.adisc_wwnn = cpu_to_be64(fc_host_node_name(shost)); in zfcp_fc_adisc()
545 fc_req->u.adisc.req.adisc_cmd = ELS_ADISC; in zfcp_fc_adisc()
546 hton24(fc_req->u.adisc.req.adisc_port_id, fc_host_port_id(shost)); in zfcp_fc_adisc()
548 ret = zfcp_fsf_send_els(adapter, port->d_id, &fc_req->ct_els, in zfcp_fc_adisc()
551 kmem_cache_free(zfcp_fc_req_cache, fc_req); in zfcp_fc_adisc()
602 struct zfcp_fc_req *fc_req; in zfcp_fc_alloc_sg_env() local
604 fc_req = kmem_cache_zalloc(zfcp_fc_req_cache, GFP_KERNEL); in zfcp_fc_alloc_sg_env()
605 if (!fc_req) in zfcp_fc_alloc_sg_env()
608 if (zfcp_sg_setup_table(&fc_req->sg_rsp, buf_num)) { in zfcp_fc_alloc_sg_env()
609 kmem_cache_free(zfcp_fc_req_cache, fc_req); in zfcp_fc_alloc_sg_env()
613 sg_init_one(&fc_req->sg_req, &fc_req->u.gpn_ft.req, in zfcp_fc_alloc_sg_env()
616 return fc_req; in zfcp_fc_alloc_sg_env()
619 static int zfcp_fc_send_gpn_ft(struct zfcp_fc_req *fc_req, in zfcp_fc_send_gpn_ft() argument
622 struct zfcp_fsf_ct_els *ct_els = &fc_req->ct_els; in zfcp_fc_send_gpn_ft()
623 struct zfcp_fc_gpn_ft_req *req = &fc_req->u.gpn_ft.req; in zfcp_fc_send_gpn_ft()
632 ct_els->req = &fc_req->sg_req; in zfcp_fc_send_gpn_ft()
633 ct_els->resp = &fc_req->sg_rsp; in zfcp_fc_send_gpn_ft()
656 static int zfcp_fc_eval_gpn_ft(struct zfcp_fc_req *fc_req, in zfcp_fc_eval_gpn_ft() argument
659 struct zfcp_fsf_ct_els *ct_els = &fc_req->ct_els; in zfcp_fc_eval_gpn_ft()
660 struct scatterlist *sg = &fc_req->sg_rsp; in zfcp_fc_eval_gpn_ft()
735 struct zfcp_fc_req *fc_req; in zfcp_fc_scan_ports() local
752 fc_req = zfcp_fc_alloc_sg_env(buf_num); in zfcp_fc_scan_ports()
753 if (!fc_req) in zfcp_fc_scan_ports()
757 ret = zfcp_fc_send_gpn_ft(fc_req, adapter, max_bytes); in zfcp_fc_scan_ports()
759 ret = zfcp_fc_eval_gpn_ft(fc_req, adapter, max_entries); in zfcp_fc_scan_ports()
766 zfcp_sg_free_table(&fc_req->sg_rsp, buf_num); in zfcp_fc_scan_ports()
767 kmem_cache_free(zfcp_fc_req_cache, fc_req); in zfcp_fc_scan_ports()
773 struct zfcp_fc_req *fc_req) in zfcp_fc_gspn() argument
777 struct zfcp_fsf_ct_els *ct_els = &fc_req->ct_els; in zfcp_fc_gspn()
778 struct zfcp_fc_gspn_req *gspn_req = &fc_req->u.gspn.req; in zfcp_fc_gspn()
779 struct zfcp_fc_gspn_rsp *gspn_rsp = &fc_req->u.gspn.rsp; in zfcp_fc_gspn()
786 sg_init_one(&fc_req->sg_req, gspn_req, sizeof(*gspn_req)); in zfcp_fc_gspn()
787 sg_init_one(&fc_req->sg_rsp, gspn_rsp, sizeof(*gspn_rsp)); in zfcp_fc_gspn()
791 ct_els->req = &fc_req->sg_req; in zfcp_fc_gspn()
792 ct_els->resp = &fc_req->sg_rsp; in zfcp_fc_gspn()
818 struct zfcp_fc_req *fc_req) in zfcp_fc_rspn() argument
822 struct zfcp_fsf_ct_els *ct_els = &fc_req->ct_els; in zfcp_fc_rspn()
823 struct zfcp_fc_rspn_req *rspn_req = &fc_req->u.rspn.req; in zfcp_fc_rspn()
824 struct fc_ct_hdr *rspn_rsp = &fc_req->u.rspn.rsp; in zfcp_fc_rspn()
834 sg_init_one(&fc_req->sg_req, rspn_req, sizeof(*rspn_req)); in zfcp_fc_rspn()
835 sg_init_one(&fc_req->sg_rsp, rspn_rsp, sizeof(*rspn_rsp)); in zfcp_fc_rspn()
839 ct_els->req = &fc_req->sg_req; in zfcp_fc_rspn()
840 ct_els->resp = &fc_req->sg_rsp; in zfcp_fc_rspn()
864 struct zfcp_fc_req *fc_req; in zfcp_fc_sym_name_update() local
870 fc_req = kmem_cache_zalloc(zfcp_fc_req_cache, GFP_KERNEL); in zfcp_fc_sym_name_update()
871 if (!fc_req) in zfcp_fc_sym_name_update()
878 ret = zfcp_fc_gspn(adapter, fc_req); in zfcp_fc_sym_name_update()
882 memset(fc_req, 0, sizeof(*fc_req)); in zfcp_fc_sym_name_update()
883 zfcp_fc_rspn(adapter, fc_req); in zfcp_fc_sym_name_update()
888 kmem_cache_free(zfcp_fc_req_cache, fc_req); in zfcp_fc_sym_name_update()