Lines Matching refs:q
100 buf->sg_cnt = blk_rq_map_sg(req->q, req, buf->sg_list); in bsg_map_buffer()
113 struct request_queue *q = req->q; in bsg_create_job() local
119 job = kzalloc(sizeof(struct bsg_job) + q->bsg_job_size, GFP_KERNEL); in bsg_create_job()
125 if (q->bsg_job_size) in bsg_create_job()
163 void bsg_request_fn(struct request_queue *q) in bsg_request_fn() argument
165 struct device *dev = q->queuedata; in bsg_request_fn()
174 req = blk_fetch_request(q); in bsg_request_fn()
177 spin_unlock_irq(q->queue_lock); in bsg_request_fn()
183 spin_lock_irq(q->queue_lock); in bsg_request_fn()
188 ret = q->bsg_job_fn(job); in bsg_request_fn()
189 spin_lock_irq(q->queue_lock); in bsg_request_fn()
194 spin_unlock_irq(q->queue_lock); in bsg_request_fn()
196 spin_lock_irq(q->queue_lock); in bsg_request_fn()
211 int bsg_setup_queue(struct device *dev, struct request_queue *q, in bsg_setup_queue() argument
216 q->queuedata = dev; in bsg_setup_queue()
217 q->bsg_job_size = dd_job_size; in bsg_setup_queue()
218 q->bsg_job_fn = job_fn; in bsg_setup_queue()
219 queue_flag_set_unlocked(QUEUE_FLAG_BIDI, q); in bsg_setup_queue()
220 blk_queue_softirq_done(q, bsg_softirq_done); in bsg_setup_queue()
221 blk_queue_rq_timeout(q, BLK_DEFAULT_SG_TIMEOUT); in bsg_setup_queue()
223 ret = bsg_register_queue(q, dev, name, NULL); in bsg_setup_queue()