From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1BA153EA76; Tue, 11 Mar 2025 15:30:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741707038; cv=none; b=svuFkl5iCJrV8c8KAgT9vNk+Ggg/M0lYbRJmuuhAAb49OPle6S+LXX1oqGRb+G85SzMSFg3k0c3n1ViFW+lH7Gew9GYpD9J4GJp0/+0QLCz9NacIk78kuwotYBh3+47ZD1jZtfDYIljzjIZww3VNXDwxzjVTdzL2+tspbblTTwI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741707038; c=relaxed/simple; bh=c4ynthUPRNcVJJ1p9buziHgRvHHehoY5GVVKwerHVBg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gJzlLXaygEaPz6WZoZh0ucxgJ/Ro4KIXZz05E0JSSMcpcBU1lBhkKwSxpD3L+w7yRN4+qmrpy0e6Cmbr3JqlvVaoJIVV9EuGvTWtOb13zWiQFZaCsFgm2iNvKslpeIf1aPS4/7oruDV7Y/sxgX+/injW6US3XgKQdZn9zSOb5Ok= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=s4p+JFYf; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="s4p+JFYf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3DE44C4CEE9; Tue, 11 Mar 2025 15:30:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1741707037; bh=c4ynthUPRNcVJJ1p9buziHgRvHHehoY5GVVKwerHVBg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s4p+JFYfGwHLu07BME8ZbYEDw3NXBTlBpl7XyeoORedrZVz9MY/pzwCo+QbtGoaTu 8fwD+X9KmzgdByQyP9rIjPH+PBYJI/c3BOKpWTfdi6FSPFCpxwCgmyW1DvaGJbgLbs n2pyUcCkT5WwgraySs20NkaWhRsE/VqR8ytNscwI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, stable , Forest , Mathias Nyman Subject: [PATCH 5.10 253/462] USB: Add USB_QUIRK_NO_LPM quirk for sony xperia xz1 smartphone Date: Tue, 11 Mar 2025 15:58:39 +0100 Message-ID: <20250311145808.356225560@linuxfoundation.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250311145758.343076290@linuxfoundation.org> References: <20250311145758.343076290@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mathias Nyman commit 159daf1258227f44b26b5d38f4aa8f37b8cca663 upstream. The fastboot tool for communicating with Android bootloaders does not work reliably with this device if USB 2 Link Power Management (LPM) is enabled. Various fastboot commands are affected, including the following, which usually reproduces the problem within two tries: fastboot getvar kernel getvar:kernel FAILED (remote: 'GetVar Variable Not found') This issue was hidden on many systems up until commit 63a1f8454962 ("xhci: stored cached port capability values in one place") as the xhci driver failed to detect USB 2 LPM support if USB 3 ports were listed before USB 2 ports in the "supported protocol capabilities". Adding the quirk resolves the issue. No drawbacks are expected since the device uses different USB product IDs outside of fastboot mode, and since fastboot commands worked before, until LPM was enabled on the tested system by the aforementioned commit. Based on a patch from Forest from which most of the code and commit message is taken. Cc: stable Reported-by: Forest Closes: https://lore.kernel.org/hk8umj9lv4l4qguftdq1luqtdrpa1gks5l@sonic.net Tested-by: Forest Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250206151836.51742-1-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/quirks.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/usb/core/quirks.c +++ b/drivers/usb/core/quirks.c @@ -430,6 +430,9 @@ static const struct usb_device_id usb_qu { 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 },