Commit 96c4f569846dccf552dbf5ca059a734eb51d3aae
1 parent
225d4be7
Generate interrupts and update state even if output is disabled (OpenBSD)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3116 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
4 additions
and
4 deletions
hw/slavio_serial.c
@@ -427,17 +427,17 @@ static void slavio_serial_mem_writeb(void *opaque, target_phys_addr_t addr, uint | @@ -427,17 +427,17 @@ static void slavio_serial_mem_writeb(void *opaque, target_phys_addr_t addr, uint | ||
427 | break; | 427 | break; |
428 | case 1: | 428 | case 1: |
429 | SER_DPRINTF("Write channel %c, ch %d\n", CHN_C(s), val); | 429 | SER_DPRINTF("Write channel %c, ch %d\n", CHN_C(s), val); |
430 | + s->tx = val; | ||
430 | if (s->wregs[5] & 8) { // tx enabled | 431 | if (s->wregs[5] & 8) { // tx enabled |
431 | - s->tx = val; | ||
432 | if (s->chr) | 432 | if (s->chr) |
433 | qemu_chr_write(s->chr, &s->tx, 1); | 433 | qemu_chr_write(s->chr, &s->tx, 1); |
434 | else if (s->type == kbd) { | 434 | else if (s->type == kbd) { |
435 | handle_kbd_command(s, val); | 435 | handle_kbd_command(s, val); |
436 | } | 436 | } |
437 | - s->rregs[0] |= 4; // Tx buffer empty | ||
438 | - s->rregs[1] |= 1; // All sent | ||
439 | - set_txint(s); | ||
440 | } | 437 | } |
438 | + s->rregs[0] |= 4; // Tx buffer empty | ||
439 | + s->rregs[1] |= 1; // All sent | ||
440 | + set_txint(s); | ||
441 | break; | 441 | break; |
442 | default: | 442 | default: |
443 | break; | 443 | break; |