ide: clear SRST after SRST finishes
authorJohn Snow <jsnow@redhat.com>
Tue, 20 Oct 2020 20:02:42 +0000 (16:02 -0400)
committerJohn Snow <jsnow@redhat.com>
Tue, 27 Oct 2020 14:39:06 +0000 (10:39 -0400)
The SRST protocol states that after diagnostics are complete and the
status is posted, we should clear the SRST bit if it should so happen to
be set.

The reset method itself should handle this, but just in case -- make our
intention explicit here.

Signed-off-by: John Snow <jsnow@redhat.com>
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-id: 20201020200242.1497705-4-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
hw/ide/core.c

index 98cea7ad45075306723ac49fb4db21069a0c6994..e85821637c961121ad7a2ccfbaf9869e5463074b 100644 (file)
@@ -2268,6 +2268,8 @@ static void ide_bus_perform_srst(void *opaque)
         s = &bus->ifs[i];
         ide_perform_srst(s);
     }
+
+    bus->cmd &= ~IDE_CTRL_RESET;
 }
 
 void ide_ctrl_write(void *opaque, uint32_t addr, uint32_t val)