diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-26 13:23:47 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-26 13:23:47 -0400 |
| commit | 9fc377799bc9bfd8d5cb35d0d1ea2e2458cbdbb3 (patch) | |
| tree | fe93603b4e33dd50ff5f95ff769a0748b230cdf9 /include/linux/usb.h | |
| parent | 5e23ae49960d05f578a73ecd19749c45af682c2b (diff) | |
| parent | e387ef5c47ddeaeaa3cbdc54424cdb7a28dae2c0 (diff) | |
Merge tag 'usb-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB patches from Greg Kroah-Hartman:
"Here's the big USB patch set for the 3.6-rc1 merge window.
Lots of little changes in here, primarily for gadget controllers and
drivers. There's some scsi changes that I think also went in through
the scsi tree, but they merge just fine. All of these patches have
been in the linux-next tree for a while now.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
Fix up trivial conflicts in include/scsi/scsi_device.h (same libata
conflict that Jeff had already encountered)
* tag 'usb-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (207 commits)
usb: Add USB_QUIRK_RESET_RESUME for all Logitech UVC webcams
usb: Add quirk detection based on interface information
usb: s3c-hsotg: Add header file protection macros in s3c-hsotg.h
USB: ehci-s5p: Add vbus setup function to the s5p ehci glue layer
USB: add USB_VENDOR_AND_INTERFACE_INFO() macro
USB: notify phy when root hub port connect change
USB: remove 8 bytes of padding from usb_host_interface on 64 bit builds
USB: option: add ZTE MF821D
USB: sierra: QMI mode MC7710 moved to qcserial
USB: qcserial: adding Sierra Wireless devices
USB: qcserial: support generic Qualcomm serial ports
USB: qcserial: make probe more flexible
USB: qcserial: centralize probe exit path
USB: qcserial: consolidate usb_set_interface calls
USB: ehci-s5p: Add support for device tree
USB: ohci-exynos: Add support for device tree
USB: ehci-omap: fix compile failure(v1)
usb: host: tegra: pass correct pointer in ehci_setup()
USB: ehci-fsl: Update ifdef check to work on 64-bit ppc
USB: serial: keyspan: Removed unrequired parentheses.
...
Diffstat (limited to 'include/linux/usb.h')
| -rw-r--r-- | include/linux/usb.h | 59 |
1 files changed, 56 insertions, 3 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index dea39dc551d4..30d1ae38eab1 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
| @@ -77,14 +77,15 @@ struct usb_host_endpoint { | |||
| 77 | struct usb_host_interface { | 77 | struct usb_host_interface { |
| 78 | struct usb_interface_descriptor desc; | 78 | struct usb_interface_descriptor desc; |
| 79 | 79 | ||
| 80 | int extralen; | ||
| 81 | unsigned char *extra; /* Extra descriptors */ | ||
| 82 | |||
| 80 | /* array of desc.bNumEndpoint endpoints associated with this | 83 | /* array of desc.bNumEndpoint endpoints associated with this |
| 81 | * interface setting. these will be in no particular order. | 84 | * interface setting. these will be in no particular order. |
| 82 | */ | 85 | */ |
| 83 | struct usb_host_endpoint *endpoint; | 86 | struct usb_host_endpoint *endpoint; |
| 84 | 87 | ||
| 85 | char *string; /* iInterface string, if present */ | 88 | char *string; /* iInterface string, if present */ |
| 86 | unsigned char *extra; /* Extra descriptors */ | ||
| 87 | int extralen; | ||
| 88 | }; | 89 | }; |
| 89 | 90 | ||
| 90 | enum usb_interface_condition { | 91 | enum usb_interface_condition { |
| @@ -331,6 +332,11 @@ struct usb_bus { | |||
| 331 | u8 otg_port; /* 0, or number of OTG/HNP port */ | 332 | u8 otg_port; /* 0, or number of OTG/HNP port */ |
| 332 | unsigned is_b_host:1; /* true during some HNP roleswitches */ | 333 | unsigned is_b_host:1; /* true during some HNP roleswitches */ |
| 333 | unsigned b_hnp_enable:1; /* OTG: did A-Host enable HNP? */ | 334 | unsigned b_hnp_enable:1; /* OTG: did A-Host enable HNP? */ |
| 335 | unsigned no_stop_on_short:1; /* | ||
| 336 | * Quirk: some controllers don't stop | ||
| 337 | * the ep queue on a short transfer | ||
| 338 | * with the URB_SHORT_NOT_OK flag set. | ||
| 339 | */ | ||
| 334 | unsigned sg_tablesize; /* 0 or largest number of sg list entries */ | 340 | unsigned sg_tablesize; /* 0 or largest number of sg list entries */ |
| 335 | 341 | ||
| 336 | int devnum_next; /* Next open device number in | 342 | int devnum_next; /* Next open device number in |
| @@ -556,7 +562,6 @@ struct usb_device { | |||
| 556 | struct usb3_lpm_parameters u1_params; | 562 | struct usb3_lpm_parameters u1_params; |
| 557 | struct usb3_lpm_parameters u2_params; | 563 | struct usb3_lpm_parameters u2_params; |
| 558 | unsigned lpm_disable_count; | 564 | unsigned lpm_disable_count; |
| 559 | unsigned hub_initiated_lpm_disable_count; | ||
| 560 | }; | 565 | }; |
| 561 | #define to_usb_device(d) container_of(d, struct usb_device, dev) | 566 | #define to_usb_device(d) container_of(d, struct usb_device, dev) |
| 562 | 567 | ||
| @@ -629,6 +634,17 @@ extern void usb_enable_lpm(struct usb_device *udev); | |||
| 629 | extern int usb_unlocked_disable_lpm(struct usb_device *udev); | 634 | extern int usb_unlocked_disable_lpm(struct usb_device *udev); |
| 630 | extern void usb_unlocked_enable_lpm(struct usb_device *udev); | 635 | extern void usb_unlocked_enable_lpm(struct usb_device *udev); |
| 631 | 636 | ||
| 637 | extern int usb_disable_ltm(struct usb_device *udev); | ||
| 638 | extern void usb_enable_ltm(struct usb_device *udev); | ||
| 639 | |||
| 640 | static inline bool usb_device_supports_ltm(struct usb_device *udev) | ||
| 641 | { | ||
| 642 | if (udev->speed != USB_SPEED_SUPER || !udev->bos || !udev->bos->ss_cap) | ||
| 643 | return false; | ||
| 644 | return udev->bos->ss_cap->bmAttributes & USB_LTM_SUPPORT; | ||
| 645 | } | ||
| 646 | |||
| 647 | |||
| 632 | /*-------------------------------------------------------------------------*/ | 648 | /*-------------------------------------------------------------------------*/ |
| 633 | 649 | ||
| 634 | /* for drivers using iso endpoints */ | 650 | /* for drivers using iso endpoints */ |
| @@ -777,6 +793,22 @@ static inline int usb_make_path(struct usb_device *dev, char *buf, size_t size) | |||
| 777 | .bInterfaceProtocol = (pr) | 793 | .bInterfaceProtocol = (pr) |
| 778 | 794 | ||
| 779 | /** | 795 | /** |
| 796 | * USB_DEVICE_INTERFACE_NUMBER - describe a usb device with a specific interface number | ||
| 797 | * @vend: the 16 bit USB Vendor ID | ||
| 798 | * @prod: the 16 bit USB Product ID | ||
| 799 | * @num: bInterfaceNumber value | ||
| 800 | * | ||
| 801 | * This macro is used to create a struct usb_device_id that matches a | ||
| 802 | * specific interface number of devices. | ||
| 803 | */ | ||
| 804 | #define USB_DEVICE_INTERFACE_NUMBER(vend, prod, num) \ | ||
| 805 | .match_flags = USB_DEVICE_ID_MATCH_DEVICE | \ | ||
| 806 | USB_DEVICE_ID_MATCH_INT_NUMBER, \ | ||
| 807 | .idVendor = (vend), \ | ||
| 808 | .idProduct = (prod), \ | ||
| 809 | .bInterfaceNumber = (num) | ||
| 810 | |||
| 811 | /** | ||
| 780 | * USB_DEVICE_INFO - macro used to describe a class of usb devices | 812 | * USB_DEVICE_INFO - macro used to describe a class of usb devices |
| 781 | * @cl: bDeviceClass value | 813 | * @cl: bDeviceClass value |
| 782 | * @sc: bDeviceSubClass value | 814 | * @sc: bDeviceSubClass value |
| @@ -829,6 +861,27 @@ static inline int usb_make_path(struct usb_device *dev, char *buf, size_t size) | |||
| 829 | .bInterfaceSubClass = (sc), \ | 861 | .bInterfaceSubClass = (sc), \ |
| 830 | .bInterfaceProtocol = (pr) | 862 | .bInterfaceProtocol = (pr) |
| 831 | 863 | ||
| 864 | /** | ||
| 865 | * USB_VENDOR_AND_INTERFACE_INFO - describe a specific usb vendor with a class of usb interfaces | ||
| 866 | * @vend: the 16 bit USB Vendor ID | ||
| 867 | * @cl: bInterfaceClass value | ||
| 868 | * @sc: bInterfaceSubClass value | ||
| 869 | * @pr: bInterfaceProtocol value | ||
| 870 | * | ||
| 871 | * This macro is used to create a struct usb_device_id that matches a | ||
| 872 | * specific vendor with a specific class of interfaces. | ||
| 873 | * | ||
| 874 | * This is especially useful when explicitly matching devices that have | ||
| 875 | * vendor specific bDeviceClass values, but standards-compliant interfaces. | ||
| 876 | */ | ||
| 877 | #define USB_VENDOR_AND_INTERFACE_INFO(vend, cl, sc, pr) \ | ||
| 878 | .match_flags = USB_DEVICE_ID_MATCH_INT_INFO \ | ||
| 879 | | USB_DEVICE_ID_MATCH_VENDOR, \ | ||
| 880 | .idVendor = (vend), \ | ||
| 881 | .bInterfaceClass = (cl), \ | ||
| 882 | .bInterfaceSubClass = (sc), \ | ||
| 883 | .bInterfaceProtocol = (pr) | ||
| 884 | |||
| 832 | /* ----------------------------------------------------------------------- */ | 885 | /* ----------------------------------------------------------------------- */ |
| 833 | 886 | ||
| 834 | /* Stuff for dynamic usb ids */ | 887 | /* Stuff for dynamic usb ids */ |
