aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hw/usb.c4
-rw-r--r--hw/usb.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/hw/usb.c b/hw/usb.c
index 05725474e..e5b8f335d 100644
--- a/hw/usb.c
+++ b/hw/usb.c
@@ -73,10 +73,14 @@ void usb_device_reset(USBDevice *dev)
void usb_wakeup(USBEndpoint *ep)
{
USBDevice *dev = ep->dev;
+ USBBus *bus = usb_bus_from_device(dev);
if (dev->remote_wakeup && dev->port && dev->port->ops->wakeup) {
dev->port->ops->wakeup(dev->port);
}
+ if (bus->ops->wakeup_endpoint) {
+ bus->ops->wakeup_endpoint(bus, ep);
+ }
}
/**********************/
diff --git a/hw/usb.h b/hw/usb.h
index b2caa7734..4470ea890 100644
--- a/hw/usb.h
+++ b/hw/usb.h
@@ -425,6 +425,7 @@ struct USBBus {
struct USBBusOps {
int (*register_companion)(USBBus *bus, USBPort *ports[],
uint32_t portcount, uint32_t firstport);
+ void (*wakeup_endpoint)(USBBus *bus, USBEndpoint *ep);
};
void usb_bus_new(USBBus *bus, USBBusOps *ops, DeviceState *host);