summaryrefslogtreecommitdiff
path: root/hw/fdc.c
diff options
context:
space:
mode:
authorHervé Poussineau <hpoussin@reactos.org>2012-02-06 22:29:03 +0100
committerKevin Wolf <kwolf@redhat.com>2012-02-29 12:48:46 +0100
commit1457a75843740b0433edfc88666c793858f4423a (patch)
tree616ea8acdc2793afc978365889623a3e8cfe2a0a /hw/fdc.c
parent08388273a3c4e895bf7e10f356f66c2363cfe90b (diff)
downloadqemu-1457a75843740b0433edfc88666c793858f4423a.zip
fdc: set busy bit when starting a command
This bit must be active while a command is currently executed. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/fdc.c')
-rw-r--r--hw/fdc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/fdc.c b/hw/fdc.c
index 64e635a849..05edc3aa3c 100644
--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -1446,7 +1446,6 @@ static void fdctrl_handle_readid(FDCtrl *fdctrl, int direction)
{
FDrive *cur_drv = get_cur_drv(fdctrl);
- /* XXX: should set main status register to busy */
cur_drv->head = (fdctrl->fifo[1] >> 2) & 1;
qemu_mod_timer(fdctrl->result_timer,
qemu_get_clock_ns(vm_clock) + (get_ticks_per_sec() / 50));
@@ -1734,6 +1733,7 @@ static void fdctrl_write_data(FDCtrl *fdctrl, uint32_t value)
pos = command_to_handler[value & 0xff];
FLOPPY_DPRINTF("%s command\n", handlers[pos].name);
fdctrl->data_len = handlers[pos].parameters + 1;
+ fdctrl->msr |= FD_MSR_CMDBUSY;
}
FLOPPY_DPRINTF("%s: %02x\n", __func__, value);