diff options
author | Hans de Goede <hdegoede@redhat.com> | 2014-09-16 12:36:52 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-24 00:40:48 -0400 |
commit | 734016b00b50a3c6a0e1fc1b7b217e783f5123a1 (patch) | |
tree | 7220726749b76ac0697bbbca5eb8689e5d4779cb /drivers/usb/storage | |
parent | 593078525c8b234a35a36ff551b8716464e86481 (diff) |
uas: Add no-report-opcodes quirk
Besides the ASM1051 (*) needing sdev->no_report_opcodes = 1, it turns out that
the JMicron JMS567 also needs it to work properly with uas (usb-storage always
sets it). Since some of the scsi devs were not to keen on the idea to
outrightly set sdev->no_report_opcodes = 1 for all uas devices, so add a quirk
for this, and set it for the JMS567.
*) Which has become a non-issue since we've completely blacklisted uas on
the ASM1051 for other reasons
Cc: stable@vger.kernel.org
Reported-and-tested-by: Claudio Bizzarri <claudio.bizzarri@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/storage')
-rw-r--r-- | drivers/usb/storage/uas.c | 4 | ||||
-rw-r--r-- | drivers/usb/storage/unusual_uas.h | 7 | ||||
-rw-r--r-- | drivers/usb/storage/usb.c | 5 |
3 files changed, 15 insertions, 1 deletions
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 8c7d4a239f4c..cad02ac88564 100644 --- a/drivers/usb/storage/uas.c +++ b/drivers/usb/storage/uas.c | |||
@@ -961,6 +961,10 @@ static int uas_slave_alloc(struct scsi_device *sdev) | |||
961 | static int uas_slave_configure(struct scsi_device *sdev) | 961 | static int uas_slave_configure(struct scsi_device *sdev) |
962 | { | 962 | { |
963 | struct uas_dev_info *devinfo = sdev->hostdata; | 963 | struct uas_dev_info *devinfo = sdev->hostdata; |
964 | |||
965 | if (devinfo->flags & US_FL_NO_REPORT_OPCODES) | ||
966 | sdev->no_report_opcodes = 1; | ||
967 | |||
964 | scsi_set_tag_type(sdev, MSG_ORDERED_TAG); | 968 | scsi_set_tag_type(sdev, MSG_ORDERED_TAG); |
965 | scsi_activate_tcq(sdev, devinfo->qdepth - 2); | 969 | scsi_activate_tcq(sdev, devinfo->qdepth - 2); |
966 | return 0; | 970 | return 0; |
diff --git a/drivers/usb/storage/unusual_uas.h b/drivers/usb/storage/unusual_uas.h index 3ff2dd4c78ca..3e6243719df8 100644 --- a/drivers/usb/storage/unusual_uas.h +++ b/drivers/usb/storage/unusual_uas.h | |||
@@ -53,3 +53,10 @@ UNUSUAL_DEV(0x0bc2, 0x3312, 0x0000, 0x9999, | |||
53 | "Expansion Desk", | 53 | "Expansion Desk", |
54 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 54 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
55 | US_FL_NO_ATA_1X), | 55 | US_FL_NO_ATA_1X), |
56 | |||
57 | /* Reported-by: Claudio Bizzarri <claudio.bizzarri@gmail.com> */ | ||
58 | UNUSUAL_DEV(0x152d, 0x0567, 0x0000, 0x9999, | ||
59 | "JMicron", | ||
60 | "JMS567", | ||
61 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | ||
62 | US_FL_NO_REPORT_OPCODES), | ||
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index b9d1b9357287..f60e7d463636 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c | |||
@@ -479,7 +479,7 @@ void usb_stor_adjust_quirks(struct usb_device *udev, unsigned long *fflags) | |||
479 | US_FL_SINGLE_LUN | US_FL_NO_WP_DETECT | | 479 | US_FL_SINGLE_LUN | US_FL_NO_WP_DETECT | |
480 | US_FL_NO_READ_DISC_INFO | US_FL_NO_READ_CAPACITY_16 | | 480 | US_FL_NO_READ_DISC_INFO | US_FL_NO_READ_CAPACITY_16 | |
481 | US_FL_INITIAL_READ10 | US_FL_WRITE_CACHE | | 481 | US_FL_INITIAL_READ10 | US_FL_WRITE_CACHE | |
482 | US_FL_NO_ATA_1X); | 482 | US_FL_NO_ATA_1X | US_FL_NO_REPORT_OPCODES); |
483 | 483 | ||
484 | p = quirks; | 484 | p = quirks; |
485 | while (*p) { | 485 | while (*p) { |
@@ -517,6 +517,9 @@ void usb_stor_adjust_quirks(struct usb_device *udev, unsigned long *fflags) | |||
517 | case 'e': | 517 | case 'e': |
518 | f |= US_FL_NO_READ_CAPACITY_16; | 518 | f |= US_FL_NO_READ_CAPACITY_16; |
519 | break; | 519 | break; |
520 | case 'f': | ||
521 | f |= US_FL_NO_REPORT_OPCODES; | ||
522 | break; | ||
520 | case 'h': | 523 | case 'h': |
521 | f |= US_FL_CAPACITY_HEURISTICS; | 524 | f |= US_FL_CAPACITY_HEURISTICS; |
522 | break; | 525 | break; |