H A D | zfcp_fc.c | 330 static void zfcp_fc_ns_gid_pn_eval(struct zfcp_fc_req *fc_req) zfcp_fc_ns_gid_pn_eval() argument 332 struct zfcp_fsf_ct_els *ct_els = &fc_req->ct_els; zfcp_fc_ns_gid_pn_eval() 333 struct zfcp_fc_gid_pn_rsp *gid_pn_rsp = &fc_req->u.gid_pn.rsp; zfcp_fc_ns_gid_pn_eval() 359 struct zfcp_fc_req *fc_req) zfcp_fc_ns_gid_pn_request() 363 struct zfcp_fc_gid_pn_req *gid_pn_req = &fc_req->u.gid_pn.req; zfcp_fc_ns_gid_pn_request() 364 struct zfcp_fc_gid_pn_rsp *gid_pn_rsp = &fc_req->u.gid_pn.rsp; zfcp_fc_ns_gid_pn_request() 368 fc_req->ct_els.port = port; zfcp_fc_ns_gid_pn_request() 369 fc_req->ct_els.handler = zfcp_fc_complete; zfcp_fc_ns_gid_pn_request() 370 fc_req->ct_els.handler_data = &completion; zfcp_fc_ns_gid_pn_request() 371 fc_req->ct_els.req = &fc_req->sg_req; zfcp_fc_ns_gid_pn_request() 372 fc_req->ct_els.resp = &fc_req->sg_rsp; zfcp_fc_ns_gid_pn_request() 373 sg_init_one(&fc_req->sg_req, gid_pn_req, sizeof(*gid_pn_req)); zfcp_fc_ns_gid_pn_request() 374 sg_init_one(&fc_req->sg_rsp, gid_pn_rsp, sizeof(*gid_pn_rsp)); zfcp_fc_ns_gid_pn_request() 380 ret = zfcp_fsf_send_ct(&adapter->gs->ds, &fc_req->ct_els, zfcp_fc_ns_gid_pn_request() 385 zfcp_fc_ns_gid_pn_eval(fc_req); zfcp_fc_ns_gid_pn_request() 398 struct zfcp_fc_req *fc_req; zfcp_fc_ns_gid_pn() local 401 fc_req = mempool_alloc(adapter->pool.gid_pn, GFP_ATOMIC); zfcp_fc_ns_gid_pn() 402 if (!fc_req) zfcp_fc_ns_gid_pn() 405 memset(fc_req, 0, sizeof(*fc_req)); zfcp_fc_ns_gid_pn() 411 ret = zfcp_fc_ns_gid_pn_request(port, fc_req); zfcp_fc_ns_gid_pn() 415 mempool_free(fc_req, adapter->pool.gid_pn); zfcp_fc_ns_gid_pn() 487 struct zfcp_fc_req *fc_req = data; zfcp_fc_adisc_handler() local 488 struct zfcp_port *port = fc_req->ct_els.port; zfcp_fc_adisc_handler() 489 struct fc_els_adisc *adisc_resp = &fc_req->u.adisc.rsp; zfcp_fc_adisc_handler() 491 if (fc_req->ct_els.status) { zfcp_fc_adisc_handler() 513 kmem_cache_free(zfcp_fc_req_cache, fc_req); zfcp_fc_adisc_handler() 518 struct zfcp_fc_req *fc_req; zfcp_fc_adisc() local 523 fc_req = kmem_cache_zalloc(zfcp_fc_req_cache, GFP_ATOMIC); zfcp_fc_adisc() 524 if (!fc_req) zfcp_fc_adisc() 527 fc_req->ct_els.port = port; zfcp_fc_adisc() 528 fc_req->ct_els.req = &fc_req->sg_req; zfcp_fc_adisc() 529 fc_req->ct_els.resp = &fc_req->sg_rsp; zfcp_fc_adisc() 530 sg_init_one(&fc_req->sg_req, &fc_req->u.adisc.req, zfcp_fc_adisc() 532 sg_init_one(&fc_req->sg_rsp, &fc_req->u.adisc.rsp, zfcp_fc_adisc() 535 fc_req->ct_els.handler = zfcp_fc_adisc_handler; zfcp_fc_adisc() 536 fc_req->ct_els.handler_data = fc_req; zfcp_fc_adisc() 540 fc_req->u.adisc.req.adisc_wwpn = fc_host_port_name(shost); zfcp_fc_adisc() 541 fc_req->u.adisc.req.adisc_wwnn = fc_host_node_name(shost); zfcp_fc_adisc() 542 fc_req->u.adisc.req.adisc_cmd = ELS_ADISC; zfcp_fc_adisc() 543 hton24(fc_req->u.adisc.req.adisc_port_id, fc_host_port_id(shost)); zfcp_fc_adisc() 545 ret = zfcp_fsf_send_els(adapter, port->d_id, &fc_req->ct_els, zfcp_fc_adisc() 548 kmem_cache_free(zfcp_fc_req_cache, fc_req); zfcp_fc_adisc() 598 struct zfcp_fc_req *fc_req; zfcp_alloc_sg_env() local 600 fc_req = kmem_cache_zalloc(zfcp_fc_req_cache, GFP_KERNEL); zfcp_alloc_sg_env() 601 if (!fc_req) zfcp_alloc_sg_env() 604 if (zfcp_sg_setup_table(&fc_req->sg_rsp, buf_num)) { zfcp_alloc_sg_env() 605 kmem_cache_free(zfcp_fc_req_cache, fc_req); zfcp_alloc_sg_env() 609 sg_init_one(&fc_req->sg_req, &fc_req->u.gpn_ft.req, zfcp_alloc_sg_env() 612 return fc_req; zfcp_alloc_sg_env() 615 static int zfcp_fc_send_gpn_ft(struct zfcp_fc_req *fc_req, zfcp_fc_send_gpn_ft() argument 618 struct zfcp_fsf_ct_els *ct_els = &fc_req->ct_els; zfcp_fc_send_gpn_ft() 619 struct zfcp_fc_gpn_ft_req *req = &fc_req->u.gpn_ft.req; zfcp_fc_send_gpn_ft() 628 ct_els->req = &fc_req->sg_req; zfcp_fc_send_gpn_ft() 629 ct_els->resp = &fc_req->sg_rsp; zfcp_fc_send_gpn_ft() 652 static int zfcp_fc_eval_gpn_ft(struct zfcp_fc_req *fc_req, zfcp_fc_eval_gpn_ft() argument 655 struct zfcp_fsf_ct_els *ct_els = &fc_req->ct_els; zfcp_fc_eval_gpn_ft() 656 struct scatterlist *sg = &fc_req->sg_rsp; zfcp_fc_eval_gpn_ft() 730 struct zfcp_fc_req *fc_req; zfcp_fc_scan_ports() local 747 fc_req = zfcp_alloc_sg_env(buf_num); zfcp_fc_scan_ports() 748 if (!fc_req) zfcp_fc_scan_ports() 752 ret = zfcp_fc_send_gpn_ft(fc_req, adapter, max_bytes); zfcp_fc_scan_ports() 754 ret = zfcp_fc_eval_gpn_ft(fc_req, adapter, max_entries); zfcp_fc_scan_ports() 761 zfcp_sg_free_table(&fc_req->sg_rsp, buf_num); zfcp_fc_scan_ports() 762 kmem_cache_free(zfcp_fc_req_cache, fc_req); zfcp_fc_scan_ports() 768 struct zfcp_fc_req *fc_req) zfcp_fc_gspn() 772 struct zfcp_fsf_ct_els *ct_els = &fc_req->ct_els; zfcp_fc_gspn() 773 struct zfcp_fc_gspn_req *gspn_req = &fc_req->u.gspn.req; zfcp_fc_gspn() 774 struct zfcp_fc_gspn_rsp *gspn_rsp = &fc_req->u.gspn.rsp; zfcp_fc_gspn() 781 sg_init_one(&fc_req->sg_req, gspn_req, sizeof(*gspn_req)); zfcp_fc_gspn() 782 sg_init_one(&fc_req->sg_rsp, gspn_rsp, sizeof(*gspn_rsp)); zfcp_fc_gspn() 786 ct_els->req = &fc_req->sg_req; zfcp_fc_gspn() 787 ct_els->resp = &fc_req->sg_rsp; zfcp_fc_gspn() 813 struct zfcp_fc_req *fc_req) zfcp_fc_rspn() 817 struct zfcp_fsf_ct_els *ct_els = &fc_req->ct_els; zfcp_fc_rspn() 818 struct zfcp_fc_rspn_req *rspn_req = &fc_req->u.rspn.req; zfcp_fc_rspn() 819 struct fc_ct_hdr *rspn_rsp = &fc_req->u.rspn.rsp; zfcp_fc_rspn() 829 sg_init_one(&fc_req->sg_req, rspn_req, sizeof(*rspn_req)); zfcp_fc_rspn() 830 sg_init_one(&fc_req->sg_rsp, rspn_rsp, sizeof(*rspn_rsp)); zfcp_fc_rspn() 834 ct_els->req = &fc_req->sg_req; zfcp_fc_rspn() 835 ct_els->resp = &fc_req->sg_rsp; zfcp_fc_rspn() 859 struct zfcp_fc_req *fc_req; zfcp_fc_sym_name_update() local 865 fc_req = kmem_cache_zalloc(zfcp_fc_req_cache, GFP_KERNEL); zfcp_fc_sym_name_update() 866 if (!fc_req) zfcp_fc_sym_name_update() 873 ret = zfcp_fc_gspn(adapter, fc_req); zfcp_fc_sym_name_update() 877 memset(fc_req, 0, sizeof(*fc_req)); zfcp_fc_sym_name_update() 878 zfcp_fc_rspn(adapter, fc_req); zfcp_fc_sym_name_update() 883 kmem_cache_free(zfcp_fc_req_cache, fc_req); zfcp_fc_sym_name_update() 358 zfcp_fc_ns_gid_pn_request(struct zfcp_port *port, struct zfcp_fc_req *fc_req) zfcp_fc_ns_gid_pn_request() argument 767 zfcp_fc_gspn(struct zfcp_adapter *adapter, struct zfcp_fc_req *fc_req) zfcp_fc_gspn() argument 812 zfcp_fc_rspn(struct zfcp_adapter *adapter, struct zfcp_fc_req *fc_req) zfcp_fc_rspn() argument
|