Revision 3dc345d5
b/hw/usb-ohci.c | ||
---|---|---|
327 | 327 |
{ |
328 | 328 |
OHCIState *s = port1->opaque; |
329 | 329 |
OHCIPort *port = &s->rhport[port1->index]; |
330 |
uint32_t old_state = port->ctrl; |
|
330 | 331 |
|
331 | 332 |
/* set connect status */ |
332 | 333 |
port->ctrl |= OHCI_PORT_CCS | OHCI_PORT_CSC; |
... | ... | |
344 | 345 |
} |
345 | 346 |
|
346 | 347 |
DPRINTF("usb-ohci: Attached port %d\n", port1->index); |
348 |
|
|
349 |
if (old_state != port->ctrl) { |
|
350 |
ohci_set_interrupt(s, OHCI_INTR_RHSC); |
|
351 |
} |
|
347 | 352 |
} |
348 | 353 |
|
349 | 354 |
static void ohci_detach(USBPort *port1) |
... | ... | |
366 | 371 |
} |
367 | 372 |
DPRINTF("usb-ohci: Detached port %d\n", port1->index); |
368 | 373 |
|
369 |
if (old_state != port->ctrl) |
|
374 |
if (old_state != port->ctrl) {
|
|
370 | 375 |
ohci_set_interrupt(s, OHCI_INTR_RHSC); |
376 |
} |
|
371 | 377 |
} |
372 | 378 |
|
373 | 379 |
static void ohci_wakeup(USBPort *port1) |
Also available in: Unified diff