usb: unplug full speed device on m31phy with and panic [1/1]

PD#SWPL-134215

Problem:
unplug full speed device on m31phy with and panic

Solution:
there is no amlogic_usb_v2 struct in usb_phy_trim_tuning for m31phy,
so it needs to do some filtering.

Verify:
t5m, t3

Change-Id: I65a6f968229ef41da8aaa0024cd7438693d5a935
Signed-off-by: he.he <he.he@amlogic.com>
This commit is contained in:
he.he
2023-07-31 17:08:30 +08:00
committed by gerrit autosubmit
parent c58214ff22
commit 7a2ae9ab56
+4
View File
@@ -83,6 +83,10 @@ usb_phy_trim_tuning(struct usb_phy *x, int port, int default_val)
struct amlogic_usb_v2 *aml_phy;
if (x) {
if (x->label)
if (!strncmp(x->label, "amlogic-usbm31phy3", 18) ||
!strncmp(x->label, "amlogic-usb2-m31-phy", 20))
return;
aml_phy = container_of(x, struct amlogic_usb_v2, phy);
if (aml_phy->phy_trim_tuning)