Lines Matching refs:job

35 static void bsg_destroy_job(struct bsg_job *job)  in bsg_destroy_job()  argument
37 put_device(job->dev); /* release reference for the request */ in bsg_destroy_job()
39 kfree(job->request_payload.sg_list); in bsg_destroy_job()
40 kfree(job->reply_payload.sg_list); in bsg_destroy_job()
41 kfree(job); in bsg_destroy_job()
52 void bsg_job_done(struct bsg_job *job, int result, in bsg_job_done() argument
55 struct request *req = job->req; in bsg_job_done()
59 err = job->req->errors = result; in bsg_job_done()
62 job->req->sense_len = sizeof(u32); in bsg_job_done()
64 job->req->sense_len = job->reply_len; in bsg_job_done()
84 struct bsg_job *job = rq->special; in bsg_softirq_done() local
87 bsg_destroy_job(job); in bsg_softirq_done()
114 struct bsg_job *job; in bsg_create_job() local
119 job = kzalloc(sizeof(struct bsg_job) + q->bsg_job_size, GFP_KERNEL); in bsg_create_job()
120 if (!job) in bsg_create_job()
123 req->special = job; in bsg_create_job()
124 job->req = req; in bsg_create_job()
126 job->dd_data = (void *)&job[1]; in bsg_create_job()
127 job->request = req->cmd; in bsg_create_job()
128 job->request_len = req->cmd_len; in bsg_create_job()
129 job->reply = req->sense; in bsg_create_job()
130 job->reply_len = SCSI_SENSE_BUFFERSIZE; /* Size of sense buffer in bsg_create_job()
133 ret = bsg_map_buffer(&job->request_payload, req); in bsg_create_job()
138 ret = bsg_map_buffer(&job->reply_payload, rsp); in bsg_create_job()
142 job->dev = dev; in bsg_create_job()
144 get_device(job->dev); in bsg_create_job()
148 kfree(job->request_payload.sg_list); in bsg_create_job()
150 kfree(job); in bsg_create_job()
180 struct bsg_job *job; in bsg_request_fn() local
200 job = req->special; in bsg_request_fn()
201 ret = q->bsg_job_fn(job); in bsg_request_fn()