summaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/uas-detect.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-30 09:08:53 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-30 09:08:53 -0700
commitdcca8de0aa597f14e31a1b38690626c9f6745fd5 (patch)
tree7c8c794f75d42aa999da232229fd2feb9625153c /drivers/usb/storage/uas-detect.h
parent73be174cf5c37a90855b9ae9b8e58848716d898f (diff)
parent0d3bba0287d4e284c3ec7d3397e81eec920d5e7e (diff)
downloadop-kernel-dev-dcca8de0aa597f14e31a1b38690626c9f6745fd5.zip
op-kernel-dev-dcca8de0aa597f14e31a1b38690626c9f6745fd5.tar.gz
Merge tag 'usb-4.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB fixes from Greg KH: "Here are a number of small USB fixes for 4.2-rc2. They revert one problem patch, fix some minor things, and add some new quirks for "broken" devices. All have been in linux-next successfully" * tag 'usb-4.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: cdc-acm: prevent infinite loop when parsing CDC headers. Revert "usb: host: ehci-msm: Use devm_ioremap_resource instead of devm_ioremap" usb: chipidea: otg: remove mutex unlock and lock while stop and start role uas: Set max_sectors_240 quirk for ASM1053 devices uas: Add US_FL_MAX_SECTORS_240 flag uas: Allow uas_use_uas_driver to return usb-storage flags
Diffstat (limited to 'drivers/usb/storage/uas-detect.h')
-rw-r--r--drivers/usb/storage/uas-detect.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/usb/storage/uas-detect.h b/drivers/usb/storage/uas-detect.h
index 9893d69..f58caa9 100644
--- a/drivers/usb/storage/uas-detect.h
+++ b/drivers/usb/storage/uas-detect.h
@@ -51,7 +51,8 @@ static int uas_find_endpoints(struct usb_host_interface *alt,
}
static int uas_use_uas_driver(struct usb_interface *intf,
- const struct usb_device_id *id)
+ const struct usb_device_id *id,
+ unsigned long *flags_ret)
{
struct usb_host_endpoint *eps[4] = { };
struct usb_device *udev = interface_to_usbdev(intf);
@@ -73,7 +74,7 @@ static int uas_use_uas_driver(struct usb_interface *intf,
* this writing the following versions exist:
* ASM1051 - no uas support version
* ASM1051 - with broken (*) uas support
- * ASM1053 - with working uas support
+ * ASM1053 - with working uas support, but problems with large xfers
* ASM1153 - with working uas support
*
* Devices with these chips re-use a number of device-ids over the
@@ -103,6 +104,9 @@ static int uas_use_uas_driver(struct usb_interface *intf,
} else if (usb_ss_max_streams(&eps[1]->ss_ep_comp) == 32) {
/* Possibly an ASM1051, disable uas */
flags |= US_FL_IGNORE_UAS;
+ } else {
+ /* ASM1053, these have issues with large transfers */
+ flags |= US_FL_MAX_SECTORS_240;
}
}
@@ -132,5 +136,8 @@ static int uas_use_uas_driver(struct usb_interface *intf,
return 0;
}
+ if (flags_ret)
+ *flags_ret = flags;
+
return 1;
}
OpenPOWER on IntegriCloud