linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] usb: mtu3: disable USB2 LPM
@ 2020-06-29  6:00 Chunfeng Yun
  2020-06-29  6:00 ` [PATCH 2/2] usb: mtu3: fix NULL pointer dereference Chunfeng Yun
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Chunfeng Yun @ 2020-06-29  6:00 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Felipe Balbi
  Cc: linux-usb, linux-kernel, Chunfeng Yun, linux-mediatek,
	Matthias Brugger, Markus Elfring, linux-arm-kernel

A SuperSpeed device shall include the USB 2.0 extension descriptor
and shall support LPM when operating in USB 2.0 HS mode(see usb3.2
spec9.6.2.1). But we always don't support it, so disable it by
default, otherwise device will enter LPM suspend mode when
connected to Win10 system.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 drivers/usb/mtu3/mtu3_core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/mtu3/mtu3_core.c b/drivers/usb/mtu3/mtu3_core.c
index 9dd0216..50d6a40 100644
--- a/drivers/usb/mtu3/mtu3_core.c
+++ b/drivers/usb/mtu3/mtu3_core.c
@@ -604,6 +604,8 @@ static void mtu3_regs_init(struct mtu3 *mtu)
 	mtu3_clrbits(mbase, U3D_MISC_CTRL, VBUS_FRC_EN | VBUS_ON);
 	/* enable automatical HWRW from L1 */
 	mtu3_setbits(mbase, U3D_POWER_MANAGEMENT, LPM_HRWE);
+	/* always reject LPM request */
+	mtu3_setbits(mbase, U3D_POWER_MANAGEMENT, LPM_MODE(1));
 
 	/* use new QMU format when HW version >= 0x1003 */
 	if (mtu->gen2cp)
-- 
1.9.1
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-06-30  7:29 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-29  6:00 [PATCH 1/2] usb: mtu3: disable USB2 LPM Chunfeng Yun
2020-06-29  6:00 ` [PATCH 2/2] usb: mtu3: fix NULL pointer dereference Chunfeng Yun
2020-06-29  8:00   ` Markus Elfring
2020-06-29  8:10     ` Greg Kroah-Hartman
2020-06-30  7:28     ` Chunfeng Yun
2020-06-29 16:19   ` Searching for initialisation of variables by function calls before null pointer checks Markus Elfring
2020-06-29  7:30 ` [PATCH 1/2] usb: mtu3: disable USB2 LPM Markus Elfring
2020-06-29  8:10   ` Greg Kroah-Hartman
2020-06-29  7:37 ` Peter Chen
2020-06-30  7:03   ` Chunfeng Yun
2020-06-29  8:15 ` Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).