qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 1/2] ide: remove possibility to disable DMA for cdro


From: Hervé Poussineau
Subject: [Qemu-devel] [PATCH 1/2] ide: remove possibility to disable DMA for cdroms
Date: Tue, 22 Apr 2014 23:54:35 +0200

This define has been introduced 8 years ago, and non-DMA cases have never 
changed since then.

Signed-off-by: Hervé Poussineau <address@hidden>
---
 hw/ide/core.c     |    8 --------
 hw/ide/internal.h |    1 -
 2 files changed, 9 deletions(-)

diff --git a/hw/ide/core.c b/hw/ide/core.c
index c943a4d..61b211f 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -204,16 +204,10 @@ static void ide_atapi_identify(IDEState *s)
     padstr((char *)(p + 23), s->version, 8); /* firmware version */
     padstr((char *)(p + 27), s->drive_model_str, 40); /* model */
     put_le16(p + 48, 1); /* dword I/O (XXX: should not be set on CDROM) */
-#ifdef USE_DMA_CDROM
     put_le16(p + 49, 1 << 9 | 1 << 8); /* DMA and LBA supported */
     put_le16(p + 53, 7); /* words 64-70, 54-58, 88 valid */
     put_le16(p + 62, 7);  /* single word dma0-2 supported */
     put_le16(p + 63, 7);  /* mdma0-2 supported */
-#else
-    put_le16(p + 49, 1 << 9); /* LBA supported, no DMA */
-    put_le16(p + 53, 3); /* words 64-70, 54-58 valid */
-    put_le16(p + 63, 0x103); /* DMA modes XXX: may be incorrect */
-#endif
     put_le16(p + 64, 3); /* pio3-4 supported */
     put_le16(p + 65, 0xb4); /* minimum DMA multiword tx cycle time */
     put_le16(p + 66, 0xb4); /* recommended DMA multiword tx cycle time */
@@ -230,9 +224,7 @@ static void ide_atapi_identify(IDEState *s)
     }
 
     put_le16(p + 80, 0x1e); /* support up to ATA/ATAPI-4 */
-#ifdef USE_DMA_CDROM
     put_le16(p + 88, 0x3f | (1 << 13)); /* udma5 set and supported */
-#endif
     memcpy(s->identify_data, p, sizeof(s->identify_data));
     s->identify_set = 1;
 }
diff --git a/hw/ide/internal.h b/hw/ide/internal.h
index 0567a52..af4aa9a 100644
--- a/hw/ide/internal.h
+++ b/hw/ide/internal.h
@@ -17,7 +17,6 @@
 //#define DEBUG_IDE
 //#define DEBUG_IDE_ATAPI
 //#define DEBUG_AIO
-#define USE_DMA_CDROM
 
 typedef struct IDEBus IDEBus;
 typedef struct IDEDevice IDEDevice;
-- 
1.7.10.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]