mirror of https://github.com/xemu-project/xemu.git
usb-ohci: raise interrupt on attach
Got lost in commit 618c169b57
,
add it back in. Also fix codestyle while we are at it.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
6c2385270b
commit
3dc345d587
|
@ -327,6 +327,7 @@ static void ohci_attach(USBPort *port1)
|
||||||
{
|
{
|
||||||
OHCIState *s = port1->opaque;
|
OHCIState *s = port1->opaque;
|
||||||
OHCIPort *port = &s->rhport[port1->index];
|
OHCIPort *port = &s->rhport[port1->index];
|
||||||
|
uint32_t old_state = port->ctrl;
|
||||||
|
|
||||||
/* set connect status */
|
/* set connect status */
|
||||||
port->ctrl |= OHCI_PORT_CCS | OHCI_PORT_CSC;
|
port->ctrl |= OHCI_PORT_CCS | OHCI_PORT_CSC;
|
||||||
|
@ -344,6 +345,10 @@ static void ohci_attach(USBPort *port1)
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINTF("usb-ohci: Attached port %d\n", port1->index);
|
DPRINTF("usb-ohci: Attached port %d\n", port1->index);
|
||||||
|
|
||||||
|
if (old_state != port->ctrl) {
|
||||||
|
ohci_set_interrupt(s, OHCI_INTR_RHSC);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ohci_detach(USBPort *port1)
|
static void ohci_detach(USBPort *port1)
|
||||||
|
@ -366,8 +371,9 @@ static void ohci_detach(USBPort *port1)
|
||||||
}
|
}
|
||||||
DPRINTF("usb-ohci: Detached port %d\n", port1->index);
|
DPRINTF("usb-ohci: Detached port %d\n", port1->index);
|
||||||
|
|
||||||
if (old_state != port->ctrl)
|
if (old_state != port->ctrl) {
|
||||||
ohci_set_interrupt(s, OHCI_INTR_RHSC);
|
ohci_set_interrupt(s, OHCI_INTR_RHSC);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ohci_wakeup(USBPort *port1)
|
static void ohci_wakeup(USBPort *port1)
|
||||||
|
|
Loading…
Reference in New Issue