Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com>
---
 drivers/scsi/sym53c8xx_2/sym_glue.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c 
b/drivers/scsi/sym53c8xx_2/sym_glue.c
index 5d00e51..c33c697 100644
--- a/drivers/scsi/sym53c8xx_2/sym_glue.c
+++ b/drivers/scsi/sym53c8xx_2/sym_glue.c
@@ -374,14 +374,16 @@ int sym_setup_data_and_start(struct sym_hcb *np, struct 
scsi_cmnd *cmd, struct s
                cp->segments = 0;
        }
 
+       if (scsi_bidi_cmnd(cmd)) {
+               scmd_printk(KERN_INFO, cmd, "got bidi command");
+               sym_set_cam_status(cmd, DID_ERROR);
+               goto out_abort;
+       }
+
        /*
         *  Set the data pointer.
         */
        switch (dir) {
-       case DMA_BIDIRECTIONAL:
-               scmd_printk(KERN_INFO, cmd, "got DMA_BIDIRECTIONAL command");
-               sym_set_cam_status(cmd, DID_ERROR);
-               goto out_abort;
        case DMA_TO_DEVICE:
                goalp = SCRIPTA_BA(np, data_out2) + 8;
                lastp = goalp - 8 - (cp->segments * (2*4));
-- 
2.1.2

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to