* rtl8821ae bisected regression between 4.1 and 4.2
@ 2015-10-01 13:17 João Paulo Rechi Vita
2015-10-01 15:42 ` Larry Finger
0 siblings, 1 reply; 3+ messages in thread
From: João Paulo Rechi Vita @ 2015-10-01 13:17 UTC (permalink / raw)
To: linux-wireless
Cc: Vincent Fann, Shao Fu, Larry Finger, Kalle Valo, Stable,
Daniel Drake
Hello linux-wirelless (cc'ing stable since the original patch had
cc:stable as well),
I'm experiencing a CPU soft lockup while downloading when rtl8821ae is
loaded (even when downloading through other adapters) on a vanilla 4.2
kernel. The problem did not happen on vanilla 4.1. Bisecting shows the
first bad commit being "rtlwifi: Remove the clear interrupt routine
from all drivers" (1277fa2ab2f9a624a4b0177119ca13b5fd65edd0).
Reverting that commit makes the problem go away.
The system is perfectly stable until I start downloading, when the UI
becomes unresponsive, sometimes leading to a complete freeze. When the
system does not completely freezes and I'm able to kill the download,
everything seems to go back to normal after killing it, and I am able
to continue to use the computer as long as I do not download anything.
Most of the time either a soft or a hard lockup is detected, but not
always, although the freeze always occurs.
This is the kernel log with lockdep enabled (although sometimes the
problem does not occur with lockdep enabled):
https://gist.github.com/jprvita/3aa2c0c9a66793e1fad1
I have the laptop where this happens as a test machine sitting on my
desk, so I'm available to test any patches or gather more information
if needed. Please advise on how I can help debugging this further.
Regards,
--
João Paulo Rechi Vita
http://about.me/jprvita
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: rtl8821ae bisected regression between 4.1 and 4.2
2015-10-01 13:17 rtl8821ae bisected regression between 4.1 and 4.2 João Paulo Rechi Vita
@ 2015-10-01 15:42 ` Larry Finger
2015-10-01 21:07 ` João Paulo Rechi Vita
0 siblings, 1 reply; 3+ messages in thread
From: Larry Finger @ 2015-10-01 15:42 UTC (permalink / raw)
To: João Paulo Rechi Vita, linux-wireless
Cc: Vincent Fann, Shao Fu, Kalle Valo, Stable, Daniel Drake
[-- Attachment #1: Type: text/plain, Size: 1646 bytes --]
On 10/01/2015 08:17 AM, João Paulo Rechi Vita wrote:
> Hello linux-wirelless (cc'ing stable since the original patch had
> cc:stable as well),
>
> I'm experiencing a CPU soft lockup while downloading when rtl8821ae is
> loaded (even when downloading through other adapters) on a vanilla 4.2
> kernel. The problem did not happen on vanilla 4.1. Bisecting shows the
> first bad commit being "rtlwifi: Remove the clear interrupt routine
> from all drivers" (1277fa2ab2f9a624a4b0177119ca13b5fd65edd0).
> Reverting that commit makes the problem go away.
>
> The system is perfectly stable until I start downloading, when the UI
> becomes unresponsive, sometimes leading to a complete freeze. When the
> system does not completely freezes and I'm able to kill the download,
> everything seems to go back to normal after killing it, and I am able
> to continue to use the computer as long as I do not download anything.
> Most of the time either a soft or a hard lockup is detected, but not
> always, although the freeze always occurs.
>
> This is the kernel log with lockdep enabled (although sometimes the
> problem does not occur with lockdep enabled):
> https://gist.github.com/jprvita/3aa2c0c9a66793e1fad1
>
> I have the laptop where this happens as a test machine sitting on my
> desk, so I'm available to test any patches or gather more information
> if needed. Please advise on how I can help debugging this further.
I cannot duplicate your result, and neither can the Realtek team; however, I
have prepared and attached a patch to temporarily re-add the interrupt clear
routine for rtl8821ae. Please try it and report the results.
Larry
[-- Attachment #2: 0001-rtlwifi-rtl8821ae-Trial-patch-to-reinstall-interrupt.patch --]
[-- Type: text/x-patch, Size: 1523 bytes --]
>From 97ecd2789dc71b158467fc57d0326641a4581f0d Mon Sep 17 00:00:00 2001
From: Larry Finger <Larry.Finger@lwfinger.net>
Date: Thu, 1 Oct 2015 10:37:49 -0500
Subject: [PATCH] rtlwifi: rtl8821ae: Trial patch to reinstall interrupt clear
routine
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
drivers/net/wireless/rtlwifi/rtl8821ae/hw.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/net/wireless/rtlwifi/rtl8821ae/hw.c b/drivers/net/wireless/rtlwifi/rtl8821ae/hw.c
index b7f18e21..6d2caa8 100644
--- a/drivers/net/wireless/rtlwifi/rtl8821ae/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8821ae/hw.c
@@ -2253,11 +2253,27 @@ void rtl8821ae_set_qos(struct ieee80211_hw *hw, int aci)
}
}
+static void rtl8821ae_clear_interrupt(struct ieee80211_hw *hw)
+{
+ struct rtl_priv *rtlpriv = rtl_priv(hw);
+ u32 tmp = rtl_read_dword(rtlpriv, REG_HISR);
+
+ rtl_write_dword(rtlpriv, REG_HISR, tmp);
+
+ tmp = rtl_read_dword(rtlpriv, REG_HISRE);
+ rtl_write_dword(rtlpriv, REG_HISRE, tmp);
+
+ tmp = rtl_read_dword(rtlpriv, REG_HSISR);
+ rtl_write_dword(rtlpriv, REG_HSISR, tmp);
+}
+
void rtl8821ae_enable_interrupt(struct ieee80211_hw *hw)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
+ rtl8821ae_clear_interrupt(hw);/*clear it here first*/
+
rtl_write_dword(rtlpriv, REG_HIMR, rtlpci->irq_mask[0] & 0xFFFFFFFF);
rtl_write_dword(rtlpriv, REG_HIMRE, rtlpci->irq_mask[1] & 0xFFFFFFFF);
rtlpci->irq_enabled = true;
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: rtl8821ae bisected regression between 4.1 and 4.2
2015-10-01 15:42 ` Larry Finger
@ 2015-10-01 21:07 ` João Paulo Rechi Vita
0 siblings, 0 replies; 3+ messages in thread
From: João Paulo Rechi Vita @ 2015-10-01 21:07 UTC (permalink / raw)
To: Larry Finger
Cc: linux-wireless, Vincent Fann, Shao Fu, Kalle Valo, Stable,
Daniel Drake
Hello Larry,
On 1 October 2015 at 11:42, Larry Finger <Larry.Finger@lwfinger.net> wrote:
> On 10/01/2015 08:17 AM, João Paulo Rechi Vita wrote:
>>
>> Hello linux-wirelless (cc'ing stable since the original patch had
>> cc:stable as well),
>>
>> I'm experiencing a CPU soft lockup while downloading when rtl8821ae is
>> loaded (even when downloading through other adapters) on a vanilla 4.2
>> kernel. The problem did not happen on vanilla 4.1. Bisecting shows the
>> first bad commit being "rtlwifi: Remove the clear interrupt routine
>> from all drivers" (1277fa2ab2f9a624a4b0177119ca13b5fd65edd0).
>> Reverting that commit makes the problem go away.
>>
>> The system is perfectly stable until I start downloading, when the UI
>> becomes unresponsive, sometimes leading to a complete freeze. When the
>> system does not completely freezes and I'm able to kill the download,
>> everything seems to go back to normal after killing it, and I am able
>> to continue to use the computer as long as I do not download anything.
>> Most of the time either a soft or a hard lockup is detected, but not
>> always, although the freeze always occurs.
>>
>> This is the kernel log with lockdep enabled (although sometimes the
>> problem does not occur with lockdep enabled):
>> https://gist.github.com/jprvita/3aa2c0c9a66793e1fad1
>>
>> I have the laptop where this happens as a test machine sitting on my
>> desk, so I'm available to test any patches or gather more information
>> if needed. Please advise on how I can help debugging this further.
>
>
> I cannot duplicate your result, and neither can the Realtek team; however, I
> have prepared and attached a patch to temporarily re-add the interrupt clear
> routine for rtl8821ae. Please try it and report the results.
>
With the attached patch the lockup goes away and the system remains
stable during downloads. Let me know if there is anything else you
would like me to test.
Regards,
--
João Paulo Rechi Vita
http://about.me/jprvita
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-10-01 21:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-01 13:17 rtl8821ae bisected regression between 4.1 and 4.2 João Paulo Rechi Vita
2015-10-01 15:42 ` Larry Finger
2015-10-01 21:07 ` João Paulo Rechi Vita
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.