]> err.no Git - linux-2.6/blobdiff - drivers/ata/libata-scsi.c
rt2x00: Remove HWMODE_{A,B,G}
[linux-2.6] / drivers / ata / libata-scsi.c
index dd41b1a1b304fa3921ca69666a71d91d157e2f33..0562b0a49f3b2acc474c3145ee0f48911eefe349 100644 (file)
@@ -828,7 +828,7 @@ static void ata_scsi_sdev_config(struct scsi_device *sdev)
 
 /**
  *     atapi_drain_needed - Check whether data transfer may overflow
- *     @request: request to be checked
+ *     @rq: request to be checked
  *
  *     ATAPI commands which transfer variable length data to host
  *     might overflow due to application error or hardare bug.  This
@@ -2582,7 +2582,8 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc)
                qc->tf.protocol = ATAPI_PROT_DMA;
                qc->tf.feature |= ATAPI_PKT_DMA;
 
-               if (atapi_dmadir && (scmd->sc_data_direction != DMA_TO_DEVICE))
+               if ((dev->flags & ATA_DFLAG_DMADIR) &&
+                   (scmd->sc_data_direction != DMA_TO_DEVICE))
                        /* some SATA bridges need us to indicate data xfer direction */
                        qc->tf.feature |= ATAPI_DMADIR;
        }