Revision 9bba1eb1 hw/usb-ohci.c

b/hw/usb-ohci.c
367 367
        ohci_set_interrupt(s, OHCI_INTR_RHSC);
368 368
}
369 369

  
370
static void ohci_wakeup(USBDevice *dev)
371
{
372
    USBBus *bus = usb_bus_from_device(dev);
373
    OHCIState *s = container_of(bus, OHCIState, bus);
374
    int portnum = dev->port->index;
375
    OHCIPort *port = &s->rhport[portnum];
376
    if (port->ctrl & OHCI_PORT_PSS) {
377
        DPRINTF("usb-ohci: port %d: wakeup\n", portnum);
378
        port->ctrl |= OHCI_PORT_PSSC;
379
        port->ctrl &= ~OHCI_PORT_PSS;
380
        if ((s->ctl & OHCI_CTL_HCFS) == OHCI_USB_SUSPEND) {
381
            ohci_set_interrupt(s, OHCI_INTR_RD);
382
        }
383
    }
384
}
385

  
370 386
/* Reset the controller */
371 387
static void ohci_reset(void *opaque)
372 388
{
......
1675 1691
static USBPortOps ohci_port_ops = {
1676 1692
    .attach = ohci_attach,
1677 1693
    .detach = ohci_detach,
1694
    .wakeup = ohci_wakeup,
1678 1695
    .complete = ohci_async_complete_packet,
1679 1696
};
1680 1697

  

Also available in: Unified diff