Lines Matching refs:bsg_job
13 qla4xxx_read_flash(struct bsg_job *bsg_job) in qla4xxx_read_flash() argument
15 struct Scsi_Host *host = iscsi_job_to_shost(bsg_job); in qla4xxx_read_flash()
17 struct iscsi_bsg_reply *bsg_reply = bsg_job->reply; in qla4xxx_read_flash()
18 struct iscsi_bsg_request *bsg_req = bsg_job->request; in qla4xxx_read_flash()
45 length = bsg_job->reply_payload.payload_len; in qla4xxx_read_flash()
63 sg_copy_from_buffer(bsg_job->reply_payload.sg_list, in qla4xxx_read_flash()
64 bsg_job->reply_payload.sg_cnt, in qla4xxx_read_flash()
69 bsg_job_done(bsg_job, bsg_reply->result, in qla4xxx_read_flash()
78 qla4xxx_update_flash(struct bsg_job *bsg_job) in qla4xxx_update_flash() argument
80 struct Scsi_Host *host = iscsi_job_to_shost(bsg_job); in qla4xxx_update_flash()
82 struct iscsi_bsg_reply *bsg_reply = bsg_job->reply; in qla4xxx_update_flash()
83 struct iscsi_bsg_request *bsg_req = bsg_job->request; in qla4xxx_update_flash()
110 length = bsg_job->request_payload.payload_len; in qla4xxx_update_flash()
123 sg_copy_to_buffer(bsg_job->request_payload.sg_list, in qla4xxx_update_flash()
124 bsg_job->request_payload.sg_cnt, flash, length); in qla4xxx_update_flash()
134 bsg_job_done(bsg_job, bsg_reply->result, in qla4xxx_update_flash()
143 qla4xxx_get_acb_state(struct bsg_job *bsg_job) in qla4xxx_get_acb_state() argument
145 struct Scsi_Host *host = iscsi_job_to_shost(bsg_job); in qla4xxx_get_acb_state()
147 struct iscsi_bsg_request *bsg_req = bsg_job->request; in qla4xxx_get_acb_state()
148 struct iscsi_bsg_reply *bsg_reply = bsg_job->reply; in qla4xxx_get_acb_state()
169 if (bsg_job->reply_payload.payload_len < sizeof(status)) { in qla4xxx_get_acb_state()
171 __func__, bsg_job->reply_payload.payload_len); in qla4xxx_get_acb_state()
187 sg_copy_from_buffer(bsg_job->reply_payload.sg_list, in qla4xxx_get_acb_state()
188 bsg_job->reply_payload.sg_cnt, in qla4xxx_get_acb_state()
193 bsg_job_done(bsg_job, bsg_reply->result, in qla4xxx_get_acb_state()
200 qla4xxx_read_nvram(struct bsg_job *bsg_job) in qla4xxx_read_nvram() argument
202 struct Scsi_Host *host = iscsi_job_to_shost(bsg_job); in qla4xxx_read_nvram()
204 struct iscsi_bsg_request *bsg_req = bsg_job->request; in qla4xxx_read_nvram()
205 struct iscsi_bsg_reply *bsg_reply = bsg_job->reply; in qla4xxx_read_nvram()
229 len = bsg_job->reply_payload.payload_len; in qla4xxx_read_nvram()
258 sg_copy_from_buffer(bsg_job->reply_payload.sg_list, in qla4xxx_read_nvram()
259 bsg_job->reply_payload.sg_cnt, in qla4xxx_read_nvram()
264 bsg_job_done(bsg_job, bsg_reply->result, in qla4xxx_read_nvram()
272 qla4xxx_update_nvram(struct bsg_job *bsg_job) in qla4xxx_update_nvram() argument
274 struct Scsi_Host *host = iscsi_job_to_shost(bsg_job); in qla4xxx_update_nvram()
276 struct iscsi_bsg_request *bsg_req = bsg_job->request; in qla4xxx_update_nvram()
277 struct iscsi_bsg_reply *bsg_reply = bsg_job->reply; in qla4xxx_update_nvram()
300 len = bsg_job->request_payload.payload_len; in qla4xxx_update_nvram()
322 sg_copy_to_buffer(bsg_job->request_payload.sg_list, in qla4xxx_update_nvram()
323 bsg_job->request_payload.sg_cnt, nvram, len); in qla4xxx_update_nvram()
333 bsg_job_done(bsg_job, bsg_reply->result, in qla4xxx_update_nvram()
341 qla4xxx_restore_defaults(struct bsg_job *bsg_job) in qla4xxx_restore_defaults() argument
343 struct Scsi_Host *host = iscsi_job_to_shost(bsg_job); in qla4xxx_restore_defaults()
345 struct iscsi_bsg_request *bsg_req = bsg_job->request; in qla4xxx_restore_defaults()
346 struct iscsi_bsg_reply *bsg_reply = bsg_job->reply; in qla4xxx_restore_defaults()
378 bsg_job_done(bsg_job, bsg_reply->result, in qla4xxx_restore_defaults()
385 qla4xxx_bsg_get_acb(struct bsg_job *bsg_job) in qla4xxx_bsg_get_acb() argument
387 struct Scsi_Host *host = iscsi_job_to_shost(bsg_job); in qla4xxx_bsg_get_acb()
389 struct iscsi_bsg_request *bsg_req = bsg_job->request; in qla4xxx_bsg_get_acb()
390 struct iscsi_bsg_reply *bsg_reply = bsg_job->reply; in qla4xxx_bsg_get_acb()
413 len = bsg_job->reply_payload.payload_len; in qla4xxx_bsg_get_acb()
436 sg_copy_from_buffer(bsg_job->reply_payload.sg_list, in qla4xxx_bsg_get_acb()
437 bsg_job->reply_payload.sg_cnt, in qla4xxx_bsg_get_acb()
442 bsg_job_done(bsg_job, bsg_reply->result, in qla4xxx_bsg_get_acb()
449 static void ql4xxx_execute_diag_cmd(struct bsg_job *bsg_job) in ql4xxx_execute_diag_cmd() argument
451 struct Scsi_Host *host = iscsi_job_to_shost(bsg_job); in ql4xxx_execute_diag_cmd()
453 struct iscsi_bsg_request *bsg_req = bsg_job->request; in ql4xxx_execute_diag_cmd()
454 struct iscsi_bsg_reply *bsg_reply = bsg_job->reply; in ql4xxx_execute_diag_cmd()
494 bsg_job->reply_len = sizeof(struct iscsi_bsg_reply) + sizeof(mbox_sts); in ql4xxx_execute_diag_cmd()
503 bsg_job_done(bsg_job, bsg_reply->result, in ql4xxx_execute_diag_cmd()
653 static void qla4xxx_execute_diag_loopback_cmd(struct bsg_job *bsg_job) in qla4xxx_execute_diag_loopback_cmd() argument
655 struct Scsi_Host *host = iscsi_job_to_shost(bsg_job); in qla4xxx_execute_diag_loopback_cmd()
657 struct iscsi_bsg_request *bsg_req = bsg_job->request; in qla4xxx_execute_diag_loopback_cmd()
658 struct iscsi_bsg_reply *bsg_reply = bsg_job->reply; in qla4xxx_execute_diag_loopback_cmd()
722 bsg_job->reply_len = sizeof(struct iscsi_bsg_reply) + sizeof(mbox_sts); in qla4xxx_execute_diag_loopback_cmd()
749 bsg_job_done(bsg_job, bsg_reply->result, in qla4xxx_execute_diag_loopback_cmd()
753 static int qla4xxx_execute_diag_test(struct bsg_job *bsg_job) in qla4xxx_execute_diag_test() argument
755 struct Scsi_Host *host = iscsi_job_to_shost(bsg_job); in qla4xxx_execute_diag_test()
757 struct iscsi_bsg_request *bsg_req = bsg_job->request; in qla4xxx_execute_diag_test()
775 ql4xxx_execute_diag_cmd(bsg_job); in qla4xxx_execute_diag_test()
784 qla4xxx_execute_diag_loopback_cmd(bsg_job); in qla4xxx_execute_diag_test()
796 ql4xxx_execute_diag_cmd(bsg_job); in qla4xxx_execute_diag_test()
810 int qla4xxx_process_vendor_specific(struct bsg_job *bsg_job) in qla4xxx_process_vendor_specific() argument
812 struct iscsi_bsg_reply *bsg_reply = bsg_job->reply; in qla4xxx_process_vendor_specific()
813 struct iscsi_bsg_request *bsg_req = bsg_job->request; in qla4xxx_process_vendor_specific()
814 struct Scsi_Host *host = iscsi_job_to_shost(bsg_job); in qla4xxx_process_vendor_specific()
819 return qla4xxx_read_flash(bsg_job); in qla4xxx_process_vendor_specific()
822 return qla4xxx_update_flash(bsg_job); in qla4xxx_process_vendor_specific()
825 return qla4xxx_get_acb_state(bsg_job); in qla4xxx_process_vendor_specific()
828 return qla4xxx_read_nvram(bsg_job); in qla4xxx_process_vendor_specific()
831 return qla4xxx_update_nvram(bsg_job); in qla4xxx_process_vendor_specific()
834 return qla4xxx_restore_defaults(bsg_job); in qla4xxx_process_vendor_specific()
837 return qla4xxx_bsg_get_acb(bsg_job); in qla4xxx_process_vendor_specific()
840 return qla4xxx_execute_diag_test(bsg_job); in qla4xxx_process_vendor_specific()
847 bsg_job_done(bsg_job, bsg_reply->result, in qla4xxx_process_vendor_specific()
857 int qla4xxx_bsg_request(struct bsg_job *bsg_job) in qla4xxx_bsg_request() argument
859 struct iscsi_bsg_request *bsg_req = bsg_job->request; in qla4xxx_bsg_request()
860 struct Scsi_Host *host = iscsi_job_to_shost(bsg_job); in qla4xxx_bsg_request()
865 return qla4xxx_process_vendor_specific(bsg_job); in qla4xxx_bsg_request()