diff mbox series

USB: Add LPM quirk for sony xperia xz1 compact

Message ID 10kgojpeckdq0pb4d95k1prma49du5itre@sonic.net (mailing list archive)
State New
Headers show
Series USB: Add LPM quirk for sony xperia xz1 compact | expand

Commit Message

Forest Jan. 16, 2025, 12:18 a.m. UTC
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@vger.kernel.org
Link: https://lore.kernel.org/hk8umj9lv4l4qguftdq1luqtdrpa1gks5l@sonic.net
Signed-off-by: Forest <forestix@nom.one>
---
 drivers/usb/core/quirks.c | 3 +++
 1 file changed, 3 insertions(+)


base-commit: 619f0b6fad524f08d493a98d55bac9ab8895e3a6

Comments

Greg KH Jan. 16, 2025, 10:10 a.m. UTC | #1
On Wed, Jan 15, 2025 at 04:18:22PM -0800, Forest wrote:
> 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@vger.kernel.org
> Link: https://lore.kernel.org/hk8umj9lv4l4qguftdq1luqtdrpa1gks5l@sonic.net
> Signed-off-by: Forest <forestix@nom.one>
> ---
>  drivers/usb/core/quirks.c | 3 +++
>  1 file changed, 3 insertions(+)

Always use scripts/get_maintainer.pl to get the correct people to cc:

Also, we need a "real" name here, sorry.

thanks,

greg k-h
Forest Jan. 16, 2025, 8:01 p.m. UTC | #2
On Thu, 16 Jan 2025 11:10:50 +0100, Greg KH wrote:

>> Signed-off-by: Forest <forestix@nom.one>
>> ---
>>  drivers/usb/core/quirks.c | 3 +++
>>  1 file changed, 3 insertions(+)
>
>Always use scripts/get_maintainer.pl to get the correct people to cc:

Okay. I'm not sure how to correct this. Should I submit a v2 patch,
even though the code hasn't changed?

>Also, we need a "real" name here, sorry.

Forest is my real name.
Greg KH Jan. 17, 2025, 6:10 a.m. UTC | #3
On Thu, Jan 16, 2025 at 12:01:31PM -0800, Forest wrote:
> On Thu, 16 Jan 2025 11:10:50 +0100, Greg KH wrote:
> 
> >> Signed-off-by: Forest <forestix@nom.one>
> >> ---
> >>  drivers/usb/core/quirks.c | 3 +++
> >>  1 file changed, 3 insertions(+)
> >
> >Always use scripts/get_maintainer.pl to get the correct people to cc:
> 
> Okay. I'm not sure how to correct this. Should I submit a v2 patch,
> even though the code hasn't changed?

Yes.

> >Also, we need a "real" name here, sorry.
> 
> Forest is my real name.

The exact one you sign documents in your country with?  If so, we can
take it off-list to work through the details.

thanks,

greg k-h
diff mbox series

Patch

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 },