diff options
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r-- | drivers/ata/libata-core.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 63c743baf920..f2184276539d 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * libata-core.c - helper library for ATA | 2 | * libata-core.c - helper library for ATA |
3 | * | 3 | * |
4 | * Maintained by: Jeff Garzik <jgarzik@pobox.com> | 4 | * Maintained by: Tejun Heo <tj@kernel.org> |
5 | * Please ALWAYS copy linux-ide@vger.kernel.org | 5 | * Please ALWAYS copy linux-ide@vger.kernel.org |
6 | * on emails. | 6 | * on emails. |
7 | * | 7 | * |
@@ -1602,6 +1602,12 @@ unsigned ata_exec_internal_sg(struct ata_device *dev, | |||
1602 | qc->tf = *tf; | 1602 | qc->tf = *tf; |
1603 | if (cdb) | 1603 | if (cdb) |
1604 | memcpy(qc->cdb, cdb, ATAPI_CDB_LEN); | 1604 | memcpy(qc->cdb, cdb, ATAPI_CDB_LEN); |
1605 | |||
1606 | /* some SATA bridges need us to indicate data xfer direction */ | ||
1607 | if (tf->protocol == ATAPI_PROT_DMA && (dev->flags & ATA_DFLAG_DMADIR) && | ||
1608 | dma_dir == DMA_FROM_DEVICE) | ||
1609 | qc->tf.feature |= ATAPI_DMADIR; | ||
1610 | |||
1605 | qc->flags |= ATA_QCFLAG_RESULT_TF; | 1611 | qc->flags |= ATA_QCFLAG_RESULT_TF; |
1606 | qc->dma_dir = dma_dir; | 1612 | qc->dma_dir = dma_dir; |
1607 | if (dma_dir != DMA_NONE) { | 1613 | if (dma_dir != DMA_NONE) { |