diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-01-25 21:05:55 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-01-30 14:14:26 -0500 |
commit | 40f620286dd08e29c995ca631f45e8d03f4fe1be (patch) | |
tree | 9bdfd55ad3a149bdcb1ede9bf452f32118214aea /block/bsg.c | |
parent | 3d9dd6eef888658d26ebea0cc24d15d2a93ab015 (diff) |
[SCSI] bsg: copy the cmd_type field to the subordinate request for bidi
This fixes a problem in SCSI where we use the (previously
uninitialised) cmd_type via blk_pc_request() to set up the transfer in
scsi_init_sgtable().
Acked-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'block/bsg.c')
-rw-r--r-- | block/bsg.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/block/bsg.c b/block/bsg.c index 69b0a9d33306..8917c5174dc2 100644 --- a/block/bsg.c +++ b/block/bsg.c | |||
@@ -279,6 +279,7 @@ bsg_map_hdr(struct bsg_device *bd, struct sg_io_v4 *hdr) | |||
279 | goto out; | 279 | goto out; |
280 | } | 280 | } |
281 | rq->next_rq = next_rq; | 281 | rq->next_rq = next_rq; |
282 | next_rq->cmd_type = rq->cmd_type; | ||
282 | 283 | ||
283 | dxferp = (void*)(unsigned long)hdr->din_xferp; | 284 | dxferp = (void*)(unsigned long)hdr->din_xferp; |
284 | ret = blk_rq_map_user(q, next_rq, dxferp, hdr->din_xfer_len); | 285 | ret = blk_rq_map_user(q, next_rq, dxferp, hdr->din_xfer_len); |