diff options
author | Hans de Goede <hdegoede@redhat.com> | 2012-11-17 12:47:14 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-12-04 14:41:54 +0100 |
commit | 8beba9304391189666df1b62b23a5101b3831317 (patch) | |
tree | 5d124e37ef889c4bd332597d6f0ef7233b2ce117 /hw/usb/dev-network.c | |
parent | f1ae2e3883c4ee3a9f91f484690abe42f5063d64 (diff) |
usb: Call wakeup when data becomes available for all devices with int eps
This is necessary for proper interaction with the xhci controller, and it
will allow other hcds to lower there frame timer while waiting for interrupt
data.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb/dev-network.c')
-rw-r--r-- | hw/usb/dev-network.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/usb/dev-network.c b/hw/usb/dev-network.c index 14d9e5aa5b..30cb03373e 100644 --- a/hw/usb/dev-network.c +++ b/hw/usb/dev-network.c @@ -639,6 +639,8 @@ typedef struct USBNetState { unsigned int in_ptr, in_len; uint8_t in_buf[2048]; + USBEndpoint *intr; + char usbstring_mac[13]; NICState *nic; NICConf conf; @@ -851,6 +853,10 @@ static void *rndis_queue_response(USBNetState *s, unsigned int length) struct rndis_response *r = g_malloc0(sizeof(struct rndis_response) + length); + if (QTAILQ_EMPTY(&s->rndis_resp)) { + usb_wakeup(s->intr); + } + QTAILQ_INSERT_TAIL(&s->rndis_resp, r, entries); r->length = length; @@ -1349,6 +1355,7 @@ static int usb_net_initfn(USBDevice *dev) s->media_state = 0; /* NDIS_MEDIA_STATE_CONNECTED */; s->filter = 0; s->vendorid = 0x1234; + s->intr = usb_ep_get(dev, USB_TOKEN_IN, 1); qemu_macaddr_default_if_unset(&s->conf.macaddr); s->nic = qemu_new_nic(&net_usbnet_info, &s->conf, |