Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * This file holds the definitions of quirks found in USB devices.
0004  * Only quirks that affect the whole device, not an interface,
0005  * belong here.
0006  */
0007 
0008 #ifndef __LINUX_USB_QUIRKS_H
0009 #define __LINUX_USB_QUIRKS_H
0010 
0011 /* string descriptors must not be fetched using a 255-byte read */
0012 #define USB_QUIRK_STRING_FETCH_255      BIT(0)
0013 
0014 /* device can't resume correctly so reset it instead */
0015 #define USB_QUIRK_RESET_RESUME          BIT(1)
0016 
0017 /* device can't handle Set-Interface requests */
0018 #define USB_QUIRK_NO_SET_INTF           BIT(2)
0019 
0020 /* device can't handle its Configuration or Interface strings */
0021 #define USB_QUIRK_CONFIG_INTF_STRINGS       BIT(3)
0022 
0023 /* device can't be reset(e.g morph devices), don't use reset */
0024 #define USB_QUIRK_RESET             BIT(4)
0025 
0026 /* device has more interface descriptions than the bNumInterfaces count,
0027    and can't handle talking to these interfaces */
0028 #define USB_QUIRK_HONOR_BNUMINTERFACES      BIT(5)
0029 
0030 /* device needs a pause during initialization, after we read the device
0031    descriptor */
0032 #define USB_QUIRK_DELAY_INIT            BIT(6)
0033 
0034 /*
0035  * For high speed and super speed interrupt endpoints, the USB 2.0 and
0036  * USB 3.0 spec require the interval in microframes
0037  * (1 microframe = 125 microseconds) to be calculated as
0038  * interval = 2 ^ (bInterval-1).
0039  *
0040  * Devices with this quirk report their bInterval as the result of this
0041  * calculation instead of the exponent variable used in the calculation.
0042  */
0043 #define USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL  BIT(7)
0044 
0045 /* device can't handle device_qualifier descriptor requests */
0046 #define USB_QUIRK_DEVICE_QUALIFIER      BIT(8)
0047 
0048 /* device generates spurious wakeup, ignore remote wakeup capability */
0049 #define USB_QUIRK_IGNORE_REMOTE_WAKEUP      BIT(9)
0050 
0051 /* device can't handle Link Power Management */
0052 #define USB_QUIRK_NO_LPM            BIT(10)
0053 
0054 /*
0055  * Device reports its bInterval as linear frames instead of the
0056  * USB 2.0 calculation.
0057  */
0058 #define USB_QUIRK_LINEAR_FRAME_INTR_BINTERVAL   BIT(11)
0059 
0060 /*
0061  * Device needs to be disconnected before suspend to prevent spurious
0062  * wakeup.
0063  */
0064 #define USB_QUIRK_DISCONNECT_SUSPEND        BIT(12)
0065 
0066 /* Device needs a pause after every control message. */
0067 #define USB_QUIRK_DELAY_CTRL_MSG        BIT(13)
0068 
0069 /* Hub needs extra delay after resetting its port. */
0070 #define USB_QUIRK_HUB_SLOW_RESET        BIT(14)
0071 
0072 /* device has endpoints that should be ignored */
0073 #define USB_QUIRK_ENDPOINT_IGNORE       BIT(15)
0074 
0075 #endif /* __LINUX_USB_QUIRKS_H */