aboutsummaryrefslogtreecommitdiff
path: root/hw/ide/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'hw/ide/internal.h')
-rw-r--r--hw/ide/internal.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/hw/ide/internal.h b/hw/ide/internal.h
index 8d18cc3..ea3edf5 100644
--- a/hw/ide/internal.h
+++ b/hw/ide/internal.h
@@ -379,6 +379,14 @@ struct unreported_events {
bool new_media;
};
+enum ide_dma_cmd {
+ IDE_DMA_READ,
+ IDE_DMA_WRITE,
+};
+
+#define ide_cmd_is_read(s) \
+ ((s)->dma_cmd == IDE_DMA_READ)
+
/* NOTE: IDEState represents in fact one drive */
struct IDEState {
IDEBus *bus;
@@ -446,7 +454,7 @@ struct IDEState {
uint32_t mdata_size;
uint8_t *mdata_storage;
int media_changed;
- int is_read;
+ enum ide_dma_cmd dma_cmd;
/* SMART */
uint8_t smart_enabled;
uint8_t smart_autosave;