Commit 54f8af28 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] ide should check dma_on

parent 261ff2d6
......@@ -1255,13 +1255,14 @@ static int set_io_32bit(ide_drive_t *drive, int arg)
static int set_using_dma (ide_drive_t *drive, int arg)
{
if (!drive->driver || !DRIVER(drive)->supports_dma)
if (!DRIVER(drive)->supports_dma)
return -EPERM;
if (!drive->id || !(drive->id->capability & 1))
return -EPERM;
if (HWIF(drive)->ide_dma_check == NULL)
return -EPERM;
if (arg) {
if (HWIF(drive)->ide_dma_check(drive)) return -EIO;
if (HWIF(drive)->ide_dma_on(drive)) return -EIO;
} else {
if (HWIF(drive)->ide_dma_off(drive)) return -EIO;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment