--- /dev/null
+From 4250c90b30b8bf2a1a21122ba0484f8f351f152d Mon Sep 17 00:00:00 2001
+From: Robin van der Gracht <robin@protonic.nl>
+Date: Mon, 29 Sep 2014 15:00:07 +0200
+Subject: iio: st_sensors: Fix buffer copy
+
+From: Robin van der Gracht <robin@protonic.nl>
+
+commit 4250c90b30b8bf2a1a21122ba0484f8f351f152d upstream.
+
+Use byte_for_channel as iterator to properly initialize the buffer.
+
+Signed-off-by: Robin van der Gracht <robin@protonic.nl>
+Acked-by: Denis Ciocca <denis.ciocca@st.com>
+Signed-off-by: Jonathan Cameron <jic23@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/iio/common/st_sensors/st_sensors_buffer.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/iio/common/st_sensors/st_sensors_buffer.c
++++ b/drivers/iio/common/st_sensors/st_sensors_buffer.c
+@@ -71,7 +71,7 @@ int st_sensors_get_buffer_element(struct
+ goto st_sensors_free_memory;
+ }
+
+- for (i = 0; i < n * num_data_channels; i++) {
++ for (i = 0; i < n * byte_for_channel; i++) {
+ if (i < n)
+ buf[i] = rx_array[i];
+ else
--- /dev/null
+From ac0372abf8524a7572a9cdaac6495eb2eba20457 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Canek=20Pel=C3=A1ez=20Vald=C3=A9s?= <canek@ciencias.unam.mx>
+Date: Sun, 24 Aug 2014 19:06:11 -0500
+Subject: rt2x00: support Ralink 5362.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: =?UTF-8?q?Canek=20Pel=C3=A1ez=20Vald=C3=A9s?= <canek@ciencias.unam.mx>
+
+commit ac0372abf8524a7572a9cdaac6495eb2eba20457 upstream.
+
+Signed-off-by: Canek Peláez Valdés <canek@ciencias.unam.mx>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/rt2x00/rt2800.h | 4 +++-
+ drivers/net/wireless/rt2x00/rt2800lib.c | 6 ++++++
+ 2 files changed, 9 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/wireless/rt2x00/rt2800.h
++++ b/drivers/net/wireless/rt2x00/rt2800.h
+@@ -52,6 +52,7 @@
+ * RF5592 2.4G/5G 2T2R
+ * RF3070 2.4G 1T1R
+ * RF5360 2.4G 1T1R
++ * RF5362 2.4G 1T1R
+ * RF5370 2.4G 1T1R
+ * RF5390 2.4G 1T1R
+ */
+@@ -72,6 +73,7 @@
+ #define RF3070 0x3070
+ #define RF3290 0x3290
+ #define RF5360 0x5360
++#define RF5362 0x5362
+ #define RF5370 0x5370
+ #define RF5372 0x5372
+ #define RF5390 0x5390
+@@ -2145,7 +2147,7 @@ struct mac_iveiv_entry {
+ /* Bits [7-4] for RF3320 (RT3370/RT3390), on other chipsets reserved */
+ #define RFCSR3_PA1_BIAS_CCK FIELD8(0x70)
+ #define RFCSR3_PA2_CASCODE_BIAS_CCKK FIELD8(0x80)
+-/* Bits for RF3290/RF5360/RF5370/RF5372/RF5390/RF5392 */
++/* Bits for RF3290/RF5360/RF5362/RF5370/RF5372/RF5390/RF5392 */
+ #define RFCSR3_VCOCAL_EN FIELD8(0x80)
+ /* Bits for RF3050 */
+ #define RFCSR3_BIT1 FIELD8(0x02)
+--- a/drivers/net/wireless/rt2x00/rt2800lib.c
++++ b/drivers/net/wireless/rt2x00/rt2800lib.c
+@@ -3142,6 +3142,7 @@ static void rt2800_config_channel(struct
+ break;
+ case RF3070:
+ case RF5360:
++ case RF5362:
+ case RF5370:
+ case RF5372:
+ case RF5390:
+@@ -3159,6 +3160,7 @@ static void rt2800_config_channel(struct
+ rt2x00_rf(rt2x00dev, RF3290) ||
+ rt2x00_rf(rt2x00dev, RF3322) ||
+ rt2x00_rf(rt2x00dev, RF5360) ||
++ rt2x00_rf(rt2x00dev, RF5362) ||
+ rt2x00_rf(rt2x00dev, RF5370) ||
+ rt2x00_rf(rt2x00dev, RF5372) ||
+ rt2x00_rf(rt2x00dev, RF5390) ||
+@@ -4273,6 +4275,7 @@ void rt2800_vco_calibration(struct rt2x0
+ case RF3070:
+ case RF3290:
+ case RF5360:
++ case RF5362:
+ case RF5370:
+ case RF5372:
+ case RF5390:
+@@ -7073,6 +7076,7 @@ static int rt2800_init_eeprom(struct rt2
+ case RF3320:
+ case RF3322:
+ case RF5360:
++ case RF5362:
+ case RF5370:
+ case RF5372:
+ case RF5390:
+@@ -7529,6 +7533,7 @@ static int rt2800_probe_hw_mode(struct r
+ case RF3320:
+ case RF3322:
+ case RF5360:
++ case RF5362:
+ case RF5370:
+ case RF5372:
+ case RF5390:
+@@ -7658,6 +7663,7 @@ static int rt2800_probe_hw_mode(struct r
+ case RF3070:
+ case RF3290:
+ case RF5360:
++ case RF5362:
+ case RF5370:
+ case RF5372:
+ case RF5390:
--- /dev/null
+From 547039ec502076e60034eeb79611df3433a99b7d Mon Sep 17 00:00:00 2001
+From: Peter Hurley <peter@hurleysoftware.com>
+Date: Thu, 16 Oct 2014 13:46:38 -0400
+Subject: serial: Fix divide-by-zero fault in uart_get_divisor()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Peter Hurley <peter@hurleysoftware.com>
+
+commit 547039ec502076e60034eeb79611df3433a99b7d upstream.
+
+uart_get_baud_rate() will return baud == 0 if the max rate is set
+to the "magic" 38400 rate and the SPD_* flags are also specified.
+On the first iteration, if the current baud rate is higher than the
+max, the baud rate is clamped at the max (which in the degenerate
+case is 38400). On the second iteration, the now-"magic" 38400 baud
+rate selects the possibly higher alternate baud rate indicated by
+the SPD_* flag. Since only two loop iterations are performed, the
+loop is exited, a kernel WARNING is generated and a baud rate of
+0 is returned.
+
+Reproducible with:
+ setserial /dev/ttyS0 spd_hi base_baud 38400
+
+Only perform the "magic" 38400 -> SPD_* baud transform on the first
+loop iteration, which prevents the degenerate case from recognizing
+the clamped baud rate as the "magic" 38400 value.
+
+Reported-by: Robert Święcki <robert@swiecki.net>
+Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/tty/serial/serial_core.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/tty/serial/serial_core.c
++++ b/drivers/tty/serial/serial_core.c
+@@ -353,7 +353,7 @@ uart_get_baud_rate(struct uart_port *por
+ * The spd_hi, spd_vhi, spd_shi, spd_warp kludge...
+ * Die! Die! Die!
+ */
+- if (baud == 38400)
++ if (try == 0 && baud == 38400)
+ baud = altbaud;
+
+ /*
intel_pstate-correct-byt-vid-values.patch
freezer-do-not-freeze-tasks-killed-by-oom-killer.patch
oom-pm-oom-killed-task-shouldn-t-escape-pm-suspend.patch
+iio-st_sensors-fix-buffer-copy.patch
+staging-iio-ad5933-fix-null-pointer-deref-when-enabling-buffer.patch
+staging-iio-ad5933-drop-raw-from-channel-names.patch
+staging-iio-ade7758-fix-null-pointer-deref-when-enabling-buffer.patch
+staging-iio-ade7758-fix-check-if-channels-are-enabled-in-prenable.patch
+staging-iio-ade7758-remove-raw-from-channel-name.patch
+serial-fix-divide-by-zero-fault-in-uart_get_divisor.patch
+usb-serial-cp210x-add-silicon-labs-358x-vid-and-pid.patch
+usb-serial-ftdi_sio-add-awinda-station-and-dongle-products.patch
+usb-serial-ftdi_sio-add-bricked-ftdi-device-pid.patch
+usb-cdc-acm-add-device-id-for-gw-instek-afg-2225.patch
+usb-cdc-acm-only-raise-dtr-on-transitions-from-b0.patch
+usb-phy-return-enodev-on-failure-of-try_module_get.patch
+usb-option-add-support-for-telit-le910.patch
+usb-option-add-haier-ce81b-cdma-modem.patch
+rt2x00-support-ralink-5362.patch
+wireless-rt2x00-add-new-rt2800usb-devices.patch
+wireless-rt2x00-add-new-rt2800usb-device.patch
+usb-dwc3-gadget-properly-initialize-link-trb.patch
+spi-pl022-fix-incorrect-dma_unmap_sg.patch
+spi-fsl-dspi-fix-ctar-selection.patch
+spi-pxa2xx-toggle-clocks-on-suspend-if-not-disabled-by-runtime-pm.patch
+usb-musb-cppi41-restart-hrtimer-only-if-not-yet-done.patch
+usb-musb-dsps-start-otg-timer-on-resume-again.patch
--- /dev/null
+From 5cc7b04740effa5cc0af53f434134b5859d58b73 Mon Sep 17 00:00:00 2001
+From: Alexander Stein <alexander.stein@systec-electronic.com>
+Date: Tue, 4 Nov 2014 09:20:18 +0100
+Subject: spi: fsl-dspi: Fix CTAR selection
+
+From: Alexander Stein <alexander.stein@systec-electronic.com>
+
+commit 5cc7b04740effa5cc0af53f434134b5859d58b73 upstream.
+
+There are only 4 CTAR registers (CTAR0 - CTAR3) so we can only use the
+lower 2 bits of the chip select to select a CTAR register.
+SPI_PUSHR_CTAS used the lower 3 bits which would result in wrong bit values
+if the chip selects 4/5 are used. For those chip selects SPI_CTAR even
+calculated offsets of non-existing registers.
+
+Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/spi/spi-fsl-dspi.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/spi/spi-fsl-dspi.c
++++ b/drivers/spi/spi-fsl-dspi.c
+@@ -45,7 +45,7 @@
+
+ #define SPI_TCR 0x08
+
+-#define SPI_CTAR(x) (0x0c + (x * 4))
++#define SPI_CTAR(x) (0x0c + (((x) & 0x3) * 4))
+ #define SPI_CTAR_FMSZ(x) (((x) & 0x0000000f) << 27)
+ #define SPI_CTAR_CPOL(x) ((x) << 26)
+ #define SPI_CTAR_CPHA(x) ((x) << 25)
+@@ -69,7 +69,7 @@
+
+ #define SPI_PUSHR 0x34
+ #define SPI_PUSHR_CONT (1 << 31)
+-#define SPI_PUSHR_CTAS(x) (((x) & 0x00000007) << 28)
++#define SPI_PUSHR_CTAS(x) (((x) & 0x00000003) << 28)
+ #define SPI_PUSHR_EOQ (1 << 27)
+ #define SPI_PUSHR_CTCNT (1 << 26)
+ #define SPI_PUSHR_PCS(x) (((1 << x) & 0x0000003f) << 16)
--- /dev/null
+From 3ffa6158f002e096d28ede71be4e0ee8ab20baa2 Mon Sep 17 00:00:00 2001
+From: Ray Jui <rjui@broadcom.com>
+Date: Thu, 9 Oct 2014 11:44:54 -0700
+Subject: spi: pl022: Fix incorrect dma_unmap_sg
+
+From: Ray Jui <rjui@broadcom.com>
+
+commit 3ffa6158f002e096d28ede71be4e0ee8ab20baa2 upstream.
+
+When mapped RX DMA entries are unmapped in an error condition when DMA
+is firstly configured in the driver, the number of TX DMA entries was
+passed in, which is incorrect
+
+Signed-off-by: Ray Jui <rjui@broadcom.com>
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/spi/spi-pl022.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/spi/spi-pl022.c
++++ b/drivers/spi/spi-pl022.c
+@@ -1075,7 +1075,7 @@ err_rxdesc:
+ pl022->sgt_tx.nents, DMA_TO_DEVICE);
+ err_tx_sgmap:
+ dma_unmap_sg(rxchan->device->dev, pl022->sgt_rx.sgl,
+- pl022->sgt_tx.nents, DMA_FROM_DEVICE);
++ pl022->sgt_rx.nents, DMA_FROM_DEVICE);
+ err_rx_sgmap:
+ sg_free_table(&pl022->sgt_tx);
+ err_alloc_tx_sg:
--- /dev/null
+From 2b9375b91bef65b837bed61a05fb387159b38ddf Mon Sep 17 00:00:00 2001
+From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
+Date: Thu, 6 Nov 2014 14:08:29 +0300
+Subject: spi: pxa2xx: toggle clocks on suspend if not disabled by runtime PM
+
+From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
+
+commit 2b9375b91bef65b837bed61a05fb387159b38ddf upstream.
+
+If PM_RUNTIME is enabled, it is easy to trigger the following backtrace
+on pxa2xx hosts:
+
+------------[ cut here ]------------
+WARNING: CPU: 0 PID: 1 at /home/lumag/linux/arch/arm/mach-pxa/clock.c:35 clk_disable+0xa0/0xa8()
+Modules linked in:
+CPU: 0 PID: 1 Comm: swapper Not tainted 3.17.0-00007-g1b3d2ee-dirty #104
+[<c000de68>] (unwind_backtrace) from [<c000c078>] (show_stack+0x10/0x14)
+[<c000c078>] (show_stack) from [<c001d75c>] (warn_slowpath_common+0x6c/0x8c)
+[<c001d75c>] (warn_slowpath_common) from [<c001d818>] (warn_slowpath_null+0x1c/0x24)
+[<c001d818>] (warn_slowpath_null) from [<c0015e80>] (clk_disable+0xa0/0xa8)
+[<c0015e80>] (clk_disable) from [<c02507f8>] (pxa2xx_spi_suspend+0x2c/0x34)
+[<c02507f8>] (pxa2xx_spi_suspend) from [<c0200360>] (platform_pm_suspend+0x2c/0x54)
+[<c0200360>] (platform_pm_suspend) from [<c0207fec>] (dpm_run_callback.isra.14+0x2c/0x74)
+[<c0207fec>] (dpm_run_callback.isra.14) from [<c0209254>] (__device_suspend+0x120/0x2f8)
+[<c0209254>] (__device_suspend) from [<c0209a94>] (dpm_suspend+0x50/0x208)
+[<c0209a94>] (dpm_suspend) from [<c00455ac>] (suspend_devices_and_enter+0x8c/0x3a0)
+[<c00455ac>] (suspend_devices_and_enter) from [<c0045ad4>] (pm_suspend+0x214/0x2a8)
+[<c0045ad4>] (pm_suspend) from [<c04b5c34>] (test_suspend+0x14c/0x1dc)
+[<c04b5c34>] (test_suspend) from [<c000880c>] (do_one_initcall+0x8c/0x1fc)
+[<c000880c>] (do_one_initcall) from [<c04aecfc>] (kernel_init_freeable+0xf4/0x1b4)
+[<c04aecfc>] (kernel_init_freeable) from [<c0378078>] (kernel_init+0x8/0xec)
+[<c0378078>] (kernel_init) from [<c0009590>] (ret_from_fork+0x14/0x24)
+---[ end trace 46524156d8faa4f6 ]---
+
+This happens because suspend function tries to disable a clock that is
+already disabled by runtime_suspend callback. Add if
+(!pm_runtime_suspended()) checks to suspend/resume path.
+
+Fixes: 7d94a505858 (spi/pxa2xx: add support for runtime PM)
+Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
+Reported-by: Andrea Adami <andrea.adami@gmail.com>
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/spi/spi-pxa2xx.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- a/drivers/spi/spi-pxa2xx.c
++++ b/drivers/spi/spi-pxa2xx.c
+@@ -1280,7 +1280,9 @@ static int pxa2xx_spi_suspend(struct dev
+ if (status != 0)
+ return status;
+ write_SSCR0(0, drv_data->ioaddr);
+- clk_disable_unprepare(ssp->clk);
++
++ if (!pm_runtime_suspended(dev))
++ clk_disable_unprepare(ssp->clk);
+
+ return 0;
+ }
+@@ -1294,7 +1296,8 @@ static int pxa2xx_spi_resume(struct devi
+ pxa2xx_spi_dma_resume(drv_data);
+
+ /* Enable the SSP clock */
+- clk_prepare_enable(ssp->clk);
++ if (!pm_runtime_suspended(dev))
++ clk_prepare_enable(ssp->clk);
+
+ /* Restore LPSS private register bits */
+ lpss_ssp_setup(drv_data);
--- /dev/null
+From 6822ee34ad57b29a3b44df2c2829910f03c34fa4 Mon Sep 17 00:00:00 2001
+From: Lars-Peter Clausen <lars@metafoo.de>
+Date: Thu, 25 Sep 2014 15:27:00 +0100
+Subject: staging:iio:ad5933: Drop "raw" from channel names
+
+From: Lars-Peter Clausen <lars@metafoo.de>
+
+commit 6822ee34ad57b29a3b44df2c2829910f03c34fa4 upstream.
+
+"raw" is the name of a channel property, but should not be part of the
+channel name itself.
+
+Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
+Signed-off-by: Jonathan Cameron <jic23@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/iio/impedance-analyzer/ad5933.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/staging/iio/impedance-analyzer/ad5933.c
++++ b/drivers/staging/iio/impedance-analyzer/ad5933.c
+@@ -125,7 +125,7 @@ static const struct iio_chan_spec ad5933
+ .type = IIO_VOLTAGE,
+ .indexed = 1,
+ .channel = 0,
+- .extend_name = "real_raw",
++ .extend_name = "real",
+ .address = AD5933_REG_REAL_DATA,
+ .scan_index = 0,
+ .scan_type = {
+@@ -137,7 +137,7 @@ static const struct iio_chan_spec ad5933
+ .type = IIO_VOLTAGE,
+ .indexed = 1,
+ .channel = 0,
+- .extend_name = "imag_raw",
++ .extend_name = "imag",
+ .address = AD5933_REG_IMAG_DATA,
+ .scan_index = 1,
+ .scan_type = {
--- /dev/null
+From 824269c5868d2a7a26417e5ef3841a27d42c6139 Mon Sep 17 00:00:00 2001
+From: Lars-Peter Clausen <lars@metafoo.de>
+Date: Thu, 25 Sep 2014 15:27:00 +0100
+Subject: staging:iio:ad5933: Fix NULL pointer deref when enabling buffer
+
+From: Lars-Peter Clausen <lars@metafoo.de>
+
+commit 824269c5868d2a7a26417e5ef3841a27d42c6139 upstream.
+
+In older versions of the IIO framework it was possible to pass a
+completely different set of channels to iio_buffer_register() as the one
+that is assigned to the IIO device. Commit 959d2952d124 ("staging:iio: make
+iio_sw_buffer_preenable much more general.") introduced a restriction that
+requires that the set of channels that is passed to iio_buffer_register() is
+a subset of the channels assigned to the IIO device as the IIO core will use
+the list of channels that is assigned to the device to lookup a channel by
+scan index in iio_compute_scan_bytes(). If it can not find the channel the
+function will crash. This patch fixes the issue by making sure that the same
+set of channels is assigned to the IIO device and passed to
+iio_buffer_register().
+
+Fixes the follow NULL pointer derefernce kernel crash:
+ Unable to handle kernel NULL pointer dereference at virtual address 00000016
+ pgd = d53d0000
+ [00000016] *pgd=1534e831, *pte=00000000, *ppte=00000000
+ Internal error: Oops: 17 [#1] PREEMPT SMP ARM
+ Modules linked in:
+ CPU: 1 PID: 1626 Comm: bash Not tainted 3.15.0-19969-g2a180eb-dirty #9545
+ task: d6c124c0 ti: d539a000 task.ti: d539a000
+ PC is at iio_compute_scan_bytes+0x34/0xa8
+ LR is at iio_compute_scan_bytes+0x34/0xa8
+ pc : [<c03052e4>] lr : [<c03052e4>] psr: 60070013
+ sp : d539beb8 ip : 00000001 fp : 00000000
+ r10: 00000002 r9 : 00000000 r8 : 00000001
+ r7 : 00000000 r6 : d6dc8800 r5 : d7571000 r4 : 00000002
+ r3 : d7571000 r2 : 00000044 r1 : 00000001 r0 : 00000000
+ Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
+ Control: 18c5387d Table: 153d004a DAC: 00000015
+ Process bash (pid: 1626, stack limit = 0xd539a240)
+ Stack: (0xd539beb8 to 0xd539c000)
+ bea0: c02fc0e4 d7571000
+ bec0: d76c1640 d6dc8800 d757117c 00000000 d757112c c0305b04 d76c1690 d76c1640
+ bee0: d7571188 00000002 00000000 d7571000 d539a000 00000000 000dd1c8 c0305d54
+ bf00: d7571010 0160b868 00000002 c69d3900 d7573278 d7573308 c69d3900 c01ece90
+ bf20: 00000002 c0103fac c0103f6c d539bf88 00000002 c69d3b00 c69d3b0c c0103468
+ bf40: 00000000 00000000 d7694a00 00000002 000af408 d539bf88 c000dd84 c00b2f94
+ bf60: d7694a00 000af408 00000002 d7694a00 d7694a00 00000002 000af408 c000dd84
+ bf80: 00000000 c00b32d0 00000000 00000000 00000002 b6f1aa78 00000002 000af408
+ bfa0: 00000004 c000dc00 b6f1aa78 00000002 00000001 000af408 00000002 00000000
+ bfc0: b6f1aa78 00000002 000af408 00000004 be806a4c 000a6094 00000000 000dd1c8
+ bfe0: 00000000 be8069cc b6e8ab77 b6ec125c 40070010 00000001 22940489 154a5007
+ [<c03052e4>] (iio_compute_scan_bytes) from [<c0305b04>] (__iio_update_buffers+0x248/0x438)
+ [<c0305b04>] (__iio_update_buffers) from [<c0305d54>] (iio_buffer_store_enable+0x60/0x7c)
+ [<c0305d54>] (iio_buffer_store_enable) from [<c01ece90>] (dev_attr_store+0x18/0x24)
+ [<c01ece90>] (dev_attr_store) from [<c0103fac>] (sysfs_kf_write+0x40/0x4c)
+ [<c0103fac>] (sysfs_kf_write) from [<c0103468>] (kernfs_fop_write+0x110/0x154)
+ [<c0103468>] (kernfs_fop_write) from [<c00b2f94>] (vfs_write+0xd0/0x160)
+ [<c00b2f94>] (vfs_write) from [<c00b32d0>] (SyS_write+0x40/0x78)
+ [<c00b32d0>] (SyS_write) from [<c000dc00>] (ret_fast_syscall+0x0/0x30)
+ Code: ea00000e e1a01008 e1a00005 ebfff6fc (e5d0a016)
+
+Fixes: 959d2952d124 ("staging:iio: make iio_sw_buffer_preenable much more general.")
+Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
+Signed-off-by: Jonathan Cameron <jic23@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/iio/impedance-analyzer/ad5933.c | 11 ++++-------
+ 1 file changed, 4 insertions(+), 7 deletions(-)
+
+--- a/drivers/staging/iio/impedance-analyzer/ad5933.c
++++ b/drivers/staging/iio/impedance-analyzer/ad5933.c
+@@ -115,6 +115,7 @@ static const struct iio_chan_spec ad5933
+ .channel = 0,
+ .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED),
+ .address = AD5933_REG_TEMP_DATA,
++ .scan_index = -1,
+ .scan_type = {
+ .sign = 's',
+ .realbits = 14,
+@@ -125,8 +126,6 @@ static const struct iio_chan_spec ad5933
+ .indexed = 1,
+ .channel = 0,
+ .extend_name = "real_raw",
+- .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) |
+- BIT(IIO_CHAN_INFO_SCALE),
+ .address = AD5933_REG_REAL_DATA,
+ .scan_index = 0,
+ .scan_type = {
+@@ -139,8 +138,6 @@ static const struct iio_chan_spec ad5933
+ .indexed = 1,
+ .channel = 0,
+ .extend_name = "imag_raw",
+- .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) |
+- BIT(IIO_CHAN_INFO_SCALE),
+ .address = AD5933_REG_IMAG_DATA,
+ .scan_index = 1,
+ .scan_type = {
+@@ -748,14 +745,14 @@ static int ad5933_probe(struct i2c_clien
+ indio_dev->name = id->name;
+ indio_dev->modes = INDIO_DIRECT_MODE;
+ indio_dev->channels = ad5933_channels;
+- indio_dev->num_channels = 1; /* only register temp0_input */
++ indio_dev->num_channels = ARRAY_SIZE(ad5933_channels);
+
+ ret = ad5933_register_ring_funcs_and_init(indio_dev);
+ if (ret)
+ goto error_disable_reg;
+
+- /* skip temp0_input, register in0_(real|imag)_raw */
+- ret = iio_buffer_register(indio_dev, &ad5933_channels[1], 2);
++ ret = iio_buffer_register(indio_dev, ad5933_channels,
++ ARRAY_SIZE(ad5933_channels));
+ if (ret)
+ goto error_unreg_ring;
+
--- /dev/null
+From 79fa64eb2ee8ccb4bcad7f54caa2699730b10b22 Mon Sep 17 00:00:00 2001
+From: Lars-Peter Clausen <lars@metafoo.de>
+Date: Tue, 4 Nov 2014 18:03:15 +0100
+Subject: staging:iio:ade7758: Fix check if channels are enabled in prenable
+
+From: Lars-Peter Clausen <lars@metafoo.de>
+
+commit 79fa64eb2ee8ccb4bcad7f54caa2699730b10b22 upstream.
+
+We should check if a channel is enabled, not if no channels are enabled.
+
+Fixes: 550268ca1111 ("staging:iio: scrap scan_count and ensure all drivers use active_scan_mask")
+Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
+Signed-off-by: Jonathan Cameron <jic23@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/iio/meter/ade7758_ring.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/staging/iio/meter/ade7758_ring.c
++++ b/drivers/staging/iio/meter/ade7758_ring.c
+@@ -87,7 +87,7 @@ static int ade7758_ring_preenable(struct
+ {
+ unsigned channel;
+
+- if (!bitmap_empty(indio_dev->active_scan_mask, indio_dev->masklength))
++ if (bitmap_empty(indio_dev->active_scan_mask, indio_dev->masklength))
+ return -EINVAL;
+
+ channel = find_first_bit(indio_dev->active_scan_mask,
--- /dev/null
+From e10554738cab4224e097c2f9d975ea781a4fcde4 Mon Sep 17 00:00:00 2001
+From: Lars-Peter Clausen <lars@metafoo.de>
+Date: Tue, 4 Nov 2014 18:03:14 +0100
+Subject: staging:iio:ade7758: Fix NULL pointer deref when enabling buffer
+
+From: Lars-Peter Clausen <lars@metafoo.de>
+
+commit e10554738cab4224e097c2f9d975ea781a4fcde4 upstream.
+
+In older versions of the IIO framework it was possible to pass a completely
+different set of channels to iio_buffer_register() as the one that is
+assigned to the IIO device. Commit 959d2952d124 ("staging:iio: make
+iio_sw_buffer_preenable much more general.") introduced a restriction that
+requires that the set of channels that is passed to iio_buffer_register() is
+a subset of the channels assigned to the IIO device as the IIO core will use
+the list of channels that is assigned to the device to lookup a channel by
+scan index in iio_compute_scan_bytes(). If it can not find the channel the
+function will crash. This patch fixes the issue by making sure that the same
+set of channels is assigned to the IIO device and passed to
+iio_buffer_register().
+
+Note that we need to remove the IIO_CHAN_INFO_RAW and IIO_CHAN_INFO_SCALE
+info attributes from the channels since we don't actually want those to be
+registered.
+
+Fixes the following crash:
+ Unable to handle kernel NULL pointer dereference at virtual address 00000016
+ pgd = d2094000
+ [00000016] *pgd=16e39831, *pte=00000000, *ppte=00000000
+ Internal error: Oops: 17 [#1] PREEMPT SMP ARM
+ Modules linked in:
+ CPU: 1 PID: 1695 Comm: bash Not tainted 3.17.0-06329-g29461ee #9686
+ task: d7768040 ti: d5bd4000 task.ti: d5bd4000
+ PC is at iio_compute_scan_bytes+0x38/0xc0
+ LR is at iio_compute_scan_bytes+0x34/0xc0
+ pc : [<c0316de8>] lr : [<c0316de4>] psr: 60070013
+ sp : d5bd5ec0 ip : 00000000 fp : 00000000
+ r10: d769f934 r9 : 00000000 r8 : 00000001
+ r7 : 00000000 r6 : c8fc6240 r5 : d769f800 r4 : 00000000
+ r3 : d769f800 r2 : 00000000 r1 : ffffffff r0 : 00000000
+ Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
+ Control: 18c5387d Table: 1209404a DAC: 00000015
+ Process bash (pid: 1695, stack limit = 0xd5bd4240)
+ Stack: (0xd5bd5ec0 to 0xd5bd6000)
+ 5ec0: d769f800 d7435640 c8fc6240 d769f984 00000000 c03175a4 d7435690 d7435640
+ 5ee0: d769f990 00000002 00000000 d769f800 d5bd4000 00000000 000b43a8 c03177f4
+ 5f00: d769f810 0162b8c8 00000002 c8fc7e00 d77f1d08 d77f1da8 c8fc7e00 c01faf1c
+ 5f20: 00000002 c010694c c010690c d5bd5f88 00000002 c8fc6840 c8fc684c c0105e08
+ 5f40: 00000000 00000000 d20d1580 00000002 000af408 d5bd5f88 c000de84 c00b76d4
+ 5f60: d20d1580 000af408 00000002 d20d1580 d20d1580 00000002 000af408 c000de84
+ 5f80: 00000000 c00b7a44 00000000 00000000 00000002 b6ebea78 00000002 000af408
+ 5fa0: 00000004 c000dd00 b6ebea78 00000002 00000001 000af408 00000002 00000000
+ 5fc0: b6ebea78 00000002 000af408 00000004 bee96a4c 000a6094 00000000 000b43a8
+ 5fe0: 00000000 bee969cc b6e2eb77 b6e6525c 40070010 00000001 00000000 00000000
+ [<c0316de8>] (iio_compute_scan_bytes) from [<c03175a4>] (__iio_update_buffers+0x248/0x438)
+ [<c03175a4>] (__iio_update_buffers) from [<c03177f4>] (iio_buffer_store_enable+0x60/0x7c)
+ [<c03177f4>] (iio_buffer_store_enable) from [<c01faf1c>] (dev_attr_store+0x18/0x24)
+ [<c01faf1c>] (dev_attr_store) from [<c010694c>] (sysfs_kf_write+0x40/0x4c)
+ [<c010694c>] (sysfs_kf_write) from [<c0105e08>] (kernfs_fop_write+0x110/0x154)
+ [<c0105e08>] (kernfs_fop_write) from [<c00b76d4>] (vfs_write+0xbc/0x170)
+ [<c00b76d4>] (vfs_write) from [<c00b7a44>] (SyS_write+0x40/0x78)
+ [<c00b7a44>] (SyS_write) from [<c000dd00>] (ret_fast_syscall+0x0/0x30)
+
+Fixes: 959d2952d124 ("staging:iio: make iio_sw_buffer_preenable much more general.")
+Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
+Signed-off-by: Jonathan Cameron <jic23@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/iio/meter/ade7758.h | 1
+ drivers/staging/iio/meter/ade7758_core.c | 33 +------------------------------
+ drivers/staging/iio/meter/ade7758_ring.c | 3 --
+ 3 files changed, 3 insertions(+), 34 deletions(-)
+
+--- a/drivers/staging/iio/meter/ade7758.h
++++ b/drivers/staging/iio/meter/ade7758.h
+@@ -119,7 +119,6 @@ struct ade7758_state {
+ u8 *tx;
+ u8 *rx;
+ struct mutex buf_lock;
+- const struct iio_chan_spec *ade7758_ring_channels;
+ struct spi_transfer ring_xfer[4];
+ struct spi_message ring_msg;
+ /*
+--- a/drivers/staging/iio/meter/ade7758_core.c
++++ b/drivers/staging/iio/meter/ade7758_core.c
+@@ -631,8 +631,6 @@ static const struct iio_chan_spec ade775
+ .indexed = 1,
+ .channel = 0,
+ .extend_name = "raw",
+- .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
+- .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),
+ .address = AD7758_WT(AD7758_PHASE_A, AD7758_VOLTAGE),
+ .scan_index = 0,
+ .scan_type = {
+@@ -645,8 +643,6 @@ static const struct iio_chan_spec ade775
+ .indexed = 1,
+ .channel = 0,
+ .extend_name = "raw",
+- .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
+- .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),
+ .address = AD7758_WT(AD7758_PHASE_A, AD7758_CURRENT),
+ .scan_index = 1,
+ .scan_type = {
+@@ -659,8 +655,6 @@ static const struct iio_chan_spec ade775
+ .indexed = 1,
+ .channel = 0,
+ .extend_name = "apparent_raw",
+- .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
+- .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),
+ .address = AD7758_WT(AD7758_PHASE_A, AD7758_APP_PWR),
+ .scan_index = 2,
+ .scan_type = {
+@@ -673,8 +667,6 @@ static const struct iio_chan_spec ade775
+ .indexed = 1,
+ .channel = 0,
+ .extend_name = "active_raw",
+- .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
+- .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),
+ .address = AD7758_WT(AD7758_PHASE_A, AD7758_ACT_PWR),
+ .scan_index = 3,
+ .scan_type = {
+@@ -687,8 +679,6 @@ static const struct iio_chan_spec ade775
+ .indexed = 1,
+ .channel = 0,
+ .extend_name = "reactive_raw",
+- .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
+- .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),
+ .address = AD7758_WT(AD7758_PHASE_A, AD7758_REACT_PWR),
+ .scan_index = 4,
+ .scan_type = {
+@@ -701,8 +691,6 @@ static const struct iio_chan_spec ade775
+ .indexed = 1,
+ .channel = 1,
+ .extend_name = "raw",
+- .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
+- .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),
+ .address = AD7758_WT(AD7758_PHASE_B, AD7758_VOLTAGE),
+ .scan_index = 5,
+ .scan_type = {
+@@ -715,8 +703,6 @@ static const struct iio_chan_spec ade775
+ .indexed = 1,
+ .channel = 1,
+ .extend_name = "raw",
+- .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
+- .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),
+ .address = AD7758_WT(AD7758_PHASE_B, AD7758_CURRENT),
+ .scan_index = 6,
+ .scan_type = {
+@@ -729,8 +715,6 @@ static const struct iio_chan_spec ade775
+ .indexed = 1,
+ .channel = 1,
+ .extend_name = "apparent_raw",
+- .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
+- .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),
+ .address = AD7758_WT(AD7758_PHASE_B, AD7758_APP_PWR),
+ .scan_index = 7,
+ .scan_type = {
+@@ -743,8 +727,6 @@ static const struct iio_chan_spec ade775
+ .indexed = 1,
+ .channel = 1,
+ .extend_name = "active_raw",
+- .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
+- .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),
+ .address = AD7758_WT(AD7758_PHASE_B, AD7758_ACT_PWR),
+ .scan_index = 8,
+ .scan_type = {
+@@ -757,8 +739,6 @@ static const struct iio_chan_spec ade775
+ .indexed = 1,
+ .channel = 1,
+ .extend_name = "reactive_raw",
+- .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
+- .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),
+ .address = AD7758_WT(AD7758_PHASE_B, AD7758_REACT_PWR),
+ .scan_index = 9,
+ .scan_type = {
+@@ -771,8 +751,6 @@ static const struct iio_chan_spec ade775
+ .indexed = 1,
+ .channel = 2,
+ .extend_name = "raw",
+- .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
+- .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),
+ .address = AD7758_WT(AD7758_PHASE_C, AD7758_VOLTAGE),
+ .scan_index = 10,
+ .scan_type = {
+@@ -785,8 +763,6 @@ static const struct iio_chan_spec ade775
+ .indexed = 1,
+ .channel = 2,
+ .extend_name = "raw",
+- .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
+- .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),
+ .address = AD7758_WT(AD7758_PHASE_C, AD7758_CURRENT),
+ .scan_index = 11,
+ .scan_type = {
+@@ -799,8 +775,6 @@ static const struct iio_chan_spec ade775
+ .indexed = 1,
+ .channel = 2,
+ .extend_name = "apparent_raw",
+- .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
+- .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),
+ .address = AD7758_WT(AD7758_PHASE_C, AD7758_APP_PWR),
+ .scan_index = 12,
+ .scan_type = {
+@@ -813,8 +787,6 @@ static const struct iio_chan_spec ade775
+ .indexed = 1,
+ .channel = 2,
+ .extend_name = "active_raw",
+- .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
+- .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),
+ .address = AD7758_WT(AD7758_PHASE_C, AD7758_ACT_PWR),
+ .scan_index = 13,
+ .scan_type = {
+@@ -827,8 +799,6 @@ static const struct iio_chan_spec ade775
+ .indexed = 1,
+ .channel = 2,
+ .extend_name = "reactive_raw",
+- .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
+- .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),
+ .address = AD7758_WT(AD7758_PHASE_C, AD7758_REACT_PWR),
+ .scan_index = 14,
+ .scan_type = {
+@@ -869,13 +839,14 @@ static int ade7758_probe(struct spi_devi
+ goto error_free_rx;
+ }
+ st->us = spi;
+- st->ade7758_ring_channels = &ade7758_channels[0];
+ mutex_init(&st->buf_lock);
+
+ indio_dev->name = spi->dev.driver->name;
+ indio_dev->dev.parent = &spi->dev;
+ indio_dev->info = &ade7758_info;
+ indio_dev->modes = INDIO_DIRECT_MODE;
++ indio_dev->channels = ade7758_channels;
++ indio_dev->num_channels = ARRAY_SIZE(ade7758_channels);
+
+ ret = ade7758_configure_ring(indio_dev);
+ if (ret)
+--- a/drivers/staging/iio/meter/ade7758_ring.c
++++ b/drivers/staging/iio/meter/ade7758_ring.c
+@@ -85,7 +85,6 @@ static irqreturn_t ade7758_trigger_handl
+ **/
+ static int ade7758_ring_preenable(struct iio_dev *indio_dev)
+ {
+- struct ade7758_state *st = iio_priv(indio_dev);
+ unsigned channel;
+
+ if (!bitmap_empty(indio_dev->active_scan_mask, indio_dev->masklength))
+@@ -95,7 +94,7 @@ static int ade7758_ring_preenable(struct
+ indio_dev->masklength);
+
+ ade7758_write_waveform_type(&indio_dev->dev,
+- st->ade7758_ring_channels[channel].address);
++ indio_dev->channels[channel].address);
+
+ return 0;
+ }
--- /dev/null
+From b598aacc29331e7e638cd509108600e916c6331b Mon Sep 17 00:00:00 2001
+From: Lars-Peter Clausen <lars@metafoo.de>
+Date: Tue, 4 Nov 2014 18:03:16 +0100
+Subject: staging:iio:ade7758: Remove "raw" from channel name
+
+From: Lars-Peter Clausen <lars@metafoo.de>
+
+commit b598aacc29331e7e638cd509108600e916c6331b upstream.
+
+"raw" is a property of a channel, but should not be part of the name of
+channel.
+
+Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
+Signed-off-by: Jonathan Cameron <jic23@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/iio/meter/ade7758_core.c | 24 +++++++++---------------
+ 1 file changed, 9 insertions(+), 15 deletions(-)
+
+--- a/drivers/staging/iio/meter/ade7758_core.c
++++ b/drivers/staging/iio/meter/ade7758_core.c
+@@ -630,7 +630,6 @@ static const struct iio_chan_spec ade775
+ .type = IIO_VOLTAGE,
+ .indexed = 1,
+ .channel = 0,
+- .extend_name = "raw",
+ .address = AD7758_WT(AD7758_PHASE_A, AD7758_VOLTAGE),
+ .scan_index = 0,
+ .scan_type = {
+@@ -642,7 +641,6 @@ static const struct iio_chan_spec ade775
+ .type = IIO_CURRENT,
+ .indexed = 1,
+ .channel = 0,
+- .extend_name = "raw",
+ .address = AD7758_WT(AD7758_PHASE_A, AD7758_CURRENT),
+ .scan_index = 1,
+ .scan_type = {
+@@ -654,7 +652,7 @@ static const struct iio_chan_spec ade775
+ .type = IIO_POWER,
+ .indexed = 1,
+ .channel = 0,
+- .extend_name = "apparent_raw",
++ .extend_name = "apparent",
+ .address = AD7758_WT(AD7758_PHASE_A, AD7758_APP_PWR),
+ .scan_index = 2,
+ .scan_type = {
+@@ -666,7 +664,7 @@ static const struct iio_chan_spec ade775
+ .type = IIO_POWER,
+ .indexed = 1,
+ .channel = 0,
+- .extend_name = "active_raw",
++ .extend_name = "active",
+ .address = AD7758_WT(AD7758_PHASE_A, AD7758_ACT_PWR),
+ .scan_index = 3,
+ .scan_type = {
+@@ -678,7 +676,7 @@ static const struct iio_chan_spec ade775
+ .type = IIO_POWER,
+ .indexed = 1,
+ .channel = 0,
+- .extend_name = "reactive_raw",
++ .extend_name = "reactive",
+ .address = AD7758_WT(AD7758_PHASE_A, AD7758_REACT_PWR),
+ .scan_index = 4,
+ .scan_type = {
+@@ -690,7 +688,6 @@ static const struct iio_chan_spec ade775
+ .type = IIO_VOLTAGE,
+ .indexed = 1,
+ .channel = 1,
+- .extend_name = "raw",
+ .address = AD7758_WT(AD7758_PHASE_B, AD7758_VOLTAGE),
+ .scan_index = 5,
+ .scan_type = {
+@@ -702,7 +699,6 @@ static const struct iio_chan_spec ade775
+ .type = IIO_CURRENT,
+ .indexed = 1,
+ .channel = 1,
+- .extend_name = "raw",
+ .address = AD7758_WT(AD7758_PHASE_B, AD7758_CURRENT),
+ .scan_index = 6,
+ .scan_type = {
+@@ -714,7 +710,7 @@ static const struct iio_chan_spec ade775
+ .type = IIO_POWER,
+ .indexed = 1,
+ .channel = 1,
+- .extend_name = "apparent_raw",
++ .extend_name = "apparent",
+ .address = AD7758_WT(AD7758_PHASE_B, AD7758_APP_PWR),
+ .scan_index = 7,
+ .scan_type = {
+@@ -726,7 +722,7 @@ static const struct iio_chan_spec ade775
+ .type = IIO_POWER,
+ .indexed = 1,
+ .channel = 1,
+- .extend_name = "active_raw",
++ .extend_name = "active",
+ .address = AD7758_WT(AD7758_PHASE_B, AD7758_ACT_PWR),
+ .scan_index = 8,
+ .scan_type = {
+@@ -738,7 +734,7 @@ static const struct iio_chan_spec ade775
+ .type = IIO_POWER,
+ .indexed = 1,
+ .channel = 1,
+- .extend_name = "reactive_raw",
++ .extend_name = "reactive",
+ .address = AD7758_WT(AD7758_PHASE_B, AD7758_REACT_PWR),
+ .scan_index = 9,
+ .scan_type = {
+@@ -750,7 +746,6 @@ static const struct iio_chan_spec ade775
+ .type = IIO_VOLTAGE,
+ .indexed = 1,
+ .channel = 2,
+- .extend_name = "raw",
+ .address = AD7758_WT(AD7758_PHASE_C, AD7758_VOLTAGE),
+ .scan_index = 10,
+ .scan_type = {
+@@ -762,7 +757,6 @@ static const struct iio_chan_spec ade775
+ .type = IIO_CURRENT,
+ .indexed = 1,
+ .channel = 2,
+- .extend_name = "raw",
+ .address = AD7758_WT(AD7758_PHASE_C, AD7758_CURRENT),
+ .scan_index = 11,
+ .scan_type = {
+@@ -774,7 +768,7 @@ static const struct iio_chan_spec ade775
+ .type = IIO_POWER,
+ .indexed = 1,
+ .channel = 2,
+- .extend_name = "apparent_raw",
++ .extend_name = "apparent",
+ .address = AD7758_WT(AD7758_PHASE_C, AD7758_APP_PWR),
+ .scan_index = 12,
+ .scan_type = {
+@@ -786,7 +780,7 @@ static const struct iio_chan_spec ade775
+ .type = IIO_POWER,
+ .indexed = 1,
+ .channel = 2,
+- .extend_name = "active_raw",
++ .extend_name = "active",
+ .address = AD7758_WT(AD7758_PHASE_C, AD7758_ACT_PWR),
+ .scan_index = 13,
+ .scan_type = {
+@@ -798,7 +792,7 @@ static const struct iio_chan_spec ade775
+ .type = IIO_POWER,
+ .indexed = 1,
+ .channel = 2,
+- .extend_name = "reactive_raw",
++ .extend_name = "reactive",
+ .address = AD7758_WT(AD7758_PHASE_C, AD7758_REACT_PWR),
+ .scan_index = 14,
+ .scan_type = {
--- /dev/null
+From cf84a691a61606a2e7269907d3727e2d9fa148ee Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Mon, 27 Oct 2014 18:34:33 +0100
+Subject: USB: cdc-acm: add device id for GW Instek AFG-2225
+
+From: Johan Hovold <johan@kernel.org>
+
+commit cf84a691a61606a2e7269907d3727e2d9fa148ee upstream.
+
+Add device-id entry for GW Instek AFG-2225, which has a byte swapped
+bInterfaceSubClass (0x20).
+
+Reported-by: Karl Palsson <karlp@tweak.net.au>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/class/cdc-acm.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/class/cdc-acm.c
++++ b/drivers/usb/class/cdc-acm.c
+@@ -1672,6 +1672,7 @@ static const struct usb_device_id acm_id
+ { USB_DEVICE(0x0572, 0x1328), /* Shiro / Aztech USB MODEM UM-3100 */
+ .driver_info = NO_UNION_NORMAL, /* has no union descriptor */
+ },
++ { USB_DEVICE(0x2184, 0x001c) }, /* GW Instek AFG-2225 */
+ { USB_DEVICE(0x22b8, 0x6425), /* Motorola MOTOMAGX phones */
+ },
+ /* Motorola H24 HSPA module: */
--- /dev/null
+From 4473d054ceb572557954f9536731d39b20937b0c Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Wed, 5 Nov 2014 18:41:59 +0100
+Subject: USB: cdc-acm: only raise DTR on transitions from B0
+
+From: Johan Hovold <johan@kernel.org>
+
+commit 4473d054ceb572557954f9536731d39b20937b0c upstream.
+
+Make sure to only raise DTR on transitions from B0 in set_termios.
+
+Also allow set_termios to be called from open with a termios_old of
+NULL. Note that DTR will not be raised prematurely in this case.
+
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/class/cdc-acm.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/class/cdc-acm.c
++++ b/drivers/usb/class/cdc-acm.c
+@@ -965,11 +965,12 @@ static void acm_tty_set_termios(struct t
+ /* FIXME: Needs to clear unsupported bits in the termios */
+ acm->clocal = ((termios->c_cflag & CLOCAL) != 0);
+
+- if (!newline.dwDTERate) {
++ if (C_BAUD(tty) == B0) {
+ newline.dwDTERate = acm->line.dwDTERate;
+ newctrl &= ~ACM_CTRL_DTR;
+- } else
++ } else if (termios_old && (termios_old->c_cflag & CBAUD) == B0) {
+ newctrl |= ACM_CTRL_DTR;
++ }
+
+ if (newctrl != acm->ctrlout)
+ acm_set_control(acm, acm->ctrlout = newctrl);
--- /dev/null
+From 1200a82a59b6aa65758ccc92c3447b98c53cd7a2 Mon Sep 17 00:00:00 2001
+From: Jack Pham <jackp@codeaurora.org>
+Date: Tue, 21 Oct 2014 16:31:10 -0700
+Subject: usb: dwc3: gadget: Properly initialize LINK TRB
+
+From: Jack Pham <jackp@codeaurora.org>
+
+commit 1200a82a59b6aa65758ccc92c3447b98c53cd7a2 upstream.
+
+On ISOC endpoints the last trb_pool entry used as a
+LINK TRB is not getting zeroed out correctly due to
+memset being called incorrectly and in the wrong place.
+If pool allocated from DMA was not zero-initialized
+to begin with this will result in the size and ctrl
+values being random garbage. Call memset correctly after
+assignment of the trb_link pointer.
+
+Fixes: f6bafc6a1c ("usb: dwc3: convert TRBs into bitshifts")
+Signed-off-by: Jack Pham <jackp@codeaurora.org>
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/dwc3/gadget.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/usb/dwc3/gadget.c
++++ b/drivers/usb/dwc3/gadget.c
+@@ -532,12 +532,11 @@ static int __dwc3_gadget_ep_enable(struc
+ if (!usb_endpoint_xfer_isoc(desc))
+ return 0;
+
+- memset(&trb_link, 0, sizeof(trb_link));
+-
+ /* Link TRB for ISOC. The HWO bit is never reset */
+ trb_st_hw = &dep->trb_pool[0];
+
+ trb_link = &dep->trb_pool[DWC3_TRB_NUM - 1];
++ memset(trb_link, 0, sizeof(*trb_link));
+
+ trb_link->bpl = lower_32_bits(dwc3_trb_dma_offset(dep, trb_st_hw));
+ trb_link->bph = upper_32_bits(dwc3_trb_dma_offset(dep, trb_st_hw));
--- /dev/null
+From d2e6d62c9cbbc2da4211f672dbeea08960e29a80 Mon Sep 17 00:00:00 2001
+From: Thomas Gleixner <tglx@linutronix.de>
+Date: Thu, 2 Oct 2014 17:32:16 +0200
+Subject: usb: musb: cppi41: restart hrtimer only if not yet done
+
+From: Thomas Gleixner <tglx@linutronix.de>
+
+commit d2e6d62c9cbbc2da4211f672dbeea08960e29a80 upstream.
+
+commit c58d80f52 ("usb: musb: Ensure that cppi41 timer gets armed on
+premature DMA TX irq") fixed hrtimer scheduling bug. There is one left
+which does not trigger that often.
+The following scenario is still possible:
+
+ lock(&x->lock);
+ hrtimer_start(&x->t);
+ unlock(&x->lock);
+
+expires:
+ t->function();
+ lock(&x->lock);
+ lock(&x->lock); if (!hrtimer_queued(&x->t))
+ hrtimer_start(&x->t);
+ unlock(&x->lock);
+
+ if (!list_empty(x->early_tx_list))
+ ret = HRTIMER_RESTART;
+-> hrtimer_forward_now(...)
+ } else
+ ret = HRTIMER_NORESTART;
+
+ unlock(&x->lock);
+
+and the timer callback returns HRTIMER_RESTART for an armed timer. This
+is wrong and we run into the BUG_ON() in __run_hrtimer().
+This can happens on SMP or PREEMPT-RT.
+The patch fixes the problem by only starting the timer if the timer is
+not yet queued.
+
+Reported-by: Torben Hohn <torbenh@linutronix.de>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+[bigeasy: collected information and created a patch + description based
+ on it]
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/musb/musb_cppi41.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/musb/musb_cppi41.c
++++ b/drivers/usb/musb/musb_cppi41.c
+@@ -190,7 +190,8 @@ static enum hrtimer_restart cppi41_reche
+ }
+ }
+
+- if (!list_empty(&controller->early_tx_list)) {
++ if (!list_empty(&controller->early_tx_list) &&
++ !hrtimer_is_queued(&controller->early_tx)) {
+ ret = HRTIMER_RESTART;
+ hrtimer_forward_now(&controller->early_tx,
+ ktime_set(0, 150 * NSEC_PER_USEC));
--- /dev/null
+From 53185b3a441a6cc9bb3f57e924342d249138dcd6 Mon Sep 17 00:00:00 2001
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Mon, 13 Oct 2014 12:16:13 +0200
+Subject: usb: musb: dsps: start OTG timer on resume again
+
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+
+commit 53185b3a441a6cc9bb3f57e924342d249138dcd6 upstream.
+
+Commit 468bcc2a2ca ("usb: musb: dsps: kill OTG timer on suspend") stopped
+the timer in suspend path but forgot the re-enable it in the resume
+path. This patch fixes the behaviour.
+
+Fixes 468bcc2a2ca "usb: musb: dsps: kill OTG timer on suspend"
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/musb/musb_dsps.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/musb/musb_dsps.c
++++ b/drivers/usb/musb/musb_dsps.c
+@@ -733,7 +733,9 @@ static int dsps_resume(struct device *de
+ dsps_writel(mbase, wrp->mode, glue->context.mode);
+ dsps_writel(mbase, wrp->tx_mode, glue->context.tx_mode);
+ dsps_writel(mbase, wrp->rx_mode, glue->context.rx_mode);
+- setup_timer(&glue->timer, otg_timer, (unsigned long) musb);
++ if (musb->xceiv->state == OTG_STATE_B_IDLE &&
++ musb->port_mode == MUSB_PORT_MODE_DUAL_ROLE)
++ mod_timer(&glue->timer, jiffies + wrp->poll_seconds * HZ);
+
+ return 0;
+ }
--- /dev/null
+From 012eee1522318b5ccd64d277d50ac32f7e9974fe Mon Sep 17 00:00:00 2001
+From: Dan Williams <dcbw@redhat.com>
+Date: Tue, 14 Oct 2014 11:10:41 -0500
+Subject: USB: option: add Haier CE81B CDMA modem
+
+From: Dan Williams <dcbw@redhat.com>
+
+commit 012eee1522318b5ccd64d277d50ac32f7e9974fe upstream.
+
+Port layout:
+
+0: QCDM/DIAG
+1: NMEA
+2: AT
+3: AT/PPP
+
+Signed-off-by: Dan Williams <dcbw@redhat.com>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/option.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -362,6 +362,7 @@ static void option_instat_callback(struc
+
+ /* Haier products */
+ #define HAIER_VENDOR_ID 0x201e
++#define HAIER_PRODUCT_CE81B 0x10f8
+ #define HAIER_PRODUCT_CE100 0x2009
+
+ /* Cinterion (formerly Siemens) products */
+@@ -1620,6 +1621,7 @@ static const struct usb_device_id option
+ { USB_DEVICE(LONGCHEER_VENDOR_ID, ZOOM_PRODUCT_4597) },
+ { USB_DEVICE(LONGCHEER_VENDOR_ID, IBALL_3_5G_CONNECT) },
+ { USB_DEVICE(HAIER_VENDOR_ID, HAIER_PRODUCT_CE100) },
++ { USB_DEVICE_AND_INTERFACE_INFO(HAIER_VENDOR_ID, HAIER_PRODUCT_CE81B, 0xff, 0xff, 0xff) },
+ /* Pirelli */
+ { USB_DEVICE_INTERFACE_CLASS(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_C100_1, 0xff) },
+ { USB_DEVICE_INTERFACE_CLASS(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_C100_2, 0xff) },
--- /dev/null
+From 2d0eb862dd477c3c4f32b201254ca0b40e6f465c Mon Sep 17 00:00:00 2001
+From: Daniele Palmas <dnlplm@gmail.com>
+Date: Tue, 14 Oct 2014 10:47:37 +0200
+Subject: usb: option: add support for Telit LE910
+
+From: Daniele Palmas <dnlplm@gmail.com>
+
+commit 2d0eb862dd477c3c4f32b201254ca0b40e6f465c upstream.
+
+Add VID/PID for Telit LE910 modem. Interfaces description is almost the
+same than LE920, except that the qmi interface is number 2 (instead than
+5).
+
+Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/option.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -269,6 +269,7 @@ static void option_instat_callback(struc
+ #define TELIT_PRODUCT_DE910_DUAL 0x1010
+ #define TELIT_PRODUCT_UE910_V2 0x1012
+ #define TELIT_PRODUCT_LE920 0x1200
++#define TELIT_PRODUCT_LE910 0x1201
+
+ /* ZTE PRODUCTS */
+ #define ZTE_VENDOR_ID 0x19d2
+@@ -588,6 +589,11 @@ static const struct option_blacklist_inf
+ .reserved = BIT(3) | BIT(4),
+ };
+
++static const struct option_blacklist_info telit_le910_blacklist = {
++ .sendsetup = BIT(0),
++ .reserved = BIT(1) | BIT(2),
++};
++
+ static const struct option_blacklist_info telit_le920_blacklist = {
+ .sendsetup = BIT(0),
+ .reserved = BIT(1) | BIT(5),
+@@ -1137,6 +1143,8 @@ static const struct usb_device_id option
+ { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_CC864_SINGLE) },
+ { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_DE910_DUAL) },
+ { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UE910_V2) },
++ { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE910),
++ .driver_info = (kernel_ulong_t)&telit_le910_blacklist },
+ { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920),
+ .driver_info = (kernel_ulong_t)&telit_le920_blacklist },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622, 0xff, 0xff, 0xff) }, /* ZTE WCDMA products */
--- /dev/null
+From 2c4e3dbf63b39d44a291db70016c718f45d9cd46 Mon Sep 17 00:00:00 2001
+From: Arjun Sreedharan <arjun024@gmail.com>
+Date: Mon, 18 Aug 2014 11:17:33 +0530
+Subject: usb: phy: return -ENODEV on failure of try_module_get
+
+From: Arjun Sreedharan <arjun024@gmail.com>
+
+commit 2c4e3dbf63b39d44a291db70016c718f45d9cd46 upstream.
+
+When __usb_find_phy_dev() does not return error and
+try_module_get() fails, return -ENODEV.
+
+Signed-off-by: Arjun Sreedharan <arjun024@gmail.com>
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Cc: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/phy/phy.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/usb/phy/phy.c
++++ b/drivers/usb/phy/phy.c
+@@ -229,6 +229,9 @@ struct usb_phy *usb_get_phy_dev(struct d
+ phy = __usb_find_phy_dev(dev, &phy_bind_list, index);
+ if (IS_ERR(phy) || !try_module_get(phy->dev->driver->owner)) {
+ dev_dbg(dev, "unable to find transceiver\n");
++ if (!IS_ERR(phy))
++ phy = ERR_PTR(-ENODEV);
++
+ goto err0;
+ }
+
--- /dev/null
+From 35cc83eab097e5720a9cc0ec12bdc3a726f58381 Mon Sep 17 00:00:00 2001
+From: Nathaniel Ting <nathaniel.ting@silabs.com>
+Date: Fri, 3 Oct 2014 12:01:20 -0400
+Subject: USB: serial: cp210x: add Silicon Labs 358x VID and PID
+
+From: Nathaniel Ting <nathaniel.ting@silabs.com>
+
+commit 35cc83eab097e5720a9cc0ec12bdc3a726f58381 upstream.
+
+Enable Silicon Labs Ember VID chips to enumerate with the cp210x usb serial
+driver. EM358x devices operating with the Ember Z-Net 5.1.2 stack may now
+connect to host PCs over a USB serial link.
+
+Signed-off-by: Nathaniel Ting <nathaniel.ting@silabs.com>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+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
+@@ -155,6 +155,7 @@ static const struct usb_device_id id_tab
+ { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */
+ { USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */
+ { USB_DEVICE(0x1B1C, 0x1C00) }, /* Corsair USB Dongle */
++ { USB_DEVICE(0x1BA4, 0x0002) }, /* Silicon Labs 358x factory default */
+ { USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */
+ { USB_DEVICE(0x1D6F, 0x0010) }, /* Seluxit ApS RF Dongle */
+ { USB_DEVICE(0x1E29, 0x0102) }, /* Festo CPX-USB */
--- /dev/null
+From edd74ffab1f6909eee400c7de8ce621870aacac9 Mon Sep 17 00:00:00 2001
+From: Frans Klaver <frans.klaver@xsens.com>
+Date: Fri, 10 Oct 2014 11:52:08 +0200
+Subject: usb: serial: ftdi_sio: add Awinda Station and Dongle products
+
+From: Frans Klaver <frans.klaver@xsens.com>
+
+commit edd74ffab1f6909eee400c7de8ce621870aacac9 upstream.
+
+Add new IDs for the Xsens Awinda Station and Awinda Dongle.
+
+While at it, order the definitions by PID and add a logical separation
+between devices using Xsens' VID and those using FTDI's VID.
+
+Signed-off-by: Frans Klaver <frans.klaver@xsens.com>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/ftdi_sio.c | 2 ++
+ drivers/usb/serial/ftdi_sio_ids.h | 6 +++++-
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/serial/ftdi_sio.c
++++ b/drivers/usb/serial/ftdi_sio.c
+@@ -674,6 +674,8 @@ static const struct usb_device_id id_tab
+ { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_5_PID) },
+ { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_6_PID) },
+ { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_7_PID) },
++ { USB_DEVICE(XSENS_VID, XSENS_AWINDA_DONGLE_PID) },
++ { USB_DEVICE(XSENS_VID, XSENS_AWINDA_STATION_PID) },
+ { USB_DEVICE(XSENS_VID, XSENS_CONVERTER_PID) },
+ { USB_DEVICE(XSENS_VID, XSENS_MTW_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_OMNI1509) },
+--- a/drivers/usb/serial/ftdi_sio_ids.h
++++ b/drivers/usb/serial/ftdi_sio_ids.h
+@@ -143,8 +143,12 @@
+ * Xsens Technologies BV products (http://www.xsens.com).
+ */
+ #define XSENS_VID 0x2639
+-#define XSENS_CONVERTER_PID 0xD00D /* Xsens USB-serial converter */
++#define XSENS_AWINDA_STATION_PID 0x0101
++#define XSENS_AWINDA_DONGLE_PID 0x0102
+ #define XSENS_MTW_PID 0x0200 /* Xsens MTw */
++#define XSENS_CONVERTER_PID 0xD00D /* Xsens USB-serial converter */
++
++/* Xsens devices using FTDI VID */
+ #define XSENS_CONVERTER_0_PID 0xD388 /* Xsens USB converter */
+ #define XSENS_CONVERTER_1_PID 0xD389 /* Xsens Wireless Receiver */
+ #define XSENS_CONVERTER_2_PID 0xD38A
--- /dev/null
+From 7f2719f0003da1ad13124ef00f48d7514c79e30d Mon Sep 17 00:00:00 2001
+From: Perry Hung <iperry@gmail.com>
+Date: Wed, 22 Oct 2014 23:31:34 -0400
+Subject: usb: serial: ftdi_sio: add "bricked" FTDI device PID
+
+From: Perry Hung <iperry@gmail.com>
+
+commit 7f2719f0003da1ad13124ef00f48d7514c79e30d upstream.
+
+An official recent Windows driver from FTDI detects counterfeit devices
+and reprograms the internal EEPROM containing the USB PID to 0, effectively
+bricking the device.
+
+Add support for this VID/PID pair to correctly bind the driver on these
+devices.
+
+See:
+http://hackaday.com/2014/10/22/watch-that-windows-update-ftdi-drivers-are-killing-fake-chips/
+
+Signed-off-by: Perry Hung <iperry@gmail.com>
+Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+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
+@@ -145,6 +145,7 @@ static struct ftdi_sio_quirk ftdi_8u2232
+ * /sys/bus/usb-serial/drivers/ftdi_sio/new_id and send a patch or report.
+ */
+ static const struct usb_device_id id_table_combined[] = {
++ { USB_DEVICE(FTDI_VID, FTDI_BRICK_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_ZEITCONTROL_TAGTRACE_MIFARE_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_CTI_MINI_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_CTI_NANO_PID) },
+--- a/drivers/usb/serial/ftdi_sio_ids.h
++++ b/drivers/usb/serial/ftdi_sio_ids.h
+@@ -30,6 +30,12 @@
+
+ /*** third-party PIDs (using FTDI_VID) ***/
+
++/*
++ * Certain versions of the official Windows FTDI driver reprogrammed
++ * counterfeit FTDI devices to PID 0. Support these devices anyway.
++ */
++#define FTDI_BRICK_PID 0x0000
++
+ #define FTDI_LUMEL_PD12_PID 0x6002
+
+ /*
--- /dev/null
+From 664d6a792785cc677c2091038ce10322c8d04ae1 Mon Sep 17 00:00:00 2001
+From: Cyril Brulebois <kibi@debian.org>
+Date: Tue, 28 Oct 2014 16:42:41 +0100
+Subject: wireless: rt2x00: add new rt2800usb device
+
+From: Cyril Brulebois <kibi@debian.org>
+
+commit 664d6a792785cc677c2091038ce10322c8d04ae1 upstream.
+
+0x1b75 0xa200 AirLive WN-200USB wireless 11b/g/n dongle
+
+References: https://bugs.debian.org/766802
+Reported-by: Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>
+Signed-off-by: Cyril Brulebois <kibi@debian.org>
+Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/rt2x00/rt2800usb.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/net/wireless/rt2x00/rt2800usb.c
++++ b/drivers/net/wireless/rt2x00/rt2800usb.c
+@@ -1062,6 +1062,7 @@ static struct usb_device_id rt2800usb_de
+ /* Ovislink */
+ { USB_DEVICE(0x1b75, 0x3071) },
+ { USB_DEVICE(0x1b75, 0x3072) },
++ { USB_DEVICE(0x1b75, 0xa200) },
+ /* Para */
+ { USB_DEVICE(0x20b8, 0x8888) },
+ /* Pegatron */
--- /dev/null
+From 6a06e554daef86c4e8d290284927b081fedb249e Mon Sep 17 00:00:00 2001
+From: Xose Vazquez Perez <xose.vazquez@gmail.com>
+Date: Fri, 11 Jul 2014 21:46:57 +0200
+Subject: wireless: rt2x00: add new rt2800usb devices
+
+From: Xose Vazquez Perez <xose.vazquez@gmail.com>
+
+commit 6a06e554daef86c4e8d290284927b081fedb249e upstream.
+
+0x0b05 0x17e8 RT5372 USB 2.0 bgn 2x2 ASUS USB-N14
+0x0411 0x0253 RT5572 USB 2.0 abgn 2x2 BUFFALO WLP-U2-300D
+0x0df6 0x0078 RT???? Sitecom N300
+
+Cc: Ivo van Doorn <IvDoorn@gmail.com>
+Cc: Helmut Schaa <helmut.schaa@googlemail.com>
+Cc: John W. Linville <linville@tuxdriver.com>
+Cc: users@rt2x00.serialmonkey.com
+Cc: linux-wireless@vger.kernel.org
+Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/rt2x00/rt2800usb.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/net/wireless/rt2x00/rt2800usb.c
++++ b/drivers/net/wireless/rt2x00/rt2800usb.c
+@@ -1235,6 +1235,8 @@ static struct usb_device_id rt2800usb_de
+ /* Arcadyan */
+ { USB_DEVICE(0x043e, 0x7a12) },
+ { USB_DEVICE(0x043e, 0x7a32) },
++ /* ASUS */
++ { USB_DEVICE(0x0b05, 0x17e8) },
+ /* Azurewave */
+ { USB_DEVICE(0x13d3, 0x3329) },
+ { USB_DEVICE(0x13d3, 0x3365) },
+@@ -1271,6 +1273,7 @@ static struct usb_device_id rt2800usb_de
+ { USB_DEVICE(0x057c, 0x8501) },
+ /* Buffalo */
+ { USB_DEVICE(0x0411, 0x0241) },
++ { USB_DEVICE(0x0411, 0x0253) },
+ /* D-Link */
+ { USB_DEVICE(0x2001, 0x3c1a) },
+ { USB_DEVICE(0x2001, 0x3c21) },
+@@ -1361,6 +1364,7 @@ static struct usb_device_id rt2800usb_de
+ { USB_DEVICE(0x0df6, 0x0053) },
+ { USB_DEVICE(0x0df6, 0x0069) },
+ { USB_DEVICE(0x0df6, 0x006f) },
++ { USB_DEVICE(0x0df6, 0x0078) },
+ /* SMC */
+ { USB_DEVICE(0x083a, 0xa512) },
+ { USB_DEVICE(0x083a, 0xc522) },