Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp5279559imm; Fri, 18 May 2018 21:51:31 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp08Uc6KJSXMlWosYaCdpS94q32E07+AWOe8pzo0aNQBVhNgh4GQyZS3+Irt06fZyYeS0iC X-Received: by 2002:a62:990f:: with SMTP id d15-v6mr12009671pfe.115.1526705491002; Fri, 18 May 2018 21:51:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526705490; cv=none; d=google.com; s=arc-20160816; b=Nddd5OZ8gZXTQST6dtXjOpWLXqivqwXTI0Ch3pJ6fk661UEU57fTg8VLeuBq0mGM3x Dv0w8x8yr2A5Yu06T8y8K1oLU5FIjTpvsCKfhYWWn2kT7cE8wIhDQpZAxc4P0q/Blj9S P1D0kJ6iX8NyK3b++f1Bcc2Wy2HTZwPt/Il7GuzjLZUQ1NjYwfd0pyPymyDdzxfY75BC AfhwG1DMCchfp4uiGxuVYTK0drsbWY8+PnFd0v8LK2OHJAt2RkxsKcxnP9cmzp7YKyKb PyzDW7vu2gTRIOb3H62E+t+D0abqDjfXfoi7Hmed6xvIpM9O6W6sMBUFzSM2iwcHljhS 2Ntg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=xOCo7af8zghqVVf1BRfDI2ePXp34Tl6zKQ1U2etLeBI=; b=ImNUWC8pCwi6GUkhF+RwUUNXLMyG2dgRKT8EiUHvQyPXhaRkcDi8Amldku6Fji7ZHu phTsBQfGxnjBWpTdEzCPdcGyd4rMeBsIxjC0zA4ny8PViWbM6BNsEhkhukdl3rA66OHR wf+TWCwyGwu+LGI/Zm0Gmdhfm1QEpu5elh+A88UKZjNhUHBJ7Ifpo9M1sXQT2VXWJKrF +4qAgGzdMs+9FAp1bx4QqvMavPPg22RxKdvv142tfTLa70MjUQIWs/b0sQpBklwykFQV zlk+PE0AMKEV44GUazDTl5EdgwYv97PeEtlaTaQsRiS/gc+4IPWulMVyeOlWlanXNDXF Wscw== 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 y13-v6si6782956pge.290.2018.05.18.21.50.52; Fri, 18 May 2018 21:51:30 -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 S1752026AbeESEug (ORCPT + 99 others); Sat, 19 May 2018 00:50:36 -0400 Received: from s18231873.onlinehome-server.info ([217.160.179.168]:42472 "EHLO godking.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750955AbeESEub (ORCPT ); Sat, 19 May 2018 00:50:31 -0400 Received: from KAMPFSAU-V.kappner.info (localhost [IPv6:::1]) by godking.net (Postfix) with ESMTP id 29D261D2AE90C; Fri, 18 May 2018 23:50:27 -0500 (CDT) From: Alexander Kappner To: stern@rowland.harvard.edu, oneukum@suse.com Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, usb-storage@lists.one-eyed-alien.net, gregkh@linuxfoundation.org, Alexander Kappner Subject: [PATCH v2 2/2] [usb-storage] Add compatibility quirk flags for G-Technologies G-Drive Date: Fri, 18 May 2018 21:50:16 -0700 Message-Id: <1526705416-12573-3-git-send-email-agk@godking.net> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1526705416-12573-1-git-send-email-agk@godking.net> References: <1526705416-12573-1-git-send-email-agk@godking.net> 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 and usb-storage: [ 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 work with UAS, and another to work with usb-storage), adding this under unusual_devs.h and not just unusual_uas.h so kernels compiled without UAS receive the quirk. With the patch, the drive works reliably on UAS and usb- storage. (tested on NEC Corporation uPD720200 USB 3.0 host controller). Signed-off-by: Alexander Kappner --- drivers/usb/storage/unusual_devs.h | 9 +++++++++ drivers/usb/storage/unusual_uas.h | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index 747d3a9..22fcfcc 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. + * Patch submitted by Alexander Kappner + */ +UNUSUAL_DEV(0x4971, 0x8024, 0x0000, 0x9999, + "SimpleTech", + "External HDD", + USB_SC_DEVICE, USB_PR_DEVICE, NULL, + US_FL_ALWAYS_SYNC), + /* * Nick Bowler * SCSI stack spams (otherwise harmless) error messages. diff --git a/drivers/usb/storage/unusual_uas.h b/drivers/usb/storage/unusual_uas.h index 38434d8..d0bdebd 100644 --- a/drivers/usb/storage/unusual_uas.h +++ b/drivers/usb/storage/unusual_uas.h @@ -107,3 +107,12 @@ UNUSUAL_DEV(0x4971, 0x8017, 0x0000, 0x9999, "External HDD", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_REPORT_OPCODES), + +/* "G-DRIVE" external HDD hangs on write without these. + * Patch submitted by Alexander Kappner + */ +UNUSUAL_DEV(0x4971, 0x8024, 0x0000, 0x9999, + "SimpleTech", + "External HDD", + USB_SC_DEVICE, USB_PR_DEVICE, NULL, + US_FL_ALWAYS_SYNC), -- 2.1.4