Skip to content

Commit

Permalink
[SCSI] bsg: copy the cmd_type field to the subordinate request for bidi
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
  • Loading branch information
James Bottomley authored and James Bottomley committed Jan 30, 2008
1 parent 3d9dd6e commit 40f6202
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions block/bsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 40f6202

Please sign in to comment.