1. 14 12月, 2010 4 次提交
  2. 01 12月, 2010 1 次提交
  3. 18 11月, 2010 1 次提交
  4. 16 11月, 2010 3 次提交
  5. 12 10月, 2010 4 次提交
  6. 06 10月, 2010 2 次提交
    • H
      rt2x00: Fix oops caused by error path in rt2x00lib_start · 1f0280cb
      Helmut Schaa 提交于
      When rt2x00lib_enable_radio fails to enable the radio, rt2x00lib_start
      will call rt2x00queue_uninitialize to uninitialize the queues. Since,
      the queues are not initialized here but already in rt2x00lib_initialize
      we shouldn't uninitialize the queues here. Otherwise, a consecutive call
      to rt2x00lib_start will oops (see below) because it assumes the queues
      are already initialized.
      
      BUG: unable to handle kernel NULL pointer dereference at 00000010
      IP: [<f8d2d901>] :rt2800pci:rt2800pci_clear_entry+0x1/0x40
      *pde = 00000000
      Oops: 0000 [#1] SMP
      Modules linked in: ... rt2800pci ...
      
      Pid: 5995, comm: hostapd Not tainted (2.6.27.8 #1)
      EIP: 0060:[<f8d2d901>] EFLAGS: 00210246 CPU: 3
      EIP is at rt2800pci_clear_entry+0x1/0x40 [rt2800pci]
      EAX: 00000000 EBX: f698863c ECX: 00200296 EDX: f8d2dee0
      ESI: f6988600 EDI: f5b6f000 EBP: 00000000 ESP: f6d75e4c
       DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
      Process hostapd (pid: 5995, ti=f6d74000 task=f6ce2300 task.ti=f6d74000)
      Stack: f698863c fa00eaec 00000000 f5b6f000 00000000 f7b67000 f5b6e280 fa00c629
            f5b6f000 00000000 fa00ca3d f7b67480 00000001 fa177d4c 01b6e890 f7b67000
            00000000 f7b67000 00000001 00001003 00001002 c066c366 f7b67000 c0668ad0
      Call Trace:
       [<fa00eaec>] rt2x00queue_init_queues+0x5c/0x90 [rt2x00lib]
       [<fa00c629>] rt2x00lib_enable_radio+0x29/0xa0 [rt2x00lib]
       [<fa00ca3d>] rt2x00lib_start+0x5d/0xd0 [rt2x00lib]
       [<fa177d4c>] ieee80211_do_open+0x21c/0x510 [mac80211]
       [<c066c366>] dev_open+0x56/0xb0
       [<c0668ad0>] dev_set_rx_mode+0x20/0x40
       [<c066a67f>] dev_change_flags+0x7f/0x190
       [<c06b1495>] devinet_ioctl+0x515/0x690
       [<c0668d24>] __dev_get_by_name+0x74/0x90
       [<c065d3f0>] sock_ioctl+0xd0/0x240
       [<c065d320>] sock_ioctl+0x0/0x240
       [<c018179b>] vfs_ioctl+0x2b/0x90
       [<c0181a5b>] do_vfs_ioctl+0x25b/0x2a0
       [<c0181af6>] sys_ioctl+0x56/0x70
       [<c0103262>] syscall_call+0x7/0xb
       [<c0700000>] add_card+0xad0/0xba0
       =======================
      Code: 83 78 08 0e 74 14 8b 02 8b 48 04 85 c9 0f 99 c0 0f b6 c0 c3 8d b6
            00 00 00 00 8b 02 8b 40 04 85 c0 0f 99 c0 0f b6 c0 c3 66 90 53 <8b>
            48 10 8b 58 08 8b 40 04 83 78 08 0e 74 15 8b 11 83 c2 04 8b
      EIP: [<f8d2d901>] rt2800pci_clear_entry+0x1/0x40 [rt2800pci] SS:ESP 0068:f6d75e4c
      ---[ end trace cff9a5c094bb8837 ]---
      Reported-by: NJoshua Smith <jesmith@kaon.com>
      Signed-off-by: NHelmut Schaa <helmut.schaa@googlemail.com>
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      1f0280cb
    • H
      rt2x00: rework tx status handling in rt2800pci · 96c3da7d
      Helmut Schaa 提交于
      This patch changes the way tx status reports are handled by rt2800pci.
      Previously rt2800pci would sometimes lose tx status reports as the
      TX_STA_FIFO register is a fifo of 16 entries that can overflow in case
      we don't read it often/fast enough. Since interrupts are disabled in the
      device during the execution of the interrupt thread it happend sometimes
      under high network and CPU load that processing took too long and a few
      tx status reports were dropped by the hw.
      
      To fix this issue the TX_STA_FIFO register is read directly in the
      interrupt handler and stored in a kfifo which is large enough to hold
      all status reports of all used tx queues.
      
      To process the status reports a new tasklet txstatus_tasklet is used.
      Using the already used interrupt thread is not possible since we don't
      want to disable the TX_FIFO_STATUS interrupt while processing them and
      it is not possible to schedule the interrupt thread multiple times for
      execution. A tasklet instead can be scheduled multiple times which
      allows to leave the TX_FIFO_STATUS interrupt enabled while a previously
      scheduled tasklet is still executing.
      
      In short: All other interrupts are handled in the interrupt thread as
      before. Only the TX_FIFO_STATUS interrupt is partly handled in the
      interrupt handler and finished in the according tasklet.
      
      One drawback of this patch is that it duplicates some code from
      rt2800lib. However, that can be cleaned up in the future once the
      rt2800usb and rt2800pci tx status handling converge more.
      
      Using this patch on a Ralink RT3052 embedded board gives me a reliable
      wireless connection even under high CPU and network load. I've
      transferred several gigabytes without any queue lockups.
      Signed-off-by: NHelmut Schaa <helmut.schaa@googlemail.com>
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      96c3da7d
  7. 01 9月, 2010 1 次提交
    • 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
  8. 26 8月, 2010 1 次提交
  9. 17 8月, 2010 3 次提交
  10. 17 7月, 2010 1 次提交
    • S
      rt2x00: Fix lockdep warning in rt2x00lib_probe_dev() · 9acd56d3
      Stephen Boyd 提交于
      The rt2x00dev->intf_work workqueue is never initialized when a driver is
      probed for a non-existent device (in this case rt2500usb). On such a
      path we call rt2x00lib_remove_dev() to free any resources initialized
      during the probe before we use INIT_WORK to initialize the workqueue.
      This causes lockdep to get confused since the lock used in the workqueue
      hasn't been initialized yet but is now being acquired during
      cancel_work_sync() called by rt2x00lib_remove_dev().
      
      Fix this by initializing the workqueue first before we attempt to probe
      the device. This should make lockdep happy and avoid breaking any
      assumptions about how the library cleans up after a probe fails.
      
      phy0 -> rt2x00lib_probe_dev: Error - Failed to allocate device.
      INFO: trying to register non-static key.
      the code is fine but needs lockdep annotation.
      turning off the locking correctness validator.
      Pid: 2027, comm: modprobe Not tainted 2.6.35-rc5+ #60
      Call Trace:
       [<ffffffff8105fe59>] register_lock_class+0x152/0x31f
       [<ffffffff81344a00>] ? usb_control_msg+0xd5/0x111
       [<ffffffff81061bde>] __lock_acquire+0xce/0xcf4
       [<ffffffff8105f6fd>] ? trace_hardirqs_off+0xd/0xf
       [<ffffffff81492aef>] ?  _raw_spin_unlock_irqrestore+0x33/0x41
       [<ffffffff810628d5>] lock_acquire+0xd1/0xf7
       [<ffffffff8104f037>] ? __cancel_work_timer+0x99/0x17e
       [<ffffffff8104f06e>] __cancel_work_timer+0xd0/0x17e
       [<ffffffff8104f037>] ? __cancel_work_timer+0x99/0x17e
       [<ffffffff8104f136>] cancel_work_sync+0xb/0xd
       [<ffffffffa0096675>] rt2x00lib_remove_dev+0x25/0xb0 [rt2x00lib]
       [<ffffffffa0096bf7>] rt2x00lib_probe_dev+0x380/0x3ed [rt2x00lib]
       [<ffffffff811d78a7>] ? __raw_spin_lock_init+0x31/0x52
       [<ffffffffa00bbd2c>] ? T.676+0xe/0x10 [rt2x00usb]
       [<ffffffffa00bbe4f>] rt2x00usb_probe+0x121/0x15e [rt2x00usb]
       [<ffffffff813468bd>] usb_probe_interface+0x151/0x19e
       [<ffffffff812ea08e>] driver_probe_device+0xa7/0x136
       [<ffffffff812ea167>] __driver_attach+0x4a/0x66
       [<ffffffff812ea11d>] ? __driver_attach+0x0/0x66
       [<ffffffff812e96ca>] bus_for_each_dev+0x54/0x89
       [<ffffffff812e9efd>] driver_attach+0x19/0x1b
       [<ffffffff812e9b64>] bus_add_driver+0xb4/0x204
       [<ffffffff812ea41b>] driver_register+0x98/0x109
       [<ffffffff813465dd>] usb_register_driver+0xb2/0x173
       [<ffffffffa00ca000>] ? rt2500usb_init+0x0/0x20 [rt2500usb]
       [<ffffffffa00ca01e>] rt2500usb_init+0x1e/0x20 [rt2500usb]
       [<ffffffff81000203>] do_one_initcall+0x6d/0x17a
       [<ffffffff8106cae8>] sys_init_module+0x9c/0x1e0
       [<ffffffff8100296b>] system_call_fastpath+0x16/0x1b
      Signed-off-by: NStephen Boyd <bebarino@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      9acd56d3
  11. 13 7月, 2010 5 次提交
  12. 01 7月, 2010 2 次提交
  13. 16 6月, 2010 2 次提交
  14. 03 6月, 2010 2 次提交
  15. 29 4月, 2010 1 次提交
  16. 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
  17. 09 2月, 2010 1 次提交
  18. 06 1月, 2010 1 次提交
  19. 22 12月, 2009 2 次提交
  20. 29 11月, 2009 1 次提交
  21. 20 11月, 2009 1 次提交
    • J
      mac80211: request TX status where needed · 7351c6bd
      Johannes Berg 提交于
      Right now all frames mac80211 hands to the driver
      have the IEEE80211_TX_CTL_REQ_TX_STATUS flag set to
      request TX status. This isn't really necessary, only
      the injected frames need TX status (the latter for
      hostapd) so move setting this flag.
      
      The rate control algorithms also need TX status, but
      they don't require it.
      
      Also, rt2x00 uses that bit for its own purposes and
      seems to require it being set for all frames, but
      that can be fixed in rt2x00.
      
      This doesn't really change anything for any drivers
      but in the future drivers using hw-rate control may
      opt to not report TX status for frames that don't
      have the IEEE80211_TX_CTL_REQ_TX_STATUS flag set.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Acked-by: Ivo van Doorn <IvDoorn@gmail.com> [rt2x00 bits]
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      7351c6bd