summaryrefslogtreecommitdiffstats
path: root/hw/usb-uhci.c
diff options
context:
space:
mode:
authorbellard2006-04-24 23:38:50 +0200
committerbellard2006-04-24 23:38:50 +0200
commit52328140e2892c0f7033f6857f1a96da1680bf79 (patch)
tree65f9df7540c7e1da386148a47423ead6169f7029 /hw/usb-uhci.c
parentdo not set PORT_STAT_C_ENABLE when doing port reset (Lonnie Mendez) (diff)
downloadqemu-52328140e2892c0f7033f6857f1a96da1680bf79.tar.gz
qemu-52328140e2892c0f7033f6857f1a96da1680bf79.tar.xz
qemu-52328140e2892c0f7033f6857f1a96da1680bf79.zip
HCHALTED status bit handling (Lonnie Mendez)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1850 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/usb-uhci.c')
-rw-r--r--hw/usb-uhci.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c
index f902d4615a..10b3fa6fd7 100644
--- a/hw/usb-uhci.c
+++ b/hw/usb-uhci.c
@@ -174,6 +174,9 @@ static void uhci_ioport_writew(void *opaque, uint32_t addr, uint32_t val)
if ((val & UHCI_CMD_RS) && !(s->cmd & UHCI_CMD_RS)) {
/* start frame processing */
qemu_mod_timer(s->frame_timer, qemu_get_clock(vm_clock));
+ s->status &= ~UHCI_STS_HCHALTED;
+ } else if (!(val & UHCI_CMD_RS) && !(s->cmd & UHCI_CMD_RS)) {
+ s->status |= UHCI_STS_HCHALTED;
}
if (val & UHCI_CMD_GRESET) {
UHCIPort *port;
@@ -528,6 +531,8 @@ static void uhci_frame_timer(void *opaque)
if (!(s->cmd & UHCI_CMD_RS)) {
qemu_del_timer(s->frame_timer);
+ /* set hchalted bit in status - UHCI11D 2.1.2 */
+ s->status |= UHCI_STS_HCHALTED;
return;
}
frame_addr = s->fl_base_addr + ((s->frnum & 0x3ff) << 2);