From patchwork Mon Mar 4 03:16:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Hu X-Patchwork-Id: 209365 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:fa17:b0:10a:f01:a869 with SMTP id ju23csp1194468dyc; Sun, 3 Mar 2024 19:17:42 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV1ed5Mk5tDI+steeEYg6GAAJ8ZDNBVSht9+u7xgfCaIGgda9OOy/swKkI2SITpAECxYGau6v85PLZGm2pKMuuWXbJnPA== X-Google-Smtp-Source: AGHT+IFDMuFyfepaLPvaiGy0AVzOZv/fjauRznQa9lYMundc04RalQ1w0vG9SXqIrLjRMWCfD1dR X-Received: by 2002:a17:90b:782:b0:299:75aa:8949 with SMTP id l2-20020a17090b078200b0029975aa8949mr4869198pjz.22.1709522262398; Sun, 03 Mar 2024 19:17:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709522262; cv=pass; d=google.com; s=arc-20160816; b=qK751gYYzCykCmEWx60qGHgJZ2MfwmUo2zg39ttcXdps22/1beMllCAxd+DrrTbbEd 3hGcE11BXYRQPqo+7vw+hFdZeyukWd9/LzgLKUdGP1oTrxAoxXTT04J4zp2LZ8Himi3Q Pis+OaXhOkAhFaCxR02emsLEky934xpBQeDMtDdfPneTW4B04bEPKRZ02oAnNXQjS5Ev iD/8KeUPCy4zBzsYs2UXjKga8FdRuiq+zJ4+Mub0RQIl/PbAoY6B18UKKp1+xWvlz1Mu muo0hvvKudyX5G7axRX8c572VKxKpQd/iQrwI1UYvJGE72UoJ4p571el0NxlnNmzdWoz BJBw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=lj7Rs0qKoLVCIqM/UxQngOLW98guxb5Z67c6T7LnWao=; fh=FAooH7GKYYyIXakJ97bU/D9yPwMuBGyjp3/Wi/5Lzlc=; b=hX9saTWgGw/PrQLZEzNwHOdZHBOwLwC8Nsyg3+WF6MMgIHNbBIeoLtfHbIxX5D9Bfr 31Lk00iEa4XHSZZCt3Nu6QrK5brUUt5BwMLg0QE0gy6KpBaW2P8Ajen7/kv2jm56pa5l 5CuDfIB+2OovbovCB4DaeiHZg6ofoNXDDNcLVc6TxZ6QfKz5DmyvpvcdWSaI922z5okb X5Kkq344FqZqWaFJSjAwSBigpkuahuZybtwc1RFyP+vQW39WeVhdHlHQ7qVTjUUOidR0 U+qURjckPyQ70YSIDb/lKtjENZWheo46xl4VQyaUIlvcpXRcMqIUjU1l2HKMmDRGpgnH ab2g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=kylinos.cn); spf=pass (google.com: domain of linux-kernel+bounces-90004-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90004-ouuuleilei=gmail.com@vger.kernel.org" Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id x2-20020a1709027c0200b001dca8522501si7422566pll.276.2024.03.03.19.17.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Mar 2024 19:17:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90004-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=kylinos.cn); spf=pass (google.com: domain of linux-kernel+bounces-90004-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90004-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 181CE281497 for ; Mon, 4 Mar 2024 03:17:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CEF6B611A; Mon, 4 Mar 2024 03:17:26 +0000 (UTC) Received: from mailgw.kylinos.cn (mailgw.kylinos.cn [124.126.103.232]) (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 408D417CE; Mon, 4 Mar 2024 03:17:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=124.126.103.232 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709522245; cv=none; b=B7zzO7DZczpRgcLFPo7dXEkbC90luUxru6PvlaWaVVp+LR59zYbFkmh5FY6kyMFgO5utDdwxVXr4sngpmOD/YX1BB4nykH6rTno4gi/QdOkF9kfJuuMheUq4nUi8l2xK6C1H7dXjb/Y7yWr/bfFYLWS0zBX+O/MV3jRxE7cIrSg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709522245; c=relaxed/simple; bh=gTQA7FLDn6FvPp9uK3H01S69mE7JhpgTlSXnMal0glk=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=H+pIwTFoA/PlCp+sEbR116jzuxqWRxAdBtr7wBtED1hlsVV6X2W4REN5gEJIJMegbnjzq0YLKqRtCm89MpWi+XgsFxMHfxdv4cAG04aHsFCBs6oYYgGWVg4a7/sn3Yf26MMDCWotUZHLvw8ytUkpHWd4gtA4qhDc0sIaoq/C4LA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn; spf=pass smtp.mailfrom=kylinos.cn; arc=none smtp.client-ip=124.126.103.232 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kylinos.cn X-UUID: 885d0ca386834035b293b24f6c48d103-20240304 X-CID-O-RULE: Release_Ham X-CID-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.37,REQID:d37a901e-0f78-44e7-a3b6-2baebcb50536,IP:10, URL:0,TC:0,Content:0,EDM:0,RT:0,SF:-15,FILE:0,BULK:0,RULE:Release_Ham,ACTI ON:release,TS:-5 X-CID-INFO: VERSION:1.1.37,REQID:d37a901e-0f78-44e7-a3b6-2baebcb50536,IP:10,UR L:0,TC:0,Content:0,EDM:0,RT:0,SF:-15,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-5 X-CID-META: VersionHash:6f543d0,CLOUDID:466d1181-4f93-4875-95e7-8c66ea833d57,B ulkID:240304111709GTSTWZ2V,BulkQuantity:0,Recheck:0,SF:66|38|24|17|19|44|1 02,TC:nil,Content:0,EDM:-3,IP:-2,URL:0,File:nil,RT:nil,Bulk:nil,QS:nil,BEC :nil,COL:0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_FAS,TF_CID_SPAM_FSD,TF_CID_SPAM_FSI,TF_CID_SPAM_SNR X-UUID: 885d0ca386834035b293b24f6c48d103-20240304 X-User: huxiaoying@kylinos.cn Received: from localhost.localdomain [(112.64.161.44)] by mailgw (envelope-from ) (Generic MTA) with ESMTP id 91826270; Mon, 04 Mar 2024 11:17:07 +0800 From: Tom Hu To: linux-kernel@vger.kernel.org, stern@rowland.harvard.edu, gregkh@linuxfoundation.org Cc: linux-usb@vger.kernel.org, usb-storage@lists.one-eyed-alien.net, Tom Hu Subject: [PATCH v2] usb-storage: Add Brain USB3-FW to IGNORE_UAS Date: Mon, 4 Mar 2024 11:16:56 +0800 Message-Id: <20240304031656.174888-1-huxiaoying@kylinos.cn> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792564015445079650 X-GMAIL-MSGID: 1792564015445079650 The UAS mode of BRAIN USB_HDD is reported to fail to work on several platforms with the following error message, then after re-connecting the device will be offlined and not working at all. [ 622.518442][ 2] sd 8:0:0:0: [sda] tag#17 uas_eh_abort_handler 0 uas-tag 18 inflight: CMD [ 622.527575][ 2] sd 8:0:0:0: [sda] tag#17 CDB: Write(10) 2a 00 03 6f 88 00 00 04 00 00 [ 622.536330][ 2] sd 8:0:0:0: [sda] tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD [ 622.545266][ 2] sd 8:0:0:0: [sda] tag#0 CDB: Write(10) 2a 00 07 44 1a 88 00 00 08 00 These disks have a broken uas implementation, the tag field of the status iu-s is not set properly, so we need to fall-back to usb-storage. --- v2: remove junk information from patch. Acked-by: Alan Stern Signed-off-by: Hu Xiaoying --- drivers/usb/storage/unusual_uas.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/usb/storage/unusual_uas.h b/drivers/usb/storage/unusual_uas.h index 1f8c9b16a0fb..98b7ff2c76ba 100644 --- a/drivers/usb/storage/unusual_uas.h +++ b/drivers/usb/storage/unusual_uas.h @@ -83,6 +83,13 @@ UNUSUAL_DEV(0x0bc2, 0x331a, 0x0000, 0x9999, USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_REPORT_LUNS), +/* Reported-by: Tom Hu */ +UNUSUAL_DEV(0x1234, 0x1234, 0x0000, 0x9999, + "Brain", + "External HDD", + USB_SC_DEVICE, USB_PR_DEVICE, NULL, + US_FL_IGNORE_UAS), + /* Reported-by: Benjamin Tissoires */ UNUSUAL_DEV(0x13fd, 0x3940, 0x0000, 0x9999, "Initio Corporation",