]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.9.109/usb-storage-add-compatibility-quirk-flags-for-g-technologies-g-drive.patch
Fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 4.9.109 / usb-storage-add-compatibility-quirk-flags-for-g-technologies-g-drive.patch
1 From ca7d9515d0e6825351ce106066cea1f60e40b1c8 Mon Sep 17 00:00:00 2001
2 From: Alexander Kappner <agk@godking.net>
3 Date: Fri, 18 May 2018 21:50:16 -0700
4 Subject: usb-storage: Add compatibility quirk flags for G-Technologies G-Drive
5
6 From: Alexander Kappner <agk@godking.net>
7
8 commit ca7d9515d0e6825351ce106066cea1f60e40b1c8 upstream.
9
10 The "G-Drive" (sold by G-Technology) external USB 3.0 drive
11 hangs on write access under UAS and usb-storage:
12
13 [ 136.079121] sd 15:0:0:0: [sdi] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
14 [ 136.079144] sd 15:0:0:0: [sdi] tag#0 Sense Key : Illegal Request [current]
15 [ 136.079152] sd 15:0:0:0: [sdi] tag#0 Add. Sense: Invalid field in cdb
16 [ 136.079176] sd 15:0:0:0: [sdi] tag#0 CDB: Write(16) 8a 08 00 00 00 00 00 00 00 00 00 00 00 08 00 00
17 [ 136.079180] print_req_error: critical target error, dev sdi, sector 0
18 [ 136.079183] Buffer I/O error on dev sdi, logical block 0, lost sync page write
19 [ 136.173148] EXT4-fs (sdi): mounted filesystem with ordered data mode. Opts: (null)
20 [ 140.583998] sd 15:0:0:0: [sdi] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
21 [ 140.584010] sd 15:0:0:0: [sdi] tag#0 Sense Key : Illegal Request [current]
22 [ 140.584016] sd 15:0:0:0: [sdi] tag#0 Add. Sense: Invalid field in cdb
23 [ 140.584022] sd 15:0:0:0: [sdi] tag#0 CDB: Write(16) 8a 08 00 00 00 00 e8 c4 00 18 00 00 00 08 00 00
24 [ 140.584025] print_req_error: critical target error, dev sdi, sector 3905159192
25 [ 140.584044] print_req_error: critical target error, dev sdi, sector 3905159192
26 [ 140.584052] Aborting journal on device sdi-8.
27
28 The proposed patch adds compatibility quirks. Because the drive requires two
29 quirks (one to work with UAS, and another to work with usb-storage), adding this
30 under unusual_devs.h and not just unusual_uas.h so kernels compiled without UAS
31 receive the quirk. With the patch, the drive works reliably on UAS and usb-
32 storage.
33 (tested on NEC Corporation uPD720200 USB 3.0 host controller).
34
35 Signed-off-by: Alexander Kappner <agk@godking.net>
36 Acked-by: Alan Stern <stern@rowland.harvard.edu>
37 Cc: stable <stable@vger.kernel.org>
38 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
39
40 ---
41 drivers/usb/storage/unusual_devs.h | 9 +++++++++
42 drivers/usb/storage/unusual_uas.h | 9 +++++++++
43 2 files changed, 18 insertions(+)
44
45 --- a/drivers/usb/storage/unusual_devs.h
46 +++ b/drivers/usb/storage/unusual_devs.h
47 @@ -2340,6 +2340,15 @@ UNUSUAL_DEV( 0x4146, 0xba01, 0x0100, 0x
48 "Micro Mini 1GB",
49 USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE ),
50
51 +/* "G-DRIVE" external HDD hangs on write without these.
52 + * Patch submitted by Alexander Kappner <agk@godking.net>
53 + */
54 +UNUSUAL_DEV(0x4971, 0x8024, 0x0000, 0x9999,
55 + "SimpleTech",
56 + "External HDD",
57 + USB_SC_DEVICE, USB_PR_DEVICE, NULL,
58 + US_FL_ALWAYS_SYNC),
59 +
60 /*
61 * Nick Bowler <nbowler@elliptictech.com>
62 * SCSI stack spams (otherwise harmless) error messages.
63 --- a/drivers/usb/storage/unusual_uas.h
64 +++ b/drivers/usb/storage/unusual_uas.h
65 @@ -183,3 +183,12 @@ UNUSUAL_DEV(0x4971, 0x8017, 0x0000, 0x99
66 "External HDD",
67 USB_SC_DEVICE, USB_PR_DEVICE, NULL,
68 US_FL_NO_REPORT_OPCODES),
69 +
70 +/* "G-DRIVE" external HDD hangs on write without these.
71 + * Patch submitted by Alexander Kappner <agk@godking.net>
72 + */
73 +UNUSUAL_DEV(0x4971, 0x8024, 0x0000, 0x9999,
74 + "SimpleTech",
75 + "External HDD",
76 + USB_SC_DEVICE, USB_PR_DEVICE, NULL,
77 + US_FL_ALWAYS_SYNC),