]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/usb.h
libata: implement no[hs]rst force params
[linux-2.6-omap-h63xx.git] / include / linux / usb.h
index 4a91181629d99490afab7809ed5520eb0ea5135f..0924cd9c30f66feae597186d2b08d67155f008ad 100644 (file)
@@ -23,6 +23,7 @@
 
 struct usb_device;
 struct usb_driver;
+struct wusb_dev;
 
 /*-------------------------------------------------------------------------*/
 
@@ -109,6 +110,8 @@ enum usb_interface_condition {
  * @sysfs_files_created: sysfs attributes exist
  * @needs_remote_wakeup: flag set when the driver requires remote-wakeup
  *     capability during autosuspend.
+ * @needs_binding: flag set when the driver should be re-probed or unbound
+ *     following a reset or suspend operation it doesn't support.
  * @dev: driver model's view of this device
  * @usb_dev: if an interface is bound to the USB major, this will point
  *     to the sysfs representation for that device.
@@ -159,6 +162,7 @@ struct usb_interface {
        unsigned is_active:1;           /* the interface is not suspended */
        unsigned sysfs_files_created:1; /* the sysfs attributes exist */
        unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */
+       unsigned needs_binding:1;       /* needs delayed unbind/rebind */
 
        struct device dev;              /* interface specific device info */
        struct device *usb_dev;
@@ -292,7 +296,7 @@ struct usb_devmap {
 struct usb_bus {
        struct device *controller;      /* host/master side hardware */
        int busnum;                     /* Bus number (in order of reg) */
-       char *bus_name;                 /* stable id (PCI slot_name etc) */
+       const char *bus_name;           /* stable id (PCI slot_name etc) */
        u8 uses_dma;                    /* Does the host controller use DMA? */
        u8 otg_port;                    /* 0, or number of OTG/HNP port */
        unsigned is_b_host:1;           /* true during some HNP roleswitches */
@@ -372,6 +376,7 @@ struct usb_tt;
  *     used or not. By default, wired USB devices are authorized.
  *     WUSB devices are not, until we authorize them from user space.
  *     FIXME -- complete doc
+ * @authenticated: Crypto authentication passed
  * @wusb: device is Wireless USB
  * @string_langid: language ID for strings
  * @product: iProduct string, if present (static)
@@ -438,6 +443,7 @@ struct usb_device {
        unsigned persist_enabled:1;
        unsigned have_langid:1;
        unsigned authorized:1;
+       unsigned authenticated:1;
        unsigned wusb:1;
        int string_langid;
 
@@ -478,6 +484,7 @@ struct usb_device {
        unsigned autoresume_disabled:1;
        unsigned skip_sys_resume:1;
 #endif
+       struct wusb_dev *wusb_dev;
 };
 #define        to_usb_device(d) container_of(d, struct usb_device, dev)
 
@@ -493,8 +500,6 @@ extern int usb_lock_device_for_reset(struct usb_device *udev,
 
 /* USB port reset for device reinitialization */
 extern int usb_reset_device(struct usb_device *dev);
-extern int usb_reset_composite_device(struct usb_device *dev,
-               struct usb_interface *iface);
 
 extern struct usb_device *usb_find_device(u16 vendor_id, u16 product_id);
 
@@ -954,9 +959,9 @@ struct usbdrv_wrap {
  * @resume: Called when the device is being resumed by the system.
  * @reset_resume: Called when the suspended device has been reset instead
  *     of being resumed.
- * @pre_reset: Called by usb_reset_composite_device() when the device
+ * @pre_reset: Called by usb_reset_device() when the device
  *     is about to be reset.
- * @post_reset: Called by usb_reset_composite_device() after the device
+ * @post_reset: Called by usb_reset_device() after the device
  *     has been reset
  * @id_table: USB drivers use ID table to support hotplugging.
  *     Export this with MODULE_DEVICE_TABLE(usb,...).  This must be set
@@ -968,6 +973,8 @@ struct usbdrv_wrap {
  *     added to this driver by preventing the sysfs file from being created.
  * @supports_autosuspend: if set to 0, the USB core will not allow autosuspend
  *     for interfaces bound to this driver.
+ * @soft_unbind: if set to 1, the USB core will not kill URBs and disable
+ *     endpoints before calling the driver's disconnect method.
  *
  * USB interface drivers must provide a name, probe() and disconnect()
  * methods, and an id_table.  Other driver fields are optional.
@@ -1008,6 +1015,7 @@ struct usb_driver {
        struct usbdrv_wrap drvwrap;
        unsigned int no_dynamic_id:1;
        unsigned int supports_autosuspend:1;
+       unsigned int soft_unbind:1;
 };
 #define        to_usb_driver(d) container_of(d, struct usb_driver, drvwrap.driver)