]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[SCSI] bsg: copy the cmd_type field to the subordinate request for bidi
authorJames Bottomley <James.Bottomley@HansenPartnership.com>
Sat, 26 Jan 2008 02:05:55 +0000 (20:05 -0600)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Wed, 30 Jan 2008 19:14:26 +0000 (13:14 -0600)
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>
block/bsg.c

index 69b0a9d333064c782676a4f84fd79e4006c2c879..8917c5174dc2646c5ad8d4d67eb67529a98783f5 100644 (file)
@@ -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);