diff options
author | Michael Brown <mcb30@ipxe.org> | 2022-09-06 19:30:50 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2022-09-27 07:32:30 +0200 |
commit | a89003780d0a96b79314da4a4cdb148ff1dcb397 (patch) | |
tree | 15970fd034582dfb77e463e8d83993ac2a7b7842 /hw | |
parent | 145cdaba0f7ea721080e1289dc7a31bb2066406f (diff) | |
download | qemu-a89003780d0a96b79314da4a4cdb148ff1dcb397.zip qemu-a89003780d0a96b79314da4a4cdb148ff1dcb397.tar.gz qemu-a89003780d0a96b79314da4a4cdb148ff1dcb397.tar.bz2 |
usbnet: Add missing usb_wakeup() call in usbnet_receive()
usbnet_receive() does not currently wake up the USB endpoint, leading
to a dead RX datapath when used with a host controller such as xHCI
that relies on being woken up.
Fix by adding a call to usb_wakeup() at the end of usbnet_receive().
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Message-Id: <20220906183053.3625472-2-mcb30@ipxe.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/usb/dev-network.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/usb/dev-network.c b/hw/usb/dev-network.c index 6c49c16..61bf598 100644 --- a/hw/usb/dev-network.c +++ b/hw/usb/dev-network.c @@ -647,6 +647,7 @@ struct USBNetState { uint8_t in_buf[2048]; USBEndpoint *intr; + USBEndpoint *bulk_in; char usbstring_mac[13]; NICState *nic; @@ -1317,6 +1318,7 @@ static ssize_t usbnet_receive(NetClientState *nc, const uint8_t *buf, size_t siz memcpy(in_buf, buf, size); s->in_len = total_size; s->in_ptr = 0; + usb_wakeup(s->bulk_in, 0); return size; } @@ -1359,6 +1361,7 @@ static void usb_net_realize(USBDevice *dev, Error **errp) s->filter = 0; s->vendorid = 0x1234; s->intr = usb_ep_get(dev, USB_TOKEN_IN, 1); + s->bulk_in = usb_ep_get(dev, USB_TOKEN_IN, 2); qemu_macaddr_default_if_unset(&s->conf.macaddr); s->nic = qemu_new_nic(&net_usbnet_info, &s->conf, |