mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
Fix USB root hub hotplugging.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1931 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
6cb7ee859a
commit
6106487019
2 changed files with 34 additions and 29 deletions
|
@ -327,9 +327,8 @@ static void uhci_attach(USBPort *port1, USBDevice *dev)
|
|||
usb_attach(port1, NULL);
|
||||
}
|
||||
/* set connect status */
|
||||
if (!(port->ctrl & UHCI_PORT_CCS)) {
|
||||
port->ctrl |= UHCI_PORT_CCS | UHCI_PORT_CSC;
|
||||
}
|
||||
port->ctrl |= UHCI_PORT_CCS | UHCI_PORT_CSC;
|
||||
|
||||
/* update speed */
|
||||
if (dev->speed == USB_SPEED_LOW)
|
||||
port->ctrl |= UHCI_PORT_LSDA;
|
||||
|
@ -341,8 +340,9 @@ static void uhci_attach(USBPort *port1, USBDevice *dev)
|
|||
USB_MSG_ATTACH, 0, 0, NULL, 0);
|
||||
} else {
|
||||
/* set connect status */
|
||||
if (!(port->ctrl & UHCI_PORT_CCS)) {
|
||||
port->ctrl |= UHCI_PORT_CCS | UHCI_PORT_CSC;
|
||||
if (port->ctrl & UHCI_PORT_CCS) {
|
||||
port->ctrl &= ~UHCI_PORT_CCS;
|
||||
port->ctrl |= UHCI_PORT_CSC;
|
||||
}
|
||||
/* disable port */
|
||||
if (port->ctrl & UHCI_PORT_EN) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue