diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2012-01-17 13:25:46 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-02-10 12:16:30 +0100 |
commit | 7567b51fbe92e1300a672eaddd413c4a7e807d90 (patch) | |
tree | 99f49603bb1b279686113e15020145f827777b4a /hw/usb-ccid.c | |
parent | db4be873d312576c6971da15a38e056017a406b8 (diff) | |
download | hqemu-7567b51fbe92e1300a672eaddd413c4a7e807d90.zip hqemu-7567b51fbe92e1300a672eaddd413c4a7e807d90.tar.gz |
usb: pass USBEndpoint to usb_wakeup
Devices must specify which endpoint has data to transfer now.
The plan is to use the usb_wakeup() not only for remove wakeup support,
but for "data ready" signaling in general, so we can move away from
constant polling to event driven usb device emulation.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb-ccid.c')
-rw-r--r-- | hw/usb-ccid.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/usb-ccid.c b/hw/usb-ccid.c index 8c0c717..fda2d92 100644 --- a/hw/usb-ccid.c +++ b/hw/usb-ccid.c @@ -267,6 +267,7 @@ typedef struct CCIDBus { */ typedef struct USBCCIDState { USBDevice dev; + USBEndpoint *intr; CCIDBus bus; CCIDCardState *card; BulkIn bulk_in_pending[BULK_IN_PENDING_NUM]; /* circular */ @@ -839,7 +840,7 @@ static void ccid_on_slot_change(USBCCIDState *s, bool full) s->bmSlotICCState |= SLOT_0_CHANGED_MASK; } s->notify_slot_change = true; - usb_wakeup(&s->dev); + usb_wakeup(s->intr); } static void ccid_write_data_block_error( @@ -1190,6 +1191,7 @@ static int ccid_initfn(USBDevice *dev) usb_desc_init(dev); qbus_create_inplace(&s->bus.qbus, &ccid_bus_info, &dev->qdev, NULL); + s->intr = usb_ep_get(dev, USB_TOKEN_IN, CCID_INT_IN_EP); s->bus.qbus.allow_hotplug = 1; s->card = NULL; s->migration_state = MIGRATION_NONE; |