aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/uas-detect.h
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2013-10-25 17:04:33 +0100
committerSarah Sharp <sarah.a.sharp@linux.intel.com>2014-03-04 15:38:16 -0800
commit79b4c06112f12c31d03cf22b1ed5ce09423fd887 (patch)
tree896bf0f47bb555951e074a88d8be7e87825f1732 /drivers/usb/storage/uas-detect.h
parenta82b76f7fa6154e8ab2d8071842a3e38b9c0d0ff (diff)
downloadlinux-79b4c06112f12c31d03cf22b1ed5ce09423fd887.tar.gz
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 28101c7e6a9f10..02bf5ec957f513 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;
+}