#9654: ath: DMA failed to stop in 10 ms
------------------------+-----------------------------------
  Reporter:  anonymous  |      Owner:  nbd
      Type:  defect     |     Status:  reopened
  Priority:  normal     |  Milestone:  Barrier Breaker 14.07
 Component:  kernel     |    Version:  Trunk
Resolution:             |   Keywords:  atheros
------------------------+-----------------------------------

Comment (by gvalkov):

 I spent enough time in the beginning of August to locate the exact code
 that was causing the wifi to drop connections. I tested many many times.
 The issue was only present when programmatic access is enabled to the ADC.
 This is used to enhance the device entropy, unfortunately on some devices
 like 1043ND v1.8 it caused wifi disconnects and speed reduction.

 '''To summarize:'''
 The bug was originally introduced with:
 https://dev.openwrt.org/changeset/38486

 Which added the following patch:
 ath9k: gather entropy from raw ADC I/Q samples (use the least significant
 bit only)
 /package/kernel/mac80211/patches/550-ath9k_entropy_from_adc.patch

 The issue was resolved in r41952, where the code is called only once when
 the driver gets loaded. This commit disabled calling of the code during
 device operation.

 '''More details about my research:'''
 This line is sufficient to enable access to the ADC:
 REG_RMW_FIELD(ah, AR_PHY_TEST, AR_PHY_TEST_BBB_OBS_SEL, 1);
 Alas it's also sufficient to trigger the bugs. I used printk() to monitor
 the contents of buf[] and also to keep a track when and how often this
 function is called, depending on different experiments that I set. Without
 calling it, only zeroes are read in buf[] so we can't enhance the entropy.
 If called only once during init, then data is still received for the next
 few calls, and then back to zeroes. Normally this function is called ~
 every 100 ms.

 I also modified the code so that less samples are captured. But even if I
 reduce this to a single sample, in which case I have to call the function
 1024 times to get a result, this is still enough to trigger the bug. I
 also tried disabling ADC access after reading it, but it didn't help
 either.


 '''Now if someone messed up again or introduced a new bug, that would be
 another thing, but r41952 definitely fixed the disconnects and speed
 drop.'''

--
Ticket URL: <https://dev.openwrt.org/ticket/9654#comment:536>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to