1. 04 10月, 2011 1 次提交
    • D
      libertas: detect TX lockups and reset hardware · 8f641d93
      Daniel Drake 提交于
      Recent patches added support for resetting the SD8686 hardware when
      commands time out, which seems to happen quite frequently soon after
      resuming the system from a Wake-on-WLAN-triggered resume.
      
      At http://dev.laptop.org/ticket/10969 we see the same thing happen
      with transmits. In this case, the hardware will fail to respond to
      a frame passed for transmission, and libertas (correctly) will block
      all further commands and transmissions as the hardware can only
      deal with one thing at a time. This results in a lockup while the
      system waits indefinitely for the dead card to respond.
      
      Hook up a TX lockup timer to detect this and reset the hardware.
      Signed-off-by: NDaniel Drake <dsd@laptop.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      8f641d93
  2. 18 8月, 2011 1 次提交
  3. 10 8月, 2011 1 次提交
    • D
      libertas: disable functionality when interface is down · d2e7b342
      Daniel Drake 提交于
      Modify the driver so that it does not function when the interface is
      down, in preparation for runtime power management.
      
      No commands can be run while the interface is down, so the ndo_dev_stop
      routine now directly does all necessary work (including asking the device
      to disconnect from the network and disabling multicast functionality)
      directly.
      
      power_save and power_restore hooks are added meaning that card drivers
      can take steps to turn the device off when the interface is down.
      
      The MAC address can now only be changed when all interfaces are down;
      the new address will be programmed when an interface gets brought up.
      This matches mac80211 behaviour.
      
      Also, some small cleanups/simplifications were made in the surrounding
      device handling logic.
      Signed-off-by: NDaniel Drake <dsd@laptop.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      d2e7b342
  4. 09 8月, 2011 1 次提交
  5. 21 7月, 2011 1 次提交
  6. 12 7月, 2011 1 次提交
    • D
      libertas: fix handling of command timeout, completion and interruption · df90d843
      Daniel Drake 提交于
      When commands time out, corruption ensues. As lbs_complete_command()
      is called without locking, the command node is mistakenly freed twice.
      Also fixed up locking here in a few other places.
      
      The nature of command timeout may be that the card didn't even
      acknowledge receipt of the request. Detect this case and reset dnld_sent
      so that other commands don't hang forever.
      
      When cmdnodes are moved between the free list and the pending list,
      their list heads should be reinitialized. Fixed this.
      
      Sometimes commands are completed without actually submitting them or
      removing them from cmdpendingq. We must remember to remove them from
      cmdpendingq in these cases, so handle this in lbs_complete_command().
      
      Harmless signals generated during suspend/resume were interrupting
      lbs_cmd. Convert to an uninterruptible sleep to avoid this.
      
      lbs_thread must be woken up every time there is some new work to do.
      I found that when 2 commands are queued, ther completion of the first
      command would not wake up lbs_thread to submit the second. Poke lbs_thread
      at the end of lbs_complete_command() to fix this.
      Signed-off-by: NDaniel Drake <dsd@laptop.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      df90d843
  7. 07 6月, 2011 1 次提交
  8. 12 5月, 2011 3 次提交
  9. 06 5月, 2011 1 次提交
    • D
      libertas: remove tx_timeout handler · 7e4b4eec
      Daniel Drake 提交于
      As described at http://marc.info/?l=linux-netdev&m=130428493104730&w=2
      libertas frequently generates spurious tx timeouts, because the tx
      queue is brought down for extended periods during scanning. The net
      layer takes a look and incorrectly assumes the queue has been down for
      several seconds, and generates a tx_timeout.
      
      One way to fix this is to bump the trans_start counter while scanning
      so that the network layer knows that the device is still alive, but
      I think the tx_timeout handler is implemented wrongly here and not of
      any real use, so I vote to remove it.
      
      As explained at http://marc.info/?l=linux-wireless&m=130430311115755&w=2
      the watchdog is primarily meant to deal with lockup on the hardware TX
      path (detected by the tx queue being stopped for an extended period of
      time), but this is unlikely to happen with libertas. In this case, the tx
      queue is stopped only while waiting for lbs_thread to send the queued frame
      to the driver, and lbs_thread wakes up the queue immediately after, even
      if the frame could not be sent correctly.
      
      So, the only hardware-related possibility that this catches is if
      hw_host_to_card hangs - this is something I have never seen. And if it
      were to happen, nothing done by lbs_tx_timeout would actually wake up
      lbs_thread any quicker than otherwise.
      
      Removing this oddly-behaving spuriously-firing tx_timeout handler should
      fix an occasional kernel crash during resume
      (http://dev.laptop.org/ticket/10748)
      Signed-off-by: NDaniel Drake <dsd@laptop.org>
      Acked-by: NDan Williams <dcbw@redhat.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      7e4b4eec
  10. 29 4月, 2011 1 次提交
  11. 04 2月, 2011 1 次提交
  12. 30 11月, 2010 1 次提交
  13. 17 11月, 2010 1 次提交
  14. 09 11月, 2010 1 次提交
  15. 17 8月, 2010 1 次提交
    • D
      libertas: add two-stage firmware request helper · 72f7a667
      Dan Williams 提交于
      SDIO, GSPI, and CS all use 2-stage firmware and the loading
      process and logic should be the same.  Allow module parameters
      to override the automatic firmware choice, otherwise just walk
      the bus driver's firmware table and pick out the first firmware
      pair that exists for the given model.
      
      Some special care is taken to allow overriding of just the helper
      or the main firmware, but let the other of the pair be chosen
      automatically.
      Signed-off-by: NDan Williams <dcbw@redhat.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      72f7a667
  16. 06 8月, 2010 1 次提交
  17. 28 7月, 2010 4 次提交
  18. 13 7月, 2010 1 次提交
  19. 24 6月, 2010 3 次提交
  20. 03 6月, 2010 1 次提交
  21. 10 5月, 2010 1 次提交
  22. 04 4月, 2010 1 次提交
    • J
      net: convert multicast list to list_head · 22bedad3
      Jiri Pirko 提交于
      Converts the list and the core manipulating with it to be the same as uc_list.
      
      +uses two functions for adding/removing mc address (normal and "global"
       variant) instead of a function parameter.
      +removes dev_mcast.c completely.
      +exposes netdev_hw_addr_list_* macros along with __hw_addr_* functions for
       manipulation with lists on a sandbox (used in bonding and 80211 drivers)
      Signed-off-by: NJiri Pirko <jpirko@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      22bedad3
  23. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  24. 25 3月, 2010 1 次提交
  25. 28 2月, 2010 1 次提交
  26. 09 2月, 2010 1 次提交
  27. 23 12月, 2009 7 次提交