The SCSI core never sets sc_data_direction to DMA_BIDIRECTIONAL.
Hence remove the code that tests for this value.

Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com>
Cc: Adam Radford <linuxr...@lsi.com>
---
 drivers/scsi/3w-9xxx.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c
index cd4129f..e83e3b7 100644
--- a/drivers/scsi/3w-9xxx.c
+++ b/drivers/scsi/3w-9xxx.c
@@ -1854,8 +1854,7 @@ static int twa_scsiop_execute_scsi(TW_Device_Extension 
*tw_dev, int request_id,
                if (scsi_sg_count(srb)) {
                        if ((scsi_sg_count(srb) == 1) &&
                            (scsi_bufflen(srb) < TW_MIN_SGL_LENGTH)) {
-                               if (srb->sc_data_direction == DMA_TO_DEVICE ||
-                                   srb->sc_data_direction == DMA_BIDIRECTIONAL)
+                               if (srb->sc_data_direction == DMA_TO_DEVICE)
                                        scsi_sg_copy_to_buffer(srb,
                                                               
tw_dev->generic_buffer_virt[request_id],
                                                               TW_SECTOR_SIZE);
@@ -1927,8 +1926,7 @@ static void 
twa_scsiop_execute_scsi_complete(TW_Device_Extension *tw_dev, int re
        struct scsi_cmnd *cmd = tw_dev->srb[request_id];
 
        if (scsi_bufflen(cmd) < TW_MIN_SGL_LENGTH &&
-           (cmd->sc_data_direction == DMA_FROM_DEVICE ||
-            cmd->sc_data_direction == DMA_BIDIRECTIONAL)) {
+           cmd->sc_data_direction == DMA_FROM_DEVICE) {
                if (scsi_sg_count(cmd) == 1) {
                        void *buf = tw_dev->generic_buffer_virt[request_id];
 
-- 
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