<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/net/wireless, branch v3.2.58</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>b43: Fix machine check error due to improper access of B43_MMIO_PSM_PHY_HDR</title>
<updated>2014-04-30T15:23:26+00:00</updated>
<author>
<name>Rafał Miłecki</name>
<email>zajec5@gmail.com</email>
</author>
<published>2014-04-05T16:08:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=68289dd32489599ba7f351a3e9ee6bbb36757bc8'/>
<id>68289dd32489599ba7f351a3e9ee6bbb36757bc8</id>
<content type='text'>
commit 12cd43c6ed6da7bf7c5afbd74da6959cda6d056b upstream.

Register B43_MMIO_PSM_PHY_HDR is 16 bit one, so accessing it with 32b
functions isn't safe. On my machine it causes delayed (!) CPU exception:

Disabling lock debugging due to kernel taint
mce: [Hardware Error]: CPU 0: Machine Check Exception: 4 Bank 4: b200000000070f0f
mce: [Hardware Error]: TSC 164083803dc
mce: [Hardware Error]: PROCESSOR 2:20fc2 TIME 1396650505 SOCKET 0 APIC 0 microcode 0
mce: [Hardware Error]: Run the above through 'mcelog --ascii'
mce: [Hardware Error]: Machine check: Processor context corrupt
Kernel panic - not syncing: Fatal machine check on current CPU
Kernel Offset: 0x0 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffff9fffffff)

Signed-off-by: Rafał Miłecki &lt;zajec5@gmail.com&gt;
Acked-by: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 12cd43c6ed6da7bf7c5afbd74da6959cda6d056b upstream.

Register B43_MMIO_PSM_PHY_HDR is 16 bit one, so accessing it with 32b
functions isn't safe. On my machine it causes delayed (!) CPU exception:

Disabling lock debugging due to kernel taint
mce: [Hardware Error]: CPU 0: Machine Check Exception: 4 Bank 4: b200000000070f0f
mce: [Hardware Error]: TSC 164083803dc
mce: [Hardware Error]: PROCESSOR 2:20fc2 TIME 1396650505 SOCKET 0 APIC 0 microcode 0
mce: [Hardware Error]: Run the above through 'mcelog --ascii'
mce: [Hardware Error]: Machine check: Processor context corrupt
Kernel panic - not syncing: Fatal machine check on current CPU
Kernel Offset: 0x0 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffff9fffffff)

Signed-off-by: Rafał Miłecki &lt;zajec5@gmail.com&gt;
Acked-by: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ath9k: fix ready time of the multicast buffer queue</title>
<updated>2014-04-30T15:23:22+00:00</updated>
<author>
<name>Felix Fietkau</name>
<email>nbd@openwrt.org</email>
</author>
<published>2014-03-09T10:02:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a7bbda740718580d49fb5a7ccd950316d58970f7'/>
<id>a7bbda740718580d49fb5a7ccd950316d58970f7</id>
<content type='text'>
commit 3b3e0efb5c72c4fc940af50b33626b8a78a907dc upstream.

qi-&gt;tqi_readyTime is written directly to registers that expect
microseconds as unit instead of TU.
When setting the CABQ ready time, cur_conf-&gt;beacon_interval is in TU, so
convert it to microseconds before passing it to ath9k_hw.

This should hopefully fix some Tx DMA issues with buffered multicast
frames in AP mode.

Signed-off-by: Felix Fietkau &lt;nbd@openwrt.org&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 3b3e0efb5c72c4fc940af50b33626b8a78a907dc upstream.

qi-&gt;tqi_readyTime is written directly to registers that expect
microseconds as unit instead of TU.
When setting the CABQ ready time, cur_conf-&gt;beacon_interval is in TU, so
convert it to microseconds before passing it to ath9k_hw.

This should hopefully fix some Tx DMA issues with buffered multicast
frames in AP mode.

Signed-off-by: Felix Fietkau &lt;nbd@openwrt.org&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iwlwifi: dvm: take mutex when sending SYNC BT config command</title>
<updated>2014-04-30T15:23:21+00:00</updated>
<author>
<name>Emmanuel Grumbach</name>
<email>emmanuel.grumbach@intel.com</email>
</author>
<published>2014-03-10T13:22:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=769ddc4b6571f1b9766f2fa3d9e2c78cfc1afdeb'/>
<id>769ddc4b6571f1b9766f2fa3d9e2c78cfc1afdeb</id>
<content type='text'>
commit 82e5a649453a3cf23516277abb84273768a1592b upstream.

There is a flow in which we send the host command in SYNC
mode, but we don't take priv-&gt;mutex.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1046495

Reviewed-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Emmanuel Grumbach &lt;emmanuel.grumbach@intel.com&gt;
[bwh: Backported to 3.2:
 - Adjust filename, context
 - mutex is priv-&gt;shrd-&gt;mutex]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 82e5a649453a3cf23516277abb84273768a1592b upstream.

There is a flow in which we send the host command in SYNC
mode, but we don't take priv-&gt;mutex.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1046495

Reviewed-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Emmanuel Grumbach &lt;emmanuel.grumbach@intel.com&gt;
[bwh: Backported to 3.2:
 - Adjust filename, context
 - mutex is priv-&gt;shrd-&gt;mutex]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtlwifi: rtl8192se: Fix too long disable of IRQs</title>
<updated>2014-04-30T15:23:21+00:00</updated>
<author>
<name>Larry Finger</name>
<email>Larry.Finger@lwfinger.net</email>
</author>
<published>2014-03-04T22:53:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=721c5416f8e56db70ccc99662be57998599d06b6'/>
<id>721c5416f8e56db70ccc99662be57998599d06b6</id>
<content type='text'>
commit 2610decdd0b3808ba20471a999835cfee5275f98 upstream.

In commit f78bccd79ba3cd9d9664981b501d57bdb81ab8a4 entitled "rtlwifi:
rtl8192ce: Fix too long disable of IRQs", Olivier Langlois
&lt;olivier@trillion01.com&gt; fixed a problem caused by an extra long disabling
of interrupts. This patch makes the same fix for rtl8192se.

Signed-off-by: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
[bwh: Backported to 3.2:
 - Adjust context
 - Drop change to an error path that we don't have]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 2610decdd0b3808ba20471a999835cfee5275f98 upstream.

In commit f78bccd79ba3cd9d9664981b501d57bdb81ab8a4 entitled "rtlwifi:
rtl8192ce: Fix too long disable of IRQs", Olivier Langlois
&lt;olivier@trillion01.com&gt; fixed a problem caused by an extra long disabling
of interrupts. This patch makes the same fix for rtl8192se.

Signed-off-by: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
[bwh: Backported to 3.2:
 - Adjust context
 - Drop change to an error path that we don't have]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mwifiex: copy AP's HT capability info correctly</title>
<updated>2014-04-01T23:58:58+00:00</updated>
<author>
<name>Amitkumar Karwar</name>
<email>akarwar@marvell.com</email>
</author>
<published>2014-03-05T02:43:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8197077f9fc59c76180360af754741776cc803b1'/>
<id>8197077f9fc59c76180360af754741776cc803b1</id>
<content type='text'>
commit c99b1861c232e1f641f13b8645e0febb3712cc71 upstream.

While preparing association request, intersection of device's HT
capability information and corresponding fields advertised by AP
is used.

This patch fixes an error while copying this field from AP's
beacon.

Signed-off-by: Amitkumar Karwar &lt;akarwar@marvell.com&gt;
Signed-off-by: Bing Zhao &lt;bzhao@marvell.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit c99b1861c232e1f641f13b8645e0febb3712cc71 upstream.

While preparing association request, intersection of device's HT
capability information and corresponding fields advertised by AP
is used.

This patch fixes an error while copying this field from AP's
beacon.

Signed-off-by: Amitkumar Karwar &lt;akarwar@marvell.com&gt;
Signed-off-by: Bing Zhao &lt;bzhao@marvell.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iwlwifi: fix TX status for aggregated packets</title>
<updated>2014-04-01T23:58:56+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2014-02-25T09:37:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=7d1cce6a938cad067edbb4522b587df60afc4730'/>
<id>7d1cce6a938cad067edbb4522b587df60afc4730</id>
<content type='text'>
commit 143582c6847cb285b361804c613127c25de60ca4 upstream.

Only the first packet is currently handled correctly, but then
all others are assumed to have failed which is problematic. Fix
this, marking them all successful instead (since if they're not
then the firmware will have transmitted them as single frames.)

This fixes the lost packet reporting.

Also do a tiny variable scoping cleanup.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
[Add the dvm part]
Signed-off-by: Emmanuel Grumbach &lt;emmanuel.grumbach@intel.com&gt;
[bwh: Backported to 3.2:
 - Drop the mvm part
 - Adjust filename, context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 143582c6847cb285b361804c613127c25de60ca4 upstream.

Only the first packet is currently handled correctly, but then
all others are assumed to have failed which is problematic. Fix
this, marking them all successful instead (since if they're not
then the firmware will have transmitted them as single frames.)

This fixes the lost packet reporting.

Also do a tiny variable scoping cleanup.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
[Add the dvm part]
Signed-off-by: Emmanuel Grumbach &lt;emmanuel.grumbach@intel.com&gt;
[bwh: Backported to 3.2:
 - Drop the mvm part
 - Adjust filename, context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ath9k: Fix ETSI compliance for AR9462 2.0</title>
<updated>2014-04-01T23:58:55+00:00</updated>
<author>
<name>Sujith Manoharan</name>
<email>c_manoha@qca.qualcomm.com</email>
</author>
<published>2014-02-14T02:45:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=cf5a6031f2bd8799ad551fb9b65f1b1e3104ea8a'/>
<id>cf5a6031f2bd8799ad551fb9b65f1b1e3104ea8a</id>
<content type='text'>
commit b3050248c167871ca52cfdb2ce78aa2460249346 upstream.

The minimum CCA power threshold values have to be adjusted
for existing cards to be in compliance with new regulations.
Newer cards will make use of the values obtained from EEPROM,
support for this was added earlier. To make sure that cards
that are already in use and don't have proper values in EEPROM,
do not violate regulations, use the initvals instead.

Reported-by: Jeang Daniel &lt;dyjeong@qca.qualcomm.com&gt;
Signed-off-by: Sujith Manoharan &lt;c_manoha@qca.qualcomm.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit b3050248c167871ca52cfdb2ce78aa2460249346 upstream.

The minimum CCA power threshold values have to be adjusted
for existing cards to be in compliance with new regulations.
Newer cards will make use of the values obtained from EEPROM,
support for this was added earlier. To make sure that cards
that are already in use and don't have proper values in EEPROM,
do not violate regulations, use the initvals instead.

Reported-by: Jeang Daniel &lt;dyjeong@qca.qualcomm.com&gt;
Signed-off-by: Sujith Manoharan &lt;c_manoha@qca.qualcomm.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ath9k: protect tid-&gt;sched check</title>
<updated>2014-04-01T23:58:55+00:00</updated>
<author>
<name>Stanislaw Gruszka</name>
<email>sgruszka@redhat.com</email>
</author>
<published>2014-02-19T12:15:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=cf117670cf074367290d5993fe3111ac6d6b1777'/>
<id>cf117670cf074367290d5993fe3111ac6d6b1777</id>
<content type='text'>
commit 21f8aaee0c62708654988ce092838aa7df4d25d8 upstream.

We check tid-&gt;sched without a lock taken on ath_tx_aggr_sleep(). That
is race condition which can result of doing list_del(&amp;tid-&gt;list) twice
(second time with poisoned list node) and cause crash like shown below:

[424271.637220] BUG: unable to handle kernel paging request at 00100104
[424271.637328] IP: [&lt;f90fc072&gt;] ath_tx_aggr_sleep+0x62/0xe0 [ath9k]
...
[424271.639953] Call Trace:
[424271.639998]  [&lt;f90f6900&gt;] ? ath9k_get_survey+0x110/0x110 [ath9k]
[424271.640083]  [&lt;f90f6942&gt;] ath9k_sta_notify+0x42/0x50 [ath9k]
[424271.640177]  [&lt;f809cfef&gt;] sta_ps_start+0x8f/0x1c0 [mac80211]
[424271.640258]  [&lt;c10f730e&gt;] ? free_compound_page+0x2e/0x40
[424271.640346]  [&lt;f809e915&gt;] ieee80211_rx_handlers+0x9d5/0x2340 [mac80211]
[424271.640437]  [&lt;c112f048&gt;] ? kmem_cache_free+0x1d8/0x1f0
[424271.640510]  [&lt;c1345a84&gt;] ? kfree_skbmem+0x34/0x90
[424271.640578]  [&lt;c10fc23c&gt;] ? put_page+0x2c/0x40
[424271.640640]  [&lt;c1345a84&gt;] ? kfree_skbmem+0x34/0x90
[424271.640706]  [&lt;c1345a84&gt;] ? kfree_skbmem+0x34/0x90
[424271.640787]  [&lt;f809dde3&gt;] ? ieee80211_rx_handlers_result+0x73/0x1d0 [mac80211]
[424271.640897]  [&lt;f80a07a0&gt;] ieee80211_prepare_and_rx_handle+0x520/0xad0 [mac80211]
[424271.641009]  [&lt;f809e22d&gt;] ? ieee80211_rx_handlers+0x2ed/0x2340 [mac80211]
[424271.641104]  [&lt;c13846ce&gt;] ? ip_output+0x7e/0xd0
[424271.641182]  [&lt;f80a1057&gt;] ieee80211_rx+0x307/0x7c0 [mac80211]
[424271.641266]  [&lt;f90fa6ee&gt;] ath_rx_tasklet+0x88e/0xf70 [ath9k]
[424271.641358]  [&lt;f80a0f2c&gt;] ? ieee80211_rx+0x1dc/0x7c0 [mac80211]
[424271.641445]  [&lt;f90f82db&gt;] ath9k_tasklet+0xcb/0x130 [ath9k]

Bug report:
https://bugzilla.kernel.org/show_bug.cgi?id=70551

Reported-and-tested-by: Max Sydorenko &lt;maxim.stargazer@gmail.com&gt;
Signed-off-by: Stanislaw Gruszka &lt;sgruszka@redhat.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
[bwh: Backported to 3.2:
 - Adjust context
 - Use spin_unlock_bh() directly]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 21f8aaee0c62708654988ce092838aa7df4d25d8 upstream.

We check tid-&gt;sched without a lock taken on ath_tx_aggr_sleep(). That
is race condition which can result of doing list_del(&amp;tid-&gt;list) twice
(second time with poisoned list node) and cause crash like shown below:

[424271.637220] BUG: unable to handle kernel paging request at 00100104
[424271.637328] IP: [&lt;f90fc072&gt;] ath_tx_aggr_sleep+0x62/0xe0 [ath9k]
...
[424271.639953] Call Trace:
[424271.639998]  [&lt;f90f6900&gt;] ? ath9k_get_survey+0x110/0x110 [ath9k]
[424271.640083]  [&lt;f90f6942&gt;] ath9k_sta_notify+0x42/0x50 [ath9k]
[424271.640177]  [&lt;f809cfef&gt;] sta_ps_start+0x8f/0x1c0 [mac80211]
[424271.640258]  [&lt;c10f730e&gt;] ? free_compound_page+0x2e/0x40
[424271.640346]  [&lt;f809e915&gt;] ieee80211_rx_handlers+0x9d5/0x2340 [mac80211]
[424271.640437]  [&lt;c112f048&gt;] ? kmem_cache_free+0x1d8/0x1f0
[424271.640510]  [&lt;c1345a84&gt;] ? kfree_skbmem+0x34/0x90
[424271.640578]  [&lt;c10fc23c&gt;] ? put_page+0x2c/0x40
[424271.640640]  [&lt;c1345a84&gt;] ? kfree_skbmem+0x34/0x90
[424271.640706]  [&lt;c1345a84&gt;] ? kfree_skbmem+0x34/0x90
[424271.640787]  [&lt;f809dde3&gt;] ? ieee80211_rx_handlers_result+0x73/0x1d0 [mac80211]
[424271.640897]  [&lt;f80a07a0&gt;] ieee80211_prepare_and_rx_handle+0x520/0xad0 [mac80211]
[424271.641009]  [&lt;f809e22d&gt;] ? ieee80211_rx_handlers+0x2ed/0x2340 [mac80211]
[424271.641104]  [&lt;c13846ce&gt;] ? ip_output+0x7e/0xd0
[424271.641182]  [&lt;f80a1057&gt;] ieee80211_rx+0x307/0x7c0 [mac80211]
[424271.641266]  [&lt;f90fa6ee&gt;] ath_rx_tasklet+0x88e/0xf70 [ath9k]
[424271.641358]  [&lt;f80a0f2c&gt;] ? ieee80211_rx+0x1dc/0x7c0 [mac80211]
[424271.641445]  [&lt;f90f82db&gt;] ath9k_tasklet+0xcb/0x130 [ath9k]

Bug report:
https://bugzilla.kernel.org/show_bug.cgi?id=70551

Reported-and-tested-by: Max Sydorenko &lt;maxim.stargazer@gmail.com&gt;
Signed-off-by: Stanislaw Gruszka &lt;sgruszka@redhat.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
[bwh: Backported to 3.2:
 - Adjust context
 - Use spin_unlock_bh() directly]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtl8187: fix regression on MIPS without coherent DMA</title>
<updated>2014-04-01T23:58:52+00:00</updated>
<author>
<name>Stanislaw Gruszka</name>
<email>stf_xl@wp.pl</email>
</author>
<published>2014-02-10T21:38:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5b9f9b8ecf9439b440d833329e0fb8c52cd5f245'/>
<id>5b9f9b8ecf9439b440d833329e0fb8c52cd5f245</id>
<content type='text'>
commit b6213e413a4e0c66548153516b074df14f9d08e0 upstream.

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 &lt;petr.pisar@atlas.cz&gt;
Bisected-by: Tom Li &lt;biergaizi2009@gmail.com&gt;
Reported-and-tested-by: Tom Li &lt;biergaizi2009@gmail.com&gt;
Signed-off-by: Stanislaw Gruszka &lt;stf_xl@wp.pl&gt;
Acked-by: Larry Finger &lt;Larry.Finger@lwfinger.next&gt;
Acked-by: Hin-Tak Leung &lt;htl10@users.sourceforge.net&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit b6213e413a4e0c66548153516b074df14f9d08e0 upstream.

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 &lt;petr.pisar@atlas.cz&gt;
Bisected-by: Tom Li &lt;biergaizi2009@gmail.com&gt;
Reported-and-tested-by: Tom Li &lt;biergaizi2009@gmail.com&gt;
Signed-off-by: Stanislaw Gruszka &lt;stf_xl@wp.pl&gt;
Acked-by: Larry Finger &lt;Larry.Finger@lwfinger.next&gt;
Acked-by: Hin-Tak Leung &lt;htl10@users.sourceforge.net&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtlwifi: rtl8192ce: Fix too long disable of IRQs</title>
<updated>2014-04-01T23:58:52+00:00</updated>
<author>
<name>Olivier Langlois</name>
<email>olivier@trillion01.com</email>
</author>
<published>2014-02-01T06:11:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2de2c2e956dbf164c5acb1dca16e9a3c1938096e'/>
<id>2de2c2e956dbf164c5acb1dca16e9a3c1938096e</id>
<content type='text'>
commit f78bccd79ba3cd9d9664981b501d57bdb81ab8a4 upstream.

rtl8192ce is disabling for too long the local interrupts during hw initiatialisation when performing scans

The observable symptoms in dmesg can be:

- underruns from ALSA playback
- clock freezes (tstamps do not change for several dmesg entries until irqs are finaly reenabled):

[  250.817669] rtlwifi:rtl_op_config():&lt;0-0-0&gt; 0x100
[  250.817685] rtl8192ce:_rtl92ce_phy_set_rf_power_state():&lt;0-1-0&gt; IPS Set eRf nic enable
[  250.817732] rtl8192ce:_rtl92ce_init_mac():&lt;0-1-0&gt; reg0xec:18051d59:11
[  250.817796] rtl8192ce:_rtl92ce_init_mac():&lt;0-1-0&gt; reg0xec:18051d59:11
[  250.817910] rtl8192ce:_rtl92ce_init_mac():&lt;0-1-0&gt; reg0xec:18051d59:11
[  250.818024] rtl8192ce:_rtl92ce_init_mac():&lt;0-1-0&gt; reg0xec:18051d59:11
[  250.818139] rtl8192ce:_rtl92ce_init_mac():&lt;0-1-0&gt; reg0xec:18051d59:11
[  250.818253] rtl8192ce:_rtl92ce_init_mac():&lt;0-1-0&gt; reg0xec:18051d59:11
[  250.818367] rtl8192ce:_rtl92ce_init_mac():&lt;0-1-0&gt; reg0xec:18051d59:11
[  250.818472] rtl8192ce:_rtl92ce_init_mac():&lt;0-1-0&gt; reg0xec:18051d59:11
[  250.818472] rtl8192ce:_rtl92ce_init_mac():&lt;0-1-0&gt; reg0xec:18051d59:11
[  250.818472] rtl8192ce:_rtl92ce_init_mac():&lt;0-1-0&gt; reg0xec:18051d59:11
[  250.818472] rtl8192ce:_rtl92ce_init_mac():&lt;0-1-0&gt; reg0xec:18051d59:11
[  250.818472] rtl8192ce:_rtl92ce_init_mac():&lt;0-1-0&gt; reg0xec:98053f15:10
[  250.818472] rtl8192ce:rtl92ce_sw_led_on():&lt;0-1-0&gt; LedAddr:4E ledpin=1
[  250.818472] rtl8192c_common:rtl92c_download_fw():&lt;0-1-0&gt; Firmware Version(49), Signature(0x88c1),Size(32)
[  250.818472] rtl8192ce:rtl92ce_enable_hw_security_config():&lt;0-1-0&gt; PairwiseEncAlgorithm = 0 GroupEncAlgorithm = 0
[  250.818472] rtl8192ce:rtl92ce_enable_hw_security_config():&lt;0-1-0&gt; The SECR-value cc
[  250.818472] rtl8192c_common:rtl92c_dm_check_txpower_tracking_thermal_meter():&lt;0-1-0&gt; Schedule TxPowerTracking direct call!!
[  250.818472] rtl8192c_common:rtl92c_dm_txpower_tracking_callback_thermalmeter():&lt;0-1-0&gt; rtl92c_dm_txpower_tracking_callback_thermalmeter
[  250.818472] rtl8192c_common:rtl92c_dm_txpower_tracking_callback_thermalmeter():&lt;0-1-0&gt; Readback Thermal Meter = 0xe pre thermal meter 0xf eeprom_thermalmeter 0xf
[  250.818472] rtl8192c_common:rtl92c_dm_txpower_tracking_callback_thermalmeter():&lt;0-1-0&gt; Initial pathA ele_d reg0xc80 = 0x40000000, ofdm_index=0xc
[  250.818472] rtl8192c_common:rtl92c_dm_txpower_tracking_callback_thermalmeter():&lt;0-1-0&gt; Initial reg0xa24 = 0x90e1317, cck_index=0xc, ch14 0
[  250.818472] rtl8192c_common:rtl92c_dm_txpower_tracking_callback_thermalmeter():&lt;0-1-0&gt; Readback Thermal Meter = 0xe pre thermal meter 0xf eeprom_thermalmeter 0xf delta 0x1 delta_lck 0x0 delta_iqk 0x0
[  250.818472] rtl8192c_common:rtl92c_dm_txpower_tracking_callback_thermalmeter():&lt;0-1-0&gt; &lt;===
[  250.818472] rtl8192c_common:rtl92c_dm_initialize_txpower_tracking_thermalmeter():&lt;0-1-0&gt; pMgntInfo-&gt;txpower_tracking = 1
[  250.818472] rtl8192ce:rtl92ce_led_control():&lt;0-1-0&gt; ledaction 3
[  250.818472] rtl8192ce:rtl92ce_sw_led_on():&lt;0-1-0&gt; LedAddr:4E ledpin=1
[  250.818472] rtlwifi:rtl_ips_nic_on():&lt;0-1-0&gt; before spin_unlock_irqrestore
[  251.154656] PCM: Lost interrupts? [Q]-0 (stream=0, delta=15903, new_hw_ptr=293408, old_hw_ptr=277505)

The exact code flow that causes that is:

1. wpa_supplicant send a start_scan request to the nl80211 driver
2. mac80211 module call rtl_op_config with IEEE80211_CONF_CHANGE_IDLE
3.   rtl_ips_nic_on is called which disable local irqs
4.     rtl92c_phy_set_rf_power_state() is called
5.       rtl_ps_enable_nic() is called and hw_init()is executed and then the interrupts on the device are enabled

A good solution could be to refactor the code to avoid calling rtl92ce_hw_init() with the irqs disabled
but a quick and dirty solution that has proven to work is
to reenable the irqs during the function rtl92ce_hw_init().

I think that it is safe doing so since the device interrupt will only be enabled after the init function succeed.

Signed-off-by: Olivier Langlois &lt;olivier@trillion01.com&gt;
Acked-by: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit f78bccd79ba3cd9d9664981b501d57bdb81ab8a4 upstream.

rtl8192ce is disabling for too long the local interrupts during hw initiatialisation when performing scans

The observable symptoms in dmesg can be:

- underruns from ALSA playback
- clock freezes (tstamps do not change for several dmesg entries until irqs are finaly reenabled):

[  250.817669] rtlwifi:rtl_op_config():&lt;0-0-0&gt; 0x100
[  250.817685] rtl8192ce:_rtl92ce_phy_set_rf_power_state():&lt;0-1-0&gt; IPS Set eRf nic enable
[  250.817732] rtl8192ce:_rtl92ce_init_mac():&lt;0-1-0&gt; reg0xec:18051d59:11
[  250.817796] rtl8192ce:_rtl92ce_init_mac():&lt;0-1-0&gt; reg0xec:18051d59:11
[  250.817910] rtl8192ce:_rtl92ce_init_mac():&lt;0-1-0&gt; reg0xec:18051d59:11
[  250.818024] rtl8192ce:_rtl92ce_init_mac():&lt;0-1-0&gt; reg0xec:18051d59:11
[  250.818139] rtl8192ce:_rtl92ce_init_mac():&lt;0-1-0&gt; reg0xec:18051d59:11
[  250.818253] rtl8192ce:_rtl92ce_init_mac():&lt;0-1-0&gt; reg0xec:18051d59:11
[  250.818367] rtl8192ce:_rtl92ce_init_mac():&lt;0-1-0&gt; reg0xec:18051d59:11
[  250.818472] rtl8192ce:_rtl92ce_init_mac():&lt;0-1-0&gt; reg0xec:18051d59:11
[  250.818472] rtl8192ce:_rtl92ce_init_mac():&lt;0-1-0&gt; reg0xec:18051d59:11
[  250.818472] rtl8192ce:_rtl92ce_init_mac():&lt;0-1-0&gt; reg0xec:18051d59:11
[  250.818472] rtl8192ce:_rtl92ce_init_mac():&lt;0-1-0&gt; reg0xec:18051d59:11
[  250.818472] rtl8192ce:_rtl92ce_init_mac():&lt;0-1-0&gt; reg0xec:98053f15:10
[  250.818472] rtl8192ce:rtl92ce_sw_led_on():&lt;0-1-0&gt; LedAddr:4E ledpin=1
[  250.818472] rtl8192c_common:rtl92c_download_fw():&lt;0-1-0&gt; Firmware Version(49), Signature(0x88c1),Size(32)
[  250.818472] rtl8192ce:rtl92ce_enable_hw_security_config():&lt;0-1-0&gt; PairwiseEncAlgorithm = 0 GroupEncAlgorithm = 0
[  250.818472] rtl8192ce:rtl92ce_enable_hw_security_config():&lt;0-1-0&gt; The SECR-value cc
[  250.818472] rtl8192c_common:rtl92c_dm_check_txpower_tracking_thermal_meter():&lt;0-1-0&gt; Schedule TxPowerTracking direct call!!
[  250.818472] rtl8192c_common:rtl92c_dm_txpower_tracking_callback_thermalmeter():&lt;0-1-0&gt; rtl92c_dm_txpower_tracking_callback_thermalmeter
[  250.818472] rtl8192c_common:rtl92c_dm_txpower_tracking_callback_thermalmeter():&lt;0-1-0&gt; Readback Thermal Meter = 0xe pre thermal meter 0xf eeprom_thermalmeter 0xf
[  250.818472] rtl8192c_common:rtl92c_dm_txpower_tracking_callback_thermalmeter():&lt;0-1-0&gt; Initial pathA ele_d reg0xc80 = 0x40000000, ofdm_index=0xc
[  250.818472] rtl8192c_common:rtl92c_dm_txpower_tracking_callback_thermalmeter():&lt;0-1-0&gt; Initial reg0xa24 = 0x90e1317, cck_index=0xc, ch14 0
[  250.818472] rtl8192c_common:rtl92c_dm_txpower_tracking_callback_thermalmeter():&lt;0-1-0&gt; Readback Thermal Meter = 0xe pre thermal meter 0xf eeprom_thermalmeter 0xf delta 0x1 delta_lck 0x0 delta_iqk 0x0
[  250.818472] rtl8192c_common:rtl92c_dm_txpower_tracking_callback_thermalmeter():&lt;0-1-0&gt; &lt;===
[  250.818472] rtl8192c_common:rtl92c_dm_initialize_txpower_tracking_thermalmeter():&lt;0-1-0&gt; pMgntInfo-&gt;txpower_tracking = 1
[  250.818472] rtl8192ce:rtl92ce_led_control():&lt;0-1-0&gt; ledaction 3
[  250.818472] rtl8192ce:rtl92ce_sw_led_on():&lt;0-1-0&gt; LedAddr:4E ledpin=1
[  250.818472] rtlwifi:rtl_ips_nic_on():&lt;0-1-0&gt; before spin_unlock_irqrestore
[  251.154656] PCM: Lost interrupts? [Q]-0 (stream=0, delta=15903, new_hw_ptr=293408, old_hw_ptr=277505)

The exact code flow that causes that is:

1. wpa_supplicant send a start_scan request to the nl80211 driver
2. mac80211 module call rtl_op_config with IEEE80211_CONF_CHANGE_IDLE
3.   rtl_ips_nic_on is called which disable local irqs
4.     rtl92c_phy_set_rf_power_state() is called
5.       rtl_ps_enable_nic() is called and hw_init()is executed and then the interrupts on the device are enabled

A good solution could be to refactor the code to avoid calling rtl92ce_hw_init() with the irqs disabled
but a quick and dirty solution that has proven to work is
to reenable the irqs during the function rtl92ce_hw_init().

I think that it is safe doing so since the device interrupt will only be enabled after the init function succeed.

Signed-off-by: Olivier Langlois &lt;olivier@trillion01.com&gt;
Acked-by: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
</feed>
