diff options
author | Alexandre Oliva <lxoliva@fsfla.org> | 2014-02-15 21:44:14 +0000 |
---|---|---|
committer | Alexandre Oliva <lxoliva@fsfla.org> | 2014-02-15 21:44:14 +0000 |
commit | 05610e70416bc25eb3ce437fd4e1dd756cd4ea02 (patch) | |
tree | 2b4a5b1cf89f581ac5a7601a330f7ab87320d40f | |
parent | 2b2592fda6e4497d91efc7ba643b921719c8fa7e (diff) | |
download | linux-libre-raptor-05610e70416bc25eb3ce437fd4e1dd756cd4ea02.tar.gz linux-libre-raptor-05610e70416bc25eb3ce437fd4e1dd756cd4ea02.zip |
3.10.30-gnu_0loongsonlibre
-rw-r--r-- | lemote/gnewsense/branches/3.10/config.patch | 7 | ||||
-rw-r--r-- | lemote/gnewsense/branches/3.10/fix-rtl8187.patch | 85 | ||||
-rw-r--r-- | lemote/gnewsense/branches/3.10/series | 1 |
3 files changed, 90 insertions, 3 deletions
diff --git a/lemote/gnewsense/branches/3.10/config.patch b/lemote/gnewsense/branches/3.10/config.patch index 3d92f996d..5596f9fe8 100644 --- a/lemote/gnewsense/branches/3.10/config.patch +++ b/lemote/gnewsense/branches/3.10/config.patch @@ -1,11 +1,11 @@ Index: .config =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ .config 2014-02-10 23:35:49.000000000 +0000 -@@ -0,0 +1,4765 @@ ++++ .config 2014-02-15 08:22:23.000000000 +0000 +@@ -0,0 +1,4766 @@ +# +# Automatically generated file; DO NOT EDIT. -+# Linux/mips 3.10.29-gnu Kernel Configuration ++# Linux/mips 3.10.30-gnu Kernel Configuration +# +CONFIG_MIPS=y + @@ -1612,6 +1612,7 @@ Index: .config +# CONFIG_BCACHE_DEBUG is not set +# CONFIG_BCACHE_EDEBUG is not set +# CONFIG_BCACHE_CLOSURES_DEBUG is not set ++CONFIG_BLK_DEV_DM_BUILTIN=y +CONFIG_BLK_DEV_DM=m +# CONFIG_DM_DEBUG is not set +CONFIG_DM_BUFIO=m diff --git a/lemote/gnewsense/branches/3.10/fix-rtl8187.patch b/lemote/gnewsense/branches/3.10/fix-rtl8187.patch new file mode 100644 index 000000000..44888a3f0 --- /dev/null +++ b/lemote/gnewsense/branches/3.10/fix-rtl8187.patch @@ -0,0 +1,85 @@ +From: Stanislaw Gruszka <stf_xl@wp.pl> +Subject: rtl8187: fix regression on MIPS without coherent DMA +Date: 2014-02-10 21:38:28 + +http://marc.info/?l=linux-wireless&m=139206817709511&w=2 + +This patch fixes regression caused by commit a16dad77634 "MIPS: Fix +potencial corruption". That commit fixes one corruption scenario in +cost of adding another one, which actually start to cause crashes +on Yeeloong laptop when rtl8187 driver is used. + +For correct DMA read operation on machines without DMA coherence, kernel +have to invalidate cache, such it will refill later with new data that +device wrote to memory, when that data is needed to process. We can only +invalidate full cache line. Hence when cache line includes both dma +buffer and some other data (written in cache, but not yet in main +memory), the other data can not hit memory due to invalidation. That +happen on rtl8187 where struct rtl8187_priv fields are located just +before and after small buffers that are passed to USB layer and DMA +is performed on them. + +To fix the problem we align buffers and reserve space after them to make +them match cache line. + +This patch does not resolve all possible MIPS problems entirely, for +that we have to assure that we always map cache aligned buffers for DMA, +what can be complex or even not possible. But patch fixes visible and +reproducible regression and seems other possible corruptions do not +happen in practice, since Yeeloong laptop works stable without rtl8187 +driver. + +Bug report: +https://bugzilla.kernel.org/show_bug.cgi?id=54391 + +Reported-by: Petr Pisar <petr.pisar@atlas.cz> +Bisected-by: Tom Li <biergaizi2009@gmail.com> +Reported-and-tested-by: Tom Li <biergaizi2009@gmail.com> +Cc: stable@vger.kernel.org +Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl> +--- + drivers/net/wireless/rtl818x/rtl8187/rtl8187.h | 10 ++++++++-- + 1 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/wireless/rtl818x/rtl8187/rtl8187.h b/drivers/net/wireless/rtl818x/rtl8187/rtl8187.h +index 56aee06..a6ad79f 100644 +--- a/drivers/net/wireless/rtl818x/rtl8187/rtl8187.h ++++ b/drivers/net/wireless/rtl818x/rtl8187/rtl8187.h +@@ -15,6 +15,8 @@ + #ifndef RTL8187_H + #define RTL8187_H + ++#include <linux/cache.h> ++ + #include "rtl818x.h" + #include "leds.h" + +@@ -139,7 +141,10 @@ struct rtl8187_priv { + u8 aifsn[4]; + u8 rfkill_mask; + struct { +- __le64 buf; ++ union { ++ __le64 buf; ++ u8 dummy1[L1_CACHE_BYTES]; ++ } ____cacheline_aligned; + struct sk_buff_head queue; + } b_tx_status; /* This queue is used by both -b and non-b devices */ + struct mutex io_mutex; +@@ -147,7 +152,8 @@ struct rtl8187_priv { + u8 bits8; + __le16 bits16; + __le32 bits32; +- } *io_dmabuf; ++ u8 dummy2[L1_CACHE_BYTES]; ++ } *io_dmabuf ____cacheline_aligned; + bool rfkill_off; + u16 seqno; + }; +-- +1.7.4.4 + +-- +To unsubscribe from this list: send the line "unsubscribe linux-wireless" in +the body of a message to majordomo@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/lemote/gnewsense/branches/3.10/series b/lemote/gnewsense/branches/3.10/series index 1ded6c091..6cf6fc23f 100644 --- a/lemote/gnewsense/branches/3.10/series +++ b/lemote/gnewsense/branches/3.10/series @@ -1,4 +1,5 @@ 3.10-13161fb-loongson-community.patch -p1 # loongson-community patches +fix-rtl8187.patch -p1 gnewsense-binutils-flag.patch -p0 100gnu+freedo.patch -p1 # 100% Freedo[m] GNU+Freedo logo config.patch -p0 # config file |