39 lines
1.4 KiB
Diff
39 lines
1.4 KiB
Diff
|
|
From 6e7e25af997cd6506a22d6eb2abe5fb0835c31ed Mon Sep 17 00:00:00 2001
|
||
|
|
From: Guenter Roeck <linux@roeck-us.net>
|
||
|
|
Date: Tue, 12 Nov 2024 09:01:52 -0800
|
||
|
|
Subject: [PATCH] usb-hub: Fix handling port power control messages
|
||
|
|
MIME-Version: 1.0
|
||
|
|
Content-Type: text/plain; charset=UTF-8
|
||
|
|
Content-Transfer-Encoding: 8bit
|
||
|
|
|
||
|
|
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: zhujun2 <zhujun2_yewu@cmss.chinamobile.com>
|
||
|
|
---
|
||
|
|
hw/usb/dev-hub.c | 1 +
|
||
|
|
1 file changed, 1 insertion(+)
|
||
|
|
|
||
|
|
diff --git a/hw/usb/dev-hub.c b/hw/usb/dev-hub.c
|
||
|
|
index e35813d772..605fee4fa9 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;
|
||
|
|
}
|
||
|
|
--
|
||
|
|
2.41.0.windows.1
|
||
|
|
|