Commit 596bb44d authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Kevin Wolf
Browse files

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: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent cd369c46
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -521,7 +521,6 @@ 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_size = n * 512;
    if (s->bus->dma->ops->prepare_buf(s->bus->dma, s->is_read) == 0)