kernel: use upstream fixes for bgmac and BCM4709(4)
[openwrt.git] / target / linux / generic / patches-4.4 / 333-arc-enable-unaligned-access-in-kernel-mode.patch
1 From af737b55fc7c61f17da9ae89fba536e0a9338e98 Mon Sep 17 00:00:00 2001
2 From: Alexey Brodkin <abrodkin@synopsys.com>
3 Date: Mon, 14 Mar 2016 17:26:34 +0300
4 Subject: [PATCH] arc: enable unaligned access in kernel mode
5
6 This enables misaligned access handling even in kernel mode.
7 Some wireless drivers (ath9k-htc and mt7601u) use misaligned accesses
8 here and there and to cope with that without fixing stuff in the drivers
9 we're just gracefully handling it on ARC.
10
11 Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
12 ---
13  arch/arc/kernel/unaligned.c | 2 +-
14  1 file changed, 1 insertion(+), 1 deletion(-)
15
16 diff --git a/arch/arc/kernel/unaligned.c b/arch/arc/kernel/unaligned.c
17 index abd961f..0b0cc97 100644
18 --- a/arch/arc/kernel/unaligned.c
19 +++ b/arch/arc/kernel/unaligned.c
20 @@ -206,7 +206,7 @@ int misaligned_fixup(unsigned long address, struct pt_regs *regs,
21         char buf[TASK_COMM_LEN];
22  
23         /* handle user mode only and only if enabled by sysadmin */
24 -       if (!user_mode(regs) || !unaligned_enabled)
25 +       if (!unaligned_enabled)
26                 return 1;
27  
28         if (no_unaligned_warning) {
29 -- 
30 2.5.0
31