|
From: | Gerd Hoffmann |
Subject: | [Qemu-devel] Re: PATCH: QEMU support for UHCI suspend / remote wake up |
Date: | Thu, 25 Nov 2010 17:15:33 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100827 Red Hat/3.1.3-1.el6 Thunderbird/3.1.3 |
Hi,
+ dev->info->remote_wakeup_cb = uhci_event;
diff --git a/hw/usb.h b/hw/usb.h index 00d2802..16de1c9 100644 --- a/hw/usb.h +++ b/hw/usb.h @@ -189,6 +189,11 @@ struct USBDeviceInfo { */ int (*handle_data)(USBDevice *dev, USBPacket *p); + /* + * Process remote wakeup request. + */ + void (*remote_wakeup_cb)(USBDevice *dev); +
No way. DeviceInfo holds informations about the device *implementation*. Multiple instances will share that, placing runtime data there is just plain wrong.
Also this is a callback from the usb device to the usb host adapter, not the other way around. I'd suggest to create a USBBusOps for host adapter callbacks and and stick it into USBBus.
cheers, Gerd
[Prev in Thread] | Current Thread | [Next in Thread] |