diff options
author | Christoph Hellwig <hch@lst.de> | 2010-12-20 13:45:58 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-01-24 11:08:51 +0100 |
commit | 596bb44dead047249c11df24b0e1ffaa514f4909 (patch) | |
tree | db344df779da14b9b04d514208de20ef8a0c12bc /hw | |
parent | cd369c4634e58a99fb82f076e6117bfdf0012b8e (diff) |
ide: also reset io_buffer_index for writes
Currenly the code only resets the io_buffer_index field for reads,
but the code seems to expect this for all types of I/O. I guess
we simply don't hit large enough transfers that would require this
often enough.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/ide/core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/ide/core.c b/hw/ide/core.c index e93dd4616c..12b9c53f73 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -521,8 +521,7 @@ void ide_dma_cb(void *opaque, int ret) /* launch next transfer */ n = s->nsector; - if (s->is_read) - s->io_buffer_index = 0; + s->io_buffer_index = 0; s->io_buffer_size = n * 512; if (s->bus->dma->ops->prepare_buf(s->bus->dma, s->is_read) == 0) goto eot; |