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
This commit is contained in:
Bart Van Assche
2015-02-10 14:42:04 +00:00
parent c0f302deb5
commit b26ecfe548
+2 -1
View File
@@ -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));