Commit 7603d1568e121f74b03dabc8f86c7c9b88723075
1 parent
c0009975
Fix bugs in the ATAPI cdrom driver, by Brandon Philips.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3124 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
3 additions
and
1 deletions
hw/ide.c
@@ -671,7 +671,8 @@ static void ide_transfer_start(IDEState *s, uint8_t *buf, int size, | @@ -671,7 +671,8 @@ static void ide_transfer_start(IDEState *s, uint8_t *buf, int size, | ||
671 | s->end_transfer_func = end_transfer_func; | 671 | s->end_transfer_func = end_transfer_func; |
672 | s->data_ptr = buf; | 672 | s->data_ptr = buf; |
673 | s->data_end = buf + size; | 673 | s->data_end = buf + size; |
674 | - s->status |= DRQ_STAT; | 674 | + if (!(s->status & ERR_STAT)) |
675 | + s->status |= DRQ_STAT; | ||
675 | } | 676 | } |
676 | 677 | ||
677 | static void ide_transfer_stop(IDEState *s) | 678 | static void ide_transfer_stop(IDEState *s) |
@@ -1969,6 +1970,7 @@ static void ide_ioport_write(void *opaque, uint32_t addr, uint32_t val) | @@ -1969,6 +1970,7 @@ static void ide_ioport_write(void *opaque, uint32_t addr, uint32_t val) | ||
1969 | /* overlapping commands not supported */ | 1970 | /* overlapping commands not supported */ |
1970 | if (s->feature & 0x02) | 1971 | if (s->feature & 0x02) |
1971 | goto abort_cmd; | 1972 | goto abort_cmd; |
1973 | + s->status = READY_STAT; | ||
1972 | s->atapi_dma = s->feature & 1; | 1974 | s->atapi_dma = s->feature & 1; |
1973 | s->nsector = 1; | 1975 | s->nsector = 1; |
1974 | ide_transfer_start(s, s->io_buffer, ATAPI_PACKET_SIZE, | 1976 | ide_transfer_start(s, s->io_buffer, ATAPI_PACKET_SIZE, |