diff options
author | Guenter Roeck <linux@roeck-us.net> | 2024-11-12 09:01:52 -0800 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2024-11-18 19:37:45 +0300 |
commit | 78da6504d520406312823bfc0382a8e9f9f858d4 (patch) | |
tree | 01371ee6a93ca2d3d378ac453d22b16c5d432206 | |
parent | fe6e7a8b22759ecdfb85d542fe4ce07ec452f3e0 (diff) |
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 <linux@roeck-us.net>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20241112170152.217664-11-linux@roeck-us.net>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
(cherry picked from commit b2cc69997924b651c0c6f4037782e25f2e438715)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-rw-r--r-- | hw/usb/dev-hub.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/usb/dev-hub.c b/hw/usb/dev-hub.c index 5703e0e826..7b3cfa2c1b 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; } |