From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59816) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2lFE-0005iF-84 for qemu-devel@nongnu.org; Wed, 29 Feb 2012 10:15:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2lEp-0003Rf-Le for qemu-devel@nongnu.org; Wed, 29 Feb 2012 10:15:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56968) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2lEp-0003RA-Dl for qemu-devel@nongnu.org; Wed, 29 Feb 2012 10:14:43 -0500 From: Kevin Wolf Date: Wed, 29 Feb 2012 16:17:43 +0100 Message-Id: <1330528688-21996-3-git-send-email-kwolf@redhat.com> In-Reply-To: <1330528688-21996-1-git-send-email-kwolf@redhat.com> References: <1330528688-21996-1-git-send-email-kwolf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 02/27] fdc: set busy bit when starting a command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: Herv=C3=A9 Poussineau This bit must be active while a command is currently executed. Signed-off-by: Herv=C3=A9 Poussineau Signed-off-by: Kevin Wolf --- hw/fdc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/fdc.c b/hw/fdc.c index 64e635a..05edc3a 100644 --- a/hw/fdc.c +++ b/hw/fdc.c @@ -1446,7 +1446,6 @@ static void fdctrl_handle_readid(FDCtrl *fdctrl, in= t direction) { FDrive *cur_drv =3D get_cur_drv(fdctrl); =20 - /* XXX: should set main status register to busy */ cur_drv->head =3D (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, uint3= 2_t value) pos =3D command_to_handler[value & 0xff]; FLOPPY_DPRINTF("%s command\n", handlers[pos].name); fdctrl->data_len =3D handlers[pos].parameters + 1; + fdctrl->msr |=3D FD_MSR_CMDBUSY; } =20 FLOPPY_DPRINTF("%s: %02x\n", __func__, value); --=20 1.7.6.5