diff options
author | Tim Anderson <tsa@biglakesoftware.com> | 2018-08-09 14:55:34 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-26 08:38:07 +0200 |
commit | 0845f2a4776d2a2bab88de351ce174aa9f64ed39 (patch) | |
tree | 2e995e7703266d9386233234dbcaff9486327a85 /drivers/usb/storage/scsiglue.c | |
parent | 599f1e90f709a994f35fc20a3da8259535df5bad (diff) | |
download | linux-stable-0845f2a4776d2a2bab88de351ce174aa9f64ed39.tar.gz linux-stable-0845f2a4776d2a2bab88de351ce174aa9f64ed39.tar.bz2 linux-stable-0845f2a4776d2a2bab88de351ce174aa9f64ed39.zip |
USB: Add quirk to support DJI CineSSD
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 <tsa@biglakesoftware.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/storage/scsiglue.c')
-rw-r--r-- | drivers/usb/storage/scsiglue.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c index 8cd2926fb1fe..344ec8631481 100644 --- a/drivers/usb/storage/scsiglue.c +++ b/drivers/usb/storage/scsiglue.c @@ -392,6 +392,15 @@ static int queuecommand_lck(struct scsi_cmnd *srb, 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; |