From b26ecfe548c177c373eee53849b87fff6886e67b Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 10 Feb 2015 14:42:04 +0000 Subject: [PATCH] scst_local: Fix bidirectional command support (merge r5984 from trunk) git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@6075 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst_local/scst_local.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scst_local/scst_local.c b/scst_local/scst_local.c index fbe429471..89db74641 100644 --- a/scst_local/scst_local.c +++ b/scst_local/scst_local.c @@ -1068,7 +1068,8 @@ static int scst_local_queuecommand_lck(struct scsi_cmnd *SCpnt, #endif dir = SCST_DATA_NONE; - switch (SCpnt->sc_data_direction) { + switch (SCpnt->request->next_rq ? DMA_BIDIRECTIONAL : + SCpnt->sc_data_direction) { case DMA_TO_DEVICE: dir = SCST_DATA_WRITE; scst_cmd_set_expected(scst_cmd, dir, scsi_bufflen(SCpnt));