summaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-dma.c')
-rw-r--r--drivers/ide/ide-dma.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index cf5897f5533f..c0505e2dfc2e 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -566,9 +566,12 @@ EXPORT_SYMBOL_GPL(ide_allocate_dma_engine);
int ide_dma_prepare(ide_drive_t *drive, struct ide_cmd *cmd)
{
+ const struct ide_dma_ops *dma_ops = drive->hwif->dma_ops;
+
if ((drive->dev_flags & IDE_DFLAG_USING_DMA) == 0 ||
+ (dma_ops->dma_check && dma_ops->dma_check(drive, cmd)) ||
ide_build_sglist(drive, cmd) == 0 ||
- drive->hwif->dma_ops->dma_setup(drive, cmd))
+ dma_ops->dma_setup(drive, cmd))
return 1;
return 0;
}