From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796388391; b=ytm/8zvEcm4lOsQF6A0fu8oAGaYlbHcthSCcemBv2p+tRhRdbbRuzwUxBjnzNJDBoajf N3PQsqfSLZdvx0jWbpzPTPuMsgDfidl9gOi8nGb5rwMTqQzaxx9eKaWXnXEBKQTqKSLSR 0FtG0ZRGHXRWkYPtPy/9jzbUQ33J0KjNB7+th48cfk0WuPQJFjq5fjqL+frnGkEmDxTE4 mvE+I9Vvhs11Egr9J6GDvziW3uEUWiY5zLdigqHUMy27UZ9wXmUA7OLBUBGz5b30/ehQX Nejk0cuVuVqnDue682kbATyhhGpXj7TWuWgpK5NNxZTqS926q+8lv8xeDLkO485bgEg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796388391; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=JJcWr0xirRarvV7bkG+z4ze+4r2eO4LjX0xfj9vPHZE=; b=YhsNSDWO451pTkh7OXPgrOaDDbPiajZJ0cw7XjT91oaK6JgVP4xhLXNzQO+oRFl3ec19 f4v1i4A7uVVf1tpFgvp4VfCgp/qms+bgpvdEMpzn7jTOop47cTing5krUdD+Ox4QmjhXC 4IvAc7XK6a+oTI7lXde9xjfnXXqEvfD4u4W99XxZQx+5hDXSWnXC3DIhuAUP3cHPzrkHK wfQcSwhxpXk+zMQV1gvvdYqQJIkB1Fh/mOPkisXOdGjvQmH6a2j0E0e0j086gXOjdzt0M rB20bqKev5CjSa93PG+KP9gqMypVsYzlprntU3YD7wy0slQYfsEMAHCiaHGKZ53bTTA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=S7ISlfsO; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B95F7606A322; Fri, 4 Dec 2026 12:46:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=S7ISlfsO Received: by smtp.kernel.org (Postfix) with ESMTPSA id D16271F00897; Fri, 4 Dec 2026 12:46:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796388391; bh=JJcWr0xirRarvV7bkG+z4ze+4r2eO4LjX0xfj9vPHZE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=S7ISlfsO8GZt4Cs2hg9GYjKuFhUwxpv77/s81t0LL2+CHb+85tatiODtOAg8VlZd6 o3skI558h6i4Sjo0hS6LJX2VRiLoKeFqJZSmWW7Uz5Pmt3EI/BKJOcXuKxXi7ejoPM v3xaUng4RLcosRkxiuB6jR3vkMmNkkdXOVuw7sUA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Olivier Kaloudoff , stable , Alan Stern Subject: [PATCH 6.1 0595/1059] usb: uas: ignore UAS for ASMT135x bridges (174c:55aa) Date: Fri, 4 Dec 2026 19:02:06 +0900 Message-ID: <20261204100659.550718924@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Olivier Kaloudoff commit fafd23d61494461256d374f67c121f2712e1af2f upstream. The ASMedia chip detection in uas_use_uas_driver() assumes that every device with idVendor/idProduct 174c:5106 or 174c:55aa reporting a config.MaxPower of 0 is an ASM1153 with working UAS. ASMT135x bridges (iProduct "ASMT135x") share the same 174c:55aa id and also report MaxPower == 0, so they take the "ASM1153, do nothing" path — but their UAS implementation is broken: - The first READ(16) issued by sd probing times out after 30 s; enumeration only completes after a uas_eh_abort_handler plus a full uas_eh_host_reset_handler cycle: scsi 3:0:0:0: Direct-Access ASMT ASMT135x 0 PQ: 0 ANSI: 6 sd 3:0:0:0: [sdb] tag#26 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD IN sd 3:0:0:0: [sdb] tag#26 CDB: Read(16) 88 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 scsi host3: uas_eh_host_reset_handler start usb 6-2: reset SuperSpeed USB device number 2 using xhci_hcd scsi host3: uas_eh_host_reset_handler success - Under concurrent load the bridge stalls: all inflight commands (20+ UAS tags in the captured incident, mixed READ(16)/WRITE(16)) hit the 30 s UAS timeout in the same event, forcing repeated abort/reset cycles and eventually a USB disconnect. Writes dropped mid-flight during these resets returned zeros to the filesystem (observed as XFS metadata corruption on the mounted volume). - Sequential-write throughput is ~45 MiB/s under UAS versus ~136 MiB/s after disabling UAS (usb-storage BOT mode), which is fully stable: several tens of GiB written without a single error. - Bulk reads of healthy LBA ranges do work under UAS (~190 MiB/s, no errors); the failure pattern is command-timeout at enumeration and under queue depth / write load, not a broken transfer path. Since 174c:55aa is shared across several ASMedia bridges and enclosure rebrandings, distinguish the ASMT135x by its product string — the same approach used for the HIKSEMI MD202 check a few lines below. The product strings of working bridges using the same id ("ASM1053E", "ASM1153", "ASM1153E", "ASM1351", vendor rebrands such as "YZWY_TECH") do not contain "ASMT135", so the match is safe. Verified on an ORICO enclosure (iManufacturer "ASMT", iProduct "ASMT135x", bcdDevice 1.00) attached through an Alpine Ridge TB3 dock: with the equivalent usb-storage quirks parameter (174c:55aa:u) the device is completely stable. Signed-off-by: Olivier Kaloudoff Cc: stable Acked-by: Alan Stern Link: https://patch.msgid.link/20261014165741.35758-1-olivier.kaloudoff@gmail.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman --- drivers/usb/storage/uas-detect.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- a/drivers/usb/storage/uas-detect.h +++ b/drivers/usb/storage/uas-detect.h @@ -78,6 +78,8 @@ static int uas_use_uas_driver(struct usb * ASM1051 - with broken (*) uas support * ASM1053 - with working uas support, but problems with large xfers * ASM1153 - with working uas support + * ASMT135x - broken uas support, shares the ASM1153 MaxPower == 0 + * signature, identify it by its product string * * Devices with these chips re-use a number of device-ids over the * entire line, so the device-id is useless to determine if we're @@ -99,7 +101,11 @@ static int uas_use_uas_driver(struct usb (le16_to_cpu(udev->descriptor.idProduct) == 0x5106 || le16_to_cpu(udev->descriptor.idProduct) == 0x55aa)) { if (udev->actconfig->desc.bMaxPower == 0) { - /* ASM1153, do nothing */ + if (udev->product && strstr(udev->product, "ASMT135")) { + /* ASMT135x, broken uas */ + flags |= US_FL_IGNORE_UAS; + } + /* else ASM1153, do nothing */ } else if (udev->speed < USB_SPEED_SUPER) { /* No streams info, assume ASM1051 */ flags |= US_FL_IGNORE_UAS;