Patchwork [21/26] fdc: remove double affectation of FD_MSR_CMDBUSY flag

login
register
mail settings
Submitter Kevin Wolf
Date Nov. 14, 2012, 6:47 p.m.
Message ID <1352918847-3696-22-git-send-email-kwolf@redhat.com>
Download mbox | patch
Permalink /patch/198993/
State New
Headers show

Comments

Kevin Wolf - Nov. 14, 2012, 6:47 p.m.
From: Hervé Poussineau <hpoussin@reactos.org>

FD_MSR_CMDBUSY flag is already set in fdctrl_write_data(), just
before calling the command handler (fdctrl_start_transfer() here).

Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 hw/fdc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/hw/fdc.c b/hw/fdc.c
index 3a82ed1..a197c48 100644
--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -1239,7 +1239,7 @@  static void fdctrl_start_transfer(FDCtrl *fdctrl, int direction)
     /* Set the FIFO state */
     fdctrl->data_dir = direction;
     fdctrl->data_pos = 0;
-    fdctrl->msr |= FD_MSR_CMDBUSY;
+    assert(fdctrl->msr & FD_MSR_CMDBUSY);
     if (fdctrl->fifo[0] & 0x80)
         fdctrl->data_state |= FD_STATE_MULTI;
     else