1. 13 4月, 2014 2 次提交
    • J
      iwlwifi: pcie: clarify RX queue need_update handling and locking · 5d63f926
      Johannes Berg 提交于
      When shadow registers are enabled, then need_update never needs
      to be set, so move the need_update handling into the function
      that really needs to do it (iwl_pcie_rxq_inc_wr_ptr) and also
      separate the check when it woke up. While at it, convert it to
      bool.
      
      This also clarifies the locking and means the irq_lock needs to
      no longer be held for any such updates.
      
      The irq_lock also doesn't have to be held for restocking since
      everything else locks the RX queue properly, so remove that and
      finally disentangle the two locks entirely so there aren't any
      dependencies between the two left.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      5d63f926
    • J
      iwlwifi: pcie: implement GRO without NAPI · f14d6b39
      Johannes Berg 提交于
      Use the new NAPI infrastructure added to mac80211 to get
      GRO. We don't really implement NAPI since we don't have
      a real poll function and we never schedule a NAPI poll.
      Instead of this, we collect all the packets we got from a
      single interrupt and then call napi_gro_flush().
      
      This allows us to benefit from GRO. In half duplex medium
      like WiFi, its main advantage is that it reduces the number
      of TCP Acks, hence improving the TCP Rx performance.
      
      Since we call the Rx path with a spinlock held, remove
      the might_sleep mention from the op_mode's API.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Reviewed-by: NIdo Yariv <ido@wizery.com>
      [Squash different patches and rewrite the commit message]
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      f14d6b39
  2. 10 3月, 2014 1 次提交
  3. 13 2月, 2014 1 次提交
  4. 04 2月, 2014 1 次提交
  5. 14 1月, 2014 1 次提交
  6. 01 1月, 2014 1 次提交
  7. 22 12月, 2013 5 次提交
  8. 18 12月, 2013 8 次提交
  9. 10 12月, 2013 1 次提交
  10. 26 11月, 2013 2 次提交
  11. 09 8月, 2013 2 次提交
  12. 06 8月, 2013 1 次提交
  13. 26 7月, 2013 1 次提交
  14. 16 7月, 2013 1 次提交
  15. 25 6月, 2013 2 次提交
    • J
      iwlwifi: always use 'rxq' as RX queue struct name · fecba09e
      Johannes Berg 提交于
      A few places use just 'q', use 'rxq' there like all
      other places.
      Reviewed-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      fecba09e
    • J
      iwlwifi: pcie: rework RX buffer list init and freeing · c7df1f4b
      Johannes Berg 提交于
      The PCIe code has an array of buffer descriptors (RXBs) that have pages
      and DMA mappings attached. In regular use, the array isn't used and the
      buffers are either on the hardware receive queue or the rx_free/rx_used
      lists for recycling.
      
      Occasionally, during module unload, we'd see a warning from this:
      
      WARNING: at lib/list_debug.c:32 __list_add+0x91/0xa0()
      list_add corruption. prev->next should be next (c31c98cc), but was c31c80bc. (prev=c31c80bc).
      Pid: 519, comm: rmmod Tainted: G        W  O 3.4.24-dev #3
      Call Trace:
       [<c10335b2>] warn_slowpath_common+0x72/0xa0
       [<c1033683>] warn_slowpath_fmt+0x33/0x40
       [<c12e31d1>] __list_add+0x91/0xa0
       [<fdf2083c>] iwl_pcie_rxq_free_rbs+0xcc/0xe0 [iwlwifi]
       [<fdf21b3f>] iwl_pcie_rx_free+0x3f/0x210 [iwlwifi]
       [<fdf2dd7a>] iwl_trans_pcie_free+0x2a/0x90 [iwlwifi]
      
      The reason for this seems to be that in iwl_pcie_rxq_free_rbs() we use
      the array to free all buffers (the hardware receive queue isn't in use
      any more at this point). The function also adds all buffers to rx_used
      because it's also used during initialisation (when no freeing happens.)
      This can cause the warning because it may add entries to the list that
      are already on it. Luckily, this is harmless because it can only happen
      when the entire data structure is freed anyway, since during init both
      lists are initialized from scratch.
      
      Disentangle this code and treat init and free separately. During init
      we just need to put them onto the list after freeing all buffers (for
      switching between 4k/8k buffers); during free no list manipulations
      are necessary at all.
      Reviewed-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      c7df1f4b
  16. 13 6月, 2013 2 次提交
  17. 28 2月, 2013 1 次提交
    • J
      iwlwifi: use coherent DMA memory for command header · 38c0f334
      Johannes Berg 提交于
      Recently in commit 8a964f44
      ("iwlwifi: always copy first 16 bytes of commands") we fixed
      the problem that the hardware writes back to the command and
      that could overwrite parts of the data that was still needed
      and would thus be corrupted.
      
      Investigating this problem more closely we found that this
      write-back isn't really ordered very well with respect to
      other DMA traffic. Therefore, it sometimes happened that the
      write-back occurred after unmapping the command again which
      is clearly an issue and could corrupt the next allocation
      that goes to that spot, or (better) cause IOMMU faults.
      
      To fix this, allocate coherent memory for the first 16 bytes
      of each command, containing the write-back part, and use it
      for all queues. All the dynamic DMA mappings only need to be
      TO_DEVICE then. This ensures that even when the write-back
      happens "too late" it can't hit memory that has been freed
      or a mapping that doesn't exist any more.
      
      Since now the actual command is no longer modified, we can
      also remove CMD_WANT_HCMD and get rid of the DMA sync that
      was necessary to update the scratch pointer.
      Reviewed-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      38c0f334
  18. 05 2月, 2013 1 次提交
    • J
      iwlwifi: use threaded interrupt handler · 2bfb5092
      Johannes Berg 提交于
      With new transports coming up, move to threaded
      interrupt handling now. This has the advantage
      that we can use the same locking scheme with all
      different transports we may need to implement.
      
      Note that the TX path obviously still runs in a
      tasklet, so some spin_lock() calls need to change
      to spin_lock_bh() calls to properly lock out the
      TX path.
      
      In my test on a Calpella platform this has no
      impact on throughput or latency.
      
      Also add lockdep annotations to avoid lockups due
      to catch sending synchronous commands or using
      locks that connect with them from the irq thread.
      Reviewed-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      2bfb5092
  19. 24 1月, 2013 2 次提交
  20. 16 1月, 2013 2 次提交
  21. 03 1月, 2013 2 次提交