Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2456032imm; Wed, 16 May 2018 13:10:47 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqpgWLAx5sXG9vzt93kAw1FWZnyWAHKHrIqXwHbVi6clBigcUC/Y5AN8/j7ogF1gpuVukN6 X-Received: by 2002:a17:902:868b:: with SMTP id g11-v6mr2251214plo.305.1526501447532; Wed, 16 May 2018 13:10:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526501447; cv=none; d=google.com; s=arc-20160816; b=i2OED/Gv544xT6wk1bpHI6pZ0rLf1Zc0IteThbCmuAkzBzzXEG1xWMoWXSO4I3XEl3 z5sysn1oP8YFubhdIrzqVm0C20ccP96o5XsImsr535Sad2uuGWCgCcW2RBK+B+X1+HqW cCZeHe2BUpbBOKTool6xSGPZH58EUYNahmv4WAb40KyaeAPBwwg/tcN/t6Nz3f4muyaf aIatD0k6fB00UmluWo5al5iVGyaDy0jDANNhNseaMySA2v+CsP1/iYJhajU2xzik4B4S pmwlW2Kg3ztve8RB5kb0P7/D6NZ4Y2D7XpM12AIHcJ/pv5n9UPeRuwiwjfT/Ni7Y2JfS Y/zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=6R8ksHDi0CPNIS11dd4+dqGVZssZElCi4lAF8rG4LCI=; b=xh3NIFTQPCtSHCuVdBNJZBPGU7V76QbMJ3DaZogJe5SdtH2MekTm8qmqnVj8XtoQiS vM0pINWPX+BmFJoonTxxHIPj/qlMTXN2Ulql/bJRDgKspsHWT+kqh/iz7RsVDFIEPE6S x4reM/m0Tt825yov8ZI2Ko355+DxMIX2UQMTnO/nU+XWeLOS6dpgBsrgMGx1vfzyyaNw nfaQkZAmleoKrfTAXuC8ImwiHSnVGjscbIUi2hAQxVTdYD8PwaRJ5JcxXR7xzcB9VDrh SGTy6+1Wc4Y9J5hWhgqKSdHPkGSfXbnNQoXE0I7MobiQibndJyZxuZwqlkWrclQ2an4n UM8g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l7-v6si3463760plt.197.2018.05.16.13.10.31; Wed, 16 May 2018 13:10:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751533AbeEPUKJ (ORCPT + 99 others); Wed, 16 May 2018 16:10:09 -0400 Received: from s18231873.onlinehome-server.info ([217.160.179.168]:60686 "EHLO godking.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750937AbeEPUKI (ORCPT ); Wed, 16 May 2018 16:10:08 -0400 X-Greylist: delayed 523 seconds by postgrey-1.27 at vger.kernel.org; Wed, 16 May 2018 16:10:07 EDT Received: from KAMPFSAU-V.kappner.info (localhost [IPv6:::1]) by godking.net (Postfix) with ESMTP id D701E35BDC002; Wed, 16 May 2018 15:01:21 -0500 (CDT) From: Alexander Kappner To: stern@rowland.harvard.edu Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, usb-storage@lists.one-eyed-alien.net, linux-kernel@vger.kernel.org, Alexander Kappner Subject: [PATCH] usb-storage: Add quirks to make G-Technology "G-Drive" work Date: Wed, 16 May 2018 13:01:20 -0700 Message-Id: <1526500880-26512-1-git-send-email-agk@godking.net> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The "G-Drive" (sold by G-Technology) external USB 3.0 drive hangs on write access under UAS: [ 136.079121] sd 15:0:0:0: [sdi] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [ 136.079144] sd 15:0:0:0: [sdi] tag#0 Sense Key : Illegal Request [current] [ 136.079152] sd 15:0:0:0: [sdi] tag#0 Add. Sense: Invalid field in cdb [ 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 [ 136.079180] print_req_error: critical target error, dev sdi, sector 0 [ 136.079183] Buffer I/O error on dev sdi, logical block 0, lost sync page write [ 136.173148] EXT4-fs (sdi): mounted filesystem with ordered data mode. Opts: (null) [ 140.583998] sd 15:0:0:0: [sdi] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [ 140.584010] sd 15:0:0:0: [sdi] tag#0 Sense Key : Illegal Request [current] [ 140.584016] sd 15:0:0:0: [sdi] tag#0 Add. Sense: Invalid field in cdb [ 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 [ 140.584025] print_req_error: critical target error, dev sdi, sector 3905159192 [ 140.584044] print_req_error: critical target error, dev sdi, sector 3905159192 [ 140.584052] Aborting journal on device sdi-8. The proposed patch adds compatibility quirks. Because the drive requires two quirks (one to disable UAS, and another to work with usb-storage), adding this under unusual_devs.h and not unusual_uas.h so kernels compiled without UAS receive the quirk. With the patch, the drive works reliably (tested on NEC Corporation uPD720200 USB 3.0 host controller). Signed-off-by: Alexander Kappner --- drivers/usb/storage/unusual_devs.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index 747d3a9..b8661a1 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h @@ -2321,6 +2321,15 @@ UNUSUAL_DEV( 0x4146, 0xba01, 0x0100, 0x0100, "Micro Mini 1GB", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE ), +/* "G-DRIVE" external HDD hangs on write without these. + * Reported-by: Alexander Kappner + */ +UNUSUAL_DEV(0x4971, 0x8024, 0x0000, 0x9999, + "SimpleTech", + "External HDD", + USB_SC_DEVICE, USB_PR_DEVICE, NULL, + US_FL_IGNORE_UAS | US_FL_NO_WP_DETECT), + /* * Nick Bowler * SCSI stack spams (otherwise harmless) error messages. -- 2.1.4