Lines Matching defs:bsg_job

12 qla4xxx_read_flash(struct bsg_job *bsg_job)
14 struct Scsi_Host *host = iscsi_job_to_shost(bsg_job);
16 struct iscsi_bsg_reply *bsg_reply = bsg_job->reply;
17 struct iscsi_bsg_request *bsg_req = bsg_job->request;
44 length = bsg_job->reply_payload.payload_len;
62 sg_copy_from_buffer(bsg_job->reply_payload.sg_list,
63 bsg_job->reply_payload.sg_cnt,
68 bsg_job_done(bsg_job, bsg_reply->result,
77 qla4xxx_update_flash(struct bsg_job *bsg_job)
79 struct Scsi_Host *host = iscsi_job_to_shost(bsg_job);
81 struct iscsi_bsg_reply *bsg_reply = bsg_job->reply;
82 struct iscsi_bsg_request *bsg_req = bsg_job->request;
109 length = bsg_job->request_payload.payload_len;
122 sg_copy_to_buffer(bsg_job->request_payload.sg_list,
123 bsg_job->request_payload.sg_cnt, flash, length);
133 bsg_job_done(bsg_job, bsg_reply->result,
142 qla4xxx_get_acb_state(struct bsg_job *bsg_job)
144 struct Scsi_Host *host = iscsi_job_to_shost(bsg_job);
146 struct iscsi_bsg_request *bsg_req = bsg_job->request;
147 struct iscsi_bsg_reply *bsg_reply = bsg_job->reply;
168 if (bsg_job->reply_payload.payload_len < sizeof(status)) {
170 __func__, bsg_job->reply_payload.payload_len);
186 sg_copy_from_buffer(bsg_job->reply_payload.sg_list,
187 bsg_job->reply_payload.sg_cnt,
192 bsg_job_done(bsg_job, bsg_reply->result,
199 qla4xxx_read_nvram(struct bsg_job *bsg_job)
201 struct Scsi_Host *host = iscsi_job_to_shost(bsg_job);
203 struct iscsi_bsg_request *bsg_req = bsg_job->request;
204 struct iscsi_bsg_reply *bsg_reply = bsg_job->reply;
228 len = bsg_job->reply_payload.payload_len;
257 sg_copy_from_buffer(bsg_job->reply_payload.sg_list,
258 bsg_job->reply_payload.sg_cnt,
263 bsg_job_done(bsg_job, bsg_reply->result,
271 qla4xxx_update_nvram(struct bsg_job *bsg_job)
273 struct Scsi_Host *host = iscsi_job_to_shost(bsg_job);
275 struct iscsi_bsg_request *bsg_req = bsg_job->request;
276 struct iscsi_bsg_reply *bsg_reply = bsg_job->reply;
299 len = bsg_job->request_payload.payload_len;
321 sg_copy_to_buffer(bsg_job->request_payload.sg_list,
322 bsg_job->request_payload.sg_cnt, nvram, len);
332 bsg_job_done(bsg_job, bsg_reply->result,
340 qla4xxx_restore_defaults(struct bsg_job *bsg_job)
342 struct Scsi_Host *host = iscsi_job_to_shost(bsg_job);
344 struct iscsi_bsg_request *bsg_req = bsg_job->request;
345 struct iscsi_bsg_reply *bsg_reply = bsg_job->reply;
377 bsg_job_done(bsg_job, bsg_reply->result,
384 qla4xxx_bsg_get_acb(struct bsg_job *bsg_job)
386 struct Scsi_Host *host = iscsi_job_to_shost(bsg_job);
388 struct iscsi_bsg_request *bsg_req = bsg_job->request;
389 struct iscsi_bsg_reply *bsg_reply = bsg_job->reply;
412 len = bsg_job->reply_payload.payload_len;
435 sg_copy_from_buffer(bsg_job->reply_payload.sg_list,
436 bsg_job->reply_payload.sg_cnt,
441 bsg_job_done(bsg_job, bsg_reply->result,
448 static void ql4xxx_execute_diag_cmd(struct bsg_job *bsg_job)
450 struct Scsi_Host *host = iscsi_job_to_shost(bsg_job);
452 struct iscsi_bsg_request *bsg_req = bsg_job->request;
453 struct iscsi_bsg_reply *bsg_reply = bsg_job->reply;
493 bsg_job->reply_len = sizeof(struct iscsi_bsg_reply) + sizeof(mbox_sts);
502 bsg_job_done(bsg_job, bsg_reply->result,
652 static void qla4xxx_execute_diag_loopback_cmd(struct bsg_job *bsg_job)
654 struct Scsi_Host *host = iscsi_job_to_shost(bsg_job);
656 struct iscsi_bsg_request *bsg_req = bsg_job->request;
657 struct iscsi_bsg_reply *bsg_reply = bsg_job->reply;
721 bsg_job->reply_len = sizeof(struct iscsi_bsg_reply) + sizeof(mbox_sts);
748 bsg_job_done(bsg_job, bsg_reply->result,
752 static int qla4xxx_execute_diag_test(struct bsg_job *bsg_job)
754 struct Scsi_Host *host = iscsi_job_to_shost(bsg_job);
756 struct iscsi_bsg_request *bsg_req = bsg_job->request;
774 ql4xxx_execute_diag_cmd(bsg_job);
783 qla4xxx_execute_diag_loopback_cmd(bsg_job);
795 ql4xxx_execute_diag_cmd(bsg_job);
807 * @bsg_job: iscsi_bsg_job to handle
809 int qla4xxx_process_vendor_specific(struct bsg_job *bsg_job)
811 struct iscsi_bsg_reply *bsg_reply = bsg_job->reply;
812 struct iscsi_bsg_request *bsg_req = bsg_job->request;
813 struct Scsi_Host *host = iscsi_job_to_shost(bsg_job);
818 return qla4xxx_read_flash(bsg_job);
821 return qla4xxx_update_flash(bsg_job);
824 return qla4xxx_get_acb_state(bsg_job);
827 return qla4xxx_read_nvram(bsg_job);
830 return qla4xxx_update_nvram(bsg_job);
833 return qla4xxx_restore_defaults(bsg_job);
836 return qla4xxx_bsg_get_acb(bsg_job);
839 return qla4xxx_execute_diag_test(bsg_job);
846 bsg_job_done(bsg_job, bsg_reply->result,
854 * @bsg_job: iscsi_bsg_job to handle
856 int qla4xxx_bsg_request(struct bsg_job *bsg_job)
858 struct iscsi_bsg_request *bsg_req = bsg_job->request;
859 struct Scsi_Host *host = iscsi_job_to_shost(bsg_job);
864 return qla4xxx_process_vendor_specific(bsg_job);