From: Guenter Roeck Date: Tue, 12 Nov 2024 17:01:52 +0000 (-0800) Subject: usb-hub: Fix handling port power control messages X-Git-Tag: v7.2.15~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7ffc37b541e2a033846f2b84e177640da9f332e3;p=thirdparty%2Fqemu.git usb-hub: Fix handling port power control messages The ClearPortFeature control message fails for PORT_POWER because there is no break; at the end of the case statement, causing it to fall through to the failure handler. Add the missing break; to solve the problem. Fixes: 1cc403eb21 ("usb-hub: emulate per port power switching") Signed-off-by: Guenter Roeck Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20241112170152.217664-11-linux@roeck-us.net> Signed-off-by: Philippe Mathieu-Daudé (cherry picked from commit b2cc69997924b651c0c6f4037782e25f2e438715) Signed-off-by: Michael Tokarev --- diff --git a/hw/usb/dev-hub.c b/hw/usb/dev-hub.c index a6b50dbc8df..ccedd2bcd2d 100644 --- a/hw/usb/dev-hub.c +++ b/hw/usb/dev-hub.c @@ -479,6 +479,7 @@ static void usb_hub_handle_control(USBDevice *dev, USBPacket *p, usb_hub_port_clear(port, PORT_STAT_SUSPEND); port->wPortChange = 0; } + break; default: goto fail; }