--- /dev/null
+From 4000e626156935dfb626321ce09cae2c833eabbb Mon Sep 17 00:00:00 2001
+From: Kamil Iskra <kamil@iskra.name>
+Date: Fri, 16 Nov 2012 22:28:58 +0100
+Subject: ACPI / battery: Correct battery capacity values on Thinkpads
+
+From: Kamil Iskra <kamil@iskra.name>
+
+commit 4000e626156935dfb626321ce09cae2c833eabbb upstream.
+
+Add a quirk to correctly report battery capacity on 2010 and 2011
+Lenovo Thinkpad models.
+
+The affected models that I tested (x201, t410, t410s, and x220)
+exhibit a problem where, when battery capacity reporting unit is mAh,
+the values being reported are wrong. Pre-2010 and 2012 models appear
+to always report in mWh and are thus unaffected. Also, in mid-2012
+Lenovo issued a BIOS update for the 2011 models that fixes the issue
+(tested on x220 with a post-1.29 BIOS). No such update is available
+for the 2010 models, so those still need this patch.
+
+Problem description: for some reason, the affected Thinkpads switch
+the reporting unit between mAh and mWh; generally, mAh is used when a
+laptop is plugged in and mWh when it's unplugged, although a
+suspend/resume or rmmod/modprobe is needed for the switch to take
+effect. The values reported in mAh are *always* wrong. This does
+not appear to be a kernel regression; I believe that the values were
+never reported correctly. I tested back to kernel 2.6.34, with
+multiple machines and BIOS versions.
+
+Simply plugging a laptop into mains before turning it on is enough to
+reproduce the problem. Here's a sample /proc/acpi/battery/BAT0/info
+from Thinkpad x220 (before a BIOS update) with a 4-cell battery:
+
+present: yes
+design capacity: 2886 mAh
+last full capacity: 2909 mAh
+battery technology: rechargeable
+design voltage: 14800 mV
+design capacity warning: 145 mAh
+design capacity low: 13 mAh
+cycle count: 0
+capacity granularity 1: 1 mAh
+capacity granularity 2: 1 mAh
+model number: 42T4899
+serial number: 21064
+battery type: LION
+OEM info: SANYO
+
+Once the laptop switches the unit to mWh (unplug from mains, suspend,
+resume), the output changes to:
+
+present: yes
+design capacity: 28860 mWh
+last full capacity: 29090 mWh
+battery technology: rechargeable
+design voltage: 14800 mV
+design capacity warning: 1454 mWh
+design capacity low: 200 mWh
+cycle count: 0
+capacity granularity 1: 1 mWh
+capacity granularity 2: 1 mWh
+model number: 42T4899
+serial number: 21064
+battery type: LION
+OEM info: SANYO
+
+Can you see how the values for "design capacity", etc., differ by a
+factor of 10 instead of 14.8 (the design voltage of this battery)?
+On the battery itself it says: 14.8V, 1.95Ah, 29Wh, so clearly the
+values reported in mWh are correct and the ones in mAh are not.
+
+My guess is that this problem has been around ever since those
+machines were released, but because the most common Thinkpad
+batteries are rated at 10.8V, the error (8%) is small enough that it
+simply hasn't been noticed or at least nobody could be bothered to
+look into it.
+
+My patch works around the problem by adjusting the incorrectly
+reported mAh values by "10000 / design_voltage". The patch also has
+code to figure out if it should be activated or not. It only
+activates on Lenovo Thinkpads, only when the unit is mAh, and, as an
+extra precaution, only when the battery capacity reported through
+ACPI does not match what is reported through DMI (I've never
+encountered a machine where the first two conditions would be true
+but the last would not, but better safe than sorry).
+
+I've been using this patch for close to a year on several systems
+without any problems.
+
+References: https://bugzilla.kernel.org/show_bug.cgi?id=41062
+Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/acpi/battery.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 77 insertions(+)
+
+--- a/drivers/acpi/battery.c
++++ b/drivers/acpi/battery.c
+@@ -34,6 +34,7 @@
+ #include <linux/dmi.h>
+ #include <linux/slab.h>
+ #include <linux/suspend.h>
++#include <asm/unaligned.h>
+
+ #ifdef CONFIG_ACPI_PROCFS_POWER
+ #include <linux/proc_fs.h>
+@@ -97,6 +98,18 @@ enum {
+ */
+ ACPI_BATTERY_QUIRK_SIGNED16_CURRENT,
+ ACPI_BATTERY_QUIRK_PERCENTAGE_CAPACITY,
++ /* On Lenovo Thinkpad models from 2010 and 2011, the power unit
++ switches between mWh and mAh depending on whether the system
++ is running on battery or not. When mAh is the unit, most
++ reported values are incorrect and need to be adjusted by
++ 10000/design_voltage. Verified on x201, t410, t410s, and x220.
++ Pre-2010 and 2012 models appear to always report in mWh and
++ are thus unaffected (tested with t42, t61, t500, x200, x300,
++ and x230). Also, in mid-2012 Lenovo issued a BIOS update for
++ the 2011 models that fixes the issue (tested on x220 with a
++ post-1.29 BIOS), but as of Nov. 2012, no such update is
++ available for the 2010 models. */
++ ACPI_BATTERY_QUIRK_THINKPAD_MAH,
+ };
+
+ struct acpi_battery {
+@@ -429,6 +442,21 @@ static int acpi_battery_get_info(struct
+ kfree(buffer.pointer);
+ if (test_bit(ACPI_BATTERY_QUIRK_PERCENTAGE_CAPACITY, &battery->flags))
+ battery->full_charge_capacity = battery->design_capacity;
++ if (test_bit(ACPI_BATTERY_QUIRK_THINKPAD_MAH, &battery->flags) &&
++ battery->power_unit && battery->design_voltage) {
++ battery->design_capacity = battery->design_capacity *
++ 10000 / battery->design_voltage;
++ battery->full_charge_capacity = battery->full_charge_capacity *
++ 10000 / battery->design_voltage;
++ battery->design_capacity_warning =
++ battery->design_capacity_warning *
++ 10000 / battery->design_voltage;
++ /* Curiously, design_capacity_low, unlike the rest of them,
++ is correct. */
++ /* capacity_granularity_* equal 1 on the systems tested, so
++ it's impossible to tell if they would need an adjustment
++ or not if their values were higher. */
++ }
+ return result;
+ }
+
+@@ -469,6 +497,11 @@ static int acpi_battery_get_state(struct
+ && battery->capacity_now >= 0 && battery->capacity_now <= 100)
+ battery->capacity_now = (battery->capacity_now *
+ battery->full_charge_capacity) / 100;
++ if (test_bit(ACPI_BATTERY_QUIRK_THINKPAD_MAH, &battery->flags) &&
++ battery->power_unit && battery->design_voltage) {
++ battery->capacity_now = battery->capacity_now *
++ 10000 / battery->design_voltage;
++ }
+ return result;
+ }
+
+@@ -580,6 +613,24 @@ static void acpi_battery_quirks(struct a
+ }
+ }
+
++static void find_battery(const struct dmi_header *dm, void *private)
++{
++ struct acpi_battery *battery = (struct acpi_battery *)private;
++ /* Note: the hardcoded offsets below have been extracted from
++ the source code of dmidecode. */
++ if (dm->type == DMI_ENTRY_PORTABLE_BATTERY && dm->length >= 8) {
++ const u8 *dmi_data = (const u8 *)(dm + 1);
++ int dmi_capacity = get_unaligned((const u16 *)(dmi_data + 6));
++ if (dm->length >= 18)
++ dmi_capacity *= dmi_data[17];
++ if (battery->design_capacity * battery->design_voltage / 1000
++ != dmi_capacity &&
++ battery->design_capacity * 10 == dmi_capacity)
++ set_bit(ACPI_BATTERY_QUIRK_THINKPAD_MAH,
++ &battery->flags);
++ }
++}
++
+ /*
+ * According to the ACPI spec, some kinds of primary batteries can
+ * report percentage battery remaining capacity directly to OS.
+@@ -605,6 +656,32 @@ static void acpi_battery_quirks2(struct
+ battery->capacity_now = (battery->capacity_now *
+ battery->full_charge_capacity) / 100;
+ }
++
++ if (test_bit(ACPI_BATTERY_QUIRK_THINKPAD_MAH, &battery->flags))
++ return ;
++
++ if (battery->power_unit && dmi_name_in_vendors("LENOVO")) {
++ const char *s;
++ s = dmi_get_system_info(DMI_PRODUCT_VERSION);
++ if (s && !strnicmp(s, "ThinkPad", 8)) {
++ dmi_walk(find_battery, battery);
++ if (test_bit(ACPI_BATTERY_QUIRK_THINKPAD_MAH,
++ &battery->flags) &&
++ battery->design_voltage) {
++ battery->design_capacity =
++ battery->design_capacity *
++ 10000 / battery->design_voltage;
++ battery->full_charge_capacity =
++ battery->full_charge_capacity *
++ 10000 / battery->design_voltage;
++ battery->design_capacity_warning =
++ battery->design_capacity_warning *
++ 10000 / battery->design_voltage;
++ battery->capacity_now = battery->capacity_now *
++ 10000 / battery->design_voltage;
++ }
++ }
++ }
+ }
+
+ static int acpi_battery_update(struct acpi_battery *battery)
--- /dev/null
+From a6b5e88c0e42093b9057856f35770966c8c591e3 Mon Sep 17 00:00:00 2001
+From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
+Date: Fri, 30 Nov 2012 13:05:05 +0100
+Subject: ACPI / PNP: Do not crash due to stale pointer use during system resume
+
+From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
+
+commit a6b5e88c0e42093b9057856f35770966c8c591e3 upstream.
+
+During resume from system suspend the 'data' field of
+struct pnp_dev in pnpacpi_set_resources() may be a stale pointer,
+due to removal of the associated ACPI device node object in the
+previous suspend-resume cycle. This happens, for example, if a
+dockable machine is booted in the docking station and then suspended
+and resumed and suspended again. If that happens,
+pnpacpi_build_resource_template() called from pnpacpi_set_resources()
+attempts to use that pointer and crashes.
+
+However, pnpacpi_set_resources() actually checks the device's ACPI
+handle, attempts to find the ACPI device node object attached to it
+and returns an error code if that fails, so in fact it knows what the
+correct value of dev->data should be. Use this observation to update
+dev->data with the correct value if necessary and dump a call trace
+if that's the case (once).
+
+We still need to fix the root cause of this issue, but preventing
+systems from crashing because of it is an improvement too.
+
+Reported-and-tested-by: Zdenek Kabelac <zdenek.kabelac@gmail.com>
+References: https://bugzilla.kernel.org/show_bug.cgi?id=51071
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/pnp/pnpacpi/core.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/pnp/pnpacpi/core.c
++++ b/drivers/pnp/pnpacpi/core.c
+@@ -94,6 +94,9 @@ static int pnpacpi_set_resources(struct
+ return -ENODEV;
+ }
+
++ if (WARN_ON_ONCE(acpi_dev != dev->data))
++ dev->data = acpi_dev;
++
+ ret = pnpacpi_build_resource_template(dev, &buffer);
+ if (ret)
+ return ret;
--- /dev/null
+From 129ff8f8d58297b04f47b5d6fad81aa2d08404e1 Mon Sep 17 00:00:00 2001
+From: Zhang Rui <rui.zhang@intel.com>
+Date: Tue, 4 Dec 2012 23:30:19 +0100
+Subject: ACPI / video: ignore BIOS initial backlight value for HP Folio 13-2000
+
+From: Zhang Rui <rui.zhang@intel.com>
+
+commit 129ff8f8d58297b04f47b5d6fad81aa2d08404e1 upstream.
+
+Or else the laptop will boot with a dimmed screen.
+
+References: https://bugzilla.kernel.org/show_bug.cgi?id=51141
+Tested-by: Stefan Nagy <public@stefan-nagy.at>
+Signed-off-by: Zhang Rui <rui.zhang@intel.com>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/acpi/video.c | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+--- a/drivers/acpi/video.c
++++ b/drivers/acpi/video.c
+@@ -390,6 +390,12 @@ static int __init video_set_bqc_offset(c
+ return 0;
+ }
+
++static int video_ignore_initial_backlight(const struct dmi_system_id *d)
++{
++ use_bios_initial_backlight = 0;
++ return 0;
++}
++
+ static struct dmi_system_id video_dmi_table[] __initdata = {
+ /*
+ * Broken _BQC workaround http://bugzilla.kernel.org/show_bug.cgi?id=13121
+@@ -434,6 +440,14 @@ static struct dmi_system_id video_dmi_ta
+ DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 7720"),
+ },
+ },
++ {
++ .callback = video_ignore_initial_backlight,
++ .ident = "HP Folio 13-2000",
++ .matches = {
++ DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "HP Folio 13 - 2000 Notebook PC"),
++ },
++ },
+ {}
+ };
+
x86-amd-power-driver-support-for-amd-s-family-16h-processors.patch
telephony-ijx-buffer-overflow-in-ixj_write_cid.patch
tmpfs-fix-shared-mempolicy-leak.patch
+x86-hpet-fix-masking-of-msi-interrupts.patch
+usb-add-new-zte-3g-dongle-s-pid-to-option.c.patch
+usb-option-blacklist-network-interface-on-huawei-e173.patch
+usb-ftdi_sio-add-support-for-newport-agilis-motor-drivers.patch
+usb-ftdi_sio-fixup-beaglebone-a5-quirk.patch
+usb-cp210x-add-virtenio-preon32-device-id.patch
+usb-mark-uas-driver-as-broken.patch
+acpi-battery-correct-battery-capacity-values-on-thinkpads.patch
+acpi-pnp-do-not-crash-due-to-stale-pointer-use-during-system-resume.patch
+acpi-video-ignore-bios-initial-backlight-value-for-hp-folio-13-2000.patch
+usb-ohci-workaround-for-hardware-bug-retired-tds-not-added-to-the-done-queue.patch
+xhci-extend-fresco-logic-msi-quirk.patch
--- /dev/null
+From 31b6a1048b7292efff8b5b53ae3d9d29adde385e Mon Sep 17 00:00:00 2001
+From: "li.rui27@zte.com.cn" <li.rui27@zte.com.cn>
+Date: Tue, 20 Nov 2012 14:31:47 +0800
+Subject: USB: add new zte 3g-dongle's pid to option.c
+
+From: "li.rui27@zte.com.cn" <li.rui27@zte.com.cn>
+
+commit 31b6a1048b7292efff8b5b53ae3d9d29adde385e upstream.
+
+Signed-off-by: Rui li <li.rui27@zte.com.cn>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/option.c | 22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -883,6 +883,10 @@ static const struct usb_device_id option
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0126, 0xff, 0xff, 0xff),
+ .driver_info = (kernel_ulong_t)&net_intf5_blacklist },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0128, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0135, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0136, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0137, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0139, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0142, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0143, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0144, 0xff, 0xff, 0xff) },
+@@ -903,20 +907,34 @@ static const struct usb_device_id option
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0165, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0167, 0xff, 0xff, 0xff),
+ .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0189, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0191, 0xff, 0xff, 0xff), /* ZTE EuFi890 */
+ .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0196, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0197, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0199, 0xff, 0xff, 0xff), /* ZTE MF820S */
+ .driver_info = (kernel_ulong_t)&net_intf1_blacklist },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0200, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0201, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0254, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0257, 0xff, 0xff, 0xff), /* ZTE MF821 */
+ .driver_info = (kernel_ulong_t)&net_intf3_blacklist },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0265, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0284, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0317, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0326, 0xff, 0xff, 0xff),
+ .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0330, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0395, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0414, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0417, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1008, 0xff, 0xff, 0xff),
+ .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1010, 0xff, 0xff, 0xff),
+ .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1012, 0xff, 0xff, 0xff),
+ .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1018, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1021, 0xff, 0xff, 0xff),
+ .driver_info = (kernel_ulong_t)&net_intf2_blacklist },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1057, 0xff, 0xff, 0xff) },
+@@ -1096,6 +1114,10 @@ static const struct usb_device_id option
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1298, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1299, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1300, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1301, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1302, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1303, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1333, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1401, 0xff, 0xff, 0xff),
+ .driver_info = (kernel_ulong_t)&net_intf2_blacklist },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1402, 0xff, 0xff, 0xff),
--- /dev/null
+From 356fe44f4b8ece867bdb9876b1854d7adbef9de2 Mon Sep 17 00:00:00 2001
+From: Markus Becker <mab@comnets.uni-bremen.de>
+Date: Thu, 22 Nov 2012 09:41:23 +0100
+Subject: USB: cp210x: add Virtenio Preon32 device id
+
+From: Markus Becker <mab@comnets.uni-bremen.de>
+
+commit 356fe44f4b8ece867bdb9876b1854d7adbef9de2 upstream.
+
+Signed-off-by: Markus Becker <mab@comnets.uni-bremen.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/cp210x.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/serial/cp210x.c
++++ b/drivers/usb/serial/cp210x.c
+@@ -120,6 +120,7 @@ static const struct usb_device_id id_tab
+ { USB_DEVICE(0x10C4, 0x8477) }, /* Balluff RFID */
+ { USB_DEVICE(0x10C4, 0x85EA) }, /* AC-Services IBUS-IF */
+ { USB_DEVICE(0x10C4, 0x85EB) }, /* AC-Services CIS-IBUS */
++ { USB_DEVICE(0x10C4, 0x85F8) }, /* Virtenio Preon32 */
+ { USB_DEVICE(0x10C4, 0x8664) }, /* AC-Services CAN-IF */
+ { USB_DEVICE(0x10C4, 0x8665) }, /* AC-Services OBD-IF */
+ { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */
--- /dev/null
+From d7e14b375b40c04cd735b115713043b69a2c68ac Mon Sep 17 00:00:00 2001
+From: Martin Teichmann <lkb.teichmann@gmail.com>
+Date: Wed, 21 Nov 2012 16:45:07 +0100
+Subject: USB: ftdi_sio: Add support for Newport AGILIS motor drivers
+
+From: Martin Teichmann <lkb.teichmann@gmail.com>
+
+commit d7e14b375b40c04cd735b115713043b69a2c68ac upstream.
+
+The Newport AGILIS model AG-UC8 compact piezo motor controller
+(http://search.newport.com/?q=*&x2=sku&q2=AG-UC8)
+is yet another device using an FTDI USB-to-serial chip. It works
+fine with the ftdi_sio driver when adding
+
+ options ftdi-sio product=0x3000 vendor=0x104d
+
+to modprobe.d. udevadm reports "Newport" as the manufacturer,
+and "Agilis" as the product name.
+
+Signed-off-by: Martin Teichmann <lkb.teichmann@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/ftdi_sio.c | 1 +
+ drivers/usb/serial/ftdi_sio_ids.h | 6 ++++++
+ 2 files changed, 7 insertions(+)
+
+--- a/drivers/usb/serial/ftdi_sio.c
++++ b/drivers/usb/serial/ftdi_sio.c
+@@ -195,6 +195,7 @@ static struct usb_device_id id_table_com
+ { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_THROTTLE_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_GATEWAY_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_GBM_PID) },
++ { USB_DEVICE(NEWPORT_VID, NEWPORT_AGILIS_PID) },
+ { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) },
+ { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_SPROG_II) },
+--- a/drivers/usb/serial/ftdi_sio_ids.h
++++ b/drivers/usb/serial/ftdi_sio_ids.h
+@@ -752,6 +752,12 @@
+ #define TTI_VID 0x103E /* Vendor Id */
+ #define TTI_QL355P_PID 0x03E8 /* TTi QL355P power supply */
+
++/*
++ * Newport Cooperation (www.newport.com)
++ */
++#define NEWPORT_VID 0x104D
++#define NEWPORT_AGILIS_PID 0x3000
++
+ /* Interbiometrics USB I/O Board */
+ /* Developed for Interbiometrics by Rudolf Gugler */
+ #define INTERBIOMETRICS_VID 0x1209
--- /dev/null
+From 1a88d5eee2ef2ad1d3c4e32043e9c4c5347d4fc1 Mon Sep 17 00:00:00 2001
+From: Peter Korsgaard <jacmet@sunsite.dk>
+Date: Thu, 22 Nov 2012 16:30:46 +0100
+Subject: usb: ftdi_sio: fixup BeagleBone A5+ quirk
+
+From: Peter Korsgaard <jacmet@sunsite.dk>
+
+commit 1a88d5eee2ef2ad1d3c4e32043e9c4c5347d4fc1 upstream.
+
+BeagleBone A5+ devices ended up getting shipped with the
+'BeagleBone/XDS100V2' product string, and not XDS100 like it
+was agreed, so adjust the quirk to match.
+
+For details, see the thread on the beagle list:
+
+https://groups.google.com/forum/#!msg/beagleboard/zrFPew9_Wvo/ibWr1-eE8JwJ
+
+Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/ftdi_sio.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/serial/ftdi_sio.c
++++ b/drivers/usb/serial/ftdi_sio.c
+@@ -1798,7 +1798,7 @@ static int ftdi_8u2232c_probe(struct usb
+ dbg("%s", __func__);
+
+ if ((udev->manufacturer && !strcmp(udev->manufacturer, "CALAO Systems")) ||
+- (udev->product && !strcmp(udev->product, "BeagleBone/XDS100")))
++ (udev->product && !strcmp(udev->product, "BeagleBone/XDS100V2")))
+ return ftdi_jtag_probe(serial);
+
+ return 0;
--- /dev/null
+From fb37ef98015f864d22be223a0e0d93547cd1d4ef Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Wed, 28 Nov 2012 10:19:16 -0800
+Subject: USB: mark uas driver as BROKEN
+
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+commit fb37ef98015f864d22be223a0e0d93547cd1d4ef upstream.
+
+As reported https://bugzilla.kernel.org/show_bug.cgi?id=51031, the UAS
+driver causes problems and has been asked to be not built into any of
+the major distributions. To prevent users from running into problems
+with it, and for distros that were not notified, just mark the whole
+thing as broken.
+
+Acked-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/storage/Kconfig | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/storage/Kconfig
++++ b/drivers/usb/storage/Kconfig
+@@ -199,7 +199,7 @@ config USB_STORAGE_ENE_UB6250
+
+ config USB_UAS
+ tristate "USB Attached SCSI"
+- depends on USB && SCSI
++ depends on USB && SCSI && BROKEN
+ help
+ The USB Attached SCSI protocol is supported by some USB
+ storage devices. It permits higher performance by supporting
--- /dev/null
+From 50ce5c0683aa83eb161624ea89daa5a9eee0c2ce Mon Sep 17 00:00:00 2001
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Mon, 26 Nov 2012 12:36:21 -0500
+Subject: USB: OHCI: workaround for hardware bug: retired TDs not added to the Done Queue
+
+From: Alan Stern <stern@rowland.harvard.edu>
+
+commit 50ce5c0683aa83eb161624ea89daa5a9eee0c2ce upstream.
+
+This patch (as1636) is a partial workaround for a hardware bug
+affecting OHCI controllers by NVIDIA at least, maybe others too. When
+the controller retires a Transfer Descriptor, it is supposed to add
+the TD onto the Done Queue. But sometimes this doesn't happen, with
+the result that ohci-hcd never realizes the corresponding transfer has
+finished. Symptoms can vary; a typical result is that USB audio stops
+working after a while.
+
+The patch works around the problem by recognizing that TDs are always
+processed in order. Therefore, if a later TD is found on the Done
+Queue than all the earlier TDs for the same endpoint must be finished
+as well.
+
+Unfortunately this won't solve the problem in cases where the missing
+TD is the last one in the endpoint's queue. A complete fix would
+require a signficant amount of change to the driver.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Tested-by: Oliver Neukum <oneukum@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/ohci-q.c | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+--- a/drivers/usb/host/ohci-q.c
++++ b/drivers/usb/host/ohci-q.c
+@@ -1130,6 +1130,25 @@ dl_done_list (struct ohci_hcd *ohci)
+
+ while (td) {
+ struct td *td_next = td->next_dl_td;
++ struct ed *ed = td->ed;
++
++ /*
++ * Some OHCI controllers (NVIDIA for sure, maybe others)
++ * occasionally forget to add TDs to the done queue. Since
++ * TDs for a given endpoint are always processed in order,
++ * if we find a TD on the donelist then all of its
++ * predecessors must be finished as well.
++ */
++ for (;;) {
++ struct td *td2;
++
++ td2 = list_first_entry(&ed->td_list, struct td,
++ td_list);
++ if (td2 == td)
++ break;
++ takeback_td(ohci, td2);
++ }
++
+ takeback_td(ohci, td);
+ td = td_next;
+ }
--- /dev/null
+From f36446cf9bbebaa03a80d95cfeeafbaf68218249 Mon Sep 17 00:00:00 2001
+From: Bjørn Mork <bjorn@mork.no>
+Date: Sun, 25 Nov 2012 17:05:10 +0100
+Subject: USB: option: blacklist network interface on Huawei E173
+
+From: Bjørn Mork <bjorn@mork.no>
+
+commit f36446cf9bbebaa03a80d95cfeeafbaf68218249 upstream.
+
+The Huawei E173 will normally appear as 12d1:1436 in Linux. But
+the modem has another mode with different device ID and a slightly
+different set of descriptors. This is the mode used by Windows like
+this:
+
+ 3Modem: USB\VID_12D1&PID_140C&MI_00\6&3A1D2012&0&0000
+ Networkcard: USB\VID_12D1&PID_140C&MI_01\6&3A1D2012&0&0001
+ Appli.Inter: USB\VID_12D1&PID_140C&MI_02\6&3A1D2012&0&0002
+ PC UI Inter: USB\VID_12D1&PID_140C&MI_03\6&3A1D2012&0&0003
+
+All interfaces have the same ff/ff/ff class codes in this mode.
+Blacklisting the network interface to allow it to be picked up by
+the network driver.
+
+Reported-by: Thomas Schäfer <tschaefer@t-online.de>
+Signed-off-by: Bjørn Mork <bjorn@mork.no>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/option.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -80,6 +80,7 @@ static void option_instat_callback(struc
+ #define OPTION_PRODUCT_GTM380_MODEM 0x7201
+
+ #define HUAWEI_VENDOR_ID 0x12D1
++#define HUAWEI_PRODUCT_E173 0x140C
+ #define HUAWEI_PRODUCT_K4505 0x1464
+ #define HUAWEI_PRODUCT_K3765 0x1465
+ #define HUAWEI_PRODUCT_K4605 0x14C6
+@@ -552,6 +553,8 @@ static const struct usb_device_id option
+ { USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_GLX) },
+ { USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_GKE) },
+ { USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_GLE) },
++ { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E173, 0xff, 0xff, 0xff),
++ .driver_info = (kernel_ulong_t) &net_intf1_blacklist },
+ { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4505, 0xff, 0xff, 0xff),
+ .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist },
+ { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3765, 0xff, 0xff, 0xff),
--- /dev/null
+From 6acf5a8c931da9d26c8dd77d784daaf07fa2bff0 Mon Sep 17 00:00:00 2001
+From: Jan Beulich <JBeulich@suse.com>
+Date: Fri, 2 Nov 2012 14:02:40 +0000
+Subject: x86: hpet: Fix masking of MSI interrupts
+
+From: Jan Beulich <JBeulich@suse.com>
+
+commit 6acf5a8c931da9d26c8dd77d784daaf07fa2bff0 upstream.
+
+HPET_TN_FSB is not a proper mask bit; it merely toggles between MSI and
+legacy interrupt delivery. The proper mask bit is HPET_TN_ENABLE, so
+use both bits when (un)masking the interrupt.
+
+Signed-off-by: Jan Beulich <jbeulich@suse.com>
+Link: http://lkml.kernel.org/r/5093E09002000078000A60E6@nat28.tlf.novell.com
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/kernel/hpet.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/x86/kernel/hpet.c
++++ b/arch/x86/kernel/hpet.c
+@@ -427,7 +427,7 @@ void hpet_msi_unmask(struct irq_data *da
+
+ /* unmask it */
+ cfg = hpet_readl(HPET_Tn_CFG(hdev->num));
+- cfg |= HPET_TN_FSB;
++ cfg |= HPET_TN_ENABLE | HPET_TN_FSB;
+ hpet_writel(cfg, HPET_Tn_CFG(hdev->num));
+ }
+
+@@ -438,7 +438,7 @@ void hpet_msi_mask(struct irq_data *data
+
+ /* mask it */
+ cfg = hpet_readl(HPET_Tn_CFG(hdev->num));
+- cfg &= ~HPET_TN_FSB;
++ cfg &= ~(HPET_TN_ENABLE | HPET_TN_FSB);
+ hpet_writel(cfg, HPET_Tn_CFG(hdev->num));
+ }
+
--- /dev/null
+From bba18e33f25072ebf70fd8f7f0cdbf8cdb59a746 Mon Sep 17 00:00:00 2001
+From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Date: Wed, 17 Oct 2012 13:44:06 -0700
+Subject: xhci: Extend Fresco Logic MSI quirk.
+
+From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+
+commit bba18e33f25072ebf70fd8f7f0cdbf8cdb59a746 upstream.
+
+Ali reports that plugging a device into the Fresco Logic xHCI host with
+PCI device ID 1400 produces an IRQ error:
+
+ do_IRQ: 3.176 No irq handler for vector (irq -1)
+
+Other early Fresco Logic host revisions don't support MSI, even though
+their PCI config space claims they do. Extend the quirk to disabling
+MSI to this chipset revision. Also enable the short transfer quirk,
+since it's likely this revision also has that quirk, and it should be
+harmless to enable.
+
+04:00.0 0c03: 1b73:1400 (rev 01) (prog-if 30 [XHCI])
+ Subsystem: 1d5c:1000
+ Physical Slot: 3
+ Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
+ Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
+ Latency: 0, Cache Line Size: 64 bytes
+ Interrupt: pin A routed to IRQ 51
+ Region 0: Memory at d4600000 (32-bit, non-prefetchable) [size=64K]
+ Capabilities: [50] Power Management version 3
+ Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold-)
+ Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
+ Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
+ Address: 00000000feeff00c Data: 41b1
+ Capabilities: [80] Express (v1) Endpoint, MSI 00
+ DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <2us, L1 <32us
+ ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
+ DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
+ RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
+ MaxPayload 128 bytes, MaxReadReq 512 bytes
+ DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
+ LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 unlimited, L1 unlimited
+ ClockPM- Surprise- LLActRep- BwNot-
+ LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
+ ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
+ LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
+ Kernel driver in use: xhci_hcd
+
+This patch should be backported to stable kernels as old as 2.6.36, that
+contain the commit f5182b4155b9d686c5540a6822486400e34ddd98 "xhci:
+Disable MSI for some Fresco Logic hosts."
+
+Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Reported-by: A Sh <smr.ash1991@gmail.com>
+Tested-by: A Sh <smr.ash1991@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/xhci-pci.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/host/xhci-pci.c
++++ b/drivers/usb/host/xhci-pci.c
+@@ -28,6 +28,7 @@
+ /* Device for a quirk */
+ #define PCI_VENDOR_ID_FRESCO_LOGIC 0x1b73
+ #define PCI_DEVICE_ID_FRESCO_LOGIC_PDK 0x1000
++#define PCI_DEVICE_ID_FRESCO_LOGIC_FL1400 0x1400
+
+ #define PCI_VENDOR_ID_ETRON 0x1b6f
+ #define PCI_DEVICE_ID_ASROCK_P67 0x7023
+@@ -109,8 +110,10 @@ static int xhci_pci_setup(struct usb_hcd
+
+ /* Look for vendor-specific quirks */
+ if (pdev->vendor == PCI_VENDOR_ID_FRESCO_LOGIC &&
+- pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_PDK) {
+- if (pdev->revision == 0x0) {
++ (pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_PDK ||
++ pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_FL1400)) {
++ if (pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_PDK &&
++ pdev->revision == 0x0) {
+ xhci->quirks |= XHCI_RESET_EP_QUIRK;
+ xhci_dbg(xhci, "QUIRK: Fresco Logic xHC needs configure"
+ " endpoint cmd after reset endpoint\n");