Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2505672imm; Mon, 24 Sep 2018 05:36:39 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaNJWiqL8rn6LXYM4yaU1tTf/npnztEuw4jBgmVaN74IsQ4OGe+XhJGwsoSoP2BG8Mtf1Xa X-Received: by 2002:a62:a03:: with SMTP id s3-v6mr10315776pfi.147.1537792599653; Mon, 24 Sep 2018 05:36:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537792599; cv=none; d=google.com; s=arc-20160816; b=K/3y/O0IxxvxtAqmTsuoAhzKqXaKh97mb1dsQUL2d+gQ9fTN0Su4hMTvD5dTFxdMzb k8+TQTFqOVmIMyP2WowQwauDZhE5U/RYgs6s8QtojQDskjZKGwedZtryHF/5LQtIhqMf ZhUCvhFqND51ySPp7rKRc2hD/XrRGdNJczGs4hdIKIJbhft64Er06+DKL60E0h5tCgID ZnTsnrMcOLbqjHuM9eVqaf4ZZcvHyt/BaEECXEDVFNQLWEC/JbQlvFt3hhD6VEd6LjHo crT69IdeQC7ozAh4qnDKUS+KENXQYEf6BI4p4sOQM7o0P9WKKX14Kq+PruOw5IfjxSF8 SNvg== 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=PAtqKi0c17efZF1e8cHJKtfbMTCVW5KmnXLBswoLfCo=; b=bnbOEWdHAkgHlV+M3dWqTR5zatU2csGYrdqRKB2twveJ47rbUYNKtbLF4isSlzVisz B00EFySnxhrQUaBqUpii7zKlZ6Rni6vxnEYi7DgbuUYXO0cL9SALvcju/b8Z73dZS/XE Xz8UUHTHZhSY4AHMV49rgblP8u/zRZ+aMogDRKyCs2Yf32N5unvJGkHYzAYvgyT94lCn nYmsJNvBBcjIp2bQmNYTKSy+UBEdkOd66MpnPpU7fhlItKgg9Ose7fE3evtkCWlgQV4q YTU15Hytlc8gwUSf1hyUrU7xc8fsuAbnh0CwcrAhRc9f6yz5K5ZYSm0ZCG1FYQrTb3ug jkZQ== 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 31-v6si36422249pld.145.2018.09.24.05.36.24; Mon, 24 Sep 2018 05:36:39 -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 S2388247AbeIXShc (ORCPT + 99 others); Mon, 24 Sep 2018 14:37:32 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:58532 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728937AbeIXShc (ORCPT ); Mon, 24 Sep 2018 14:37:32 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id AD9061092; Mon, 24 Sep 2018 12:35:34 +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.18 121/235] USB: Add quirk to support DJI CineSSD Date: Mon, 24 Sep 2018 13:51:47 +0200 Message-Id: <20180924113118.223401340@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180924113103.999624566@linuxfoundation.org> References: <20180924113103.999624566@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.18-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 @@ -406,6 +406,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 @@ -376,6 +376,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 @@ -2288,6 +2288,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