[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 22/28] usb: add USBBusOps->wakeup_endpoint
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 22/28] usb: add USBBusOps->wakeup_endpoint |
Date: |
Fri, 10 Feb 2012 12:43:18 +0100 |
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 <address@hidden>
---
hw/usb.c | 4 ++++
hw/usb.h | 1 +
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/hw/usb.c b/hw/usb.c
index 0572547..e5b8f33 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 b2caa77..4470ea8 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);
--
1.7.1
- [Qemu-devel] [PULL 00/28] usb patch queue, Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 02/28] usb-ehci: Clear the portstatus powner bit on device disconnect, Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 04/28] usb: kill USB_MSG_{ATTACH,DETACH}, Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 08/28] usb-hub: implement find_device, Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 01/28] usb-uhci: implement bandwidth management, Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 07/28] usb: add usb_find_device(), Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 22/28] usb: add USBBusOps->wakeup_endpoint,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 10/28] usb-uhci: switch to usb_find_device(), Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 03/28] usb-redir: Add the posibility to filter out certain devices from redirecion, Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 18/28] usb: add USBEndpoint->{nr,pid}, Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 06/28] usb: kill usb_send_msg, Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 14/28] usb-xhci: switch to usb_find_device(), Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 23/28] xhci: signal low- and fullspeed support, Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 15/28] usb: kill handle_packet callback, Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 12/28] usb-ohci: switch to usb_find_device(), Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 05/28] usb: kill USB_MSG_RESET, Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 16/28] usb: fold usb_generic_handle_packet into usb_handle_packet, Gerd Hoffmann, 2012/02/10