Commit 96c4f569846dccf552dbf5ca059a734eb51d3aae

Authored by blueswir1
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 427 break;
428 428 case 1:
429 429 SER_DPRINTF("Write channel %c, ch %d\n", CHN_C(s), val);
  430 + s->tx = val;
430 431 if (s->wregs[5] & 8) { // tx enabled
431   - s->tx = val;
432 432 if (s->chr)
433 433 qemu_chr_write(s->chr, &s->tx, 1);
434 434 else if (s->type == kbd) {
435 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 441 break;
442 442 default:
443 443 break;
... ...