git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[Bluetooth] Handle device registration failures
[pandora-kernel.git]
/
block
/
scsi_ioctl.c
diff --git
a/block/scsi_ioctl.c
b/block/scsi_ioctl.c
index
b3e2107
..
2528a0c
100644
(file)
--- a/
block/scsi_ioctl.c
+++ b/
block/scsi_ioctl.c
@@
-228,6
+228,7
@@
static int sg_io(struct file *file, request_queue_t *q,
struct request *rq;
char sense[SCSI_SENSE_BUFFERSIZE];
unsigned char cmd[BLK_MAX_CDB];
struct request *rq;
char sense[SCSI_SENSE_BUFFERSIZE];
unsigned char cmd[BLK_MAX_CDB];
+ struct bio *bio;
if (hdr->interface_id != 'S')
return -EINVAL;
if (hdr->interface_id != 'S')
return -EINVAL;
@@
-270,13
+271,6
@@
static int sg_io(struct file *file, request_queue_t *q,
rq->cmd_type = REQ_TYPE_BLOCK_PC;
rq->cmd_type = REQ_TYPE_BLOCK_PC;
- /*
- * bounce this after holding a reference to the original bio, it's
- * needed for proper unmapping
- */
- if (rq->bio)
- blk_queue_bounce(q, &rq->bio);
-
rq->timeout = jiffies_to_msecs(hdr->timeout);
if (!rq->timeout)
rq->timeout = q->sg_timeout;
rq->timeout = jiffies_to_msecs(hdr->timeout);
if (!rq->timeout)
rq->timeout = q->sg_timeout;
@@
-308,6
+302,7
@@
static int sg_io(struct file *file, request_queue_t *q,
if (ret)
goto out;
if (ret)
goto out;
+ bio = rq->bio;
rq->retries = 0;
start_time = jiffies;
rq->retries = 0;
start_time = jiffies;
@@
-338,7
+333,7
@@
static int sg_io(struct file *file, request_queue_t *q,
hdr->sb_len_wr = len;
}
hdr->sb_len_wr = len;
}
- if (blk_rq_unmap_user(
rq
))
+ if (blk_rq_unmap_user(
bio
))
ret = -EFAULT;
/* may not have succeeded, but output values written to control
ret = -EFAULT;
/* may not have succeeded, but output values written to control