diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-10-09 20:27:55 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-10-09 20:27:55 +0000 |
commit | a7dfe172fa839a10667264a99f307d143eb2cc92 (patch) | |
tree | 25904502af415119c721f27647aa4be550ba2bf1 | |
parent | 7fe48483cd90401de2477733ce65037ee0ed0906 (diff) |
IDE standby fix for Linux 2.6 guest - segfault fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1111 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | hw/ide.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -1567,6 +1567,10 @@ static void ide_ioport_write(void *opaque, uint32_t addr, uint32_t val) goto abort_cmd; } break; + case WIN_STANDBYNOW1: + s->status = READY_STAT; + ide_set_irq(s); + break; /* ATAPI commands */ case WIN_PIDENTIFY: if (s->is_cdrom) { @@ -1784,6 +1788,16 @@ static uint32_t ide_data_readl(void *opaque, uint32_t addr) return ret; } +static void ide_dummy_transfer_stop(IDEState *s) +{ + s->data_ptr = s->io_buffer; + s->data_end = s->io_buffer; + s->io_buffer[0] = 0xff; + s->io_buffer[1] = 0xff; + s->io_buffer[2] = 0xff; + s->io_buffer[3] = 0xff; +} + static void ide_reset(IDEState *s) { s->mult_sectors = MAX_MULT_SECTORS; @@ -1791,6 +1805,10 @@ static void ide_reset(IDEState *s) s->select = 0xa0; s->status = READY_STAT; ide_set_signature(s); + /* init the transfer handler so that 0xffff is returned on data + accesses */ + s->end_transfer_func = ide_dummy_transfer_stop; + ide_dummy_transfer_stop(s); } struct partition { |