Skip to content
Snippets Groups Projects
  1. Jun 19, 2014
  2. Sep 11, 2012
  3. Jul 17, 2012
    • Daniel Drake's avatar
      libertas: handle command failure immediately · 9c3099f7
      Daniel Drake authored
      
      Fail commands immediately when the request cannot be sent to the hardware.
      
      This solves the following deadlock:
       1. Two commands are in the queue.
       2. The first command is sent, but causes a timeout, which kicks off an
          asynchronous device reset
       3. The second command is submitted to the device, and fails. The failure
          is noted but the existing code waits for the timeout handler to take
          care of the failure.
       4. The device reset kicks in, causing the device "surprise removed" flag
          to be set as the device disappears from the bus.
       5. lbs_thread notes this and enters "adapter removed; waiting to die"
          mode, without processing any further command timeouts.
      
      While adjusting lbs thread logic to handle this situation may be one way
      to fix this, it seems more practical to simplify handling of host_to_card
      failure so that the commands are failed immediately without waiting for
      more compliated timeout logic to kick in.
      
      Signed-off-by: default avatarDaniel Drake <dsd@laptop.org>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      9c3099f7
    • Daniel Drake's avatar
      libertas: Update 11d info only when interface is active · 20d2ebe5
      Daniel Drake authored
      
      reg_notifier can be called before the interface is up.
      Handle this correctly by storing the requested country code, then
      apply the relevant configuration when the interface is brought up.
      
      Signed-off-by: default avatarDaniel Drake <dsd@laptop.org>
      Acked-by: default avatarDan Williams <dcbw@redhat.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      20d2ebe5
  4. Oct 31, 2011
  5. Aug 09, 2011
    • Daniel Drake's avatar
      libertas: disable functionality when interface is down · d2e7b342
      Daniel Drake authored
      
      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: default avatarDaniel Drake <dsd@laptop.org>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      d2e7b342
  6. Jul 11, 2011
    • Daniel Drake's avatar
      libertas: fix handling of command timeout, completion and interruption · df90d843
      Daniel Drake authored
      
      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: default avatarDaniel Drake <dsd@laptop.org>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      df90d843
    • Olivier Sobrie's avatar
      libertas: fix errors in functions accessing module registers · edcc3604
      Olivier Sobrie authored
      
      Problems located in the two functions lbs_set_reg() and lbs_get_reg():
      - The offset field of struct cmd_ds_reg_access was not filled in
      - The test on the return code of lbs_cmd_with_response() in function
        lbs_get_reg() was inverted
      
      Signed-off-by: default avatarOlivier Sobrie <olivier@sobrie.be>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      edcc3604
  7. Jun 07, 2011
  8. May 31, 2011
  9. May 11, 2011
  10. May 10, 2011
  11. Apr 28, 2011
  12. Feb 03, 2011
  13. Nov 16, 2010
  14. Jul 27, 2010
  15. Jul 12, 2010
  16. Jun 23, 2010
  17. Jun 02, 2010
  18. Mar 30, 2010
    • Tejun Heo's avatar
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo authored
      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: default avatarTejun Heo <tj@kernel.org>
      Guess-its-ok-by: default avatarChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  19. Dec 22, 2009
Loading