From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59742) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2lF6-0005aZ-P0 for qemu-devel@nongnu.org; Wed, 29 Feb 2012 10:15:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2lEx-0003UX-FB for qemu-devel@nongnu.org; Wed, 29 Feb 2012 10:15:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:29483) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2lEx-0003U3-77 for qemu-devel@nongnu.org; Wed, 29 Feb 2012 10:14:51 -0500 From: Kevin Wolf Date: Wed, 29 Feb 2012 16:17:50 +0100 Message-Id: <1330528688-21996-10-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 09/27] fdc: fix seek command, which shouldn't check tracks 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 The seek command just sends step pulses to the drive and doesn't care if there is a medium inserted of if it is banging the head against the drive. Signed-off-by: Herv=C3=A9 Poussineau Signed-off-by: Kevin Wolf --- hw/fdc.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/fdc.c b/hw/fdc.c index cc03326..7879b70 100644 --- a/hw/fdc.c +++ b/hw/fdc.c @@ -1622,13 +1622,16 @@ static void fdctrl_handle_seek(FDCtrl *fdctrl, in= t direction) SET_CUR_DRV(fdctrl, fdctrl->fifo[1] & FD_DOR_SELMASK); cur_drv =3D get_cur_drv(fdctrl); fdctrl_reset_fifo(fdctrl); + /* The seek command just sends step pulses to the drive and doesn't = care if + * there is a medium inserted of if it's banging the head against th= e drive. + */ if (fdctrl->fifo[2] > cur_drv->max_track) { - fdctrl_raise_irq(fdctrl, FD_SR0_ABNTERM | FD_SR0_SEEK); + cur_drv->track =3D cur_drv->max_track; } else { cur_drv->track =3D fdctrl->fifo[2]; - /* Raise Interrupt */ - fdctrl_raise_irq(fdctrl, FD_SR0_SEEK); } + /* Raise Interrupt */ + fdctrl_raise_irq(fdctrl, FD_SR0_SEEK); } =20 static void fdctrl_handle_perpendicular_mode(FDCtrl *fdctrl, int directi= on) --=20 1.7.6.5