summaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/uas-detect.h
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2013-10-25 18:04:33 +0200
committerSarah Sharp <sarah.a.sharp@linux.intel.com>2014-03-05 00:38:16 +0100
commit79b4c06112f12c31d03cf22b1ed5ce09423fd887 (patch)
tree896bf0f47bb555951e074a88d8be7e87825f1732 /drivers/usb/storage/uas-detect.h
parentusb: Reset USB-3 devices on USB-3 link bounce (diff)
downloadlinux-79b4c06112f12c31d03cf22b1ed5ce09423fd887.tar.xz
linux-79b4c06112f12c31d03cf22b1ed5ce09423fd887.zip
uas: Add the posibilty to blacklist uas devices from using the uas driver
Once we start supporting uas hardware, and as more and more uas devices become available, we will likely start seeing broken devices. This patch prepares for the inevitable need for blacklisting those devices from using the uas driver (they will use usb-storage instead). Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Diffstat (limited to 'drivers/usb/storage/uas-detect.h')
-rw-r--r--drivers/usb/storage/uas-detect.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/usb/storage/uas-detect.h b/drivers/usb/storage/uas-detect.h
index 28101c7e6a9f..02bf5ec957f5 100644
--- a/drivers/usb/storage/uas-detect.h
+++ b/drivers/usb/storage/uas-detect.h
@@ -38,3 +38,14 @@ static int uas_find_uas_alt_setting(struct usb_interface *intf)
return -ENODEV;
}
+
+static int uas_use_uas_driver(struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ unsigned long flags = id->driver_info;
+
+ if (flags & US_FL_IGNORE_UAS)
+ return 0;
+
+ return uas_find_uas_alt_setting(intf) >= 0;
+}