[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 16/24] usbnet: Add missing usb_wakeup() call in usbnet_receive()
From: |
Gerd Hoffmann |
Subject: |
[PULL 16/24] usbnet: Add missing usb_wakeup() call in usbnet_receive() |
Date: |
Tue, 27 Sep 2022 10:19:04 +0200 |
From: Michael Brown <mcb30@ipxe.org>
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>
---
hw/usb/dev-network.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/usb/dev-network.c b/hw/usb/dev-network.c
index 6c49c16015e0..61bf598870cb 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,
--
2.37.3
- [PULL 08/24] ui/clipboard: reset the serial state on reset, (continued)
- [PULL 08/24] ui/clipboard: reset the serial state on reset, Gerd Hoffmann, 2022/09/27
- [PULL 07/24] ui/vdagent: always reset the clipboard serial on caps, Gerd Hoffmann, 2022/09/27
- [PULL 05/24] ui: add some vdagent related traces, Gerd Hoffmann, 2022/09/27
- [PULL 10/24] ui/console: fix three double frees in png_save(), Gerd Hoffmann, 2022/09/27
- [PULL 09/24] ui/vdagent: fix serial reset of guest agent, Gerd Hoffmann, 2022/09/27
- [PULL 03/24] Revert "main-loop: Disable block backend global state assertion on Cocoa", Gerd Hoffmann, 2022/09/27
- [PULL 02/24] ui/cocoa: Run qemu_init in the main thread, Gerd Hoffmann, 2022/09/27
- [PULL 06/24] ui/clipboard: fix serial priority, Gerd Hoffmann, 2022/09/27
- [PULL 11/24] hw/usb/hcd-xhci: Check whether DMA accesses fail, Gerd Hoffmann, 2022/09/27
- [PULL 04/24] meson: Allow to enable gtk and sdl while cocoa is enabled, Gerd Hoffmann, 2022/09/27
- [PULL 16/24] usbnet: Add missing usb_wakeup() call in usbnet_receive(),
Gerd Hoffmann <=
- [PULL 14/24] usb/msd: add usb_msd_fatal_error() and fix guest-triggerable assert, Gerd Hoffmann, 2022/09/27
- [PULL 15/24] hcd-xhci: drop operation with secondary stream arrays enabled, Gerd Hoffmann, 2022/09/27
- [PULL 12/24] hcd-ohci: Drop ohci_service_iso_td() if ed->head & OHCI_DPTR_MASK is zero, Gerd Hoffmann, 2022/09/27
- [PULL 13/24] usb/msd: move usb_msd_packet_complete(), Gerd Hoffmann, 2022/09/27
- [PULL 19/24] usbnet: Report link-up via interrupt endpoint in CDC-ECM mode, Gerd Hoffmann, 2022/09/27
- [PULL 18/24] usbnet: Detect short packets as sent by the xHCI controller, Gerd Hoffmann, 2022/09/27
- [PULL 17/24] usbnet: Accept mandatory USB_CDC_SET_ETHERNET_PACKET_FILTER request, Gerd Hoffmann, 2022/09/27
- [PULL 24/24] virtio-gpu: update scanout if there is any area covered by the rect, Gerd Hoffmann, 2022/09/27
- [PULL 21/24] Revert "audio: Log context for audio bug", Gerd Hoffmann, 2022/09/27
- [PULL 20/24] audio: Add sndio backend, Gerd Hoffmann, 2022/09/27