浏览代码

[SCSI] u14-34f: fix data direction bug

Direction of data transfer 'DMA_FROM_DEVICE' was tested twice. DTD_OUT
means  transfer from host to device. This should occur when the
direction of data transfer (sc_data_direction) is 'DMA_TO_DEVICE'.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Roel Kluin 17 年之前
父节点
当前提交
d6a451dd4d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/scsi/u14-34f.c

+ 1 - 1
drivers/scsi/u14-34f.c

@@ -1216,7 +1216,7 @@ static void scsi_to_dev_dir(unsigned int i, unsigned int j) {
       cpp->xdir = DTD_IN;
       cpp->xdir = DTD_IN;
       return;
       return;
       }
       }
-   else if (SCpnt->sc_data_direction == DMA_FROM_DEVICE) {
+   else if (SCpnt->sc_data_direction == DMA_TO_DEVICE) {
       cpp->xdir = DTD_OUT;
       cpp->xdir = DTD_OUT;
       return;
       return;
       }
       }