1. 04 8月, 2015 1 次提交
  2. 28 5月, 2015 2 次提交
  3. 12 3月, 2015 2 次提交
    • E
      iwlwifi: pcie: allow the op_mode to freeze the stuck queue timer · e0b8d405
      Emmanuel Grumbach 提交于
      This allows the op_mode to let the transport know that a
      queue is currently frozen and that its timer should be
      stopped.
      When the queue is unfrozen, its timer should be set to
      expire after the remainder of the timeout has elapsed.
      This can be used when stations go to sleep. When a station
      goes to sleep, the op_mode can freeze the timer so that the
      queue will never be considered as stuck. When the station
      wakes up, the queue will be unfrozen.
      This is meant to avoid false positives that would happen if
      a buggy station goes to sleep for a very long time. In case
      we have a dedicated queue for this station (BA agreement)
      and it goes to sleep for a very long time, the queue would
      rightfully be stopped during all that time. In this case,
      the stuck queue timer could fire and that would be a false
      positive.
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      e0b8d405
    • E
      iwlwifi: pcie: speed up the Tx DMA stop flow · 36277234
      Emmanuel Grumbach 提交于
      We don't need to acquire MAC access for each access, it
      makes much more sense to keep the MAC access. This speeds
      up the Tx DMA stop flow significantly.
      Moreover, if one channel can't be stopped, stop the others
      but don't poll for them to avoid being stuck there for a
      long time.
      
      This solves a situation in which we were stuck in that flow
      for way too long with a spinlock held which led to a kernel
      panic.
      Reviewed-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      36277234
  4. 01 2月, 2015 5 次提交
  5. 22 1月, 2015 1 次提交
  6. 29 12月, 2014 1 次提交
  7. 01 12月, 2014 1 次提交
  8. 11 11月, 2014 1 次提交
    • E
      iwlwifi: pcie: introduce delay when waking up the device · 01e58a28
      Emmanuel Grumbach 提交于
      In some rare cases, the firmware can put the device to
      sleep after the driver requested the access. This is
      because the access request can take a short time to be
      propagated to the firmware.
      
      If that happens, the driver may think that it has access
      since the firmware hasn't put the device to sleep yet, but
      right after the driver's check, the firmware might put the
      device to sleep.
      
      Warn when this happens by allowing the firmware to finish
      the "put the device sleep" flow so that the driver will
      not get access to the device. This will make the issue
      visible.
      
      This still doesn't fix the race, but at least it makes
      it more visible.
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      01e58a28
  9. 14 9月, 2014 2 次提交
  10. 04 9月, 2014 6 次提交
  11. 25 6月, 2014 1 次提交
  12. 16 5月, 2014 1 次提交
  13. 13 5月, 2014 1 次提交
    • E
      iwlwifi: pcie: disable BHs in iwl_pcie_txq_check_wrptrs · d090f878
      Emmanuel Grumbach 提交于
      This fixes:
      
      =================================
      [ INFO: inconsistent lock state ]
      3.14.3+ #5 Tainted: G           O
      ---------------------------------
      inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
      swapper/3/0 [HC0[0]:SC1[3]:HE1:SE0] takes:
       (&(&txq->lock)->rlock){+.?...}, at: [<ffffffffa059803c>] iwl_pcie_enqueue_hcmd+0x12c/0x1000 [iwlwifi]
      {SOFTIRQ-ON-W} state was registered at:
        [<ffffffff810d9071>] __lock_acquire+0x5f1/0x13b0
        [<ffffffff810d9ee0>] lock_acquire+0xb0/0x1f0
        [<ffffffff817ef80e>] _raw_spin_lock+0x3e/0x80
        [<ffffffffa0598f7a>] iwl_pcie_txq_check_wrptrs+0x6a/0xb0 [iwlwifi]
        [<ffffffffa0594b5a>] iwl_pcie_irq_handler+0xdba/0x2670 [iwlwifi]
        [<ffffffff810ef1e0>] irq_thread_fn+0x20/0x50
        [<ffffffff810ef77f>] irq_thread+0x11f/0x150
        [<ffffffff810a04f0>] kthread+0xf0/0x110
        [<ffffffff817fa4bc>] ret_from_fork+0x7c/0xb0
      irq event stamp: 1142192
      hardirqs last  enabled at (1142192): [<ffffffff817efb6c>] _raw_spin_unlock_irq+0x2c/0x40
      hardirqs last disabled at (1142191): [<ffffffff817ef9ef>] _raw_spin_lock_irq+0x1f/0x80
      softirqs last  enabled at (1142188): [<ffffffff81079082>] _local_bh_enable+0x22/0x50
      softirqs last disabled at (1142189): [<ffffffff8107ad35>] irq_exit+0xe5/0xf0
      
      other info that might help us debug this:
       Possible unsafe locking scenario:
      
             CPU0
             ----
        lock(&(&txq->lock)->rlock);
        <Interrupt>
          lock(&(&txq->lock)->rlock);
      
      Fixes: ea68f460 ("iwlwifi: pcie: clarify TX queue need_update handling")
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      d090f878
  14. 07 5月, 2014 3 次提交
  15. 14 4月, 2014 1 次提交
  16. 13 4月, 2014 2 次提交
  17. 06 4月, 2014 1 次提交
    • E
      iwlwifi: pcie: don't leave the new NICs awake for commands · e7f76340
      Emmanuel Grumbach 提交于
      A hardware bug had been discovered on 7260 / 3160 and 7265
      and the workaround for this bug is to force the NIC to stay
      awake as long as we have host commands in flight. This
      workaround has been introduced for all NICs in a previous
      patch:
      
      b9439491 ("iwlwifi: pcie: keep the NIC awake when commands are in flight")
      
      In newer NICs, this bug is solved, so we can let the NIC go
      to sleep even when we send commands. The hardware will wake
      up when we increment the scheduler write pointer.
      Make the workaround conditional to only use it on affected
      hardware.
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      e7f76340
  18. 21 2月, 2014 1 次提交
  19. 13 2月, 2014 1 次提交
  20. 04 2月, 2014 1 次提交
  21. 20 1月, 2014 1 次提交
    • E
      iwlwifi: pcie: don't panic on host commands in iwldvm · 23e76d1a
      Emmanuel Grumbach 提交于
      None of the devices supported by iwldvm have support for
      shadow registers. This means that we wake the NIC
      when we increment the write pointer on Tx ring.
      This happened even before my bad commit mentionned below.
      Since my commit below, we wake up the NIC when we put a
      host command on the ring regardless of shadow register
      support. This means that in iwldvm (when the NIC doesn't
      support shadow register), we wake up the NIC twice:
      
      pcie_enqueue_hcmd:
      	wake up the NIC
      	iwl_pcie_txq_inc_wr_ptr:
      		wake up the NIC - no shadow reg support
      
      Since waking up the NIC means that we need to acquire a
      spinlock, this obviously leads to a recursive spinlock
      and hence a freeze.
      
      Fixes: b9439491 ("iwlwifi: pcie: keep the NIC awake when commands are in flight")
      Reported-by: NJanusz Dziedzic <janusz.dziedzic@gmail.com>
      Reviewed-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      23e76d1a
  22. 01 1月, 2014 3 次提交
  23. 22 12月, 2013 1 次提交