--- /dev/null
+From 2dfd06036ba7ae8e7be2daf5a2fff1dac42390bf Mon Sep 17 00:00:00 2001
+From: Junxiao Bi <junxiao.bi@oracle.com>
+Date: Wed, 27 Jun 2012 17:09:54 +0800
+Subject: aio: make kiocb->private NUll in init_sync_kiocb()
+
+From: Junxiao Bi <junxiao.bi@oracle.com>
+
+commit 2dfd06036ba7ae8e7be2daf5a2fff1dac42390bf upstream.
+
+Ocfs2 uses kiocb.*private as a flag of unsigned long size. In
+commit a11f7e6 ocfs2: serialize unaligned aio, the unaligned
+io flag is involved in it to serialize the unaligned aio. As
+*private is not initialized in init_sync_kiocb() of do_sync_write(),
+this unaligned io flag may be unexpectly set in an aligned dio.
+And this will cause OCFS2_I(inode)->ip_unaligned_aio decreased
+to -1 in ocfs2_dio_end_io(), thus the following unaligned dio
+will hang forever at ocfs2_aiodio_wait() in ocfs2_file_aio_write().
+
+Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
+Acked-by: Jeff Moyer <jmoyer@redhat.com>
+Signed-off-by: Joel Becker <jlbec@evilplan.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ include/linux/aio.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/include/linux/aio.h
++++ b/include/linux/aio.h
+@@ -140,6 +140,7 @@ struct kiocb {
+ (x)->ki_dtor = NULL; \
+ (x)->ki_obj.tsk = tsk; \
+ (x)->ki_user_data = 0; \
++ (x)->private = NULL; \
+ } while (0)
+
+ #define AIO_RING_MAGIC 0xa10a10a1
--- /dev/null
+From 2c995ff892313009e336ecc8ec3411022f5b1c39 Mon Sep 17 00:00:00 2001
+From: Antonio Quartulli <ordex@autistici.org>
+Date: Tue, 19 Jun 2012 09:26:39 +0000
+Subject: batman-adv: fix skb->data assignment
+
+From: Antonio Quartulli <ordex@autistici.org>
+
+commit 2c995ff892313009e336ecc8ec3411022f5b1c39 upstream.
+
+skb_linearize(skb) possibly rearranges the skb internal data and then changes
+the skb->data pointer value. For this reason any other pointer in the code that
+was assigned skb->data before invoking skb_linearise(skb) must be re-assigned.
+
+In the current tt_query message handling code this is not done and therefore, in
+case of skb linearization, the pointer used to handle the packet header ends up
+in pointing to free'd memory.
+
+This bug was introduced by a73105b8d4c765d9ebfb664d0a66802127d8e4c7
+(batman-adv: improved client announcement mechanism)
+
+Signed-off-by: Antonio Quartulli <ordex@autistici.org>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/batman-adv/routing.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/net/batman-adv/routing.c
++++ b/net/batman-adv/routing.c
+@@ -618,6 +618,8 @@ int recv_tt_query(struct sk_buff *skb, s
+ * changes */
+ if (skb_linearize(skb) < 0)
+ goto out;
++ /* skb_linearize() possibly changed skb->data */
++ tt_query = (struct tt_query_packet *)skb->data;
+
+ tt_len = tt_query->tt_data * sizeof(struct tt_change);
+
--- /dev/null
+From 5870adc68fc39d81089f1e80efdf64b97e5c37a1 Mon Sep 17 00:00:00 2001
+From: Marek Lindner <lindner_marek@yahoo.de>
+Date: Wed, 20 Jun 2012 17:16:05 +0200
+Subject: batman-adv: only drop packets of known wifi clients
+
+From: Marek Lindner <lindner_marek@yahoo.de>
+
+commit 5870adc68fc39d81089f1e80efdf64b97e5c37a1 upstream.
+
+bug introduced with 59b699cdee039d75915c354da06937102d1f9a84
+
+If the source or destination mac address of an ethernet packet
+could not be found in the translation table the packet was
+dropped if AP isolation was turned on. This behavior would
+make it impossible to send broadcast packets over the mesh as
+the broadcast address will never enter the translation table.
+
+Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
+Acked-by: Antonio Quartulli <ordex@autistici.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/batman-adv/translation-table.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/net/batman-adv/translation-table.c
++++ b/net/batman-adv/translation-table.c
+@@ -1803,10 +1803,10 @@ bool is_ap_isolated(struct bat_priv *bat
+ {
+ struct tt_local_entry *tt_local_entry = NULL;
+ struct tt_global_entry *tt_global_entry = NULL;
+- bool ret = true;
++ bool ret = false;
+
+ if (!atomic_read(&bat_priv->ap_isolation))
+- return false;
++ goto out;
+
+ tt_local_entry = tt_local_hash_find(bat_priv, dst);
+ if (!tt_local_entry)
+@@ -1816,10 +1816,10 @@ bool is_ap_isolated(struct bat_priv *bat
+ if (!tt_global_entry)
+ goto out;
+
+- if (_is_ap_isolated(tt_local_entry, tt_global_entry))
++ if (!_is_ap_isolated(tt_local_entry, tt_global_entry))
+ goto out;
+
+- ret = false;
++ ret = true;
+
+ out:
+ if (tt_global_entry)
--- /dev/null
+From d9cb9bd63eb27ac19f26a8547128c053f43a5da8 Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Fri, 15 Jun 2012 00:20:44 +0000
+Subject: can: c_can: precedence error in c_can_chip_config()
+
+From: Dan Carpenter <dan.carpenter@oracle.com>
+
+commit d9cb9bd63eb27ac19f26a8547128c053f43a5da8 upstream.
+
+(CAN_CTRLMODE_LISTENONLY & CAN_CTRLMODE_LOOPBACK) is (0x02 & 0x01) which
+is zero so the condition is never true. The intent here was to test
+that both flags were set.
+
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/can/c_can/c_can.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/can/c_can/c_can.c
++++ b/drivers/net/can/c_can/c_can.c
+@@ -590,8 +590,8 @@ static void c_can_chip_config(struct net
+ priv->write_reg(priv, &priv->regs->control,
+ CONTROL_ENABLE_AR);
+
+- if (priv->can.ctrlmode & (CAN_CTRLMODE_LISTENONLY &
+- CAN_CTRLMODE_LOOPBACK)) {
++ if ((priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY) &&
++ (priv->can.ctrlmode & CAN_CTRLMODE_LOOPBACK)) {
+ /* loopback + silent mode : useful for hot self-test */
+ priv->write_reg(priv, &priv->regs->control, CONTROL_EIE |
+ CONTROL_SIE | CONTROL_IE | CONTROL_TEST);
--- /dev/null
+From 85f2f834e85517307f13e30e630a5fc86f757cb5 Mon Sep 17 00:00:00 2001
+From: Hui Wang <jason77.wang@gmail.com>
+Date: Wed, 27 Jun 2012 16:19:18 +0800
+Subject: can: flexcan: use be32_to_cpup to handle the value of dt entry
+
+From: Hui Wang <jason77.wang@gmail.com>
+
+commit 85f2f834e85517307f13e30e630a5fc86f757cb5 upstream.
+
+The freescale arm i.MX series platform can support this driver, and
+usually the arm cpu works in the little endian mode by default, while
+device tree entry value is stored in big endian format, we should use
+be32_to_cpup() to handle them, after modification, it can work well
+both on the le cpu and be cpu.
+
+Cc: Shawn Guo <shawn.guo@linaro.org>
+Signed-off-by: Hui Wang <jason77.wang@gmail.com>
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/can/flexcan.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/can/flexcan.c
++++ b/drivers/net/can/flexcan.c
+@@ -933,12 +933,12 @@ static int __devinit flexcan_probe(struc
+ u32 clock_freq = 0;
+
+ if (pdev->dev.of_node) {
+- const u32 *clock_freq_p;
++ const __be32 *clock_freq_p;
+
+ clock_freq_p = of_get_property(pdev->dev.of_node,
+ "clock-frequency", NULL);
+ if (clock_freq_p)
+- clock_freq = *clock_freq_p;
++ clock_freq = be32_to_cpup(clock_freq_p);
+ }
+
+ if (!clock_freq) {
--- /dev/null
+From fe20b39ec32e975f1054c0b7866c873a954adf05 Mon Sep 17 00:00:00 2001
+From: Eliad Peller <eliad@wizery.com>
+Date: Tue, 12 Jun 2012 12:53:13 +0300
+Subject: cfg80211: fix potential deadlock in regulatory
+
+From: Eliad Peller <eliad@wizery.com>
+
+commit fe20b39ec32e975f1054c0b7866c873a954adf05 upstream.
+
+reg_timeout_work() calls restore_regulatory_settings() which
+takes cfg80211_mutex.
+
+reg_set_request_processed() already holds cfg80211_mutex
+before calling cancel_delayed_work_sync(reg_timeout),
+so it might deadlock.
+
+Call the async cancel_delayed_work instead, in order
+to avoid the potential deadlock.
+
+This is the relevant lockdep warning:
+
+cfg80211: Calling CRDA for country: XX
+
+======================================================
+[ INFO: possible circular locking dependency detected ]
+3.4.0-rc5-wl+ #26 Not tainted
+-------------------------------------------------------
+kworker/0:2/1391 is trying to acquire lock:
+ (cfg80211_mutex){+.+.+.}, at: [<bf28ae00>] restore_regulatory_settings+0x34/0x418 [cfg80211]
+
+but task is already holding lock:
+ ((reg_timeout).work){+.+...}, at: [<c0059e94>] process_one_work+0x1f0/0x480
+
+which lock already depends on the new lock.
+
+the existing dependency chain (in reverse order) is:
+
+-> #2 ((reg_timeout).work){+.+...}:
+ [<c008fd44>] validate_chain+0xb94/0x10f0
+ [<c0090b68>] __lock_acquire+0x8c8/0x9b0
+ [<c0090d40>] lock_acquire+0xf0/0x114
+ [<c005b600>] wait_on_work+0x4c/0x154
+ [<c005c000>] __cancel_work_timer+0xd4/0x11c
+ [<c005c064>] cancel_delayed_work_sync+0x1c/0x20
+ [<bf28b274>] reg_set_request_processed+0x50/0x78 [cfg80211]
+ [<bf28bd84>] set_regdom+0x550/0x600 [cfg80211]
+ [<bf294cd8>] nl80211_set_reg+0x218/0x258 [cfg80211]
+ [<c03c7738>] genl_rcv_msg+0x1a8/0x1e8
+ [<c03c6a00>] netlink_rcv_skb+0x5c/0xc0
+ [<c03c7584>] genl_rcv+0x28/0x34
+ [<c03c6720>] netlink_unicast+0x15c/0x228
+ [<c03c6c7c>] netlink_sendmsg+0x218/0x298
+ [<c03933c8>] sock_sendmsg+0xa4/0xc0
+ [<c039406c>] __sys_sendmsg+0x1e4/0x268
+ [<c0394228>] sys_sendmsg+0x4c/0x70
+ [<c0013840>] ret_fast_syscall+0x0/0x3c
+
+-> #1 (reg_mutex){+.+.+.}:
+ [<c008fd44>] validate_chain+0xb94/0x10f0
+ [<c0090b68>] __lock_acquire+0x8c8/0x9b0
+ [<c0090d40>] lock_acquire+0xf0/0x114
+ [<c04734dc>] mutex_lock_nested+0x48/0x320
+ [<bf28b2cc>] reg_todo+0x30/0x538 [cfg80211]
+ [<c0059f44>] process_one_work+0x2a0/0x480
+ [<c005a4b4>] worker_thread+0x1bc/0x2bc
+ [<c0061148>] kthread+0x98/0xa4
+ [<c0014af4>] kernel_thread_exit+0x0/0x8
+
+-> #0 (cfg80211_mutex){+.+.+.}:
+ [<c008ed58>] print_circular_bug+0x68/0x2cc
+ [<c008fb28>] validate_chain+0x978/0x10f0
+ [<c0090b68>] __lock_acquire+0x8c8/0x9b0
+ [<c0090d40>] lock_acquire+0xf0/0x114
+ [<c04734dc>] mutex_lock_nested+0x48/0x320
+ [<bf28ae00>] restore_regulatory_settings+0x34/0x418 [cfg80211]
+ [<bf28b200>] reg_timeout_work+0x1c/0x20 [cfg80211]
+ [<c0059f44>] process_one_work+0x2a0/0x480
+ [<c005a4b4>] worker_thread+0x1bc/0x2bc
+ [<c0061148>] kthread+0x98/0xa4
+ [<c0014af4>] kernel_thread_exit+0x0/0x8
+
+other info that might help us debug this:
+
+Chain exists of:
+ cfg80211_mutex --> reg_mutex --> (reg_timeout).work
+
+ Possible unsafe locking scenario:
+
+ CPU0 CPU1
+ ---- ----
+ lock((reg_timeout).work);
+ lock(reg_mutex);
+ lock((reg_timeout).work);
+ lock(cfg80211_mutex);
+
+ *** DEADLOCK ***
+
+2 locks held by kworker/0:2/1391:
+ #0: (events){.+.+.+}, at: [<c0059e94>] process_one_work+0x1f0/0x480
+ #1: ((reg_timeout).work){+.+...}, at: [<c0059e94>] process_one_work+0x1f0/0x480
+
+stack backtrace:
+[<c001b928>] (unwind_backtrace+0x0/0x12c) from [<c0471d3c>] (dump_stack+0x20/0x24)
+[<c0471d3c>] (dump_stack+0x20/0x24) from [<c008ef70>] (print_circular_bug+0x280/0x2cc)
+[<c008ef70>] (print_circular_bug+0x280/0x2cc) from [<c008fb28>] (validate_chain+0x978/0x10f0)
+[<c008fb28>] (validate_chain+0x978/0x10f0) from [<c0090b68>] (__lock_acquire+0x8c8/0x9b0)
+[<c0090b68>] (__lock_acquire+0x8c8/0x9b0) from [<c0090d40>] (lock_acquire+0xf0/0x114)
+[<c0090d40>] (lock_acquire+0xf0/0x114) from [<c04734dc>] (mutex_lock_nested+0x48/0x320)
+[<c04734dc>] (mutex_lock_nested+0x48/0x320) from [<bf28ae00>] (restore_regulatory_settings+0x34/0x418 [cfg80211])
+[<bf28ae00>] (restore_regulatory_settings+0x34/0x418 [cfg80211]) from [<bf28b200>] (reg_timeout_work+0x1c/0x20 [cfg80211])
+[<bf28b200>] (reg_timeout_work+0x1c/0x20 [cfg80211]) from [<c0059f44>] (process_one_work+0x2a0/0x480)
+[<c0059f44>] (process_one_work+0x2a0/0x480) from [<c005a4b4>] (worker_thread+0x1bc/0x2bc)
+[<c005a4b4>] (worker_thread+0x1bc/0x2bc) from [<c0061148>] (kthread+0x98/0xa4)
+[<c0061148>] (kthread+0x98/0xa4) from [<c0014af4>] (kernel_thread_exit+0x0/0x8)
+cfg80211: Calling CRDA to update world regulatory domain
+cfg80211: World regulatory domain updated:
+cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
+cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
+cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
+cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
+cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
+cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
+
+Signed-off-by: Eliad Peller <eliad@wizery.com>
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/wireless/reg.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/net/wireless/reg.c
++++ b/net/wireless/reg.c
+@@ -1389,7 +1389,7 @@ static void reg_set_request_processed(vo
+ spin_unlock(®_requests_lock);
+
+ if (last_request->initiator == NL80211_REGDOM_SET_BY_USER)
+- cancel_delayed_work_sync(®_timeout);
++ cancel_delayed_work(®_timeout);
+
+ if (need_more_processing)
+ schedule_work(®_work);
--- /dev/null
+From 7975059db572eb47f0fb272a62afeae272a4b209 Mon Sep 17 00:00:00 2001
+From: Rajendra Nayak <rnayak@ti.com>
+Date: Wed, 6 Jun 2012 14:41:31 +0530
+Subject: clk: Allow late cache allocation for clk->parents
+
+From: Rajendra Nayak <rnayak@ti.com>
+
+commit 7975059db572eb47f0fb272a62afeae272a4b209 upstream.
+
+Parent clocks for muxes are cached in clk->parents to
+avoid frequent lookups, however the cache allocation happens
+only during clock registeration and later clk_set_parent()
+assumes a cache space available and allocated.
+
+This is not entirely true for platforms which do early clock
+registerations wherein the cache allocation using kzalloc
+could fail during clock registeration.
+
+Allow cache allocation to happen later as part of clk_set_parent()
+to help such cases and avoid crashes assuming a cache being
+available.
+
+While here also replace existing kmalloc() with kzalloc()
+in the file.
+
+Signed-off-by: Rajendra Nayak <rnayak@ti.com>
+Signed-off-by: Mike Turquette <mturquette@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/clk/clk.c | 15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+--- a/drivers/clk/clk.c
++++ b/drivers/clk/clk.c
+@@ -997,7 +997,7 @@ static struct clk *__clk_init_parent(str
+
+ if (!clk->parents)
+ clk->parents =
+- kmalloc((sizeof(struct clk*) * clk->num_parents),
++ kzalloc((sizeof(struct clk*) * clk->num_parents),
+ GFP_KERNEL);
+
+ if (!clk->parents)
+@@ -1063,9 +1063,13 @@ static int __clk_set_parent(struct clk *
+ old_parent = clk->parent;
+
+ /* find index of new parent clock using cached parent ptrs */
+- for (i = 0; i < clk->num_parents; i++)
+- if (clk->parents[i] == parent)
+- break;
++ if (clk->parents)
++ for (i = 0; i < clk->num_parents; i++)
++ if (clk->parents[i] == parent)
++ break;
++ else
++ clk->parents = kzalloc((sizeof(struct clk*) * clk->num_parents),
++ GFP_KERNEL);
+
+ /*
+ * find index of new parent clock using string name comparison
+@@ -1074,7 +1078,8 @@ static int __clk_set_parent(struct clk *
+ if (i == clk->num_parents)
+ for (i = 0; i < clk->num_parents; i++)
+ if (!strcmp(clk->parent_names[i], parent->name)) {
+- clk->parents[i] = __clk_lookup(parent->name);
++ if (clk->parents)
++ clk->parents[i] = __clk_lookup(parent->name);
+ break;
+ }
+
--- /dev/null
+From 863b13271f1608ab3af6f7a371047d9a66693e38 Mon Sep 17 00:00:00 2001
+From: Rajendra Nayak <rnayak@ti.com>
+Date: Tue, 3 Jul 2012 12:11:41 +0530
+Subject: clk: fix parent validation in __clk_set_parent()
+
+From: Rajendra Nayak <rnayak@ti.com>
+
+commit 863b13271f1608ab3af6f7a371047d9a66693e38 upstream.
+
+The below commit introduced a bug in __clk_set_parent()
+which could cause it to *skip* the parent validation
+which makes sure the parent passed to the api is a valid
+one.
+
+ commit 7975059db572eb47f0fb272a62afeae272a4b209
+ Author: Rajendra Nayak <rnayak@ti.com>
+ Date: Wed Jun 6 14:41:31 2012 +0530
+
+ clk: Allow late cache allocation for clk->parents
+
+This was identified by the following compiler warning..
+
+ drivers/clk/clk.c: In function '__clk_set_parent':
+ drivers/clk/clk.c:1083:5: warning: 'i' may be used uninitialized in this function [-Wuninitialized]
+
+.. as reported by Marc Kleine-Budde.
+
+There were various options discussed on how to fix this, one
+being initing 'i' to clk->num_parents, but the below approach
+was found to be more appropriate as it also makes the 'parent
+validation' code simpler to read.
+
+Reported-by: Marc Kleine-Budde <mkl@pengutronix.de>
+Signed-off-by: Rajendra Nayak <rnayak@ti.com>
+Signed-off-by: Mike Turquette <mturquette@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/clk/clk.c | 28 +++++++++++++---------------
+ 1 file changed, 13 insertions(+), 15 deletions(-)
+
+--- a/drivers/clk/clk.c
++++ b/drivers/clk/clk.c
+@@ -1062,26 +1062,24 @@ static int __clk_set_parent(struct clk *
+
+ old_parent = clk->parent;
+
+- /* find index of new parent clock using cached parent ptrs */
+- if (clk->parents)
+- for (i = 0; i < clk->num_parents; i++)
+- if (clk->parents[i] == parent)
+- break;
+- else
++ if (!clk->parents)
+ clk->parents = kzalloc((sizeof(struct clk*) * clk->num_parents),
+ GFP_KERNEL);
+
+ /*
+- * find index of new parent clock using string name comparison
+- * also try to cache the parent to avoid future calls to __clk_lookup
++ * find index of new parent clock using cached parent ptrs,
++ * or if not yet cached, use string name comparison and cache
++ * them now to avoid future calls to __clk_lookup.
+ */
+- if (i == clk->num_parents)
+- for (i = 0; i < clk->num_parents; i++)
+- if (!strcmp(clk->parent_names[i], parent->name)) {
+- if (clk->parents)
+- clk->parents[i] = __clk_lookup(parent->name);
+- break;
+- }
++ for (i = 0; i < clk->num_parents; i++) {
++ if (clk->parents && clk->parents[i] == parent)
++ break;
++ else if (!strcmp(clk->parent_names[i], parent->name)) {
++ if (clk->parents)
++ clk->parents[i] = __clk_lookup(parent->name);
++ break;
++ }
++ }
+
+ if (i == clk->num_parents) {
+ pr_debug("%s: clock %s is not a possible parent of clock %s\n",
--- /dev/null
+From 8cd578b6e28693f357867a77598a88ef3deb6b39 Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Date: Sat, 9 Jun 2012 11:07:56 +0800
+Subject: gpiolib: wm8994: Pay attention to the value set when enabling as output
+
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+
+commit 8cd578b6e28693f357867a77598a88ef3deb6b39 upstream.
+
+Not paying attention to the value being set is a bad thing because it
+means that we'll not set the hardware up to reflect what was requested.
+Not setting the hardware up to reflect what was requested means that the
+caller won't get the results they wanted.
+
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpio/gpio-wm8994.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/drivers/gpio/gpio-wm8994.c
++++ b/drivers/gpio/gpio-wm8994.c
+@@ -89,8 +89,11 @@ static int wm8994_gpio_direction_out(str
+ struct wm8994_gpio *wm8994_gpio = to_wm8994_gpio(chip);
+ struct wm8994 *wm8994 = wm8994_gpio->wm8994;
+
++ if (value)
++ value = WM8994_GPN_LVL;
++
+ return wm8994_set_bits(wm8994, WM8994_GPIO_1 + offset,
+- WM8994_GPN_DIR, 0);
++ WM8994_GPN_DIR | WM8994_GPN_LVL, value);
+ }
+
+ static void wm8994_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
--- /dev/null
+From 0e90b49ca4b891f085b57559a3071a4feefb496c Mon Sep 17 00:00:00 2001
+From: Mitch A Williams <mitch.a.williams@intel.com>
+Date: Sat, 30 Jun 2012 00:23:19 +0000
+Subject: igbvf: fix divide by zero
+
+From: Mitch A Williams <mitch.a.williams@intel.com>
+
+commit 0e90b49ca4b891f085b57559a3071a4feefb496c upstream.
+
+Using ethtool -C ethX rx-usecs 0 crashes with a divide by zero.
+Refactor this function to fix this issue and make it more clear
+what the intent of each conditional is. Add comment regarding
+using a setting of zero.
+
+CC: David Ahern <daahern@cisco.com>
+Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
+Tested-by: Aaron Brown <aaron.f.brown@intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/ethernet/intel/igbvf/ethtool.c | 29 ++++++++++++++++++-----------
+ 1 file changed, 18 insertions(+), 11 deletions(-)
+
+--- a/drivers/net/ethernet/intel/igbvf/ethtool.c
++++ b/drivers/net/ethernet/intel/igbvf/ethtool.c
+@@ -357,21 +357,28 @@ static int igbvf_set_coalesce(struct net
+ struct igbvf_adapter *adapter = netdev_priv(netdev);
+ struct e1000_hw *hw = &adapter->hw;
+
+- if ((ec->rx_coalesce_usecs > IGBVF_MAX_ITR_USECS) ||
+- ((ec->rx_coalesce_usecs > 3) &&
+- (ec->rx_coalesce_usecs < IGBVF_MIN_ITR_USECS)) ||
+- (ec->rx_coalesce_usecs == 2))
+- return -EINVAL;
+-
+- /* convert to rate of irq's per second */
+- if (ec->rx_coalesce_usecs && ec->rx_coalesce_usecs <= 3) {
++ if ((ec->rx_coalesce_usecs >= IGBVF_MIN_ITR_USECS) &&
++ (ec->rx_coalesce_usecs <= IGBVF_MAX_ITR_USECS)) {
++ adapter->current_itr = ec->rx_coalesce_usecs << 2;
++ adapter->requested_itr = 1000000000 /
++ (adapter->current_itr * 256);
++ } else if ((ec->rx_coalesce_usecs == 3) ||
++ (ec->rx_coalesce_usecs == 2)) {
+ adapter->current_itr = IGBVF_START_ITR;
+ adapter->requested_itr = ec->rx_coalesce_usecs;
+- } else {
+- adapter->current_itr = ec->rx_coalesce_usecs << 2;
++ } else if (ec->rx_coalesce_usecs == 0) {
++ /*
++ * The user's desire is to turn off interrupt throttling
++ * altogether, but due to HW limitations, we can't do that.
++ * Instead we set a very small value in EITR, which would
++ * allow ~967k interrupts per second, but allow the adapter's
++ * internal clocking to still function properly.
++ */
++ adapter->current_itr = 4;
+ adapter->requested_itr = 1000000000 /
+ (adapter->current_itr * 256);
+- }
++ } else
++ return -EINVAL;
+
+ writel(adapter->current_itr,
+ hw->hw_addr + adapter->rx_ring->itr_register);
--- /dev/null
+From eac9ac6d1f5d0e9d33e4ded682187b630e7606cd Mon Sep 17 00:00:00 2001
+From: Johannes Berg <johannes.berg@intel.com>
+Date: Mon, 25 Jun 2012 09:36:41 +0200
+Subject: iwlwifi: fix activating inactive stations
+
+From: Johannes Berg <johannes.berg@intel.com>
+
+commit eac9ac6d1f5d0e9d33e4ded682187b630e7606cd upstream.
+
+When authentication/association timed out, the driver would
+complain bitterly, printing the message
+ACTIVATE a non DRIVER active station id ... addr ...
+
+The cause turns out to be that when the AP station is added
+but we don't associate, the IWL_STA_UCODE_INPROGRESS is set
+but never cleared. This then causes iwl_restore_stations()
+to attempt to resend it because it uses the flag internally
+and uploads even if it didn't set it itself.
+
+To fix this issue and not upload the station again when it
+has already been removed by mac80211, clear the flag after
+adding it in case we add it only for association.
+
+Reviewed-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
+Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/iwlwifi/iwl-mac80211.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+--- a/drivers/net/wireless/iwlwifi/iwl-mac80211.c
++++ b/drivers/net/wireless/iwlwifi/iwl-mac80211.c
+@@ -788,6 +788,18 @@ static int iwlagn_mac_sta_state(struct i
+ switch (op) {
+ case ADD:
+ ret = iwlagn_mac_sta_add(hw, vif, sta);
++ if (ret)
++ break;
++ /*
++ * Clear the in-progress flag, the AP station entry was added
++ * but we'll initialize LQ only when we've associated (which
++ * would also clear the in-progress flag). This is necessary
++ * in case we never initialize LQ because association fails.
++ */
++ spin_lock_bh(&priv->sta_lock);
++ priv->stations[iwl_sta_id(sta)].used &=
++ ~IWL_STA_UCODE_INPROGRESS;
++ spin_unlock_bh(&priv->sta_lock);
+ break;
+ case REMOVE:
+ ret = iwlagn_mac_sta_remove(hw, vif, sta);
--- /dev/null
+From 57efd44c8cad440fb00ef8078cb018ab2f221373 Mon Sep 17 00:00:00 2001
+From: Alexander Duyck <alexander.h.duyck@intel.com>
+Date: Mon, 25 Jun 2012 21:54:46 +0000
+Subject: ixgbe: Do not pad FCoE frames as this can cause issues with
+ FCoE DDP
+
+From: Alexander Duyck <alexander.h.duyck@intel.com>
+
+commit 57efd44c8cad440fb00ef8078cb018ab2f221373 upstream.
+
+FCoE target mode was experiencing issues due to the fact that we were
+sending up data frames that were padded to 60 bytes after the DDP logic had
+already stripped the frame down to 52 or 56 depending on the use of VLANs.
+This was resulting in the FCoE DDP logic having issues since it thought the
+frame still had data in it due to the padding.
+
+To resolve this, adding code so that we do not pad FCoE frames prior to
+handling them to the stack.
+
+Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
+Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
+Tested-by: Ross Brattain <ross.b.brattain@intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/ethernet/intel/ixgbe/ixgbe.h | 4 ++--
+ drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c | 2 +-
+ drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 14 ++++++++++----
+ 3 files changed, 13 insertions(+), 7 deletions(-)
+
+--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h
++++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
+@@ -189,7 +189,7 @@ enum ixgbe_ring_state_t {
+ __IXGBE_HANG_CHECK_ARMED,
+ __IXGBE_RX_RSC_ENABLED,
+ __IXGBE_RX_CSUM_UDP_ZERO_ERR,
+- __IXGBE_RX_FCOE_BUFSZ,
++ __IXGBE_RX_FCOE,
+ };
+
+ #define check_for_tx_hang(ring) \
+@@ -283,7 +283,7 @@ struct ixgbe_ring_feature {
+ #if defined(IXGBE_FCOE) && (PAGE_SIZE < 8192)
+ static inline unsigned int ixgbe_rx_pg_order(struct ixgbe_ring *ring)
+ {
+- return test_bit(__IXGBE_RX_FCOE_BUFSZ, &ring->state) ? 1 : 0;
++ return test_bit(__IXGBE_RX_FCOE, &ring->state) ? 1 : 0;
+ }
+ #else
+ #define ixgbe_rx_pg_order(_ring) 0
+--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
++++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
+@@ -628,7 +628,7 @@ static int ixgbe_alloc_q_vector(struct i
+ f = &adapter->ring_feature[RING_F_FCOE];
+ if ((rxr_idx >= f->mask) &&
+ (rxr_idx < f->mask + f->indices))
+- set_bit(__IXGBE_RX_FCOE_BUFSZ, &ring->state);
++ set_bit(__IXGBE_RX_FCOE, &ring->state);
+ }
+
+ #endif /* IXGBE_FCOE */
+--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
++++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+@@ -1036,17 +1036,17 @@ static inline void ixgbe_rx_hash(struct
+ #ifdef IXGBE_FCOE
+ /**
+ * ixgbe_rx_is_fcoe - check the rx desc for incoming pkt type
+- * @adapter: address of board private structure
++ * @ring: structure containing ring specific data
+ * @rx_desc: advanced rx descriptor
+ *
+ * Returns : true if it is FCoE pkt
+ */
+-static inline bool ixgbe_rx_is_fcoe(struct ixgbe_adapter *adapter,
++static inline bool ixgbe_rx_is_fcoe(struct ixgbe_ring *ring,
+ union ixgbe_adv_rx_desc *rx_desc)
+ {
+ __le16 pkt_info = rx_desc->wb.lower.lo_dword.hs_rss.pkt_info;
+
+- return (adapter->flags & IXGBE_FLAG_FCOE_ENABLED) &&
++ return test_bit(__IXGBE_RX_FCOE, &ring->state) &&
+ ((pkt_info & cpu_to_le16(IXGBE_RXDADV_PKTTYPE_ETQF_MASK)) ==
+ (cpu_to_le16(IXGBE_ETQF_FILTER_FCOE <<
+ IXGBE_RXDADV_PKTTYPE_ETQF_SHIFT)));
+@@ -1519,6 +1519,12 @@ static bool ixgbe_cleanup_headers(struct
+ skb->truesize -= ixgbe_rx_bufsz(rx_ring);
+ }
+
++#ifdef IXGBE_FCOE
++ /* do not attempt to pad FCoE Frames as this will disrupt DDP */
++ if (ixgbe_rx_is_fcoe(rx_ring, rx_desc))
++ return false;
++
++#endif
+ /* if skb_pad returns an error the skb was freed */
+ if (unlikely(skb->len < 60)) {
+ int pad_len = 60 - skb->len;
+@@ -1745,7 +1751,7 @@ static bool ixgbe_clean_rx_irq(struct ix
+
+ #ifdef IXGBE_FCOE
+ /* if ddp, not passing to ULD unless for FCP_RSP or error */
+- if (ixgbe_rx_is_fcoe(adapter, rx_desc)) {
++ if (ixgbe_rx_is_fcoe(rx_ring, rx_desc)) {
+ ddp_bytes = ixgbe_fcoe_ddp(adapter, rx_desc, skb);
+ if (!ddp_bytes) {
+ dev_kfree_skb_any(skb);
--- /dev/null
+From 88a9e31c506c00c8b7a2f1611406d0e38dcb33b3 Mon Sep 17 00:00:00 2001
+From: Eliad Peller <eliad@wizery.com>
+Date: Fri, 1 Jun 2012 11:14:03 +0300
+Subject: mac80211: clear ifmgd->bssid only after building DELBA
+
+From: Eliad Peller <eliad@wizery.com>
+
+commit 88a9e31c506c00c8b7a2f1611406d0e38dcb33b3 upstream.
+
+ieee80211_set_disassoc() clears ifmgd->bssid before
+building DELBA frames, resulting in frames with invalid
+bssid ("00:00:00:00:00:00").
+
+Fix it by clearing ifmgd->bssid only after building
+all the needed frames.
+
+After this change, we no longer need to save the
+bssid (before clearing it), so remove the local array.
+
+Reported-by: Ido Yariv <ido@wizery.com>
+Signed-off-by: Eliad Peller <eliad@wizery.com>
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/mac80211/mlme.c | 13 ++++++-------
+ 1 file changed, 6 insertions(+), 7 deletions(-)
+
+--- a/net/mac80211/mlme.c
++++ b/net/mac80211/mlme.c
+@@ -1375,7 +1375,6 @@ static void ieee80211_set_disassoc(struc
+ struct ieee80211_local *local = sdata->local;
+ struct sta_info *sta;
+ u32 changed = 0;
+- u8 bssid[ETH_ALEN];
+
+ ASSERT_MGD_MTX(ifmgd);
+
+@@ -1385,10 +1384,7 @@ static void ieee80211_set_disassoc(struc
+ if (WARN_ON(!ifmgd->associated))
+ return;
+
+- memcpy(bssid, ifmgd->associated->bssid, ETH_ALEN);
+-
+ ifmgd->associated = NULL;
+- memset(ifmgd->bssid, 0, ETH_ALEN);
+
+ /*
+ * we need to commit the associated = NULL change because the
+@@ -1408,7 +1404,7 @@ static void ieee80211_set_disassoc(struc
+ netif_carrier_off(sdata->dev);
+
+ mutex_lock(&local->sta_mtx);
+- sta = sta_info_get(sdata, bssid);
++ sta = sta_info_get(sdata, ifmgd->bssid);
+ if (sta) {
+ set_sta_flag(sta, WLAN_STA_BLOCK_BA);
+ ieee80211_sta_tear_down_BA_sessions(sta, tx);
+@@ -1417,13 +1413,16 @@ static void ieee80211_set_disassoc(struc
+
+ /* deauthenticate/disassociate now */
+ if (tx || frame_buf)
+- ieee80211_send_deauth_disassoc(sdata, bssid, stype, reason,
+- tx, frame_buf);
++ ieee80211_send_deauth_disassoc(sdata, ifmgd->bssid, stype,
++ reason, tx, frame_buf);
+
+ /* flush out frame */
+ if (tx)
+ drv_flush(local, false);
+
++ /* clear bssid only after building the needed mgmt frames */
++ memset(ifmgd->bssid, 0, ETH_ALEN);
++
+ /* remove AP and TDLS peers */
+ sta_info_flush(local, sdata);
+
--- /dev/null
+From 4b5ebccc40843104d980f0714bc86bfcd5568941 Mon Sep 17 00:00:00 2001
+From: Johannes Berg <johannes.berg@intel.com>
+Date: Wed, 27 Jun 2012 15:38:56 +0200
+Subject: mac80211: correct behaviour on unrecognised action frames
+
+From: Johannes Berg <johannes.berg@intel.com>
+
+commit 4b5ebccc40843104d980f0714bc86bfcd5568941 upstream.
+
+When receiving an "individually addressed" action frame, the
+receiver is required to return it to the sender. mac80211
+gets this wrong as it also returns group addressed (mcast)
+frames to the sender. Fix this and update the reference to
+the new 802.11 standards version since things were shuffled
+around significantly.
+
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/mac80211/rx.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/net/mac80211/rx.c
++++ b/net/mac80211/rx.c
+@@ -2459,7 +2459,7 @@ ieee80211_rx_h_action_return(struct ieee
+ * frames that we didn't handle, including returning unknown
+ * ones. For all other modes we will return them to the sender,
+ * setting the 0x80 bit in the action category, as required by
+- * 802.11-2007 7.3.1.11.
++ * 802.11-2012 9.24.4.
+ * Newer versions of hostapd shall also use the management frame
+ * registration mechanisms, but older ones still use cooked
+ * monitor interfaces so push all frames there.
+@@ -2469,6 +2469,9 @@ ieee80211_rx_h_action_return(struct ieee
+ sdata->vif.type == NL80211_IFTYPE_AP_VLAN))
+ return RX_DROP_MONITOR;
+
++ if (is_multicast_ether_addr(mgmt->da))
++ return RX_DROP_MONITOR;
++
+ /* do not return rejected action frames */
+ if (mgmt->u.action.category & 0x80)
+ return RX_DROP_UNUSABLE;
--- /dev/null
+From 48f8b641297df49021093763a3271119a84990a2 Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Sat, 9 Jun 2012 19:08:25 +0300
+Subject: mtd: cafe_nand: fix an & vs | mistake
+
+From: Dan Carpenter <dan.carpenter@oracle.com>
+
+commit 48f8b641297df49021093763a3271119a84990a2 upstream.
+
+The intent here was clearly to set result to true if the 0x40000000 flag
+was set. But instead there was a | vs & typo and we always set result
+to true.
+
+Artem: check the spec at
+wiki.laptop.org/images/5/5c/88ALP01_Datasheet_July_2007.pdf
+and this fix looks correct.
+
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
+Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/mtd/nand/cafe_nand.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/mtd/nand/cafe_nand.c
++++ b/drivers/mtd/nand/cafe_nand.c
+@@ -102,7 +102,7 @@ static const char *part_probes[] = { "cm
+ static int cafe_device_ready(struct mtd_info *mtd)
+ {
+ struct cafe_priv *cafe = mtd->priv;
+- int result = !!(cafe_readl(cafe, NAND_STATUS) | 0x40000000);
++ int result = !!(cafe_readl(cafe, NAND_STATUS) & 0x40000000);
+ uint32_t irqs = cafe_readl(cafe, NAND_IRQ);
+
+ cafe_writel(cafe, irqs, NAND_IRQ);
--- /dev/null
+From 925839243dc9aa4ef25305f5afd10ed18258a4ac Mon Sep 17 00:00:00 2001
+From: Stone Piao <piaoyun@marvell.com>
+Date: Wed, 20 Jun 2012 20:21:10 -0700
+Subject: mwifiex: fix 11n rx packet drop issue
+
+From: Stone Piao <piaoyun@marvell.com>
+
+commit 925839243dc9aa4ef25305f5afd10ed18258a4ac upstream.
+
+Currently we check the sequence number of last packet received
+against start_win. If a sequence hole is detected, start_win is
+updated to next sequence number.
+
+Since the rx sequence number is initialized to 0, a corner case
+exists when BA setup happens immediately after association. As
+0 is a valid sequence number, start_win gets increased to 1
+incorrectly. This causes the first packet with sequence number 0
+being dropped.
+
+Initialize rx sequence number as 0xffff and skip adjusting
+start_win if the sequence number remains 0xffff. The sequence
+number will be updated once the first packet is received.
+
+Signed-off-by: Stone Piao <piaoyun@marvell.com>
+Signed-off-by: Avinash Patil <patila@marvell.com>
+Signed-off-by: Kiran Divekar <dkiran@marvell.com>
+Signed-off-by: Bing Zhao <bzhao@marvell.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/mwifiex/11n_rxreorder.c | 5 +++--
+ drivers/net/wireless/mwifiex/11n_rxreorder.h | 7 +++++++
+ drivers/net/wireless/mwifiex/wmm.c | 2 ++
+ 3 files changed, 12 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/wireless/mwifiex/11n_rxreorder.c
++++ b/drivers/net/wireless/mwifiex/11n_rxreorder.c
+@@ -256,7 +256,8 @@ mwifiex_11n_create_rx_reorder_tbl(struct
+ else
+ last_seq = priv->rx_seq[tid];
+
+- if (last_seq >= new_node->start_win)
++ if (last_seq != MWIFIEX_DEF_11N_RX_SEQ_NUM &&
++ last_seq >= new_node->start_win)
+ new_node->start_win = last_seq + 1;
+
+ new_node->win_size = win_size;
+@@ -596,5 +597,5 @@ void mwifiex_11n_cleanup_reorder_tbl(str
+ spin_unlock_irqrestore(&priv->rx_reorder_tbl_lock, flags);
+
+ INIT_LIST_HEAD(&priv->rx_reorder_tbl_ptr);
+- memset(priv->rx_seq, 0, sizeof(priv->rx_seq));
++ mwifiex_reset_11n_rx_seq_num(priv);
+ }
+--- a/drivers/net/wireless/mwifiex/11n_rxreorder.h
++++ b/drivers/net/wireless/mwifiex/11n_rxreorder.h
+@@ -37,6 +37,13 @@
+
+ #define ADDBA_RSP_STATUS_ACCEPT 0
+
++#define MWIFIEX_DEF_11N_RX_SEQ_NUM 0xffff
++
++static inline void mwifiex_reset_11n_rx_seq_num(struct mwifiex_private *priv)
++{
++ memset(priv->rx_seq, 0xff, sizeof(priv->rx_seq));
++}
++
+ int mwifiex_11n_rx_reorder_pkt(struct mwifiex_private *,
+ u16 seqNum,
+ u16 tid, u8 *ta,
+--- a/drivers/net/wireless/mwifiex/wmm.c
++++ b/drivers/net/wireless/mwifiex/wmm.c
+@@ -404,6 +404,8 @@ mwifiex_wmm_init(struct mwifiex_adapter
+ priv->add_ba_param.tx_win_size = MWIFIEX_AMPDU_DEF_TXWINSIZE;
+ priv->add_ba_param.rx_win_size = MWIFIEX_AMPDU_DEF_RXWINSIZE;
+
++ mwifiex_reset_11n_rx_seq_num(priv);
++
+ atomic_set(&priv->wmm.tx_pkts_queued, 0);
+ atomic_set(&priv->wmm.highest_queued_prio, HIGH_PRIO_TID);
+ }
--- /dev/null
+From f03ba7e9a24e5e9efaad56bd1713b994ea556b16 Mon Sep 17 00:00:00 2001
+From: Stone Piao <piaoyun@marvell.com>
+Date: Wed, 20 Jun 2012 20:21:11 -0700
+Subject: mwifiex: fix WPS eapol handshake failure
+
+From: Stone Piao <piaoyun@marvell.com>
+
+commit f03ba7e9a24e5e9efaad56bd1713b994ea556b16 upstream.
+
+After association, STA will go through eapol handshake with WPS
+enabled AP. It's observed that WPS handshake fails with some 11n
+AP. The reason for the failure is that the eapol packet is sent
+via 11n frame aggregation.
+
+The eapol packet should be sent directly without 11n aggregation.
+
+This patch fixes the problem by adding WPS session control while
+dequeuing Tx packets for transmission.
+
+Signed-off-by: Stone Piao <piaoyun@marvell.com>
+Signed-off-by: Avinash Patil <patila@marvell.com>
+Signed-off-by: Bing Zhao <bzhao@marvell.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/mwifiex/wmm.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/net/wireless/mwifiex/wmm.c
++++ b/drivers/net/wireless/mwifiex/wmm.c
+@@ -1211,6 +1211,7 @@ mwifiex_dequeue_tx_packet(struct mwifiex
+
+ if (!ptr->is_11n_enabled ||
+ mwifiex_is_ba_stream_setup(priv, ptr, tid) ||
++ priv->wps.session_enable ||
+ ((priv->sec_info.wpa_enabled ||
+ priv->sec_info.wpa2_enabled) &&
+ !priv->wpa_is_gtk_set)) {
--- /dev/null
+From b9f90eb2740203ff2592efe640409ad48335d1c2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no>
+Date: Thu, 21 Jun 2012 02:45:58 +0000
+Subject: net: qmi_wwan: fix Gobi device probing
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no>
+
+commit b9f90eb2740203ff2592efe640409ad48335d1c2 upstream.
+
+Ignoring interfaces with additional descriptors is not a reliable
+method for locating the correct interface on Gobi devices. There
+is at least one device where this method fails:
+https://bbs.archlinux.org/viewtopic.php?id=143506
+
+The result is that the AT command port (interface #2) is hidden
+from qcserial, preventing traditional serial modem usage:
+
+[ 15.562552] qmi_wwan 4-1.6:1.0: cdc-wdm0: USB WDM device
+[ 15.562691] qmi_wwan 4-1.6:1.0: wwan0: register 'qmi_wwan' at usb-0000:00:1d.0-1.6, Qualcomm Gobi wwan/QMI device, 1e:df:3c:3a:4e:3b
+[ 15.563383] qmi_wwan: probe of 4-1.6:1.1 failed with error -22
+[ 15.564189] qmi_wwan 4-1.6:1.2: cdc-wdm1: USB WDM device
+[ 15.564302] qmi_wwan 4-1.6:1.2: wwan1: register 'qmi_wwan' at usb-0000:00:1d.0-1.6, Qualcomm Gobi wwan/QMI device, 1e:df:3c:3a:4e:3b
+[ 15.564328] qmi_wwan: probe of 4-1.6:1.3 failed with error -22
+[ 15.569376] qcserial 4-1.6:1.1: Qualcomm USB modem converter detected
+[ 15.569440] usb 4-1.6: Qualcomm USB modem converter now attached to ttyUSB0
+[ 15.570372] qcserial 4-1.6:1.3: Qualcomm USB modem converter detected
+[ 15.570430] usb 4-1.6: Qualcomm USB modem converter now attached to ttyUSB1
+
+Use static interface numbers taken from the interface map in
+qcserial for all Gobi devices instead:
+
+ Gobi 1K USB layout:
+ 0: serial port (doesn't respond)
+ 1: serial port (doesn't respond)
+ 2: AT-capable modem port
+ 3: QMI/net
+
+ Gobi 2K+ USB layout:
+ 0: QMI/net
+ 1: DM/DIAG (use libqcdm from ModemManager for communication)
+ 2: AT-capable modem port
+ 3: NMEA
+
+This should be more reliable over all, and will also prevent the
+noisy "probe failed" messages. The whitelisting logic is expected
+to be replaced by direct interface number matching in 3.6.
+
+Reported-by: Heinrich Siebmanns (Harvey) <H.Siebmanns@t-online.de>
+Signed-off-by: Bjørn Mork <bjorn@mork.no>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/usb/qmi_wwan.c | 83 +++++++++++++++++++++------------------------
+ 1 file changed, 40 insertions(+), 43 deletions(-)
+
+--- a/drivers/net/usb/qmi_wwan.c
++++ b/drivers/net/usb/qmi_wwan.c
+@@ -257,29 +257,6 @@ err:
+ return rv;
+ }
+
+-/* Gobi devices uses identical class/protocol codes for all interfaces regardless
+- * of function. Some of these are CDC ACM like and have the exact same endpoints
+- * we are looking for. This leaves two possible strategies for identifying the
+- * correct interface:
+- * a) hardcoding interface number, or
+- * b) use the fact that the wwan interface is the only one lacking additional
+- * (CDC functional) descriptors
+- *
+- * Let's see if we can get away with the generic b) solution.
+- */
+-static int qmi_wwan_bind_gobi(struct usbnet *dev, struct usb_interface *intf)
+-{
+- int rv = -EINVAL;
+-
+- /* ignore any interface with additional descriptors */
+- if (intf->cur_altsetting->extralen)
+- goto err;
+-
+- rv = qmi_wwan_bind_shared(dev, intf);
+-err:
+- return rv;
+-}
+-
+ static void qmi_wwan_unbind_shared(struct usbnet *dev, struct usb_interface *intf)
+ {
+ struct usb_driver *subdriver = (void *)dev->data[0];
+@@ -347,15 +324,15 @@ static const struct driver_info qmi_wwan
+ .manage_power = qmi_wwan_manage_power,
+ };
+
+-static const struct driver_info qmi_wwan_gobi = {
+- .description = "Qualcomm Gobi wwan/QMI device",
++static const struct driver_info qmi_wwan_force_int0 = {
++ .description = "Qualcomm WWAN/QMI device",
+ .flags = FLAG_WWAN,
+- .bind = qmi_wwan_bind_gobi,
++ .bind = qmi_wwan_bind_shared,
+ .unbind = qmi_wwan_unbind_shared,
+ .manage_power = qmi_wwan_manage_power,
++ .data = BIT(0), /* interface whitelist bitmap */
+ };
+
+-/* ZTE suck at making USB descriptors */
+ static const struct driver_info qmi_wwan_force_int1 = {
+ .description = "Qualcomm WWAN/QMI device",
+ .flags = FLAG_WWAN,
+@@ -365,6 +342,15 @@ static const struct driver_info qmi_wwan
+ .data = BIT(1), /* interface whitelist bitmap */
+ };
+
++static const struct driver_info qmi_wwan_force_int3 = {
++ .description = "Qualcomm WWAN/QMI device",
++ .flags = FLAG_WWAN,
++ .bind = qmi_wwan_bind_shared,
++ .unbind = qmi_wwan_unbind_shared,
++ .manage_power = qmi_wwan_manage_power,
++ .data = BIT(3), /* interface whitelist bitmap */
++};
++
+ static const struct driver_info qmi_wwan_force_int4 = {
+ .description = "Qualcomm WWAN/QMI device",
+ .flags = FLAG_WWAN,
+@@ -390,16 +376,23 @@ static const struct driver_info qmi_wwan
+ static const struct driver_info qmi_wwan_sierra = {
+ .description = "Sierra Wireless wwan/QMI device",
+ .flags = FLAG_WWAN,
+- .bind = qmi_wwan_bind_gobi,
++ .bind = qmi_wwan_bind_shared,
+ .unbind = qmi_wwan_unbind_shared,
+ .manage_power = qmi_wwan_manage_power,
+ .data = BIT(8) | BIT(19), /* interface whitelist bitmap */
+ };
+
+ #define HUAWEI_VENDOR_ID 0x12D1
++
++/* Gobi 1000 QMI/wwan interface number is 3 according to qcserial */
++#define QMI_GOBI1K_DEVICE(vend, prod) \
++ USB_DEVICE(vend, prod), \
++ .driver_info = (unsigned long)&qmi_wwan_force_int3
++
++/* Gobi 2000 and Gobi 3000 QMI/wwan interface number is 0 according to qcserial */
+ #define QMI_GOBI_DEVICE(vend, prod) \
+ USB_DEVICE(vend, prod), \
+- .driver_info = (unsigned long)&qmi_wwan_gobi
++ .driver_info = (unsigned long)&qmi_wwan_force_int0
+
+ static const struct usb_device_id products[] = {
+ { /* Huawei E392, E398 and possibly others sharing both device id and more... */
+@@ -493,20 +486,24 @@ static const struct usb_device_id produc
+ .bInterfaceProtocol = 0xff,
+ .driver_info = (unsigned long)&qmi_wwan_sierra,
+ },
+- {QMI_GOBI_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */
+- {QMI_GOBI_DEVICE(0x03f0, 0x1f1d)}, /* HP un2400 Gobi Modem Device */
+- {QMI_GOBI_DEVICE(0x03f0, 0x371d)}, /* HP un2430 Mobile Broadband Module */
+- {QMI_GOBI_DEVICE(0x04da, 0x250d)}, /* Panasonic Gobi Modem device */
+- {QMI_GOBI_DEVICE(0x413c, 0x8172)}, /* Dell Gobi Modem device */
+- {QMI_GOBI_DEVICE(0x1410, 0xa001)}, /* Novatel Gobi Modem device */
+- {QMI_GOBI_DEVICE(0x0b05, 0x1776)}, /* Asus Gobi Modem device */
+- {QMI_GOBI_DEVICE(0x19d2, 0xfff3)}, /* ONDA Gobi Modem device */
+- {QMI_GOBI_DEVICE(0x05c6, 0x9001)}, /* Generic Gobi Modem device */
+- {QMI_GOBI_DEVICE(0x05c6, 0x9002)}, /* Generic Gobi Modem device */
+- {QMI_GOBI_DEVICE(0x05c6, 0x9202)}, /* Generic Gobi Modem device */
+- {QMI_GOBI_DEVICE(0x05c6, 0x9203)}, /* Generic Gobi Modem device */
+- {QMI_GOBI_DEVICE(0x05c6, 0x9222)}, /* Generic Gobi Modem device */
+- {QMI_GOBI_DEVICE(0x05c6, 0x9009)}, /* Generic Gobi Modem device */
++
++ /* Gobi 1000 devices */
++ {QMI_GOBI1K_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */
++ {QMI_GOBI1K_DEVICE(0x03f0, 0x1f1d)}, /* HP un2400 Gobi Modem Device */
++ {QMI_GOBI1K_DEVICE(0x03f0, 0x371d)}, /* HP un2430 Mobile Broadband Module */
++ {QMI_GOBI1K_DEVICE(0x04da, 0x250d)}, /* Panasonic Gobi Modem device */
++ {QMI_GOBI1K_DEVICE(0x413c, 0x8172)}, /* Dell Gobi Modem device */
++ {QMI_GOBI1K_DEVICE(0x1410, 0xa001)}, /* Novatel Gobi Modem device */
++ {QMI_GOBI1K_DEVICE(0x0b05, 0x1776)}, /* Asus Gobi Modem device */
++ {QMI_GOBI1K_DEVICE(0x19d2, 0xfff3)}, /* ONDA Gobi Modem device */
++ {QMI_GOBI1K_DEVICE(0x05c6, 0x9001)}, /* Generic Gobi Modem device */
++ {QMI_GOBI1K_DEVICE(0x05c6, 0x9002)}, /* Generic Gobi Modem device */
++ {QMI_GOBI1K_DEVICE(0x05c6, 0x9202)}, /* Generic Gobi Modem device */
++ {QMI_GOBI1K_DEVICE(0x05c6, 0x9203)}, /* Generic Gobi Modem device */
++ {QMI_GOBI1K_DEVICE(0x05c6, 0x9222)}, /* Generic Gobi Modem device */
++ {QMI_GOBI1K_DEVICE(0x05c6, 0x9009)}, /* Generic Gobi Modem device */
++
++ /* Gobi 2000 and 3000 devices */
+ {QMI_GOBI_DEVICE(0x413c, 0x8186)}, /* Dell Gobi 2000 Modem device (N0218, VU936) */
+ {QMI_GOBI_DEVICE(0x05c6, 0x920b)}, /* Generic Gobi 2000 Modem device */
+ {QMI_GOBI_DEVICE(0x05c6, 0x9225)}, /* Sony Gobi 2000 Modem device (N0279, VU730) */
--- /dev/null
+From d9b8706843a501034d09bea63ca6723a2ed02b11 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no>
+Date: Thu, 21 Jun 2012 23:11:18 +0000
+Subject: net: qmi_wwan: fix Oops while disconnecting
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no>
+
+commit d9b8706843a501034d09bea63ca6723a2ed02b11 upstream.
+
+usbnet_disconnect() will set intfdata to NULL before calling
+the minidriver unbind function. The cdc_wdm subdriver cannot
+know that it is disconnecting until the qmi_wwan unbind
+function has called its disconnect function. This means that
+we must be able to support the cdc_wdm subdriver operating
+normally while usbnet_disconnect() is running, and in
+particular that intfdata may be NULL.
+
+The only place this matters is in qmi_wwan_cdc_wdm_manage_power
+which is called from cdc_wdm. Simply testing for NULL
+intfdata there is sufficient to allow it to continue working
+at all times.
+
+Fixes this Oops where a cdc-wdm device was closed while the
+USB device was disconnecting, causing wdm_release to call
+qmi_wwan_cdc_wdm_manage_power after intfdata was set to
+NULL by usbnet_disconnect:
+
+[41819.087460] BUG: unable to handle kernel NULL pointer dereference at 00000080
+[41819.087815] IP: [<f8640458>] qmi_wwan_manage_power+0x68/0x90 [qmi_wwan]
+[41819.088028] *pdpt = 000000000314f001 *pde = 0000000000000000
+[41819.088028] Oops: 0002 [#1] SMP
+[41819.088028] Modules linked in: qmi_wwan option usb_wwan usbserial usbnet
+cdc_wdm nls_iso8859_1 nls_cp437 vfat fat usb_storage bnep rfcomm bluetooth
+parport_pc ppdev binfmt_misc iptable_nat nf_nat nf_conntrack_ipv4
+nf_conntrack nf_defrag_ipv4 iptable_mangle iptable_filter ip_tables
+x_tables dm_crypt uvcvideo snd_hda_codec_realtek snd_hda_intel
+videobuf2_core snd_hda_codec joydev videodev videobuf2_vmalloc
+hid_multitouch snd_hwdep arc4 videobuf2_memops snd_pcm snd_seq_midi
+snd_rawmidi snd_seq_midi_event ath9k mac80211 snd_seq ath9k_common ath9k_hw
+ath snd_timer snd_seq_device sparse_keymap dm_multipath scsi_dh coretemp
+mac_hid snd soundcore cfg80211 snd_page_alloc psmouse serio_raw microcode
+lp parport dm_mirror dm_region_hash dm_log usbhid hid i915 drm_kms_helper
+drm r8169 i2c_algo_bit wmi video [last unloaded: qmi_wwan]
+[41819.088028]
+[41819.088028] Pid: 23292, comm: qmicli Not tainted 3.4.0-5-generic #11-Ubuntu GIGABYTE T1005/T1005
+[41819.088028] EIP: 0060:[<f8640458>] EFLAGS: 00010246 CPU: 1
+[41819.088028] EIP is at qmi_wwan_manage_power+0x68/0x90 [qmi_wwan]
+[41819.088028] EAX: 00000000 EBX: 00000000 ECX: 000000c3 EDX: 00000000
+[41819.088028] ESI: c3b27658 EDI: 00000000 EBP: c298bea4 ESP: c298be98
+[41819.088028] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
+[41819.088028] CR0: 8005003b CR2: 00000080 CR3: 3605e000 CR4: 000007f0
+[41819.088028] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
+[41819.088028] DR6: ffff0ff0 DR7: 00000400
+[41819.088028] Process qmicli (pid: 23292, ti=c298a000 task=f343b280 task.ti=c298a000)
+[41819.088028] Stack:
+[41819.088028] 00000000 c3b27658 e2a80d00 c298beb0 f864051a c3b27600 c298bec0 f9027099
+[41819.088028] c2fd6000 00000008 c298bef0 c1147f96 00000001 00000000 00000000 f4e54790
+[41819.088028] ecf43a00 ecf43a00 c2fd6008 c2fd6000 ebbd7600 ffffffb9 c298bf08 c1144474
+[41819.088028] Call Trace:
+[41819.088028] [<f864051a>] qmi_wwan_cdc_wdm_manage_power+0x1a/0x20 [qmi_wwan]
+[41819.088028] [<f9027099>] wdm_release+0x69/0x70 [cdc_wdm]
+[41819.088028] [<c1147f96>] fput+0xe6/0x210
+[41819.088028] [<c1144474>] filp_close+0x54/0x80
+[41819.088028] [<c1046a65>] put_files_struct+0x75/0xc0
+[41819.088028] [<c1046b56>] exit_files+0x46/0x60
+[41819.088028] [<c1046f81>] do_exit+0x141/0x780
+[41819.088028] [<c107248f>] ? wake_up_state+0xf/0x20
+[41819.088028] [<c1053f48>] ? signal_wake_up+0x28/0x40
+[41819.088028] [<c1054f3b>] ? zap_other_threads+0x6b/0x80
+[41819.088028] [<c1047864>] do_group_exit+0x34/0xa0
+[41819.088028] [<c10478e8>] sys_exit_group+0x18/0x20
+[41819.088028] [<c15bb7df>] sysenter_do_call+0x12/0x28
+[41819.088028] Code: 04 83 e7 01 c1 e7 03 0f b6 42 18 83 e0 f7 09 f8 88 42
+18 8b 43 04 e8 48 9a dd c8 89 f0 8b 5d f4 8b 75 f8 8b 7d fc 89 ec 5d c3 90
+<f0> ff 88 80 00 00 00 0f 94 c0 84 c0 75 b7 31 f6 8b 5d f4 89 f0
+[41819.088028] EIP: [<f8640458>] qmi_wwan_manage_power+0x68/0x90 [qmi_wwan] SS:ESP 0068:c298be98
+[41819.088028] CR2: 0000000000000080
+[41819.149492] ---[ end trace 0944479ff8257f55 ]---
+
+Reported-by: Marius Bjørnstad Kotsbak <marius.kotsbak@gmail.com>
+Signed-off-by: Bjørn Mork <bjorn@mork.no>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/usb/qmi_wwan.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/net/usb/qmi_wwan.c
++++ b/drivers/net/usb/qmi_wwan.c
+@@ -197,6 +197,10 @@ err:
+ static int qmi_wwan_cdc_wdm_manage_power(struct usb_interface *intf, int on)
+ {
+ struct usbnet *dev = usb_get_intfdata(intf);
++
++ /* can be called while disconnecting */
++ if (!dev)
++ return 0;
+ return qmi_wwan_manage_power(dev, on);
+ }
+
--- /dev/null
+From 3e5d3c35a68c9a933bdbdd8685bd1a205b57e806 Mon Sep 17 00:00:00 2001
+From: Junxiao Bi <junxiao.bi@oracle.com>
+Date: Wed, 27 Jun 2012 17:09:55 +0800
+Subject: ocfs2: clear unaligned io flag when dio fails
+
+From: Junxiao Bi <junxiao.bi@oracle.com>
+
+commit 3e5d3c35a68c9a933bdbdd8685bd1a205b57e806 upstream.
+
+The unaligned io flag is set in the kiocb when an unaligned
+dio is issued, it should be cleared even when the dio fails,
+or it may affect the following io which are using the same
+kiocb.
+
+Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
+Signed-off-by: Joel Becker <jlbec@evilplan.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/ocfs2/file.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/fs/ocfs2/file.c
++++ b/fs/ocfs2/file.c
+@@ -2422,8 +2422,10 @@ out_dio:
+ unaligned_dio = 0;
+ }
+
+- if (unaligned_dio)
++ if (unaligned_dio) {
++ ocfs2_iocb_clear_unaligned_aio(iocb);
+ atomic_dec(&OCFS2_I(inode)->ip_unaligned_aio);
++ }
+
+ out:
+ if (rw_level != -1)
--- /dev/null
+From e734568b675c985db2026848fefaac01c22977a5 Mon Sep 17 00:00:00 2001
+From: Will Deacon <will.deacon@arm.com>
+Date: Fri, 8 Jun 2012 16:16:04 +0100
+Subject: oprofile: perf: use NR_CPUS instead or nr_cpumask_bits for static array
+
+From: Will Deacon <will.deacon@arm.com>
+
+commit e734568b675c985db2026848fefaac01c22977a5 upstream.
+
+The OProfile perf backend uses a static array to keep track of the
+perf events on the system. When compiling with CONFIG_CPUMASK_OFFSTACK=y
+&& SMP, nr_cpumask_bits is not a compile-time constant and the build
+will fail with:
+
+oprofile_perf.c:28: error: variably modified 'perf_events' at file scope
+
+This patch uses NR_CPUs instead of nr_cpumask_bits for the array
+initialisation. If this causes space problems in the future, we can
+always move to dynamic allocation for the events array.
+
+Cc: Matt Fleming <matt@console-pimps.org>
+Reported-by: Russell King - ARM Linux <linux@arm.linux.org.uk>
+Signed-off-by: Will Deacon <will.deacon@arm.com>
+Signed-off-by: Robert Richter <robert.richter@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/oprofile/oprofile_perf.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/oprofile/oprofile_perf.c
++++ b/drivers/oprofile/oprofile_perf.c
+@@ -25,7 +25,7 @@ static int oprofile_perf_enabled;
+ static DEFINE_MUTEX(oprofile_perf_mutex);
+
+ static struct op_counter_config *counter_config;
+-static struct perf_event **perf_events[nr_cpumask_bits];
++static struct perf_event **perf_events[NR_CPUS];
+ static int num_counters;
+
+ /*
--- /dev/null
+From f63d7dabd5da9ef41f28f6d69b29bc084db0ca5a Mon Sep 17 00:00:00 2001
+From: Larry Finger <Larry.Finger@lwfinger.net>
+Date: Mon, 25 Jun 2012 18:01:12 -0500
+Subject: rtlwifi: rtl8192cu: New USB IDs
+
+From: Larry Finger <Larry.Finger@lwfinger.net>
+
+commit f63d7dabd5da9ef41f28f6d69b29bc084db0ca5a upstream.
+
+The latest Realtek driver for the RTL8188CU and RTL8192CU chips adds three
+new USB IDs.
+
+Reported-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
+Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/rtlwifi/rtl8192cu/sw.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
++++ b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
+@@ -301,9 +301,11 @@ static struct usb_device_id rtl8192c_usb
+ {RTL_USB_DEVICE(0x07b8, 0x8188, rtl92cu_hal_cfg)}, /*Abocom - Abocom*/
+ {RTL_USB_DEVICE(0x07b8, 0x8189, rtl92cu_hal_cfg)}, /*Funai - Abocom*/
+ {RTL_USB_DEVICE(0x0846, 0x9041, rtl92cu_hal_cfg)}, /*NetGear WNA1000M*/
++ {RTL_USB_DEVICE(0x0bda, 0x5088, rtl92cu_hal_cfg)}, /*Thinkware-CC&C*/
+ {RTL_USB_DEVICE(0x0df6, 0x0052, rtl92cu_hal_cfg)}, /*Sitecom - Edimax*/
+ {RTL_USB_DEVICE(0x0df6, 0x005c, rtl92cu_hal_cfg)}, /*Sitecom - Edimax*/
+ {RTL_USB_DEVICE(0x0eb0, 0x9071, rtl92cu_hal_cfg)}, /*NO Brand - Etop*/
++ {RTL_USB_DEVICE(0x4856, 0x0091, rtl92cu_hal_cfg)}, /*NetweeN - Feixun*/
+ /* HP - Lite-On ,8188CUS Slim Combo */
+ {RTL_USB_DEVICE(0x103c, 0x1629, rtl92cu_hal_cfg)},
+ {RTL_USB_DEVICE(0x13d3, 0x3357, rtl92cu_hal_cfg)}, /* AzureWave */
+@@ -345,6 +347,7 @@ static struct usb_device_id rtl8192c_usb
+ {RTL_USB_DEVICE(0x07b8, 0x8178, rtl92cu_hal_cfg)}, /*Funai -Abocom*/
+ {RTL_USB_DEVICE(0x0846, 0x9021, rtl92cu_hal_cfg)}, /*Netgear-Sercomm*/
+ {RTL_USB_DEVICE(0x0b05, 0x17ab, rtl92cu_hal_cfg)}, /*ASUS-Edimax*/
++ {RTL_USB_DEVICE(0x0bda, 0x8186, rtl92cu_hal_cfg)}, /*Realtek 92CE-VAU*/
+ {RTL_USB_DEVICE(0x0df6, 0x0061, rtl92cu_hal_cfg)}, /*Sitecom-Edimax*/
+ {RTL_USB_DEVICE(0x0e66, 0x0019, rtl92cu_hal_cfg)}, /*Hawking-Edimax*/
+ {RTL_USB_DEVICE(0x2001, 0x3307, rtl92cu_hal_cfg)}, /*D-Link-Cameo*/
--- /dev/null
+From 6a0bdffa0073857870a4ed1b4489762146359eb4 Mon Sep 17 00:00:00 2001
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Wed, 20 Jun 2012 16:04:19 -0400
+Subject: SCSI & usb-storage: add try_rc_10_first flag
+
+From: Alan Stern <stern@rowland.harvard.edu>
+
+commit 6a0bdffa0073857870a4ed1b4489762146359eb4 upstream.
+
+Several bug reports have been received recently for USB mass-storage
+devices that don't handle READ CAPACITY(16) commands properly. They
+report bogus sizes, in some cases becoming unusable as a result.
+
+The bugs were triggered by commit
+09b6b51b0b6c1b9bb61815baf205e4d74c89ff04 (SCSI & usb-storage: add
+flags for VPD pages and REPORT LUNS), which caused usb-storage to stop
+overriding the SCSI level reported by devices. By default, the sd
+driver will try READ CAPACITY(16) first for any device whose level is
+above SCSI_SPC_2.
+
+It seems likely that any device large enough to require the use of
+READ CAPACITY(16) (i.e., 2 TB or more) would be able to handle READ
+CAPACITY(10) commands properly. Indeed, I don't know of any devices
+that don't handle READ CAPACITY(10) properly.
+
+Therefore this patch (as1559) adds a new flag telling the sd driver
+to try READ CAPACITY(10) before READ CAPACITY(16), and sets this flag
+for every USB mass-storage device. If a device really is larger than
+2 TB, sd will fall back to READ CAPACITY(16) just as it used to.
+
+This fixes Bugzilla #43391.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Acked-by: Hans de Goede <hdegoede@redhat.com>
+CC: "James E.J. Bottomley" <JBottomley@parallels.com>
+CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/scsi/sd.c | 2 ++
+ drivers/usb/storage/scsiglue.c | 6 ++++++
+ include/scsi/scsi_device.h | 1 +
+ 3 files changed, 9 insertions(+)
+
+--- a/drivers/scsi/sd.c
++++ b/drivers/scsi/sd.c
+@@ -1898,6 +1898,8 @@ static int sd_try_rc16_first(struct scsi
+ {
+ if (sdp->host->max_cmd_len < 16)
+ return 0;
++ if (sdp->try_rc_10_first)
++ return 0;
+ if (sdp->scsi_level > SCSI_SPC_2)
+ return 1;
+ if (scsi_device_protection(sdp))
+--- a/drivers/usb/storage/scsiglue.c
++++ b/drivers/usb/storage/scsiglue.c
+@@ -202,6 +202,12 @@ static int slave_configure(struct scsi_d
+ if (us->fflags & US_FL_NO_READ_CAPACITY_16)
+ sdev->no_read_capacity_16 = 1;
+
++ /*
++ * Many devices do not respond properly to READ_CAPACITY_16.
++ * Tell the SCSI layer to try READ_CAPACITY_10 first.
++ */
++ sdev->try_rc_10_first = 1;
++
+ /* assume SPC3 or latter devices support sense size > 18 */
+ if (sdev->scsi_level > SCSI_SPC_2)
+ us->fflags |= US_FL_SANE_SENSE;
+--- a/include/scsi/scsi_device.h
++++ b/include/scsi/scsi_device.h
+@@ -151,6 +151,7 @@ struct scsi_device {
+ SD_LAST_BUGGY_SECTORS */
+ unsigned no_read_disc_info:1; /* Avoid READ_DISC_INFO cmds */
+ unsigned no_read_capacity_16:1; /* Avoid READ_CAPACITY_16 cmds */
++ unsigned try_rc_10_first:1; /* Try READ_CAPACACITY_10 first */
+ unsigned is_visible:1; /* is the device visible in sysfs */
+
+ DECLARE_BITMAP(supported_events, SDEV_EVT_MAXBITS); /* supported events */
pm-sleep-prevent-waiting-forever-on-asynchronous-suspend-after-abort.patch
dmaengine-pl330-dont-complete-descriptor-for-cyclic-dma.patch
nfs-force-the-legacy-idmapper-to-be-single-threaded.patch
+clk-allow-late-cache-allocation-for-clk-parents.patch
+clk-fix-parent-validation-in-__clk_set_parent.patch
+gpiolib-wm8994-pay-attention-to-the-value-set-when-enabling-as-output.patch
+usb-option-add-id-for-cellient-men-200.patch
+usb-option-add-usb-id-for-novatel-ovation-mc551.patch
+usb-cp210x-add-10-device-ids.patch
+scsi-usb-storage-add-try_rc_10_first-flag.patch
+usb-storage-revert-commit-afff07e61a52-add-090c-1000-to-unusal-devs.patch
+cfg80211-fix-potential-deadlock-in-regulatory.patch
+batman-adv-fix-skb-data-assignment.patch
+batman-adv-only-drop-packets-of-known-wifi-clients.patch
+ixgbe-do-not-pad-fcoe-frames-as-this-can-cause-issues-with.patch
+can-c_can-precedence-error-in-c_can_chip_config.patch
+can-flexcan-use-be32_to_cpup-to-handle-the-value-of-dt-entry.patch
+usb-qmi_wwan-make-forced-int-4-whitelist-generic.patch
+usb-qmi_wwan-add-zte-vodafone-k3520-z.patch
+net-qmi_wwan-fix-gobi-device-probing.patch
+net-qmi_wwan-fix-oops-while-disconnecting.patch
+oprofile-perf-use-nr_cpus-instead-or-nr_cpumask_bits-for-static-array.patch
+x86-compat-use-test_thread_flag-tif_ia32-in-compat-signal-delivery.patch
+x86-cpufeature-rename-x86_feature_dts-to-x86_feature_dtherm.patch
+igbvf-fix-divide-by-zero.patch
+rtlwifi-rtl8192cu-new-usb-ids.patch
+mac80211-clear-ifmgd-bssid-only-after-building-delba.patch
+mac80211-correct-behaviour-on-unrecognised-action-frames.patch
+mwifiex-fix-11n-rx-packet-drop-issue.patch
+mwifiex-fix-wps-eapol-handshake-failure.patch
+vfs-make-o_path-file-descriptors-usable-for-fchdir.patch
+mtd-cafe_nand-fix-an-vs-mistake.patch
+aio-make-kiocb-private-null-in-init_sync_kiocb.patch
+ocfs2-clear-unaligned-io-flag-when-dio-fails.patch
+iwlwifi-fix-activating-inactive-stations.patch
--- /dev/null
+From 3fcc8f96829776cf181918461923d1e3bbb831a2 Mon Sep 17 00:00:00 2001
+From: Craig Shelley <craig@microtron.org.uk>
+Date: Tue, 26 Jun 2012 23:20:04 +0100
+Subject: USB: CP210x Add 10 Device IDs
+
+From: Craig Shelley <craig@microtron.org.uk>
+
+commit 3fcc8f96829776cf181918461923d1e3bbb831a2 upstream.
+
+This patch adds 10 device IDs for CP210x based devices from the following manufacturers:
+Timewave
+Clipsal
+Festo
+Link Instruments
+
+Signed-off-by: Craig Shelley <craig@microtron.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/cp210x.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+--- a/drivers/usb/serial/cp210x.c
++++ b/drivers/usb/serial/cp210x.c
+@@ -93,6 +93,7 @@ static const struct usb_device_id id_tab
+ { USB_DEVICE(0x10C4, 0x814B) }, /* West Mountain Radio RIGtalk */
+ { USB_DEVICE(0x10C4, 0x8156) }, /* B&G H3000 link cable */
+ { USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */
++ { USB_DEVICE(0x10C4, 0x815F) }, /* Timewave HamLinkUSB */
+ { USB_DEVICE(0x10C4, 0x818B) }, /* AVIT Research USB to TTL */
+ { USB_DEVICE(0x10C4, 0x819F) }, /* MJS USB Toslink Switcher */
+ { USB_DEVICE(0x10C4, 0x81A6) }, /* ThinkOptics WavIt */
+@@ -134,7 +135,13 @@ static const struct usb_device_id id_tab
+ { USB_DEVICE(0x10CE, 0xEA6A) }, /* Silicon Labs MobiData GPRS USB Modem 100EU */
+ { USB_DEVICE(0x13AD, 0x9999) }, /* Baltech card reader */
+ { USB_DEVICE(0x1555, 0x0004) }, /* Owen AC4 USB-RS485 Converter */
++ { USB_DEVICE(0x166A, 0x0201) }, /* Clipsal 5500PACA C-Bus Pascal Automation Controller */
++ { USB_DEVICE(0x166A, 0x0301) }, /* Clipsal 5800PC C-Bus Wireless PC Interface */
+ { USB_DEVICE(0x166A, 0x0303) }, /* Clipsal 5500PCU C-Bus USB interface */
++ { USB_DEVICE(0x166A, 0x0304) }, /* Clipsal 5000CT2 C-Bus Black and White Touchscreen */
++ { USB_DEVICE(0x166A, 0x0305) }, /* Clipsal C-5000CT2 C-Bus Spectrum Colour Touchscreen */
++ { USB_DEVICE(0x166A, 0x0401) }, /* Clipsal L51xx C-Bus Architectural Dimmer */
++ { USB_DEVICE(0x166A, 0x0101) }, /* Clipsal 5560884 C-Bus Multi-room Audio Matrix Switcher */
+ { USB_DEVICE(0x16D6, 0x0001) }, /* Jablotron serial interface */
+ { USB_DEVICE(0x16DC, 0x0010) }, /* W-IE-NE-R Plein & Baus GmbH PL512 Power Supply */
+ { USB_DEVICE(0x16DC, 0x0011) }, /* W-IE-NE-R Plein & Baus GmbH RCM Remote Control for MARATON Power Supply */
+@@ -146,7 +153,11 @@ static const struct usb_device_id id_tab
+ { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */
+ { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */
+ { USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */
++ { USB_DEVICE(0x1E29, 0x0102) }, /* Festo CPX-USB */
++ { USB_DEVICE(0x1E29, 0x0501) }, /* Festo CMSP */
+ { USB_DEVICE(0x3195, 0xF190) }, /* Link Instruments MSO-19 */
++ { USB_DEVICE(0x3195, 0xF280) }, /* Link Instruments MSO-28 */
++ { USB_DEVICE(0x3195, 0xF281) }, /* Link Instruments MSO-28 */
+ { USB_DEVICE(0x413C, 0x9500) }, /* DW700 GPS USB interface */
+ { } /* Terminating Entry */
+ };
--- /dev/null
+From 1e2c4e59d2b8797973471b4a287a43eac12a0f40 Mon Sep 17 00:00:00 2001
+From: Dmitry Shmygov <shmygov@rambler.ru>
+Date: Wed, 20 Jun 2012 15:51:40 +0400
+Subject: USB: option: add id for Cellient MEN-200
+
+From: Dmitry Shmygov <shmygov@rambler.ru>
+
+commit 1e2c4e59d2b8797973471b4a287a43eac12a0f40 upstream.
+
+Add vendor and product ID to option.c driver
+for Cellient MEN-200 EVDO Rev.B 450MHz data module.
+http://cellient.com
+
+Signed-off-by: Dmitry Shmygov <shmygov@rambler.ru>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/option.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -497,6 +497,10 @@ static void option_instat_callback(struc
+ /* MediaTek products */
+ #define MEDIATEK_VENDOR_ID 0x0e8d
+
++/* Cellient products */
++#define CELLIENT_VENDOR_ID 0x2692
++#define CELLIENT_PRODUCT_MEN200 0x9005
++
+ /* some devices interfaces need special handling due to a number of reasons */
+ enum option_blacklist_reason {
+ OPTION_BLACKLIST_NONE = 0,
+@@ -1233,6 +1237,7 @@ static const struct usb_device_id option
+ { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, 0x00a1, 0xff, 0x02, 0x01) },
+ { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, 0x00a2, 0xff, 0x00, 0x00) },
+ { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, 0x00a2, 0xff, 0x02, 0x01) }, /* MediaTek MT6276M modem & app port */
++ { USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MEN200) },
+ { } /* Terminating entry */
+ };
+ MODULE_DEVICE_TABLE(usb, option_ids);
--- /dev/null
+From 065b07e7a14676f4138ce4619d229c0be5a74230 Mon Sep 17 00:00:00 2001
+From: Forest Bond <forest.bond@rapidrollout.com>
+Date: Fri, 22 Jun 2012 10:30:38 -0400
+Subject: USB: option: Add USB ID for Novatel Ovation MC551
+
+From: Forest Bond <forest.bond@rapidrollout.com>
+
+commit 065b07e7a14676f4138ce4619d229c0be5a74230 upstream.
+
+This device is also known as the Verizon USB551L.
+
+Signed-off-by: Forest Bond <forest.bond@rapidrollout.com>
+Acked-by: Dan Williams <dcbw@redhat.com>
+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
+@@ -236,6 +236,7 @@ static void option_instat_callback(struc
+ #define NOVATELWIRELESS_PRODUCT_G1 0xA001
+ #define NOVATELWIRELESS_PRODUCT_G1_M 0xA002
+ #define NOVATELWIRELESS_PRODUCT_G2 0xA010
++#define NOVATELWIRELESS_PRODUCT_MC551 0xB001
+
+ /* AMOI PRODUCTS */
+ #define AMOI_VENDOR_ID 0x1614
+@@ -738,6 +739,8 @@ static const struct usb_device_id option
+ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_G1) },
+ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_G1_M) },
+ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_G2) },
++ /* Novatel Ovation MC551 a.k.a. Verizon USB551L */
++ { USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC551, 0xff, 0xff, 0xff) },
+
+ { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01) },
+ { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01A) },
--- /dev/null
+From f7142e6c226076fd40c2ebaad9fb0c9a631b790e Mon Sep 17 00:00:00 2001
+From: "Andrew Bird (Sphere Systems)" <ajb@spheresystems.co.uk>
+Date: Sat, 19 May 2012 22:28:38 +0000
+Subject: USB: qmi_wwan: Add ZTE (Vodafone) K3520-Z
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: "Andrew Bird (Sphere Systems)" <ajb@spheresystems.co.uk>
+
+commit f7142e6c226076fd40c2ebaad9fb0c9a631b790e upstream.
+
+Signed-off-by: Andrew Bird <ajb@spheresystems.co.uk>
+Acked-by: Bjørn Mork <bjorn@mork.no>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/usb/qmi_wwan.c | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+--- a/drivers/net/usb/qmi_wwan.c
++++ b/drivers/net/usb/qmi_wwan.c
+@@ -356,6 +356,15 @@ static const struct driver_info qmi_wwan
+ };
+
+ /* ZTE suck at making USB descriptors */
++static const struct driver_info qmi_wwan_force_int1 = {
++ .description = "Qualcomm WWAN/QMI device",
++ .flags = FLAG_WWAN,
++ .bind = qmi_wwan_bind_shared,
++ .unbind = qmi_wwan_unbind_shared,
++ .manage_power = qmi_wwan_manage_power,
++ .data = BIT(1), /* interface whitelist bitmap */
++};
++
+ static const struct driver_info qmi_wwan_force_int4 = {
+ .description = "Qualcomm WWAN/QMI device",
+ .flags = FLAG_WWAN,
+@@ -430,6 +439,15 @@ static const struct usb_device_id produc
+ .bInterfaceProtocol = 0xff,
+ .driver_info = (unsigned long)&qmi_wwan_force_int4,
+ },
++ { /* ZTE (Vodafone) K3520-Z */
++ .match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO,
++ .idVendor = 0x19d2,
++ .idProduct = 0x0055,
++ .bInterfaceClass = 0xff,
++ .bInterfaceSubClass = 0xff,
++ .bInterfaceProtocol = 0xff,
++ .driver_info = (unsigned long)&qmi_wwan_force_int1,
++ },
+ { /* ZTE (Vodafone) K3565-Z */
+ .match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x19d2,
--- /dev/null
+From 00001880cd8faaa349fe2ebb158f7e0cd8026048 Mon Sep 17 00:00:00 2001
+From: "Andrew Bird (Sphere Systems)" <ajb@spheresystems.co.uk>
+Date: Sat, 19 May 2012 22:28:36 +0000
+Subject: USB: qmi_wwan: Make forced int 4 whitelist generic
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: "Andrew Bird (Sphere Systems)" <ajb@spheresystems.co.uk>
+
+commit 00001880cd8faaa349fe2ebb158f7e0cd8026048 upstream.
+
+Change the forced interface 4 whitelist to use the generic shared
+binder instead of the Gobi specific one. Certain ZTE devices
+(K3520-Z & K3765-Z) don't work with the Gobi version, but function
+quite happily with the generic. This has been tested with the following
+devices:
+K3520-Z
+K3565-Z
+K3765-Z
+K4505-Z
+It hasn't been tested with the ZTE MF820D, which is the only other
+device that uses this whitelist at present. Although Bjorn doesn't
+expect any problems, any testing with that device would be appreciated.
+
+Signed-off-by: Andrew Bird <ajb@spheresystems.co.uk>
+Acked-by: Bjørn Mork <bjorn@mork.no>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/usb/qmi_wwan.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/usb/qmi_wwan.c
++++ b/drivers/net/usb/qmi_wwan.c
+@@ -357,9 +357,9 @@ static const struct driver_info qmi_wwan
+
+ /* ZTE suck at making USB descriptors */
+ static const struct driver_info qmi_wwan_force_int4 = {
+- .description = "Qualcomm Gobi wwan/QMI device",
++ .description = "Qualcomm WWAN/QMI device",
+ .flags = FLAG_WWAN,
+- .bind = qmi_wwan_bind_gobi,
++ .bind = qmi_wwan_bind_shared,
+ .unbind = qmi_wwan_unbind_shared,
+ .manage_power = qmi_wwan_manage_power,
+ .data = BIT(4), /* interface whitelist bitmap */
--- /dev/null
+From 0070513b5e005161a7a7fd9a3f48f982b41eb094 Mon Sep 17 00:00:00 2001
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Wed, 20 Jun 2012 16:04:30 -0400
+Subject: usb-storage: revert commit afff07e61a52 (Add 090c:1000 to unusal-devs)
+
+From: Alan Stern <stern@rowland.harvard.edu>
+
+commit 0070513b5e005161a7a7fd9a3f48f982b41eb094 upstream.
+
+This patch (as1560) reverts commit
+afff07e61a5243e14ee3f0a272a0380cd744a8a3 (usb-storage: Add 090c:1000
+to unusal-devs). It is no longer needed, because usb-storage now
+tells the sd driver to try READ CAPACITY(10) before READ CAPACITY(16)
+for every USB mass-storage device.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Acked-by: Hans de Goede <hdegoede@redhat.com>
+CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/storage/unusual_devs.h | 7 -------
+ 1 file changed, 7 deletions(-)
+
+--- a/drivers/usb/storage/unusual_devs.h
++++ b/drivers/usb/storage/unusual_devs.h
+@@ -1107,13 +1107,6 @@ UNUSUAL_DEV( 0x090a, 0x1200, 0x0000, 0x9
+ USB_SC_RBC, USB_PR_BULK, NULL,
+ 0 ),
+
+-/* Feiya QDI U2 DISK, reported by Hans de Goede <hdegoede@redhat.com> */
+-UNUSUAL_DEV( 0x090c, 0x1000, 0x0000, 0xffff,
+- "Feiya",
+- "QDI U2 DISK",
+- USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+- US_FL_NO_READ_CAPACITY_16 ),
+-
+ /* aeb */
+ UNUSUAL_DEV( 0x090c, 0x1132, 0x0000, 0xffff,
+ "Feiya",
--- /dev/null
+From 332a2e1244bd08b9e3ecd378028513396a004a24 Mon Sep 17 00:00:00 2001
+From: Linus Torvalds <torvalds@linux-foundation.org>
+Date: Sat, 7 Jul 2012 10:17:00 -0700
+Subject: vfs: make O_PATH file descriptors usable for 'fchdir()'
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Linus Torvalds <torvalds@linux-foundation.org>
+
+commit 332a2e1244bd08b9e3ecd378028513396a004a24 upstream.
+
+We already use them for openat() and friends, but fchdir() also wants to
+be able to use O_PATH file descriptors. This should make it comparable
+to the O_SEARCH of Solaris. In particular, O_PATH allows you to access
+(not-quite-open) a directory you don't have read persmission to, only
+execute permission.
+
+Noticed during development of multithread support for ksh93.
+
+Reported-by: ольга крыжановская <olga.kryzhanovska@gmail.com>
+Cc: Al Viro <viro@zeniv.linux.org.uk>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/open.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/fs/open.c
++++ b/fs/open.c
+@@ -396,10 +396,10 @@ SYSCALL_DEFINE1(fchdir, unsigned int, fd
+ {
+ struct file *file;
+ struct inode *inode;
+- int error;
++ int error, fput_needed;
+
+ error = -EBADF;
+- file = fget(fd);
++ file = fget_raw_light(fd, &fput_needed);
+ if (!file)
+ goto out;
+
+@@ -413,7 +413,7 @@ SYSCALL_DEFINE1(fchdir, unsigned int, fd
+ if (!error)
+ set_fs_pwd(current->fs, &file->f_path);
+ out_putf:
+- fput(file);
++ fput_light(file, fput_needed);
+ out:
+ return error;
+ }
--- /dev/null
+From 0b91f45b23cb73ce11acdc3cf4c6efd4441e3b3e Mon Sep 17 00:00:00 2001
+From: Suresh Siddha <suresh.b.siddha@intel.com>
+Date: Thu, 14 Jun 2012 18:07:15 -0700
+Subject: x86, compat: Use test_thread_flag(TIF_IA32) in compat signal delivery
+
+From: Suresh Siddha <suresh.b.siddha@intel.com>
+
+commit 0b91f45b23cb73ce11acdc3cf4c6efd4441e3b3e upstream.
+
+Signal delivery compat path may not have the 'TS_COMPAT' flag (that
+flag indicates how we entered the kernel). So use
+test_thread_flag(TIF_IA32) instead of is_ia32_task(): one of the
+functions of TIF_IA32 is just what kind of signal frame we want.
+
+Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
+Link: http://lkml.kernel.org/r/1339722435.3475.57.camel@sbsiddha-desk.sc.intel.com
+Signed-off-by: H. Peter Anvin <hpa@zytor.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/ia32/ia32_signal.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/x86/ia32/ia32_signal.c
++++ b/arch/x86/ia32/ia32_signal.c
+@@ -38,7 +38,7 @@
+ int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from)
+ {
+ int err = 0;
+- bool ia32 = is_ia32_task();
++ bool ia32 = test_thread_flag(TIF_IA32);
+
+ if (!access_ok(VERIFY_WRITE, to, sizeof(compat_siginfo_t)))
+ return -EFAULT;
--- /dev/null
+From 4ad33411308596f2f918603509729922a1ec4411 Mon Sep 17 00:00:00 2001
+From: "H. Peter Anvin" <hpa@linux.intel.com>
+Date: Fri, 22 Jun 2012 10:58:06 -0700
+Subject: x86, cpufeature: Rename X86_FEATURE_DTS to X86_FEATURE_DTHERM
+
+From: "H. Peter Anvin" <hpa@linux.intel.com>
+
+commit 4ad33411308596f2f918603509729922a1ec4411 upstream.
+
+It makes sense to label "Digital Thermal Sensor" as "DTS", but
+unfortunately the string "dts" was already used for "Debug Store", and
+/proc/cpuinfo is a user space ABI.
+
+Therefore, rename this to "dtherm".
+
+This conflict went into mainline via the hwmon tree without any x86
+maintainer ack, and without any kind of hint in the subject.
+
+ a4659053 x86/hwmon: fix initialization of coretemp
+
+Reported-by: Jean Delvare <khali@linux-fr.org>
+Link: http://lkml.kernel.org/r/4FE34BCB.5050305@linux.intel.com
+Cc: Jan Beulich <JBeulich@suse.com>
+Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/include/asm/cpufeature.h | 2 +-
+ arch/x86/kernel/cpu/scattered.c | 2 +-
+ drivers/hwmon/coretemp.c | 4 ++--
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+--- a/arch/x86/include/asm/cpufeature.h
++++ b/arch/x86/include/asm/cpufeature.h
+@@ -176,7 +176,7 @@
+ #define X86_FEATURE_XSAVEOPT (7*32+ 4) /* Optimized Xsave */
+ #define X86_FEATURE_PLN (7*32+ 5) /* Intel Power Limit Notification */
+ #define X86_FEATURE_PTS (7*32+ 6) /* Intel Package Thermal Status */
+-#define X86_FEATURE_DTS (7*32+ 7) /* Digital Thermal Sensor */
++#define X86_FEATURE_DTHERM (7*32+ 7) /* Digital Thermal Sensor */
+ #define X86_FEATURE_HW_PSTATE (7*32+ 8) /* AMD HW-PState */
+
+ /* Virtualization flags: Linux defined, word 8 */
+--- a/arch/x86/kernel/cpu/scattered.c
++++ b/arch/x86/kernel/cpu/scattered.c
+@@ -31,7 +31,7 @@ void __cpuinit init_scattered_cpuid_feat
+ const struct cpuid_bit *cb;
+
+ static const struct cpuid_bit __cpuinitconst cpuid_bits[] = {
+- { X86_FEATURE_DTS, CR_EAX, 0, 0x00000006, 0 },
++ { X86_FEATURE_DTHERM, CR_EAX, 0, 0x00000006, 0 },
+ { X86_FEATURE_IDA, CR_EAX, 1, 0x00000006, 0 },
+ { X86_FEATURE_ARAT, CR_EAX, 2, 0x00000006, 0 },
+ { X86_FEATURE_PLN, CR_EAX, 4, 0x00000006, 0 },
+--- a/drivers/hwmon/coretemp.c
++++ b/drivers/hwmon/coretemp.c
+@@ -664,7 +664,7 @@ static void __cpuinit get_core_online(un
+ * sensors. We check this bit only, all the early CPUs
+ * without thermal sensors will be filtered out.
+ */
+- if (!cpu_has(c, X86_FEATURE_DTS))
++ if (!cpu_has(c, X86_FEATURE_DTHERM))
+ return;
+
+ if (!pdev) {
+@@ -765,7 +765,7 @@ static struct notifier_block coretemp_cp
+ };
+
+ static const struct x86_cpu_id coretemp_ids[] = {
+- { X86_VENDOR_INTEL, X86_FAMILY_ANY, X86_MODEL_ANY, X86_FEATURE_DTS },
++ { X86_VENDOR_INTEL, X86_FAMILY_ANY, X86_MODEL_ANY, X86_FEATURE_DTHERM },
+ {}
+ };
+ MODULE_DEVICE_TABLE(x86cpu, coretemp_ids);