[PATCH] USB: Add LPM quirk for sony xperia xz1 compact
From: Forest
Date: Wed Jan 15 2025 - 19:18:45 EST
Since USB 2 LPM was enabled for this device by 63a1f8454962
("xhci: stored cached port capability values in one place"),
the fastboot tool for communicating with Android bootloaders no longer
works reliably. Various fastboot commands are affected, including the
following, which usually reproduces the problem within two tries:
fastboot getvar kernel
A typical error message when that command fails:
getvar:kernel FAILED (remote: 'GetVar Variable Not found')
Adding the quirk resolves the regression. No drawbacks are expected,
since the device uses different USB product IDs outside of fastboot
mode, and since fastboot commands worked until LPM was enabled by the
aforementioned commit.
Cc: stable@xxxxxxxxxxxxxxx
Link: https://lore.kernel.org/hk8umj9lv4l4qguftdq1luqtdrpa1gks5l@xxxxxxxxx
Signed-off-by: Forest <forestix@xxxxxxx>
---
drivers/usb/core/quirks.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index 13171454f959..375a64e7e188 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -432,6 +432,9 @@ static const struct usb_device_id usb_quirk_list[] = {
{ USB_DEVICE(0x0c45, 0x7056), .driver_info =
USB_QUIRK_IGNORE_REMOTE_WAKEUP },
+ /* Sony Xperia XZ1 Compact (lilac) smartphone in fastboot mode */
+ { USB_DEVICE(0x0fce, 0x0dde), .driver_info = USB_QUIRK_NO_LPM },
+
/* Action Semiconductor flash disk */
{ USB_DEVICE(0x10d6, 0x2200), .driver_info =
USB_QUIRK_STRING_FETCH_255 },
base-commit: 619f0b6fad524f08d493a98d55bac9ab8895e3a6
--
2.39.5