summaryrefslogtreecommitdiff
path: root/hw/fdc.c
diff options
context:
space:
mode:
authorHervé Poussineau <hpoussin@reactos.org>2012-09-20 23:07:53 +0200
committerKevin Wolf <kwolf@redhat.com>2012-11-14 18:19:22 +0100
commit075f5532f182a12d8c89352f876363f110722e82 (patch)
tree5ec576e40916b9eb9074bab0b135c6f8134a0997 /hw/fdc.c
parentd6ed4e21060d13a2faf7c1c9d121e68a16a411f8 (diff)
downloadqemu-075f5532f182a12d8c89352f876363f110722e82.zip
fdc: fix false FD_SR0_SEEK
Do not always set FD_SR0_SEEK, as callers already set it if needed. 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.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/hw/fdc.c b/hw/fdc.c
index a9a2a2a10a..525ba20194 100644
--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -1149,10 +1149,14 @@ static void fdctrl_stop_transfer(FDCtrl *fdctrl, uint8_t status0,
uint8_t status1, uint8_t status2)
{
FDrive *cur_drv;
-
cur_drv = get_cur_drv(fdctrl);
- fdctrl->status0 = status0 | FD_SR0_SEEK | (cur_drv->head << 2) |
- GET_CUR_DRV(fdctrl);
+
+ fdctrl->status0 &= ~(FD_SR0_DS0 | FD_SR0_DS1 | FD_SR0_HEAD);
+ fdctrl->status0 |= GET_CUR_DRV(fdctrl);
+ if (cur_drv->head) {
+ fdctrl->status0 |= FD_SR0_HEAD;
+ }
+ fdctrl->status0 |= status0;
FLOPPY_DPRINTF("transfer status: %02x %02x %02x (%02x)\n",
status0, status1, status2, fdctrl->status0);