1. 09 11月, 2016 1 次提交
    • A
      mwifiex: prevent register accesses after host is sleeping · ec815dd2
      Amitkumar Karwar 提交于
      Following is mwifiex driver-firmware host sleep handshake.
      It involves three threads. suspend handler, interrupt handler, interrupt
      processing in main work queue.
      
      1) Enter suspend handler
      2) Download HS_CFG command
      3) Response from firmware for HS_CFG
      4) Suspend thread waits until handshake completes(i.e hs_activate becomes
         true)
      5) SLEEP from firmware
      6) SLEEP confirm downloaded to firmware.
      7) SLEEP confirm response from firmware
      8) Driver processes SLEEP confirm response and set hs_activate to wake up
      suspend thread
      9) Exit suspend handler
      10) Read sleep cookie in loop and wait until it indicates firmware is
      sleep.
      11) After processing SLEEP confirm response, we are at the end of interrupt
      processing routine. Recheck if there are interrupts received while we were
      processing them.
      
      During suspend-resume stress test, it's been observed that we may end up
      acessing PCIe hardware(in 10 and 11) when PCIe bus is closed which leads
      to a kernel crash.
      
      This patch solves the problem with below changes.
      a) action 10 above can be done before 8
      b) Skip 11 if hs_activated is true. SLEEP confirm response
      is the last interrupt from firmware. No need to recheck for
      pending interrupts.
      c) Add flush_workqueue() in suspend handler.
      Signed-off-by: NAmitkumar Karwar <akarwar@marvell.com>
      Reviewed-by: NBrian Norris <briannorris@chromium.org>
      Tested-by: NBrian Norris <briannorris@chromium.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      ec815dd2
  2. 09 9月, 2016 3 次提交
  3. 04 9月, 2016 3 次提交
  4. 19 7月, 2016 3 次提交
  5. 08 7月, 2016 3 次提交
  6. 14 6月, 2016 2 次提交
  7. 04 6月, 2016 1 次提交
  8. 14 4月, 2016 3 次提交
  9. 08 4月, 2016 2 次提交
  10. 07 3月, 2016 1 次提交
  11. 25 2月, 2016 1 次提交
  12. 07 2月, 2016 6 次提交
  13. 29 1月, 2016 3 次提交
  14. 07 1月, 2016 2 次提交
  15. 30 12月, 2015 1 次提交
  16. 18 11月, 2015 1 次提交
  17. 29 9月, 2015 1 次提交
  18. 13 8月, 2015 1 次提交
  19. 06 8月, 2015 1 次提交
  20. 03 6月, 2015 1 次提交
    • A
      mwifiex: device dump support via devcoredump framework · 57670ee8
      Amitkumar Karwar 提交于
      Currently device dump generated in the driver is retrieved
      using ethtool set/get dump commands. We will get rid of
      ethtool approach and use devcoredump framework.
      
      Device dump can be trigger by
      cat /debugfs/mwifiex/mlanX/device_dump
      and when the dump operation is completed, data can be read by
      cat /sys/class/devcoredump/devcdX/data
      
      We have prepared following script to split device dump data
      into multiple files.
      
       [root]# cat mwifiex_split_dump_data.sh
       #!/bin/bash
       # usage: ./mwifiex_split_dump_data.sh dump_data
      
       fw_dump_data=$1
      
       mem_type="driverinfo ITCM DTCM SQRAM APU CIU ICU MAC"
      
       for name in ${mem_type[@]}
       do
           sed -n "/Start dump $name/,/End dump/p" $fw_dump_data  > tmp.$name.log
           if [ ! -s tmp.$name.log ]
           then
               rm -rf tmp.$name.log
           else
               #Remove the describle info "Start dump" and "End dump"
               sed '1d' tmp.$name.log | sed '$d' > /data/$name.log
               if [ -s /data/$name.log ]
               then
                   echo "generate /data/$name.log"
               else
                   sed '1d' tmp.$name.log | sed '$d' > /var/$name.log
                   echo "generate /var/$name.log"
               fi
               rm -rf tmp.$name.log
           fi
       done
      Signed-off-by: NAmitkumar Karwar <akarwar@marvell.com>
      Signed-off-by: NCathy Luo <cluo@marvell.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      57670ee8