When connecting to AP, mac80211 asks driver to enter and leave PS quickly,
but driver deinit doesn't wait for delayed work complete when entering PS,
then driver reinit procedure and delay work are running simultaneously.
This will cause unpredictable kernel oops or crash like
This patch ensures all delayed works done before entering PS to satisfy
our expectation, so use cancel_delayed_work_sync() instead. An exception
is delayed work ips_nic_off_wq because running task may be itself, so add
a parameter ips_wq to deinit function to handle this case.
rtlwifi_new: rtl8821ae: Fix connection loss 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 40b368af4b75
("rtlwifi: Fix alignment issues"); however, this change led to
instability in the connection. To restore stability, this change
was reverted in commit b8b8b16352cd ("rtlwifi: rtl8821ae: Fix connection
lost problem").
Unfortunately, the unaligned access caueses machine checks in ARM
architecture, and we were forced to evaluate the actual cause of the
problem on x86 platforms. Following a suggestion from Pkshih
<email address hidden>, it was found that by increasing the ASPM L1
latency from 0 to 7 fixed the stability. 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.
rtlwifi_new: rtl8821ae: Fix problem with unaligned read
Using a patch supplied by Realtek, the L1 latency for 0x70f is increased.
With this change, the byte read on x86_64 now works, and there will be
no unaligned access on AARCH64.
Signed-off-by: Larry Finger <email address hidden>
Merge pull request #315 from zerotier/kernel_version
Fix alignment fault on AARCH64 (Marvell Armada)
c336b74...
by
Adam Ierymenko <email address hidden>
Fix alignment fault on AARCH64 (Marvell Armada)
This fixes an alignment fault kernel panic on AARCH64 platforms, specifically the Marvell Armada chip in the espressobin network-oriented SBC but also probably other AARCH64 chips that don't like unaligned access.