Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2485812imm; Mon, 24 Sep 2018 05:18:37 -0700 (PDT) X-Google-Smtp-Source: ACcGV62POf8pHz5JGdIdcThxO7S5Ob+zV8R0/EY7CuMQEztTFMx3dGQbZEuNIBNWlKgnbaLPFb0u X-Received: by 2002:a63:c912:: with SMTP id o18-v6mr9012600pgg.331.1537791517072; Mon, 24 Sep 2018 05:18:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537791517; cv=none; d=google.com; s=arc-20160816; b=msj7T9YxIuAmnrM9oF9gTOMlMlCK1/ShWB6VVO0efHsn4p49CibJfVguVSSgrBe80f gNwWdPB4ngnOuUFDVaJFgI8IqcoyO/iLAwxKkJxAMMctJfB/MHfdu1b77kHATbtf2Zrr 8EjveLh6nmFrYZuDFM4pDRClsHI4Px9jVk3BhBI37f+zyad2QS1oOXNq9fjz6Y3pObHD ZmypmyoY0ag36+osEtQeIWyv7xMTBQfxFjO2hn+5HbhmjwAL0jgoshfJib3Sv2sUKflK h3DeZoE18Po7qMa1+qXqHj3iqTh6Tid4kTgTDC1AXh4UX/qaRnWQj8OmIa61BreNqFn4 VL4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=Febu8mHGFAe+TGJC64D1MDgI3qJjE+i+nRc6heWXLGg=; b=wGjJUu69nB57OAieVeG8JYIOf93hB6lokHNDMdBY1n0pGy7s/snBsKRINVvvSzyBuf 8tsBut5TT3kMe2cQJo8pPdksKCht7/W2R3MaSF/bDp1KRUBEHB4g2LB00FverYuk8eaq L3plu81qe7T/chqm0sG+KTMldRgQ9yqP97sriLZL29koAKR35WqfkKPFQLm99/AnMroy L/5Hz5YDx04G+yMWrgSwLFxy+7JtlbQAtg9GH3xGa/F+II1IPT7JRSU4yaluG6FjJOg6 1Ercd1lXDzxzdii9RMCkBzK+071rhQu8GiDiDQZvbD2ln2OkEL7ggbbRfGmm6gIhARmy lm1Q== 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 o2-v6si14322061pga.521.2018.09.24.05.18.21; Mon, 24 Sep 2018 05:18:37 -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 S1732402AbeIXSTQ (ORCPT + 99 others); Mon, 24 Sep 2018 14:19:16 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:55904 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729919AbeIXSTP (ORCPT ); Mon, 24 Sep 2018 14:19:15 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 9BA11109F; Mon, 24 Sep 2018 12:17:23 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tim Anderson , Alan Stern Subject: [PATCH 4.14 088/173] USB: Add quirk to support DJI CineSSD Date: Mon, 24 Sep 2018 13:52:02 +0200 Message-Id: <20180924113122.539901560@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180924113114.334025954@linuxfoundation.org> References: <20180924113114.334025954@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tim Anderson commit f45681f9becaa65111ed0a691ccf080a0cd5feb8 upstream. This device does not correctly handle the LPM operations. Also, the device cannot handle ATA pass-through commands and locks up when attempted while running in super speed. This patch adds the equivalent quirk logic as found in uas. Signed-off-by: Tim Anderson Acked-by: Alan Stern Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/quirks.c | 3 +++ drivers/usb/storage/scsiglue.c | 9 +++++++++ drivers/usb/storage/unusual_devs.h | 7 +++++++ 3 files changed, 19 insertions(+) --- a/drivers/usb/core/quirks.c +++ b/drivers/usb/core/quirks.c @@ -259,6 +259,9 @@ static const struct usb_device_id usb_qu { USB_DEVICE(0x2040, 0x7200), .driver_info = USB_QUIRK_CONFIG_INTF_STRINGS }, + /* DJI CineSSD */ + { USB_DEVICE(0x2ca3, 0x0031), .driver_info = USB_QUIRK_NO_LPM }, + /* INTEL VALUE SSD */ { USB_DEVICE(0x8086, 0xf1a5), .driver_info = USB_QUIRK_RESET_RESUME }, --- a/drivers/usb/storage/scsiglue.c +++ b/drivers/usb/storage/scsiglue.c @@ -392,6 +392,15 @@ static int queuecommand_lck(struct scsi_ return 0; } + if ((us->fflags & US_FL_NO_ATA_1X) && + (srb->cmnd[0] == ATA_12 || srb->cmnd[0] == ATA_16)) { + memcpy(srb->sense_buffer, usb_stor_sense_invalidCDB, + sizeof(usb_stor_sense_invalidCDB)); + srb->result = SAM_STAT_CHECK_CONDITION; + done(srb); + return 0; + } + /* enqueue the command and wake up the control thread */ srb->scsi_done = done; us->srb = srb; --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h @@ -2307,6 +2307,13 @@ UNUSUAL_DEV( 0x2735, 0x100b, 0x0000, 0x USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_GO_SLOW ), +/* Reported-by: Tim Anderson */ +UNUSUAL_DEV( 0x2ca3, 0x0031, 0x0000, 0x9999, + "DJI", + "CineSSD", + USB_SC_DEVICE, USB_PR_DEVICE, NULL, + US_FL_NO_ATA_1X), + /* * Reported by Frederic Marchal * Mio Moov 330