]> git.baikalelectronics.ru Git - kernel.git/commit
rtlwifi: rtl8821ae: Fix connection lost problem correctly
authorLarry Finger <Larry.Finger@lwfinger.net>
Mon, 5 Feb 2018 18:38:11 +0000 (12:38 -0600)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 7 Feb 2018 13:38:37 +0000 (15:38 +0200)
commitd75ab23f349638254ff7368af29f26c7f75d6b4f
tree006bc09d51813a3f94f3c1484fd555e3fe8110b8
parent490826d5cb43f0fba993aec863ac88306ea3cbb7
rtlwifi: rtl8821ae: Fix connection lost problem correctly

There has been a coding error in rtl8821ae since it was first introduced,
namely that an 8-bit register was read using a 16-bit read in
_rtl8821ae_dbi_read(). This error was fixed with commit 053ab98e7e53
("rtlwifi: Fix alignment issues"); however, this change led to
instability in the connection. To restore stability, this change
was reverted in commit 296ea90a9d16 ("rtlwifi: rtl8821ae: Fix connection
lost problem").

Unfortunately, the unaligned access causes machine checks in ARM
architecture, and we were finally forced to find the actual cause of the
problem on x86 platforms. Following a suggestion from Pkshih
<pkshih@realtek.com>, it was found that increasing the ASPM L1
latency from 0 to 7 fixed the instability. This parameter was varied to
see if a smaller value would work; however, it appears that 7 is the
safest value. A new symbol is defined for this quantity, thus it can be
easily changed if necessary.

Fixes: 296ea90a9d16 ("rtlwifi: rtl8821ae: Fix connection lost problem")
Cc: Stable <stable@vger.kernel.org> # 4.14+
Fix-suggested-by: Pkshih <pkshih@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: James Cameron <quozl@laptop.org> # x86_64 OLPC NL3
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c
drivers/net/wireless/realtek/rtlwifi/wifi.h