Message ID | 20240226075936.1744353-1-huxiaoying@kylinos.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-80740-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp1933247dyb; Mon, 26 Feb 2024 00:16:42 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVQNQ+s5eE12EdK1sOUTf0dAMi93C05mozuhfAKeYTHeuSRwFmA4KhxTVKVLsILmObZiTMVxV7Uot0Et9V1YyJ6Vz3qng== X-Google-Smtp-Source: AGHT+IHWlC4AT8O1dUXEz/ZSaszYMGIBvdPiiYn10HOmS2dMVGpLnAzkXt/7BW+q80RjXQaODUe7 X-Received: by 2002:aa7:d618:0:b0:566:117c:cfca with SMTP id c24-20020aa7d618000000b00566117ccfcamr384712edr.4.1708935401866; Mon, 26 Feb 2024 00:16:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708935401; cv=pass; d=google.com; s=arc-20160816; b=nUiiylB4TqVFcKMvfrEF5CpBvNplFxf9K3KRO3eRfV//Qf9re9oqO1sYP3bIcXI2d1 O+SioLJQL9gYkCgeRCMjvM1O9udO3qDhPIXG9LS+kSom/PPM4LeCwVaARDkdQ/fdAXBe tkgWlU/wpRMcelf0yDuxiPvI1KERYnllTHzE8jtH3cLPrdRV2WuiDmld0RgNngP4LV3r GRIN/6i2a8HOwCspinjJQtEZzvVgtutVETjpDhyYHCV/PNkxD9hPyGFhu1FqDsPT/OOc KK0o673ke0SVgzoTML+urbuWljW76I96lhzEiZsjGlOLKF+GhpDQX6c6+t5R8y86ReHo XKoA== 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=CfzzEFaDFfCZN2bsZTQRtNy3LhQMF0FIf2theWzVsk0=; fh=FAooH7GKYYyIXakJ97bU/D9yPwMuBGyjp3/Wi/5Lzlc=; b=e7tghsTorytmO3STBLG3QvLWAMj/zPI3PFTdPtwomwLKbwI9BZFHKAt+91TlMsUjVN ZhYUeZBuc6WCwaPxlhWtk1OAYc9fdjMd2+YYDnNK76jYRpFid55qHnOHz6dImoOAfhGU 4fUsk64fKjcQFWMu9YjetkJ5d9LQsaWcQHQfuuU+i7GfyRT6pD0jK/GaANwK0W12l1kn cXxDYmthnAmudF5YWl8AzdlF5NUXis7wkrvbcu+B6d8XGq86Sb5RfuKIoyzfcL5zl6Xl TYXWhX33eJV7gXCkxLJ+TQUpa10L0+cx41PDgDkRR7RXq1YYTGiy6jjw1dViohF4w/Nb bo/g==; 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-80740-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80740-ouuuleilei=gmail.com@vger.kernel.org" Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id bf1-20020a0564021a4100b005646c29cabdsi1852433edb.283.2024.02.26.00.16.41 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 00:16:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80740-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=kylinos.cn); spf=pass (google.com: domain of linux-kernel+bounces-80740-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80740-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 am.mirrors.kernel.org (Postfix) with ESMTPS id D22311F22C57 for <ouuuleilei@gmail.com>; Mon, 26 Feb 2024 08:16:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D79841CF92; Mon, 26 Feb 2024 08:15:50 +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 35F911CF80; Mon, 26 Feb 2024 08:15:43 +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=1708935349; cv=none; b=M25Rb4z3blfqpIT0qrVcn9+la0k72O46Op9vquIrLH6Fy1sKVWUWBikM+Pdcl1PPnvnU559uGFUPcFluJCSGZidy3OfTqZDsGge71wBREJk/fo8K4VhUXgKfbJ6t+gR7dC4j/YQQL7dKf4+bncdl0w6yflVILWq6ymAFfR5jHGU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708935349; c=relaxed/simple; bh=1Ly8Ln5JNzP8Po26apTgYD6fQ2vZoTYlsMkbNJ0EYuE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=ejPu8uJIl7ydnT3+iD3BKrifj5wy5uQOZ5vUnNhRpMj6a9EQo2lu7K2Y4X/SLFZg5lvG0g7REkjpdiy1dFOvIsaB/SRoOZ+k+HGn1qSZiSo4Vyw02l1zDrrTR4JjNWZt4Uo3VGPZmuDMWGmdsgZELKQQ09Y6Ce3xPU771qF9NkM= 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: c414adaebff1491ea3c435d69bf18d7c-20240226 X-CID-O-RULE: Release_Ham X-CID-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.37,REQID:78a62de6-603d-4ccf-97e6-01674f37df55,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:78a62de6-603d-4ccf-97e6-01674f37df55,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:63bad180-4f93-4875-95e7-8c66ea833d57,B ulkID:2402261559416CA0LJEE,BulkQuantity:0,Recheck:0,SF:17|19|44|66|38|24|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_SNR,TF_CID_SPAM_FAS,TF_CID_SPAM_FSD,TF_CID_SPAM_FSI X-UUID: c414adaebff1491ea3c435d69bf18d7c-20240226 X-User: huxiaoying@kylinos.cn Received: from localhost.localdomain [(112.64.161.44)] by mailgw (envelope-from <huxiaoying@kylinos.cn>) (Generic MTA) with ESMTP id 51673992; Mon, 26 Feb 2024 15:59:39 +0800 From: Tom Hu <huxiaoying@kylinos.cn> 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 <huxiaoying@kylinos.cn> Subject: [PATCH] usb-storage: Add Brain USB3-FW to IGNORE_UAS Date: Mon, 26 Feb 2024 15:59:36 +0800 Message-Id: <20240226075936.1744353-1-huxiaoying@kylinos.cn> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791948647541498525 X-GMAIL-MSGID: 1791948647541498525 |
Series |
usb-storage: Add Brain USB3-FW to IGNORE_UAS
|
|
Commit Message
Tom Hu
Feb. 26, 2024, 7:59 a.m. UTC
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.
Signed-off-by: Hu Xiaoying <huxiaoying@kylinos.cn>
1
---
drivers/usb/storage/unusual_uas.h | 7 +++++++
1 file changed, 7 insertions(+)
Comments
On Mon, Feb 26, 2024 at 03:59:36PM +0800, Tom Hu wrote: > 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. > > Signed-off-by: Hu Xiaoying <huxiaoying@kylinos.cn> > 1 What is that 1? > --- > 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 <huxiaoying@kylinos.cn> */ > +UNUSUAL_DEV(0x1234, 0x1234, 0x0000, 0x9999, The vendor and product ID values have a suspicious look, but they appear to be genuine. > + "Brain", > + "External HDD", > + USB_SC_DEVICE, USB_PR_DEVICE, NULL, > + US_FL_IGNORE_UAS), > + > /* Reported-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> */ > UNUSUAL_DEV(0x13fd, 0x3940, 0x0000, 0x9999, > "Initio Corporation", > -- > 2.25.1 Acked-by: Alan Stern <stern@rowland.harvard.edu> Alan Stern
On 2024-03-01 23:53, Alan Stern wrote: >> 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 <huxiaoying@kylinos.cn> */ >> +UNUSUAL_DEV(0x1234, 0x1234, 0x0000, 0x9999, > > The vendor and product ID values have a suspicious look, but they appear > to be genuine. Hi Alan, it is of course a bogus Id, here is another one: "SmartWi - Multi Room Solution is a Smart Card Reader hardware device. This driver was developed by SmartWi International A/S. The hardware id of this driver is USB/VID_1234&PID_1234." found by googling vid_1234&pid_1234. There are others like 1234:5678 which also looks suspicious. thanks Lars
On Sat, Mar 02, 2024 at 07:06:20PM +0700, Lars Melin wrote: > On 2024-03-01 23:53, Alan Stern wrote: > > > 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 <huxiaoying@kylinos.cn> */ > > > +UNUSUAL_DEV(0x1234, 0x1234, 0x0000, 0x9999, > > > > The vendor and product ID values have a suspicious look, but they appear > > to be genuine. > > Hi Alan, > it is of course a bogus Id, here is another one: > > "SmartWi - Multi Room Solution is a Smart Card Reader hardware device. This > driver was developed by SmartWi International A/S. The hardware id of this > driver is USB/VID_1234&PID_1234." > > found by googling vid_1234&pid_1234. > > There are others like 1234:5678 which also looks suspicious. Yeah, this is a "fake" number, which happens a lot (0000/0000 is also used.) Because of this, I don't know if we should take this change. It obviously fixes an issue for _this_ device, but for any other usb-storage device using this fake id, will it cause issues? thanks, greg k-h
On 2024-03-03 02:19, Greg KH wrote: > On Sat, Mar 02, 2024 at 07:06:20PM +0700, Lars Melin wrote: >> On 2024-03-01 23:53, Alan Stern wrote: >>>> 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 <huxiaoying@kylinos.cn> */ >>>> +UNUSUAL_DEV(0x1234, 0x1234, 0x0000, 0x9999, >>> >>> The vendor and product ID values have a suspicious look, but they appear >>> to be genuine. >> >> Hi Alan, >> it is of course a bogus Id, here is another one: >> >> "SmartWi - Multi Room Solution is a Smart Card Reader hardware device. This >> driver was developed by SmartWi International A/S. The hardware id of this >> driver is USB/VID_1234&PID_1234." >> >> found by googling vid_1234&pid_1234. >> >> There are others like 1234:5678 which also looks suspicious. > > Yeah, this is a "fake" number, which happens a lot (0000/0000 is also > used.) > > Because of this, I don't know if we should take this change. It > obviously fixes an issue for _this_ device, but for any other > usb-storage device using this fake id, will it cause issues? > > thanks, > > greg k-h If you are asking me then I say that the patch should not be taken. If the manufacturer doesn't make it possible to distinguish this USB device from another USB device then there is nothing we can do for him. thanks Lars
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 <huxiaoying@kylinos.cn> */ +UNUSUAL_DEV(0x1234, 0x1234, 0x0000, 0x9999, + "Brain", + "External HDD", + USB_SC_DEVICE, USB_PR_DEVICE, NULL, + US_FL_IGNORE_UAS), + /* Reported-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> */ UNUSUAL_DEV(0x13fd, 0x3940, 0x0000, 0x9999, "Initio Corporation",