Skip to content

Commit f45681f

Browse files
Tim Andersongregkh
authored andcommitted
USB: Add quirk to support DJI CineSSD
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 <[email protected]> Acked-by: Alan Stern <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 49aa5af commit f45681f

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

drivers/usb/core/quirks.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,9 @@ static const struct usb_device_id usb_quirk_list[] = {
410410
{ USB_DEVICE(0x2040, 0x7200), .driver_info =
411411
USB_QUIRK_CONFIG_INTF_STRINGS },
412412

413+
/* DJI CineSSD */
414+
{ USB_DEVICE(0x2ca3, 0x0031), .driver_info = USB_QUIRK_NO_LPM },
415+
413416
/* INTEL VALUE SSD */
414417
{ USB_DEVICE(0x8086, 0xf1a5), .driver_info = USB_QUIRK_RESET_RESUME },
415418

drivers/usb/storage/scsiglue.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,15 @@ static int queuecommand_lck(struct scsi_cmnd *srb,
376376
return 0;
377377
}
378378

379+
if ((us->fflags & US_FL_NO_ATA_1X) &&
380+
(srb->cmnd[0] == ATA_12 || srb->cmnd[0] == ATA_16)) {
381+
memcpy(srb->sense_buffer, usb_stor_sense_invalidCDB,
382+
sizeof(usb_stor_sense_invalidCDB));
383+
srb->result = SAM_STAT_CHECK_CONDITION;
384+
done(srb);
385+
return 0;
386+
}
387+
379388
/* enqueue the command and wake up the control thread */
380389
srb->scsi_done = done;
381390
us->srb = srb;

drivers/usb/storage/unusual_devs.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2288,6 +2288,13 @@ UNUSUAL_DEV( 0x2735, 0x100b, 0x0000, 0x9999,
22882288
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
22892289
US_FL_GO_SLOW ),
22902290

2291+
/* Reported-by: Tim Anderson <[email protected]> */
2292+
UNUSUAL_DEV( 0x2ca3, 0x0031, 0x0000, 0x9999,
2293+
"DJI",
2294+
"CineSSD",
2295+
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
2296+
US_FL_NO_ATA_1X),
2297+
22912298
/*
22922299
* Reported by Frederic Marchal <[email protected]>
22932300
* Mio Moov 330

0 commit comments

Comments
 (0)