Skip to contentSkip to conversation

patch "USB: storage: ums-realtek: Whitelist auto-delink support" added to usb-linus

PATCH [email protected] 1 participant 1 message Aug 28, 2019

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

USB: storage: ums-realtek: Whitelist auto-delink support

to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

From 1902a01e2bcc3abd7c9a18dc05e78c7ab4a53c54 Mon Sep 17 00:00:00 2001
From: Kai-Heng Feng <[email protected]>
Date: Wed, 28 Aug 2019 01:34:50 +0800
Subject: USB: storage: ums-realtek: Whitelist auto-delink support

Auto-delink requires writing special registers to ums-realtek devices. Unconditionally enable auto-delink may break newer devices.

So only enable auto-delink by default for the original three IDs, 0x0138, 0x0158 and 0x0159.

Realtek is working on a patch to properly support auto-delink for other IDs.

---
 drivers/usb/storage/realtek_cr.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
drivers/usb/storage/realtek_cr.c +8 -5
index beaffac805af..1d9ce9cbc831 100644
@@ -996,12 +996,15 @@ static int init_realtek_cr(struct us_data *us)
 			goto INIT_FAIL;
 	}
 
-	if (CHECK_FW_VER(chip, 0x5888) || CHECK_FW_VER(chip, 0x5889) ||
-	    CHECK_FW_VER(chip, 0x5901))
-		SET_AUTO_DELINK(chip);
-	if (STATUS_LEN(chip) == 16) {
-		if (SUPPORT_AUTO_DELINK(chip))
+	if (CHECK_PID(chip, 0x0138) || CHECK_PID(chip, 0x0158) ||
+	    CHECK_PID(chip, 0x0159)) {
+		if (CHECK_FW_VER(chip, 0x5888) || CHECK_FW_VER(chip, 0x5889) ||
+				CHECK_FW_VER(chip, 0x5901))
 			SET_AUTO_DELINK(chip);
+		if (STATUS_LEN(chip) == 16) {
+			if (SUPPORT_AUTO_DELINK(chip))
+				SET_AUTO_DELINK(chip);
+		}
 	}
 #ifdef CONFIG_REALTEK_AUTOPM
 	if (ss_en)
Signature · 1 line
2.23.0