mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-24 03:59:52 +00:00
usb: add USBBusOps->wakeup_endpoint
Add usb bus op which is called whenever a usb endpoint becomes ready, so the host adapter emulation can react on that event. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
7567b51fbe
commit
37f32f0fdd
4
hw/usb.c
4
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);
|
||||
}
|
||||
}
|
||||
|
||||
/**********************/
|
||||
|
Loading…
Reference in New Issue
Block a user