Commit 8e640118 authored by James Bottomley's avatar James Bottomley
Browse files

update scsi_wait_req to new format for blk_rq_map_kern()

Signed-off-by: default avatarJames Bottomley <>
parent e537a36d
......@@ -246,15 +246,18 @@ void scsi_wait_req(struct scsi_request *sreq, const void *cmnd, void *buffer,
unsigned bufflen, int timeout, int retries)
int write = sreq->sr_data_direction == DMA_TO_DEVICE;
struct request *req;
if (bufflen)
req = blk_rq_map_kern(sreq->sr_device->request_queue,
sreq->sr_data_direction == DMA_TO_DEVICE,
buffer, bufflen, __GFP_WAIT);
req = blk_get_request(sreq->sr_device->request_queue, READ,
req = blk_get_request(sreq->sr_device->request_queue, write,
if (bufflen && blk_rq_map_kern(sreq->sr_device->request_queue, req,
buffer, bufflen, __GFP_WAIT)) {
sreq->sr_result = DRIVER_ERROR << 24;
req->flags |= REQ_NOMERGE;
req->waiting = &wait;
req->end_io = scsi_wait_req_end_io;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment