From patchwork Sun Jan 15 07:51:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [v2,09/10] fdc: fix seek command, which shouldn't check tracks Date: Sat, 14 Jan 2012 21:51:53 -0000 From: =?utf-8?q?Herv=C3=A9_Poussineau?= X-Patchwork-Id: 136171 Message-Id: <1326613915-3282-10-git-send-email-hpoussin@reactos.org> 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é Poussineau --- hw/fdc.c | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/hw/fdc.c b/hw/fdc.c index 685ea88..61d70eb 100644 --- a/hw/fdc.c +++ b/hw/fdc.c @@ -1599,13 +1599,12 @@ static void fdctrl_handle_seek(FDCtrl *fdctrl, int direction) SET_CUR_DRV(fdctrl, fdctrl->fifo[1] & FD_DOR_SELMASK); cur_drv = get_cur_drv(fdctrl); fdctrl_reset_fifo(fdctrl); - if (fdctrl->fifo[2] > cur_drv->max_track) { - fdctrl_raise_irq(fdctrl, FD_SR0_ABNTERM | FD_SR0_SEEK); - } else { - cur_drv->track = fdctrl->fifo[2]; - /* Raise Interrupt */ - fdctrl_raise_irq(fdctrl, FD_SR0_SEEK); - } + /* 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 the drive. + */ + cur_drv->track = fdctrl->fifo[2]; + /* Raise Interrupt */ + fdctrl_raise_irq(fdctrl, FD_SR0_SEEK); } static void fdctrl_handle_perpendicular_mode(FDCtrl *fdctrl, int direction)