From: James Bottomley Date: Sat, 26 Jan 2008 02:05:55 +0000 (-0600) Subject: [SCSI] bsg: copy the cmd_type field to the subordinate request for bidi X-Git-Tag: v2.6.25-rc1~1140^2~1 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=40f620286dd08e29c995ca631f45e8d03f4fe1be;p=linux-2.6-omap-h63xx.git [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 Signed-off-by: James Bottomley --- 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) 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);