From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:50341) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpFbw-000329-1E for qemu-devel@nongnu.org; Mon, 23 Jan 2012 03:50:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RpFbt-0006Y2-KY for qemu-devel@nongnu.org; Mon, 23 Jan 2012 03:50:43 -0500 Received: from smtp1-g21.free.fr ([212.27.42.1]:45331) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpFbs-0006XL-RB for qemu-devel@nongnu.org; Mon, 23 Jan 2012 03:50:41 -0500 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Mon, 23 Jan 2012 09:50:39 +0100 Message-Id: <1327308641-14736-9-git-send-email-hpoussin@reactos.org> In-Reply-To: <1327308641-14736-1-git-send-email-hpoussin@reactos.org> References: <1327308641-14736-1-git-send-email-hpoussin@reactos.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v3 8/9] fdc: fix seek command, which shouldn't check tracks List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , =?UTF-8?q?Herv=C3=A9=20Poussineau?= 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 --- hw/fdc.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/fdc.c b/hw/fdc.c index 8c200fb..3fa7704 100644 --- a/hw/fdc.c +++ b/hw/fdc.c @@ -1599,13 +1599,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.7.3