aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Bottomley2008-01-25 20:05:55 -0600
committerJames Bottomley2008-01-30 13:14:26 -0600
commit40f620286dd08e29c995ca631f45e8d03f4fe1be (patch)
tree9bdfd55ad3a149bdcb1ede9bf452f32118214aea /block/bsg.c
parent3d9dd6eef888658d26ebea0cc24d15d2a93ab015 (diff)
downloadkernel-common-40f620286dd08e29c995ca631f45e8d03f4fe1be.tar.gz
kernel-common-40f620286dd08e29c995ca631f45e8d03f4fe1be.tar.xz
kernel-common-40f620286dd08e29c995ca631f45e8d03f4fe1be.zip
[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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/block/bsg.c b/block/bsg.c
index 69b0a9d3330..8917c5174dc 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);