Lines Matching refs:job
295 struct bsg_job *job; in lpfc_bsg_send_mgmt_cmd_cmp() local
308 job = dd_data->set_job; in lpfc_bsg_send_mgmt_cmd_cmp()
309 if (job) { in lpfc_bsg_send_mgmt_cmd_cmp()
310 bsg_reply = job->reply; in lpfc_bsg_send_mgmt_cmd_cmp()
312 job->dd_data = NULL; in lpfc_bsg_send_mgmt_cmd_cmp()
332 if (job) { in lpfc_bsg_send_mgmt_cmd_cmp()
351 lpfc_bsg_copy_data(rmp, &job->reply_payload, in lpfc_bsg_send_mgmt_cmd_cmp()
366 if (job) { in lpfc_bsg_send_mgmt_cmd_cmp()
368 bsg_job_done(job, bsg_reply->result, in lpfc_bsg_send_mgmt_cmd_cmp()
379 lpfc_bsg_send_mgmt_cmd(struct bsg_job *job) in lpfc_bsg_send_mgmt_cmd() argument
381 struct lpfc_vport *vport = shost_priv(fc_bsg_to_shost(job)); in lpfc_bsg_send_mgmt_cmd()
382 struct lpfc_rport_data *rdata = fc_bsg_to_rport(job)->dd_data; in lpfc_bsg_send_mgmt_cmd()
385 struct fc_bsg_reply *bsg_reply = job->reply; in lpfc_bsg_send_mgmt_cmd()
434 cmp = lpfc_alloc_bsg_buffers(phba, job->request_payload.payload_len, in lpfc_bsg_send_mgmt_cmd()
440 lpfc_bsg_copy_data(cmp, &job->request_payload, in lpfc_bsg_send_mgmt_cmd()
441 job->request_payload.payload_len, 1); in lpfc_bsg_send_mgmt_cmd()
445 rmp = lpfc_alloc_bsg_buffers(phba, job->reply_payload.payload_len, 0, in lpfc_bsg_send_mgmt_cmd()
472 dd_data->set_job = job; in lpfc_bsg_send_mgmt_cmd()
475 job->dd_data = dd_data; in lpfc_bsg_send_mgmt_cmd()
527 job->dd_data = NULL; in lpfc_bsg_send_mgmt_cmd()
554 struct bsg_job *job; in lpfc_bsg_rport_els_cmp() local
571 job = dd_data->set_job; in lpfc_bsg_rport_els_cmp()
572 if (job) { in lpfc_bsg_rport_els_cmp()
573 bsg_reply = job->reply; in lpfc_bsg_rport_els_cmp()
575 job->dd_data = NULL; in lpfc_bsg_rport_els_cmp()
594 if (job) { in lpfc_bsg_rport_els_cmp()
598 sg_copy_from_buffer(job->reply_payload.sg_list, in lpfc_bsg_rport_els_cmp()
599 job->reply_payload.sg_cnt, in lpfc_bsg_rport_els_cmp()
629 if (job) { in lpfc_bsg_rport_els_cmp()
631 bsg_job_done(job, bsg_reply->result, in lpfc_bsg_rport_els_cmp()
642 lpfc_bsg_rport_els(struct bsg_job *job) in lpfc_bsg_rport_els() argument
644 struct lpfc_vport *vport = shost_priv(fc_bsg_to_shost(job)); in lpfc_bsg_rport_els()
646 struct lpfc_rport_data *rdata = fc_bsg_to_rport(job)->dd_data; in lpfc_bsg_rport_els()
648 struct fc_bsg_request *bsg_request = job->request; in lpfc_bsg_rport_els()
649 struct fc_bsg_reply *bsg_reply = job->reply; in lpfc_bsg_rport_els()
666 if (job->request_payload.payload_len > FCELSSIZE) { in lpfc_bsg_rport_els()
681 cmdsize = job->request_payload.payload_len; in lpfc_bsg_rport_els()
701 sg_copy_to_buffer(job->request_payload.sg_list, in lpfc_bsg_rport_els()
702 job->request_payload.sg_cnt, in lpfc_bsg_rport_els()
718 dd_data->set_job = job; in lpfc_bsg_rport_els()
722 job->dd_data = dd_data; in lpfc_bsg_rport_els()
764 job->dd_data = NULL; in lpfc_bsg_rport_els()
906 struct bsg_job *job = NULL; in lpfc_bsg_ct_unsol_event() local
1093 job = dd_data->set_job; in lpfc_bsg_ct_unsol_event()
1096 if (job) { in lpfc_bsg_ct_unsol_event()
1097 bsg_reply = job->reply; in lpfc_bsg_ct_unsol_event()
1101 job->dd_data = NULL; in lpfc_bsg_ct_unsol_event()
1104 bsg_job_done(job, bsg_reply->result, in lpfc_bsg_ct_unsol_event()
1166 lpfc_bsg_hba_set_event(struct bsg_job *job) in lpfc_bsg_hba_set_event() argument
1168 struct lpfc_vport *vport = shost_priv(fc_bsg_to_shost(job)); in lpfc_bsg_hba_set_event()
1170 struct fc_bsg_request *bsg_request = job->request; in lpfc_bsg_hba_set_event()
1178 if (job->request_len < in lpfc_bsg_hba_set_event()
1233 dd_data->set_job = job; /* for unsolicited command */ in lpfc_bsg_hba_set_event()
1234 job->dd_data = dd_data; /* for fc transport timeout callback*/ in lpfc_bsg_hba_set_event()
1240 job->dd_data = NULL; in lpfc_bsg_hba_set_event()
1249 lpfc_bsg_hba_get_event(struct bsg_job *job) in lpfc_bsg_hba_get_event() argument
1251 struct lpfc_vport *vport = shost_priv(fc_bsg_to_shost(job)); in lpfc_bsg_hba_get_event()
1253 struct fc_bsg_request *bsg_request = job->request; in lpfc_bsg_hba_get_event()
1254 struct fc_bsg_reply *bsg_reply = job->reply; in lpfc_bsg_hba_get_event()
1262 if (job->request_len < in lpfc_bsg_hba_get_event()
1300 if (evt_dat->len > job->request_payload.payload_len) { in lpfc_bsg_hba_get_event()
1301 evt_dat->len = job->request_payload.payload_len; in lpfc_bsg_hba_get_event()
1305 job->request_payload.payload_len); in lpfc_bsg_hba_get_event()
1312 sg_copy_from_buffer(job->request_payload.sg_list, in lpfc_bsg_hba_get_event()
1313 job->request_payload.sg_cnt, in lpfc_bsg_hba_get_event()
1326 job->dd_data = NULL; in lpfc_bsg_hba_get_event()
1328 bsg_job_done(job, bsg_reply->result, in lpfc_bsg_hba_get_event()
1333 job->dd_data = NULL; in lpfc_bsg_hba_get_event()
1361 struct bsg_job *job; in lpfc_issue_ct_rsp_cmp() local
1373 job = dd_data->set_job; in lpfc_issue_ct_rsp_cmp()
1374 if (job) { in lpfc_issue_ct_rsp_cmp()
1376 job->dd_data = NULL; in lpfc_issue_ct_rsp_cmp()
1394 if (job) { in lpfc_issue_ct_rsp_cmp()
1395 bsg_reply = job->reply; in lpfc_issue_ct_rsp_cmp()
1426 if (job) { in lpfc_issue_ct_rsp_cmp()
1428 bsg_job_done(job, bsg_reply->result, in lpfc_issue_ct_rsp_cmp()
1444 lpfc_issue_ct_rsp(struct lpfc_hba *phba, struct bsg_job *job, uint32_t tag, in lpfc_issue_ct_rsp() argument
1521 dd_data->set_job = job; in lpfc_issue_ct_rsp()
1529 job->dd_data = dd_data; in lpfc_issue_ct_rsp()
1554 job->dd_data = NULL; in lpfc_issue_ct_rsp()
1570 lpfc_bsg_send_mgmt_rsp(struct bsg_job *job) in lpfc_bsg_send_mgmt_rsp() argument
1572 struct lpfc_vport *vport = shost_priv(fc_bsg_to_shost(job)); in lpfc_bsg_send_mgmt_rsp()
1574 struct fc_bsg_request *bsg_request = job->request; in lpfc_bsg_send_mgmt_rsp()
1575 struct fc_bsg_reply *bsg_reply = job->reply; in lpfc_bsg_send_mgmt_rsp()
1583 (unsigned long)job->request_payload.payload_len; in lpfc_bsg_send_mgmt_rsp()
1609 cmp = lpfc_alloc_bsg_buffers(phba, job->request_payload.payload_len, in lpfc_bsg_send_mgmt_rsp()
1615 lpfc_bsg_copy_data(cmp, &job->request_payload, in lpfc_bsg_send_mgmt_rsp()
1616 job->request_payload.payload_len, 1); in lpfc_bsg_send_mgmt_rsp()
1618 rc = lpfc_issue_ct_rsp(phba, job, tag, cmp, bmp, bpl_entries); in lpfc_bsg_send_mgmt_rsp()
1634 job->dd_data = NULL; in lpfc_bsg_send_mgmt_rsp()
1735 lpfc_sli3_bsg_diag_loopback_mode(struct lpfc_hba *phba, struct bsg_job *job) in lpfc_sli3_bsg_diag_loopback_mode() argument
1737 struct fc_bsg_request *bsg_request = job->request; in lpfc_sli3_bsg_diag_loopback_mode()
1738 struct fc_bsg_reply *bsg_reply = job->reply; in lpfc_sli3_bsg_diag_loopback_mode()
1750 if (job->request_len < sizeof(struct fc_bsg_request) + in lpfc_sli3_bsg_diag_loopback_mode()
1755 job->request_len, in lpfc_sli3_bsg_diag_loopback_mode()
1844 bsg_job_done(job, bsg_reply->result, in lpfc_sli3_bsg_diag_loopback_mode()
2001 lpfc_sli4_bsg_diag_loopback_mode(struct lpfc_hba *phba, struct bsg_job *job) in lpfc_sli4_bsg_diag_loopback_mode() argument
2003 struct fc_bsg_request *bsg_request = job->request; in lpfc_sli4_bsg_diag_loopback_mode()
2004 struct fc_bsg_reply *bsg_reply = job->reply; in lpfc_sli4_bsg_diag_loopback_mode()
2012 if (job->request_len < sizeof(struct fc_bsg_request) + in lpfc_sli4_bsg_diag_loopback_mode()
2017 job->request_len, in lpfc_sli4_bsg_diag_loopback_mode()
2206 bsg_job_done(job, bsg_reply->result, in lpfc_sli4_bsg_diag_loopback_mode()
2219 lpfc_bsg_diag_loopback_mode(struct bsg_job *job) in lpfc_bsg_diag_loopback_mode() argument
2226 shost = fc_bsg_to_shost(job); in lpfc_bsg_diag_loopback_mode()
2237 rc = lpfc_sli3_bsg_diag_loopback_mode(phba, job); in lpfc_bsg_diag_loopback_mode()
2240 rc = lpfc_sli4_bsg_diag_loopback_mode(phba, job); in lpfc_bsg_diag_loopback_mode()
2255 lpfc_sli4_bsg_diag_mode_end(struct bsg_job *job) in lpfc_sli4_bsg_diag_mode_end() argument
2257 struct fc_bsg_request *bsg_request = job->request; in lpfc_sli4_bsg_diag_mode_end()
2258 struct fc_bsg_reply *bsg_reply = job->reply; in lpfc_sli4_bsg_diag_mode_end()
2266 shost = fc_bsg_to_shost(job); in lpfc_sli4_bsg_diag_mode_end()
2321 bsg_job_done(job, bsg_reply->result, in lpfc_sli4_bsg_diag_mode_end()
2334 lpfc_sli4_bsg_link_diag_test(struct bsg_job *job) in lpfc_sli4_bsg_link_diag_test() argument
2336 struct fc_bsg_request *bsg_request = job->request; in lpfc_sli4_bsg_link_diag_test()
2337 struct fc_bsg_reply *bsg_reply = job->reply; in lpfc_sli4_bsg_link_diag_test()
2350 shost = fc_bsg_to_shost(job); in lpfc_sli4_bsg_link_diag_test()
2370 if (job->request_len < sizeof(struct fc_bsg_request) + in lpfc_sli4_bsg_link_diag_test()
2375 job->request_len, in lpfc_sli4_bsg_link_diag_test()
2440 if (job->reply_len < sizeof(*bsg_reply) + sizeof(*diag_status_reply)) { in lpfc_sli4_bsg_link_diag_test()
2446 job->reply_len); in lpfc_sli4_bsg_link_diag_test()
2470 bsg_job_done(job, bsg_reply->result, in lpfc_sli4_bsg_link_diag_test()
3022 lpfc_bsg_diag_loopback_run(struct bsg_job *job) in lpfc_bsg_diag_loopback_run() argument
3024 struct lpfc_vport *vport = shost_priv(fc_bsg_to_shost(job)); in lpfc_bsg_diag_loopback_run()
3025 struct fc_bsg_reply *bsg_reply = job->reply; in lpfc_bsg_diag_loopback_run()
3055 if (job->request_len < in lpfc_bsg_diag_loopback_run()
3064 if (job->request_payload.payload_len != in lpfc_bsg_diag_loopback_run()
3065 job->reply_payload.payload_len) { in lpfc_bsg_diag_loopback_run()
3082 size = job->request_payload.payload_len; in lpfc_bsg_diag_loopback_run()
3114 sg_copy_to_buffer(job->request_payload.sg_list, in lpfc_bsg_diag_loopback_run()
3115 job->request_payload.sg_cnt, in lpfc_bsg_diag_loopback_run()
3276 sg_copy_from_buffer(job->reply_payload.sg_list, in lpfc_bsg_diag_loopback_run()
3277 job->reply_payload.sg_cnt, in lpfc_bsg_diag_loopback_run()
3310 job->dd_data = NULL; in lpfc_bsg_diag_loopback_run()
3313 bsg_job_done(job, bsg_reply->result, in lpfc_bsg_diag_loopback_run()
3323 lpfc_bsg_get_dfc_rev(struct bsg_job *job) in lpfc_bsg_get_dfc_rev() argument
3325 struct lpfc_vport *vport = shost_priv(fc_bsg_to_shost(job)); in lpfc_bsg_get_dfc_rev()
3326 struct fc_bsg_reply *bsg_reply = job->reply; in lpfc_bsg_get_dfc_rev()
3331 if (job->request_len < in lpfc_bsg_get_dfc_rev()
3343 if (job->reply_len < sizeof(*bsg_reply) + sizeof(*event_reply)) { in lpfc_bsg_get_dfc_rev()
3356 bsg_job_done(job, bsg_reply->result, in lpfc_bsg_get_dfc_rev()
3377 struct bsg_job *job; in lpfc_bsg_issue_mbox_cmpl() local
3395 job = dd_data->set_job; in lpfc_bsg_issue_mbox_cmpl()
3396 if (job) { in lpfc_bsg_issue_mbox_cmpl()
3398 job->dd_data = NULL; in lpfc_bsg_issue_mbox_cmpl()
3404 if (job) { in lpfc_bsg_issue_mbox_cmpl()
3405 bsg_reply = job->reply; in lpfc_bsg_issue_mbox_cmpl()
3406 size = job->reply_payload.payload_len; in lpfc_bsg_issue_mbox_cmpl()
3408 sg_copy_from_buffer(job->reply_payload.sg_list, in lpfc_bsg_issue_mbox_cmpl()
3409 job->reply_payload.sg_cnt, in lpfc_bsg_issue_mbox_cmpl()
3420 if (job) { in lpfc_bsg_issue_mbox_cmpl()
3422 bsg_job_done(job, bsg_reply->result, in lpfc_bsg_issue_mbox_cmpl()
3549 struct bsg_job *job; in lpfc_bsg_issue_mbox_ext_handle_job() local
3563 job = dd_data->set_job; in lpfc_bsg_issue_mbox_ext_handle_job()
3564 if (job) { in lpfc_bsg_issue_mbox_ext_handle_job()
3565 bsg_reply = job->reply; in lpfc_bsg_issue_mbox_ext_handle_job()
3567 job->dd_data = NULL; in lpfc_bsg_issue_mbox_ext_handle_job()
3594 if (job) { in lpfc_bsg_issue_mbox_ext_handle_job()
3595 size = job->reply_payload.payload_len; in lpfc_bsg_issue_mbox_ext_handle_job()
3597 sg_copy_from_buffer(job->reply_payload.sg_list, in lpfc_bsg_issue_mbox_ext_handle_job()
3598 job->reply_payload.sg_cnt, in lpfc_bsg_issue_mbox_ext_handle_job()
3626 return job; in lpfc_bsg_issue_mbox_ext_handle_job()
3640 struct bsg_job *job; in lpfc_bsg_issue_read_mbox_ext_cmpl() local
3643 job = lpfc_bsg_issue_mbox_ext_handle_job(phba, pmboxq); in lpfc_bsg_issue_read_mbox_ext_cmpl()
3646 if (!job) in lpfc_bsg_issue_read_mbox_ext_cmpl()
3661 if (job) { in lpfc_bsg_issue_read_mbox_ext_cmpl()
3662 bsg_reply = job->reply; in lpfc_bsg_issue_read_mbox_ext_cmpl()
3663 bsg_job_done(job, bsg_reply->result, in lpfc_bsg_issue_read_mbox_ext_cmpl()
3680 struct bsg_job *job; in lpfc_bsg_issue_write_mbox_ext_cmpl() local
3683 job = lpfc_bsg_issue_mbox_ext_handle_job(phba, pmboxq); in lpfc_bsg_issue_write_mbox_ext_cmpl()
3686 if (!job) in lpfc_bsg_issue_write_mbox_ext_cmpl()
3699 if (job) { in lpfc_bsg_issue_write_mbox_ext_cmpl()
3700 bsg_reply = job->reply; in lpfc_bsg_issue_write_mbox_ext_cmpl()
3701 bsg_job_done(job, bsg_reply->result, in lpfc_bsg_issue_write_mbox_ext_cmpl()
3812 lpfc_bsg_sli_cfg_read_cmd_ext(struct lpfc_hba *phba, struct bsg_job *job, in lpfc_bsg_sli_cfg_read_cmd_ext() argument
3816 struct fc_bsg_request *bsg_request = job->request; in lpfc_bsg_sli_cfg_read_cmd_ext()
3948 dd_data->set_job = job; in lpfc_bsg_sli_cfg_read_cmd_ext()
3951 job->dd_data = dd_data; in lpfc_bsg_sli_cfg_read_cmd_ext()
4001 lpfc_bsg_sli_cfg_write_cmd_ext(struct lpfc_hba *phba, struct bsg_job *job, in lpfc_bsg_sli_cfg_write_cmd_ext() argument
4005 struct fc_bsg_request *bsg_request = job->request; in lpfc_bsg_sli_cfg_write_cmd_ext()
4006 struct fc_bsg_reply *bsg_reply = job->reply; in lpfc_bsg_sli_cfg_write_cmd_ext()
4120 dd_data->set_job = job; in lpfc_bsg_sli_cfg_write_cmd_ext()
4123 job->dd_data = dd_data; in lpfc_bsg_sli_cfg_write_cmd_ext()
4145 bsg_job_done(job, bsg_reply->result, in lpfc_bsg_sli_cfg_write_cmd_ext()
4168 lpfc_bsg_handle_sli_cfg_mbox(struct lpfc_hba *phba, struct bsg_job *job, in lpfc_bsg_handle_sli_cfg_mbox() argument
4195 rc = lpfc_bsg_sli_cfg_read_cmd_ext(phba, job, in lpfc_bsg_handle_sli_cfg_mbox()
4205 rc = lpfc_bsg_sli_cfg_write_cmd_ext(phba, job, in lpfc_bsg_handle_sli_cfg_mbox()
4226 rc = lpfc_bsg_sli_cfg_read_cmd_ext(phba, job, in lpfc_bsg_handle_sli_cfg_mbox()
4257 rc = lpfc_bsg_sli_cfg_read_cmd_ext(phba, job, in lpfc_bsg_handle_sli_cfg_mbox()
4265 rc = lpfc_bsg_sli_cfg_write_cmd_ext(phba, job, in lpfc_bsg_handle_sli_cfg_mbox()
4318 lpfc_bsg_read_ebuf_get(struct lpfc_hba *phba, struct bsg_job *job) in lpfc_bsg_read_ebuf_get() argument
4320 struct fc_bsg_reply *bsg_reply = job->reply; in lpfc_bsg_read_ebuf_get()
4359 sg_copy_from_buffer(job->reply_payload.sg_list, in lpfc_bsg_read_ebuf_get()
4360 job->reply_payload.sg_cnt, in lpfc_bsg_read_ebuf_get()
4373 bsg_job_done(job, bsg_reply->result, in lpfc_bsg_read_ebuf_get()
4389 lpfc_bsg_write_ebuf_set(struct lpfc_hba *phba, struct bsg_job *job, in lpfc_bsg_write_ebuf_set() argument
4392 struct fc_bsg_reply *bsg_reply = job->reply; in lpfc_bsg_write_ebuf_set()
4407 size = job->request_payload.payload_len; in lpfc_bsg_write_ebuf_set()
4408 sg_copy_to_buffer(job->request_payload.sg_list, in lpfc_bsg_write_ebuf_set()
4409 job->request_payload.sg_cnt, in lpfc_bsg_write_ebuf_set()
4468 dd_data->set_job = job; in lpfc_bsg_write_ebuf_set()
4471 job->dd_data = dd_data; in lpfc_bsg_write_ebuf_set()
4492 bsg_job_done(job, bsg_reply->result, in lpfc_bsg_write_ebuf_set()
4515 lpfc_bsg_handle_sli_cfg_ebuf(struct lpfc_hba *phba, struct bsg_job *job, in lpfc_bsg_handle_sli_cfg_ebuf() argument
4533 rc = lpfc_bsg_read_ebuf_get(phba, job); in lpfc_bsg_handle_sli_cfg_ebuf()
4545 rc = lpfc_bsg_write_ebuf_set(phba, job, dmabuf); in lpfc_bsg_handle_sli_cfg_ebuf()
4560 lpfc_bsg_handle_sli_cfg_ext(struct lpfc_hba *phba, struct bsg_job *job, in lpfc_bsg_handle_sli_cfg_ext() argument
4563 struct fc_bsg_request *bsg_request = job->request; in lpfc_bsg_handle_sli_cfg_ext()
4581 rc = lpfc_bsg_handle_sli_cfg_mbox(phba, job, dmabuf); in lpfc_bsg_handle_sli_cfg_ext()
4604 rc = lpfc_bsg_handle_sli_cfg_ebuf(phba, job, dmabuf); in lpfc_bsg_handle_sli_cfg_ext()
4638 lpfc_bsg_issue_mbox(struct lpfc_hba *phba, struct bsg_job *job, in lpfc_bsg_issue_mbox() argument
4641 struct fc_bsg_request *bsg_request = job->request; in lpfc_bsg_issue_mbox()
4642 struct fc_bsg_reply *bsg_reply = job->reply; in lpfc_bsg_issue_mbox()
4664 if (job->reply_payload.payload_len > BSG_MBOX_SIZE || in lpfc_bsg_issue_mbox()
4665 job->request_payload.payload_len > BSG_MBOX_SIZE) { in lpfc_bsg_issue_mbox()
4697 size = job->request_payload.payload_len; in lpfc_bsg_issue_mbox()
4698 sg_copy_to_buffer(job->request_payload.sg_list, in lpfc_bsg_issue_mbox()
4699 job->request_payload.sg_cnt, pmbx, size); in lpfc_bsg_issue_mbox()
4703 rc = lpfc_bsg_handle_sli_cfg_ext(phba, job, dmabuf); in lpfc_bsg_issue_mbox()
4883 dd_data->set_job = job; in lpfc_bsg_issue_mbox()
4890 job->dd_data = dd_data; in lpfc_bsg_issue_mbox()
4903 sg_copy_from_buffer(job->reply_payload.sg_list, in lpfc_bsg_issue_mbox()
4904 job->reply_payload.sg_cnt, in lpfc_bsg_issue_mbox()
4931 lpfc_bsg_mbox_cmd(struct bsg_job *job) in lpfc_bsg_mbox_cmd() argument
4933 struct lpfc_vport *vport = shost_priv(fc_bsg_to_shost(job)); in lpfc_bsg_mbox_cmd()
4934 struct fc_bsg_request *bsg_request = job->request; in lpfc_bsg_mbox_cmd()
4935 struct fc_bsg_reply *bsg_reply = job->reply; in lpfc_bsg_mbox_cmd()
4942 if (job->request_len < in lpfc_bsg_mbox_cmd()
4948 (int)(job->request_len - in lpfc_bsg_mbox_cmd()
4957 rc = lpfc_bsg_issue_mbox(phba, job, vport); in lpfc_bsg_mbox_cmd()
4962 job->dd_data = NULL; in lpfc_bsg_mbox_cmd()
4963 bsg_job_done(job, bsg_reply->result, in lpfc_bsg_mbox_cmd()
4971 job->dd_data = NULL; in lpfc_bsg_mbox_cmd()
4978 lpfc_forced_link_speed(struct bsg_job *job) in lpfc_forced_link_speed() argument
4980 struct Scsi_Host *shost = fc_bsg_to_shost(job); in lpfc_forced_link_speed()
4983 struct fc_bsg_reply *bsg_reply = job->reply; in lpfc_forced_link_speed()
4987 if (job->request_len < in lpfc_forced_link_speed()
5000 if (job->reply_len < sizeof(*bsg_reply) + sizeof(*forced_reply)) { in lpfc_forced_link_speed()
5015 bsg_job_done(job, bsg_reply->result, in lpfc_forced_link_speed()
5048 lpfc_bsg_get_ras_config(struct bsg_job *job) in lpfc_bsg_get_ras_config() argument
5050 struct Scsi_Host *shost = fc_bsg_to_shost(job); in lpfc_bsg_get_ras_config()
5052 struct fc_bsg_reply *bsg_reply = job->reply; in lpfc_bsg_get_ras_config()
5058 if (job->request_len < in lpfc_bsg_get_ras_config()
5093 bsg_job_done(job, bsg_reply->result, in lpfc_bsg_get_ras_config()
5105 lpfc_bsg_set_ras_config(struct bsg_job *job) in lpfc_bsg_set_ras_config() argument
5107 struct Scsi_Host *shost = fc_bsg_to_shost(job); in lpfc_bsg_set_ras_config()
5111 struct fc_bsg_request *bsg_request = job->request; in lpfc_bsg_set_ras_config()
5113 struct fc_bsg_reply *bsg_reply = job->reply; in lpfc_bsg_set_ras_config()
5117 if (job->request_len < in lpfc_bsg_set_ras_config()
5179 bsg_job_done(job, bsg_reply->result, in lpfc_bsg_set_ras_config()
5193 lpfc_bsg_get_ras_lwpd(struct bsg_job *job) in lpfc_bsg_get_ras_lwpd() argument
5195 struct Scsi_Host *shost = fc_bsg_to_shost(job); in lpfc_bsg_get_ras_lwpd()
5200 struct fc_bsg_reply *bsg_reply = job->reply; in lpfc_bsg_get_ras_lwpd()
5208 if (job->request_len < in lpfc_bsg_get_ras_lwpd()
5241 bsg_job_done(job, bsg_reply->result, in lpfc_bsg_get_ras_lwpd()
5254 lpfc_bsg_get_ras_fwlog(struct bsg_job *job) in lpfc_bsg_get_ras_fwlog() argument
5256 struct Scsi_Host *shost = fc_bsg_to_shost(job); in lpfc_bsg_get_ras_fwlog()
5259 struct fc_bsg_request *bsg_request = job->request; in lpfc_bsg_get_ras_fwlog()
5260 struct fc_bsg_reply *bsg_reply = job->reply; in lpfc_bsg_get_ras_fwlog()
5283 if (job->request_len < in lpfc_bsg_get_ras_fwlog()
5319 sg_copy_from_buffer(job->reply_payload.sg_list, in lpfc_bsg_get_ras_fwlog()
5320 job->reply_payload.sg_cnt, in lpfc_bsg_get_ras_fwlog()
5328 bsg_job_done(job, bsg_reply->result, in lpfc_bsg_get_ras_fwlog()
5335 lpfc_get_trunk_info(struct bsg_job *job) in lpfc_get_trunk_info() argument
5337 struct lpfc_vport *vport = shost_priv(fc_bsg_to_shost(job)); in lpfc_get_trunk_info()
5339 struct fc_bsg_reply *bsg_reply = job->reply; in lpfc_get_trunk_info()
5343 if (job->request_len < in lpfc_get_trunk_info()
5355 if (job->reply_len < sizeof(*bsg_reply) + sizeof(*event_reply)) { in lpfc_get_trunk_info()
5400 bsg_job_done(job, bsg_reply->result, in lpfc_get_trunk_info()
5407 lpfc_get_cgnbuf_info(struct bsg_job *job) in lpfc_get_cgnbuf_info() argument
5409 struct lpfc_vport *vport = shost_priv(fc_bsg_to_shost(job)); in lpfc_get_cgnbuf_info()
5411 struct fc_bsg_request *bsg_request = job->request; in lpfc_get_cgnbuf_info()
5412 struct fc_bsg_reply *bsg_reply = job->reply; in lpfc_get_cgnbuf_info()
5419 if (job->request_len < sizeof(struct fc_bsg_request) + in lpfc_get_cgnbuf_info()
5475 sg_copy_from_buffer(job->reply_payload.sg_list, in lpfc_get_cgnbuf_info()
5476 job->reply_payload.sg_cnt, in lpfc_get_cgnbuf_info()
5484 bsg_job_done(job, bsg_reply->result, in lpfc_get_cgnbuf_info()
5497 lpfc_bsg_hst_vendor(struct bsg_job *job) in lpfc_bsg_hst_vendor() argument
5499 struct fc_bsg_request *bsg_request = job->request; in lpfc_bsg_hst_vendor()
5500 struct fc_bsg_reply *bsg_reply = job->reply; in lpfc_bsg_hst_vendor()
5506 rc = lpfc_bsg_hba_set_event(job); in lpfc_bsg_hst_vendor()
5509 rc = lpfc_bsg_hba_get_event(job); in lpfc_bsg_hst_vendor()
5512 rc = lpfc_bsg_send_mgmt_rsp(job); in lpfc_bsg_hst_vendor()
5515 rc = lpfc_bsg_diag_loopback_mode(job); in lpfc_bsg_hst_vendor()
5518 rc = lpfc_sli4_bsg_diag_mode_end(job); in lpfc_bsg_hst_vendor()
5521 rc = lpfc_bsg_diag_loopback_run(job); in lpfc_bsg_hst_vendor()
5524 rc = lpfc_sli4_bsg_link_diag_test(job); in lpfc_bsg_hst_vendor()
5527 rc = lpfc_bsg_get_dfc_rev(job); in lpfc_bsg_hst_vendor()
5530 rc = lpfc_bsg_mbox_cmd(job); in lpfc_bsg_hst_vendor()
5533 rc = lpfc_forced_link_speed(job); in lpfc_bsg_hst_vendor()
5536 rc = lpfc_bsg_get_ras_lwpd(job); in lpfc_bsg_hst_vendor()
5539 rc = lpfc_bsg_get_ras_fwlog(job); in lpfc_bsg_hst_vendor()
5542 rc = lpfc_bsg_get_ras_config(job); in lpfc_bsg_hst_vendor()
5545 rc = lpfc_bsg_set_ras_config(job); in lpfc_bsg_hst_vendor()
5548 rc = lpfc_get_trunk_info(job); in lpfc_bsg_hst_vendor()
5551 rc = lpfc_get_cgnbuf_info(job); in lpfc_bsg_hst_vendor()
5569 lpfc_bsg_request(struct bsg_job *job) in lpfc_bsg_request() argument
5571 struct fc_bsg_request *bsg_request = job->request; in lpfc_bsg_request()
5572 struct fc_bsg_reply *bsg_reply = job->reply; in lpfc_bsg_request()
5579 rc = lpfc_bsg_hst_vendor(job); in lpfc_bsg_request()
5582 rc = lpfc_bsg_rport_els(job); in lpfc_bsg_request()
5585 rc = lpfc_bsg_send_mgmt_cmd(job); in lpfc_bsg_request()
5606 lpfc_bsg_timeout(struct bsg_job *job) in lpfc_bsg_timeout() argument
5608 struct lpfc_vport *vport = shost_priv(fc_bsg_to_shost(job)); in lpfc_bsg_timeout()
5632 dd_data = (struct bsg_job_data *)job->dd_data; in lpfc_bsg_timeout()
5635 job->dd_data = NULL; in lpfc_bsg_timeout()