1. 14 12月, 2010 4 次提交
  2. 16 11月, 2010 3 次提交
  3. 12 10月, 2010 4 次提交
  4. 01 9月, 2010 2 次提交
    • I
      rt2x00: Cleanup rt2x00usb_watchdog_reset_tx · cd35a391
      Ivo van Doorn 提交于
      rt2x00usb_watchdog_reset_tx performs the same task
      as rt2x00usb_kill_tx_queue, with the only difference
      is that it waits for all entries to be returned to
      the driver and for all frames the status has been
      reported to mac80211.
      
      We can easily split this task by calling rt2x00usb_kill_tx_queue,
      sleep for a short period and invoke the TX status reporting
      function. By adding the sleep() to the kill_entry we make sure
      that even during shutdown we guarentee the entry has been killed when
      the function returns. To make this work correctly the interrupt
      handlers have to be updated to prevent checking for the RADIO_ENABLED
      flag too early which prevents the ownership of the entry to be reset.
      Additionally a check for the DEVICE_PRESENT flag is not required but
      is nice to prevent race conditions when the device was unplugged.
      
      Additionally rather then calling rt2x00usb_work_txdone() for
      status reporting we let the driver perform the TX status reporting
      first. If this is not sufficient then rt2x00usb_work_txdone() will
      still be used to cleanup the mess.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Acked-by: NGertjan van Wingerde <gwingerde@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      cd35a391
    • I
      rt2x00: Split watchdog check into a DMA and STATUS timeout · 652a9dd2
      Ivo van Doorn 提交于
      The watchdog for rt2800usb triggers frequently causing all URB's
      to be canceled often enough to interrupt the normal TX flow.
      More research indicated that not the URB upload to the USB host
      were hanging, but instead the TX status reports.
      
      To correctly detect what is going on, we introduce Q_INDEX_DMA_DONE
      which is an index counter between Q_INDEX_DONE and Q_INDEX and indicates
      if the frame has been transfered to the device.
      
      This also requires the rt2x00queue timeout functions to be updated
      to differentiate between a DMA timeout (time between Q_INDEX and
      Q_INDEX_DMA_DONE timeout) and a STATUS timeout (time between
      Q_INDEX_DMA_DONE and Q_INDEX_DONE timeout)
      
      All Q_INDEX_DMA_DONE code was taken from the RFC from
      Helmut Schaa <helmut.schaa@googlemail.com> for the implementation
      for watchdog for rt2800pci.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Acked-by: NGertjan van Wingerde <gwingerde@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      652a9dd2
  5. 26 8月, 2010 3 次提交
  6. 17 8月, 2010 2 次提交
  7. 13 7月, 2010 1 次提交
    • I
      rt2x00: Implement watchdog monitoring · c965c74b
      Ivo van Doorn 提交于
      Implement watchdog monitoring for USB devices (PCI support can
      be added later). This will determine if URBs being uploaded to
      the hardware are actually returning. Both rt2500usb and rt2800usb
      have shown that URBs being uploaded can remain hanging without
      being released by the hardware.
      By using this watchdog, a queue can be reset when this occurs.
      For rt2800usb it has been tested that the connection is preserved
      even though this interruption.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      c965c74b
  8. 01 7月, 2010 4 次提交
  9. 03 6月, 2010 3 次提交
  10. 13 5月, 2010 1 次提交
  11. 17 4月, 2010 1 次提交
  12. 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
  13. 12 11月, 2009 2 次提交
  14. 07 11月, 2009 2 次提交
  15. 21 4月, 2009 1 次提交
  16. 10 2月, 2009 1 次提交
  17. 30 1月, 2009 1 次提交
  18. 13 1月, 2009 1 次提交
    • I
      rt2x00: Fix segementation fault · d15cfc3a
      Ivo van Doorn 提交于
      The queue_end() macro points to 1 position after the
      queue, which means that if we want to know if queue
      is at the end of the queue we should first increment
      the position and then check if it is a valid entry.
      
      This fixes a segmentation fault which only occurs when
      the device has enough endpoints to provide a dedicated
      endpoint for all TX queues (which likely won't happen
      for rt2500usb and rt73usb, but will happen for rt2800usb).
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      d15cfc3a
  19. 26 11月, 2008 2 次提交
    • I
      rt2x00: Detect USB BULK in/out endpoints · f1ca2167
      Ivo van Doorn 提交于
      Instead of hardcoding the used in/out endpoints
      we should detect them by walking through all
      available endpoints.
      
      rt2800usb will gain the most out of this, because
      the legacy drivers indicate that there are multiple
      endpoints available.
      However this code might benefit at least rt73usb as
      well for the MIMO queues, and if we are really lucky
      rt2500usb will benefit because for the TX and PRIO
      queues.
      
      Even if rt2500usb and rt73usb do not get better performance
      after this patch, the endpoint detection still belongs to
      rt2x00usb, and it shouldn't hurt to always try to detect
      the available endpoints.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      f1ca2167
    • I
      rt2x00: Move rt73usb register access wrappers into rt2x00usb · 0f829b1d
      Ivo van Doorn 提交于
      rt2500usb and rt73usb have different register word sizes,
      for that reason the register access wrappers were never
      moved into rt2x00usb.
      With rt2800usb on its way, we should favor the 32bit
      register access and move those wrappers into rt2x00usb.
      That saves duplicate code, since only rt2500usb will
      need the special 16bit wrappers.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      0f829b1d
  20. 22 11月, 2008 1 次提交
    • I
      rt2x00: Fix race condition when using inderect registers · 8ff48a8b
      Ivo van Doorn 提交于
      Indirect registers require multiple calls to the CSR
      register in order to access the indirect registers.
      This must be protected under a lock to prevent race
      conditions which could cause invalid data to
      be returned when reading from the indirect register or silent
      failures when writing data to the indirect register.
      
      USB drivers where already protected under a mutex,
      so rename the mutex and make PCI drivers use the mutex
      as well.
      This now means that BBP and RF registers are no longer
      accessible in interrupt context. That is not a bad
      situation since the slow behavior of accessing
      those registers means we don't _want_ to access them
      in interrupt context either.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      8ff48a8b