[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230426-usb-mtu3-improvement-v1-1-1cf02434b478@baylibre.com>
Date: Wed, 26 Apr 2023 21:24:20 +0200
From: amergnat@...libre.com
To: Chunfeng Yun <chunfeng.yun@...iatek.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-usb@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
Alexandre Bailon <abailon@...libre.com>,
Fabien Parent <fparent@...libre.com>,
Alexandre Mergnat <amergnat@...libre.com>
Subject: [PATCH] usb: mtu3: Don't check the USB3 status bits if the max
speed is USB2
From: Alexandre Bailon <abailon@...libre.com>
If the IP is U3, the driver will check some USB3 status bits.
This could fail if only USB2 is used.
This only check these bits if USB operate at USB3 speed.
Signed-off-by: Alexandre Bailon <abailon@...libre.com>
Signed-off-by: Fabien Parent <fparent@...libre.com>
Signed-off-by: Alexandre Mergnat <amergnat@...libre.com>
---
This patch is ported from downstream. Without this fix, USB doesn't
work if USB2 protocol is used first.
---
drivers/usb/mtu3/mtu3_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/mtu3/mtu3_core.c b/drivers/usb/mtu3/mtu3_core.c
index a3a6282893d0..00dba871aff8 100644
--- a/drivers/usb/mtu3/mtu3_core.c
+++ b/drivers/usb/mtu3/mtu3_core.c
@@ -100,7 +100,7 @@ static int mtu3_device_enable(struct mtu3 *mtu)
mtu3_clrbits(ibase, U3D_SSUSB_IP_PW_CTRL2, SSUSB_IP_DEV_PDN);
- if (mtu->u3_capable) {
+ if (mtu->u3_capable && mtu->max_speed >= USB_SPEED_SUPER) {
check_clk = SSUSB_U3_MAC_RST_B_STS;
mtu3_clrbits(ibase, SSUSB_U3_CTRL(0),
(SSUSB_U3_PORT_DIS | SSUSB_U3_PORT_PDN |
---
base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6
change-id: 20230426-usb-mtu3-improvement-77d987def9fe
Best regards,
--
Alexandre Mergnat <amergnat@...libre.com>
Powered by blists - more mailing lists