aboutsummaryrefslogtreecommitdiffstats
path: root/block/bsg.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/bsg.c')
-rw-r--r--block/bsg.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/block/bsg.c b/block/bsg.c
index 0676301f16d0..82d58829ba59 100644
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -15,11 +15,13 @@
15#include <linux/blkdev.h> 15#include <linux/blkdev.h>
16#include <linux/poll.h> 16#include <linux/poll.h>
17#include <linux/cdev.h> 17#include <linux/cdev.h>
18#include <linux/jiffies.h>
18#include <linux/percpu.h> 19#include <linux/percpu.h>
19#include <linux/uio.h> 20#include <linux/uio.h>
20#include <linux/idr.h> 21#include <linux/idr.h>
21#include <linux/bsg.h> 22#include <linux/bsg.h>
22#include <linux/smp_lock.h> 23#include <linux/smp_lock.h>
24#include <linux/slab.h>
23 25
24#include <scsi/scsi.h> 26#include <scsi/scsi.h>
25#include <scsi/scsi_ioctl.h> 27#include <scsi/scsi_ioctl.h>
@@ -197,7 +199,7 @@ static int blk_fill_sgv4_hdr_rq(struct request_queue *q, struct request *rq,
197 rq->cmd_len = hdr->request_len; 199 rq->cmd_len = hdr->request_len;
198 rq->cmd_type = REQ_TYPE_BLOCK_PC; 200 rq->cmd_type = REQ_TYPE_BLOCK_PC;
199 201
200 rq->timeout = (hdr->timeout * HZ) / 1000; 202 rq->timeout = msecs_to_jiffies(hdr->timeout);
201 if (!rq->timeout) 203 if (!rq->timeout)
202 rq->timeout = q->sg_timeout; 204 rq->timeout = q->sg_timeout;
203 if (!rq->timeout) 205 if (!rq->timeout)
@@ -259,7 +261,7 @@ bsg_map_hdr(struct bsg_device *bd, struct sg_io_v4 *hdr, fmode_t has_write_perm,
259 return ERR_PTR(ret); 261 return ERR_PTR(ret);
260 262
261 /* 263 /*
262 * map scatter-gather elements seperately and string them to request 264 * map scatter-gather elements separately and string them to request
263 */ 265 */
264 rq = blk_get_request(q, rw, GFP_KERNEL); 266 rq = blk_get_request(q, rw, GFP_KERNEL);
265 if (!rq) 267 if (!rq)