--- /dev/null
+From Vineet.Gupta1@synopsys.com Thu Aug 22 15:32:58 2013
+From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
+Date: Tue, 20 Aug 2013 13:38:10 +0530
+Subject: ARC: gdbserver breakage in Big-Endian configuration #1
+To: <stable@vger.kernel.org>
+Cc: <gregkh@linuxfoundation.org>, <noamc@ezchip.com>, <Anton.Kolesov@synopsys.com>, <linux-kernel@vger.kernel.org>, Vineet Gupta <Vineet.Gupta1@synopsys.com>
+Message-ID: <1376986091-30241-2-git-send-email-vgupta@synopsys.com>
+
+From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
+
+[Based on mainline commit 502a0c775c7f0a: "ARC: pt_regs update #5"]
+
+gdbserver needs @stop_pc, served by ptrace, but fetched from pt_regs
+differently, based on in_brkpt_traps(), which in turn relies on
+additional machine state in pt_regs->event bitfield.
+
+ unsigned long orig_r8:16, event:16;
+
+For big endian config, this macro was returning false, despite being in
+breakpoint Trap exception, causing wrong @stop_pc to be returned to gdb.
+
+Issue #1: In BE, @event above is at offset 2 in word, while a STW insn
+ at offset 0 was used to update it. Resort to using ST insn
+ which updates the half-word at right location.
+
+Issue #2: The union involving bitfields causes all the members to be
+ laid out at offset 0. So with fix #1 above, ASM was now
+ updating at offset 2, "C" code was still referencing at
+ offset 0. Fixed by wrapping bitfield in a struct.
+
+Reported-by: Noam Camus <noamc@ezchip.com>
+Tested-by: Anton Kolesov <akolesov@synopsys.com>
+Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arc/include/asm/ptrace.h | 2 ++
+ arch/arc/kernel/entry.S | 4 ++--
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+--- a/arch/arc/include/asm/ptrace.h
++++ b/arch/arc/include/asm/ptrace.h
+@@ -52,12 +52,14 @@ struct pt_regs {
+
+ /*to distinguish bet excp, syscall, irq */
+ union {
++ struct {
+ #ifdef CONFIG_CPU_BIG_ENDIAN
+ /* so that assembly code is same for LE/BE */
+ unsigned long orig_r8:16, event:16;
+ #else
+ unsigned long event:16, orig_r8:16;
+ #endif
++ };
+ long orig_r8_word;
+ };
+ };
+--- a/arch/arc/kernel/entry.S
++++ b/arch/arc/kernel/entry.S
+@@ -498,7 +498,7 @@ tracesys_exit:
+ trap_with_param:
+
+ ; stop_pc info by gdb needs this info
+- stw orig_r8_IS_BRKPT, [sp, PT_orig_r8]
++ st orig_r8_IS_BRKPT, [sp, PT_orig_r8]
+
+ mov r0, r12
+ lr r1, [efa]
+@@ -723,7 +723,7 @@ not_exception:
+ ; things to what they were, before returning from L2 context
+ ;----------------------------------------------------------------
+
+- ldw r9, [sp, PT_orig_r8] ; get orig_r8 to make sure it is
++ ld r9, [sp, PT_orig_r8] ; get orig_r8 to make sure it is
+ brne r9, orig_r8_IS_IRQ2, 149f ; infact a L2 ISR ret path
+
+ ld r9, [sp, PT_status32] ; get statu32_l2 (saved in pt_regs)
--- /dev/null
+From Vineet.Gupta1@synopsys.com Thu Aug 22 15:33:34 2013
+From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
+Date: Tue, 20 Aug 2013 13:38:11 +0530
+Subject: ARC: gdbserver breakage in Big-Endian configuration #2
+To: <stable@vger.kernel.org>
+Cc: <gregkh@linuxfoundation.org>, <noamc@ezchip.com>, <Anton.Kolesov@synopsys.com>, <linux-kernel@vger.kernel.org>, Vineet Gupta <Vineet.Gupta1@synopsys.com>
+Message-ID: <1376986091-30241-3-git-send-email-vgupta@synopsys.com>
+
+From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
+
+[Based on mainline commit 352c1d95e3220d0: "ARC: stop using
+pt_regs->orig_r8"]
+
+Stop using orig_r8 as it could get clobbered by ST in trap_with_param,
+and further it is semantically not needed either.
+
+Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arc/include/asm/syscall.h | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+--- a/arch/arc/include/asm/syscall.h
++++ b/arch/arc/include/asm/syscall.h
+@@ -18,7 +18,7 @@ static inline long
+ syscall_get_nr(struct task_struct *task, struct pt_regs *regs)
+ {
+ if (user_mode(regs) && in_syscall(regs))
+- return regs->orig_r8;
++ return regs->r8;
+ else
+ return -1;
+ }
+@@ -26,8 +26,7 @@ syscall_get_nr(struct task_struct *task,
+ static inline void
+ syscall_rollback(struct task_struct *task, struct pt_regs *regs)
+ {
+- /* XXX: I can't fathom how pt_regs->r8 will be clobbered ? */
+- regs->r8 = regs->orig_r8;
++ regs->r0 = regs->orig_r0;
+ }
+
+ static inline long
--- /dev/null
+From 23fb05c688a8dcb0cf6a4d8d819cffeca82e5c54 Mon Sep 17 00:00:00 2001
+From: Nicolas Ferre <nicolas.ferre@atmel.com>
+Date: Thu, 18 Apr 2013 10:13:21 +0200
+Subject: ARM: at91: at91sam9x5 RTC is not compatible with at91rm9200
+ one
+
+From: Nicolas Ferre <nicolas.ferre@atmel.com>
+
+commit 23fb05c688a8dcb0cf6a4d8d819cffeca82e5c54 upstream.
+
+Due to a bug with RTC IMR, we cannot consider at91sam9x5 RTC compatible
+with the previous one. Modify DT compatibility string, even if the driver
+is not yet modified to take it into account.
+
+Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/at91sam9x5.dtsi | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm/boot/dts/at91sam9x5.dtsi
++++ b/arch/arm/boot/dts/at91sam9x5.dtsi
+@@ -643,7 +643,7 @@
+ };
+
+ rtc@fffffeb0 {
+- compatible = "atmel,at91rm9200-rtc";
++ compatible = "atmel,at91sam9x5-rtc";
+ reg = <0xfffffeb0 0x40>;
+ interrupts = <1 4 7>;
+ status = "disabled";
--- /dev/null
+From 86a91ec757338edbce51de5dabd7afb0366f485c Mon Sep 17 00:00:00 2001
+From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
+Date: Sun, 26 May 2013 20:47:53 +0300
+Subject: iwlwifi: mvm: correctly configure MCAST in AP mode
+
+From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
+
+commit 86a91ec757338edbce51de5dabd7afb0366f485c upstream.
+
+The AP mode needs to use the MCAST fifo for the MCAST
+frames sent after the DTIM. This fifo needs to be
+configured with the same parameters as the VOICE FIFO.
+
+A separate SCD queue is mapped to this fifo - the cab_queue
+(cab stands for Content After Beacon). This queue isn't
+connected to any station, but rather to the MAC context.
+This queue should (and is already) be set as the MCAST
+queue - this is part of the of MAC context command.
+
+Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
+Reviewed-by: Ilan Peer <ilan.peer@intel.com>
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/iwlwifi/mvm/fw-api-mac.h | 8 +++++++-
+ drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c | 6 +++++-
+ drivers/net/wireless/iwlwifi/mvm/mvm.h | 1 +
+ 3 files changed, 13 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/wireless/iwlwifi/mvm/fw-api-mac.h
++++ b/drivers/net/wireless/iwlwifi/mvm/fw-api-mac.h
+@@ -71,7 +71,13 @@
+ #define MAC_INDEX_MIN_DRIVER 0
+ #define NUM_MAC_INDEX_DRIVER MAC_INDEX_AUX
+
+-#define AC_NUM 4 /* Number of access categories */
++enum iwl_ac {
++ AC_BK,
++ AC_BE,
++ AC_VI,
++ AC_VO,
++ AC_NUM,
++};
+
+ /**
+ * enum iwl_mac_protection_flags - MAC context flags
+--- a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
++++ b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
+@@ -362,7 +362,7 @@ int iwl_mvm_mac_ctxt_init(struct iwl_mvm
+ break;
+ case NL80211_IFTYPE_AP:
+ iwl_trans_ac_txq_enable(mvm->trans, vif->cab_queue,
+- IWL_MVM_TX_FIFO_VO);
++ IWL_MVM_TX_FIFO_MCAST);
+ /* fall through */
+ default:
+ for (ac = 0; ac < IEEE80211_NUM_ACS; ac++)
+@@ -550,6 +550,10 @@ static void iwl_mvm_mac_ctxt_cmd_common(
+ cmd->ac[i].fifos_mask = BIT(iwl_mvm_ac_to_tx_fifo[i]);
+ }
+
++ /* in AP mode, the MCAST FIFO takes the EDCA params from VO */
++ if (vif->type == NL80211_IFTYPE_AP)
++ cmd->ac[AC_VO].fifos_mask |= BIT(IWL_MVM_TX_FIFO_MCAST);
++
+ if (vif->bss_conf.qos)
+ cmd->qos_flags |= cpu_to_le32(MAC_QOS_FLG_UPDATE_EDCA);
+
+--- a/drivers/net/wireless/iwlwifi/mvm/mvm.h
++++ b/drivers/net/wireless/iwlwifi/mvm/mvm.h
+@@ -88,6 +88,7 @@ enum iwl_mvm_tx_fifo {
+ IWL_MVM_TX_FIFO_BE,
+ IWL_MVM_TX_FIFO_VI,
+ IWL_MVM_TX_FIFO_VO,
++ IWL_MVM_TX_FIFO_MCAST = 5,
+ };
+
+ extern struct ieee80211_ops iwl_mvm_hw_ops;
--- /dev/null
+From b4011239a08e7e6c2c6e970dfa9e8ecb73139261 Mon Sep 17 00:00:00 2001
+From: Samuel Ortiz <sameo@linux.intel.com>
+Date: Fri, 3 May 2013 18:29:30 +0200
+Subject: NFC: llcp: Fix non blocking sockets connections
+
+From: Samuel Ortiz <sameo@linux.intel.com>
+
+commit b4011239a08e7e6c2c6e970dfa9e8ecb73139261 upstream.
+
+Without the new LLCP_CONNECTING state, non blocking sockets will be
+woken up with a POLLHUP right after calling connect() because their
+state is stuck at LLCP_CLOSED.
+That prevents userspace from implementing any proper non blocking
+socket based NFC p2p client.
+
+Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/nfc/llcp.h | 1 +
+ net/nfc/llcp_sock.c | 8 +++++---
+ 2 files changed, 6 insertions(+), 3 deletions(-)
+
+--- a/net/nfc/llcp.h
++++ b/net/nfc/llcp.h
+@@ -19,6 +19,7 @@
+
+ enum llcp_state {
+ LLCP_CONNECTED = 1, /* wait_for_packet() wants that */
++ LLCP_CONNECTING,
+ LLCP_CLOSED,
+ LLCP_BOUND,
+ LLCP_LISTEN,
+--- a/net/nfc/llcp_sock.c
++++ b/net/nfc/llcp_sock.c
+@@ -571,7 +571,7 @@ static unsigned int llcp_sock_poll(struc
+ if (sk->sk_shutdown == SHUTDOWN_MASK)
+ mask |= POLLHUP;
+
+- if (sock_writeable(sk))
++ if (sock_writeable(sk) && sk->sk_state == LLCP_CONNECTED)
+ mask |= POLLOUT | POLLWRNORM | POLLWRBAND;
+ else
+ set_bit(SOCK_ASYNC_NOSPACE, &sk->sk_socket->flags);
+@@ -722,14 +722,16 @@ static int llcp_sock_connect(struct sock
+ if (ret)
+ goto sock_unlink;
+
++ sk->sk_state = LLCP_CONNECTING;
++
+ ret = sock_wait_state(sk, LLCP_CONNECTED,
+ sock_sndtimeo(sk, flags & O_NONBLOCK));
+- if (ret)
++ if (ret && ret != -EINPROGRESS)
+ goto sock_unlink;
+
+ release_sock(sk);
+
+- return 0;
++ return ret;
+
+ sock_unlink:
+ nfc_llcp_put_ssap(local, llcp_sock->ssap);
mac80211-don-t-wait-for-tx-status-forever.patch
acpi-add-_sta-evaluation-at-do_acpi_find_child.patch
acpi-try-harder-to-resolve-_adr-collisions-for-bridges.patch
+arc-gdbserver-breakage-in-big-endian-configuration-1.patch
+arc-gdbserver-breakage-in-big-endian-configuration-2.patch
+arm-at91-at91sam9x5-rtc-is-not-compatible-with-at91rm9200.patch
+nfc-llcp-fix-non-blocking-sockets-connections.patch
+iwlwifi-mvm-correctly-configure-mcast-in-ap-mode.patch