[kernel/f20] Add various UAS quirks (rhbz 1124119)

Josh Boyer jwboyer at fedoraproject.org
Mon Jan 12 14:14:38 UTC 2015


commit a6dc6dcc9f27ff2cd018141ac75e131e33737fbf
Author: Josh Boyer <jwboyer at fedoraproject.org>
Date:   Mon Jan 12 08:50:48 2015 -0500

    Add various UAS quirks (rhbz 1124119)

 kernel.spec                                        |   11 +++
 ...FL_NO_ATA_1X-for-2-more-Seagate-disk-encl.patch |   48 ++++++++++
 ...report-opcodes-quirk-for-Simpletech-devic.patch |   33 +++++++
 uas-Do-not-blacklist-ASM1153-disk-enclosures.patch |   94 ++++++++++++++++++++
 x86-vdso-Use-asm-volatile-in-__getcpu.patch        |    9 ++-
 5 files changed, 193 insertions(+), 2 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index d3e2bb8..0c72824 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -768,6 +768,11 @@ Patch26124: KEYS-close-race-between-key-lookup-and-freeing.patch
 #rhbz 1178975
 Patch26125: x86-vdso-Use-asm-volatile-in-__getcpu.patch
 
+#rhbz 1124119
+Patch26126: uas-Do-not-blacklist-ASM1153-disk-enclosures.patch
+Patch26127: uas-Add-US_FL_NO_ATA_1X-for-2-more-Seagate-disk-encl.patch
+Patch26128: uas-Add-no-report-opcodes-quirk-for-Simpletech-devic.patch
+
 # git clone ssh://git.fedorahosted.org/git/kernel-arm64.git, git diff master...devel
 Patch30000: kernel-arm64.patch
 
@@ -1506,6 +1511,11 @@ ApplyPatch KEYS-close-race-between-key-lookup-and-freeing.patch
 #rhbz 1178975
 ApplyPatch x86-vdso-Use-asm-volatile-in-__getcpu.patch
 
+#rhbz 1124119
+ApplyPatch uas-Do-not-blacklist-ASM1153-disk-enclosures.patch
+ApplyPatch uas-Add-US_FL_NO_ATA_1X-for-2-more-Seagate-disk-encl.patch
+ApplyPatch uas-Add-no-report-opcodes-quirk-for-Simpletech-devic.patch
+
 %if 0%{?aarch64patches}
 ApplyPatch kernel-arm64.patch
 %ifnarch aarch64 # this is stupid, but i want to notice before secondary koji does.
@@ -2325,6 +2335,7 @@ fi
 #                 ||     ||
 %changelog
 * Mon Jan 12 2015 Josh Boyer <jwboyer at fedoraproject.org>
+- Add various UAS quirks (rhbz 1124119)
 - Add patch to fix loop in VDSO (rhbz 1178975)
 
 * Thu Jan 08 2015 Justin M. Forbes <jforbes at fedoraproject.org> - 3.17.8-300
diff --git a/uas-Add-US_FL_NO_ATA_1X-for-2-more-Seagate-disk-encl.patch b/uas-Add-US_FL_NO_ATA_1X-for-2-more-Seagate-disk-encl.patch
new file mode 100644
index 0000000..60e5b26
--- /dev/null
+++ b/uas-Add-US_FL_NO_ATA_1X-for-2-more-Seagate-disk-encl.patch
@@ -0,0 +1,48 @@
+From: Hans de Goede <hdegoede at redhat.com>
+Date: Thu, 8 Jan 2015 14:54:03 +0100
+Subject: [PATCH] uas: Add US_FL_NO_ATA_1X for 2 more Seagate disk enclosures
+
+Just like all previous UAS capable Seagate disk enclosures, these need the
+US_FL_NO_ATA_1X to not crash when udev probes them.
+
+Cc: stable at vger.kernel.org # 3.16
+Signed-off-by: Hans de Goede <hdegoede at redhat.com>
+---
+ drivers/usb/storage/unusual_uas.h | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/drivers/usb/storage/unusual_uas.h b/drivers/usb/storage/unusual_uas.h
+index f8492c1fd0e8..9ec4561f6c2c 100644
+--- a/drivers/usb/storage/unusual_uas.h
++++ b/drivers/usb/storage/unusual_uas.h
+@@ -75,6 +75,13 @@ UNUSUAL_DEV(0x0bc2, 0xa013, 0x0000, 0x9999,
+ 		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+ 		US_FL_NO_ATA_1X),
+ 
++/* Reported-by: Hans de Goede <hdegoede at redhat.com> */
++UNUSUAL_DEV(0x0bc2, 0xa0a4, 0x0000, 0x9999,
++		"Seagate",
++		"Backup Plus Desk",
++		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
++		US_FL_NO_ATA_1X),
++
+ /* https://bbs.archlinux.org/viewtopic.php?id=183190 */
+ UNUSUAL_DEV(0x0bc2, 0xab20, 0x0000, 0x9999,
+ 		"Seagate",
+@@ -89,6 +96,13 @@ UNUSUAL_DEV(0x0bc2, 0xab21, 0x0000, 0x9999,
+ 		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+ 		US_FL_NO_ATA_1X),
+ 
++/* Reported-by: G. Richard Bellamy <rbellamy at pteradigm.com> */
++UNUSUAL_DEV(0x0bc2, 0xab2a, 0x0000, 0x9999,
++		"Seagate",
++		"BUP Fast HDD",
++		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
++		US_FL_NO_ATA_1X),
++
+ /* Reported-by: Claudio Bizzarri <claudio.bizzarri at gmail.com> */
+ UNUSUAL_DEV(0x152d, 0x0567, 0x0000, 0x9999,
+ 		"JMicron",
+-- 
+2.1.0
+
diff --git a/uas-Add-no-report-opcodes-quirk-for-Simpletech-devic.patch b/uas-Add-no-report-opcodes-quirk-for-Simpletech-devic.patch
new file mode 100644
index 0000000..837e472
--- /dev/null
+++ b/uas-Add-no-report-opcodes-quirk-for-Simpletech-devic.patch
@@ -0,0 +1,33 @@
+From: Hans de Goede <hdegoede at redhat.com>
+Date: Mon, 12 Jan 2015 13:24:31 +0100
+Subject: [PATCH] uas: Add no-report-opcodes quirk for Simpletech devices with
+ id 4971:8017
+
+Like some other uas devices these devices hang when a report-opcodes scsi
+command is send to them.
+
+BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1124119
+Cc: stable at vger.kernel.org # 3.16
+Signed-off-by: Hans de Goede <hdegoede at redhat.com>
+---
+ 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 9ec4561f6c2c..da3d98c72db1 100644
+--- a/drivers/usb/storage/unusual_uas.h
++++ b/drivers/usb/storage/unusual_uas.h
+@@ -130,3 +130,10 @@ UNUSUAL_DEV(0x4971, 0x1012, 0x0000, 0x9999,
+ 		"External HDD",
+ 		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+ 		US_FL_IGNORE_UAS),
++
++/* Reported-by: Richard Henderson <rth at redhat.com> */
++UNUSUAL_DEV(0x4971, 0x8017, 0x0000, 0x9999,
++		"SimpleTech",
++		"External HDD",
++		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
++		US_FL_NO_REPORT_OPCODES),
+-- 
+2.1.0
+
diff --git a/uas-Do-not-blacklist-ASM1153-disk-enclosures.patch b/uas-Do-not-blacklist-ASM1153-disk-enclosures.patch
new file mode 100644
index 0000000..5b67025
--- /dev/null
+++ b/uas-Do-not-blacklist-ASM1153-disk-enclosures.patch
@@ -0,0 +1,94 @@
+From: Hans de Goede <hdegoede at redhat.com>
+Date: Thu, 8 Jan 2015 14:42:01 +0100
+Subject: [PATCH] uas: Do not blacklist ASM1153 disk enclosures
+
+Our detection logic to avoid doing UAS on ASM1051 bridge chips causes problems
+with newer ASM1153 disk enclosures in 2 ways:
+
+1) Some ASM1153 disk enclosures re-use the ASM1051 device-id of 5106, which
+   we assume is always an ASM1051, so remove the quirk for 5106, and instead
+   use the same detection logic as we already use for device-id 55aa, which is
+   used for all of ASM1051, ASM1053 and ASM1153 devices <sigh>.
+
+2) Our detection logic to differentiate between ASM1051 and ASM1053 sees
+   ASM1153 devices as ASM1051 because they have 32 streams like ASM1051 devs.
+   Luckily the ASM1153 descriptors are not 100% identical, unlike the previous
+   models the ASM1153 has bMaxPower == 0, so use that to differentiate it.
+
+Signed-off-by: Hans de Goede <hdegoede at redhat.com>
+---
+ drivers/usb/storage/uas-detect.h  | 33 ++++++++++++++++++++++++++++-----
+ drivers/usb/storage/unusual_uas.h |  8 --------
+ 2 files changed, 28 insertions(+), 13 deletions(-)
+
+diff --git a/drivers/usb/storage/uas-detect.h b/drivers/usb/storage/uas-detect.h
+index 8a6f371ed6e7..9893d696fc97 100644
+--- a/drivers/usb/storage/uas-detect.h
++++ b/drivers/usb/storage/uas-detect.h
+@@ -69,16 +69,39 @@ static int uas_use_uas_driver(struct usb_interface *intf,
+ 		return 0;
+ 
+ 	/*
+-	 * ASM1051 and older ASM1053 devices have the same usb-id, and UAS is
+-	 * broken on the ASM1051, use the number of streams to differentiate.
+-	 * New ASM1053-s also support 32 streams, but have a different prod-id.
++	 * ASMedia has a number of usb3 to sata bridge chips, at the time of
++	 * this writing the following versions exist:
++	 * ASM1051 - no uas support version
++	 * ASM1051 - with broken (*) uas support
++	 * ASM1053 - with working uas support
++	 * ASM1153 - with working uas support
++	 *
++	 * 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
++	 * dealing with an ASM1051 (which we want to avoid).
++	 *
++	 * The ASM1153 can be identified by config.MaxPower == 0,
++	 * where as the ASM105x models have config.MaxPower == 36.
++	 *
++	 * Differentiating between the ASM1053 and ASM1051 is trickier, when
++	 * connected over USB-3 we can look at the number of streams supported,
++	 * ASM1051 supports 32 streams, where as early ASM1053 versions support
++	 * 16 streams, newer ASM1053-s also support 32 streams, but have a
++	 * different prod-id.
++	 *
++	 * (*) ASM1051 chips do work with UAS with some disks (with the
++	 *     US_FL_NO_REPORT_OPCODES quirk), but are broken with other disks
+ 	 */
+ 	if (le16_to_cpu(udev->descriptor.idVendor) == 0x174c &&
+-			le16_to_cpu(udev->descriptor.idProduct) == 0x55aa) {
+-		if (udev->speed < USB_SPEED_SUPER) {
++			(le16_to_cpu(udev->descriptor.idProduct) == 0x5106 ||
++			 le16_to_cpu(udev->descriptor.idProduct) == 0x55aa)) {
++		if (udev->actconfig->desc.bMaxPower == 0) {
++			/* ASM1153, do nothing */
++		} else if (udev->speed < USB_SPEED_SUPER) {
+ 			/* No streams info, assume ASM1051 */
+ 			flags |= US_FL_IGNORE_UAS;
+ 		} else if (usb_ss_max_streams(&eps[1]->ss_ep_comp) == 32) {
++			/* Possibly an ASM1051, disable uas */
+ 			flags |= US_FL_IGNORE_UAS;
+ 		}
+ 	}
+diff --git a/drivers/usb/storage/unusual_uas.h b/drivers/usb/storage/unusual_uas.h
+index 2f0a3d35269a..f8492c1fd0e8 100644
+--- a/drivers/usb/storage/unusual_uas.h
++++ b/drivers/usb/storage/unusual_uas.h
+@@ -96,14 +96,6 @@ UNUSUAL_DEV(0x152d, 0x0567, 0x0000, 0x9999,
+ 		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+ 		US_FL_NO_REPORT_OPCODES),
+ 
+-/* Most ASM1051 based devices have issues with uas, blacklist them all */
+-/* Reported-by: Hans de Goede <hdegoede at redhat.com> */
+-UNUSUAL_DEV(0x174c, 0x5106, 0x0000, 0x9999,
+-		"ASMedia",
+-		"ASM1051",
+-		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+-		US_FL_IGNORE_UAS),
+-
+ /* Reported-by: Hans de Goede <hdegoede at redhat.com> */
+ UNUSUAL_DEV(0x2109, 0x0711, 0x0000, 0x9999,
+ 		"VIA",
+-- 
+2.1.0
+
diff --git a/x86-vdso-Use-asm-volatile-in-__getcpu.patch b/x86-vdso-Use-asm-volatile-in-__getcpu.patch
index bcf5a15..033b423 100644
--- a/x86-vdso-Use-asm-volatile-in-__getcpu.patch
+++ b/x86-vdso-Use-asm-volatile-in-__getcpu.patch
@@ -1,7 +1,6 @@
-From 1ddf0b1b11aa8a90cef6706e935fc31c75c406ba Mon Sep 17 00:00:00 2001
 From: Andy Lutomirski <luto at amacapital.net>
 Date: Sun, 21 Dec 2014 08:57:46 -0800
-Subject: x86, vdso: Use asm volatile in __getcpu
+Subject: [PATCH] x86, vdso: Use asm volatile in __getcpu
 
 In Linux 3.18 and below, GCC hoists the lsl instructions in the
 pvclock code all the way to the beginning of __vdso_clock_gettime,
@@ -32,6 +31,9 @@ Cc: Marcelo Tosatti <mtosatti at redhat.com>
 Acked-by: Paolo Bonzini <pbonzini at redhat.com>
 Signed-off-by: Andy Lutomirski <luto at amacapital.net>
 (Backported to 3.17.8 by Josh Boyer <jwboyer at fedoraproject.org>)
+---
+ arch/x86/include/asm/vsyscall.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/arch/x86/include/asm/vsyscall.h b/arch/x86/include/asm/vsyscall.h
 index 2a46ca720afc..3db1fa5fdceb 100644
@@ -46,3 +48,6 @@ index 2a46ca720afc..3db1fa5fdceb 100644
  	}
  
  	return p;
+-- 
+2.1.0
+


More information about the scm-commits mailing list