summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorTony Battersby <tonyb@cybernetics.com>2014-08-22 15:53:39 -0400
committerJens Axboe <axboe@fb.com>2014-08-22 15:04:31 -0500
commit6f4a16266fb3e58cd3e200eab51d2220ef92d604 (patch)
treeefab6520c3793325ef2881f7fbe2e34df75f2204 /drivers/scsi
parenta57821cac6bb6e46abea118e34d0e86444ec1410 (diff)
downloadop-kernel-dev-6f4a16266fb3e58cd3e200eab51d2220ef92d604.zip
op-kernel-dev-6f4a16266fb3e58cd3e200eab51d2220ef92d604.tar.gz
scsi-mq: fix requests that use a separate CDB buffer
This patch fixes code such as the following with scsi-mq enabled: rq = blk_get_request(...); blk_rq_set_block_pc(rq); rq->cmd = my_cmd_buffer; /* separate CDB buffer */ blk_execute_rq_nowait(...); Code like this appears in e.g. sg_start_req() in drivers/scsi/sg.c (for large CDBs only). Without this patch, scsi_mq_prep_fn() will set rq->cmd back to rq->__cmd, causing the wrong CDB to be sent to the device. Signed-off-by: Tony Battersby <tonyb@cybernetics.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/scsi_lib.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 9c44392..d86808f 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1808,7 +1808,6 @@ static int scsi_mq_prep_fn(struct request *req)
cmd->tag = req->tag;
- req->cmd = req->__cmd;
cmd->cmnd = req->cmd;
cmd->prot_op = SCSI_PROT_NORMAL;
OpenPOWER on IntegriCloud