diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-06-13 20:12:14 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-06-13 20:13:05 +0200 |
commit | ca11788a906e126b85bdfaf78fbc58821b0cea46 (patch) | |
tree | 269e3ad0ea4bb9ca70252fe0958b645eb873982d /linux | |
parent | 926090c399ab503d6f7f67a9556d46b5094fd20f (diff) | |
download | gnumach-ca11788a906e126b85bdfaf78fbc58821b0cea46.tar.gz gnumach-ca11788a906e126b85bdfaf78fbc58821b0cea46.tar.bz2 gnumach-ca11788a906e126b85bdfaf78fbc58821b0cea46.zip |
Keep DMA enabled on QEMU disks
When the host is very loaded, some requests might time out, but that is
not a reason for disabling DMA, so keep it enabled.
* linux/src/drivers/block/triton.c (config_drive_for_dma): When disk is
QEMU, set using_dma and keep_settings to 1.
Diffstat (limited to 'linux')
-rw-r--r-- | linux/src/drivers/block/triton.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/linux/src/drivers/block/triton.c b/linux/src/drivers/block/triton.c index 37eff2b3..f4633d21 100644 --- a/linux/src/drivers/block/triton.c +++ b/linux/src/drivers/block/triton.c @@ -226,6 +226,14 @@ static int config_drive_for_dma (ide_drive_t *drive) return 1; /* DMA disabled */ } } + + if (!strcmp("QEMU HARDDISK", id->model)) { + /* Virtual disks don't have issues with DMA :) */ + drive->using_dma = 1; + /* And keep enabled even if some requests time out due to emulation lag. */ + drive->keep_settings = 1; + return 1; /* DMA enabled */ + } /* Enable DMA on any drive that has mode 4 or 2 UltraDMA enabled */ if (id->field_valid & 4) { /* UltraDMA */ /* Enable DMA on any drive that has mode 4 UltraDMA enabled */ |