diff options
author | Albert Lee <albertcc@tw.ibm.com> | 2006-04-04 04:57:18 +0200 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-04-04 14:44:24 +0200 |
commit | 95de719adc94392a95c3c4d0a2d6b8b1ea39d236 (patch) | |
tree | d8196f39ca64a2c727ff6eff94b28d10013c6564 /drivers/scsi/libata-scsi.c | |
parent | Merge branch 'master' (diff) | |
download | linux-95de719adc94392a95c3c4d0a2d6b8b1ea39d236.tar.xz linux-95de719adc94392a95c3c4d0a2d6b8b1ea39d236.zip |
[PATCH] libata: convert ATAPI_ENABLE_DMADIR to module parameter
Convert the ATAPI_ENABLE_DMADIR compile time option needed
by some SATA-PATA bridge to runtime module parameter.
Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/scsi/libata-scsi.c')
-rw-r--r-- | drivers/scsi/libata-scsi.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index 745fc263feeb..c9c001490293 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c @@ -2163,11 +2163,9 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc, const u8 *scsicmd) qc->tf.protocol = ATA_PROT_ATAPI_DMA; qc->tf.feature |= ATAPI_PKT_DMA; -#ifdef ATAPI_ENABLE_DMADIR - /* some SATA bridges need us to indicate data xfer direction */ - if (cmd->sc_data_direction != DMA_TO_DEVICE) + if (atapi_dmadir && (cmd->sc_data_direction != DMA_TO_DEVICE)) + /* some SATA bridges need us to indicate data xfer direction */ qc->tf.feature |= ATAPI_DMADIR; -#endif } qc->nbytes = cmd->bufflen; |