summaryrefslogtreecommitdiff
path: root/block/bsg.c
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2008-01-25 20:05:55 -0600
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-01-30 13:14:26 -0600
commit40f620286dd08e29c995ca631f45e8d03f4fe1be (patch)
tree9bdfd55ad3a149bdcb1ede9bf452f32118214aea /block/bsg.c
parent3d9dd6eef888658d26ebea0cc24d15d2a93ab015 (diff)
downloadlwn-40f620286dd08e29c995ca631f45e8d03f4fe1be.tar.gz
lwn-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 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)
goto out;
}
rq->next_rq = next_rq;
+ next_rq->cmd_type = rq->cmd_type;
dxferp = (void*)(unsigned long)hdr->din_xferp;
ret = blk_rq_map_user(q, next_rq, dxferp, hdr->din_xfer_len);