diff options
author | Christoph Hellwig <hch@lst.de> | 2011-05-19 10:58:09 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-06-15 14:36:16 +0200 |
commit | 4e1e00515e2522bbae98a0653ea2692ec20851ac (patch) | |
tree | 2dac7026a92db73d672d259fd3c125c02a0c5554 /hw/ide/internal.h | |
parent | cb144ccb2ffdb3bca4026455074e434d8db34d73 (diff) | |
download | qemu-4e1e00515e2522bbae98a0653ea2692ec20851ac.zip qemu-4e1e00515e2522bbae98a0653ea2692ec20851ac.tar.gz qemu-4e1e00515e2522bbae98a0653ea2692ec20851ac.tar.bz2 |
ide: allow other dma comands than read and write
Replace the is_read flag with a dma_cmd flag to allow the dma and
restart logic to handler other commands like TRIM.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/ide/internal.h')
-rw-r--r-- | hw/ide/internal.h | 10 |
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; |