From: Greg Kroah-Hartman Date: Fri, 17 Aug 2012 18:00:34 +0000 (-0700) Subject: 3.4-stable patches X-Git-Tag: v3.5.3~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=82f69c40b45ab56b19a294233ae0a123f63e2824;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: usb-add-usb_vendor_and_interface_info-macro.patch --- diff --git a/queue-3.4/series b/queue-3.4/series index 0e056426b46..1e525e9abc8 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -21,6 +21,7 @@ xhci-add-etron-xhci_trust_tx_length-quirk.patch xhci-increase-reset-timeout-for-renesas-720201-host.patch xhci-switch-ppt-ports-to-ehci-on-shutdown.patch xhci-fix-bug-after-deq-ptr-set-to-link-trb.patch +usb-add-usb_vendor_and_interface_info-macro.patch usb-support-the-new-interfaces-of-huawei-data-card-devices-in-option-driver.patch usb-option-add-zte-k5006-z.patch usb-ftdi_sio-add-vid-pid-for-kondo-serial-usb.patch diff --git a/queue-3.4/usb-add-usb_vendor_and_interface_info-macro.patch b/queue-3.4/usb-add-usb_vendor_and_interface_info-macro.patch new file mode 100644 index 00000000000..8203dbd02be --- /dev/null +++ b/queue-3.4/usb-add-usb_vendor_and_interface_info-macro.patch @@ -0,0 +1,58 @@ +From d81a5d1956731c453b85c141458d4ff5d6cc5366 Mon Sep 17 00:00:00 2001 +From: Gustavo Padovan +Date: Tue, 10 Jul 2012 19:10:06 -0300 +Subject: USB: add USB_VENDOR_AND_INTERFACE_INFO() macro + +From: Gustavo Padovan + +commit d81a5d1956731c453b85c141458d4ff5d6cc5366 upstream. + +A lot of Broadcom Bluetooth devices provides vendor specific interface +class and we are getting flooded by patches adding new device support. +This change will help us enable support for any other Broadcom with vendor +specific device that arrives in the future. + +Only the product id changes for those devices, so this macro would be +perfect for us: + +{ USB_VENDOR_AND_INTERFACE_INFO(0x0a5c, 0xff, 0x01, 0x01) } + +Signed-off-by: Marcel Holtmann +Signed-off-by: Gustavo Padovan +Acked-by: Henrik Rydberg +Signed-off-by: Greg Kroah-Hartman + +--- + include/linux/usb.h | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +--- a/include/linux/usb.h ++++ b/include/linux/usb.h +@@ -783,6 +783,27 @@ static inline int usb_make_path(struct u + .bInterfaceSubClass = (sc), \ + .bInterfaceProtocol = (pr) + ++/** ++ * USB_VENDOR_AND_INTERFACE_INFO - describe a specific usb vendor with a class of usb interfaces ++ * @vend: the 16 bit USB Vendor ID ++ * @cl: bInterfaceClass value ++ * @sc: bInterfaceSubClass value ++ * @pr: bInterfaceProtocol value ++ * ++ * This macro is used to create a struct usb_device_id that matches a ++ * specific vendor with a specific class of interfaces. ++ * ++ * This is especially useful when explicitly matching devices that have ++ * vendor specific bDeviceClass values, but standards-compliant interfaces. ++ */ ++#define USB_VENDOR_AND_INTERFACE_INFO(vend, cl, sc, pr) \ ++ .match_flags = USB_DEVICE_ID_MATCH_INT_INFO \ ++ | USB_DEVICE_ID_MATCH_VENDOR, \ ++ .idVendor = (vend), \ ++ .bInterfaceClass = (cl), \ ++ .bInterfaceSubClass = (sc), \ ++ .bInterfaceProtocol = (pr) ++ + /* ----------------------------------------------------------------------- */ + + /* Stuff for dynamic usb ids */