1. 02 10月, 2020 2 次提交
  2. 29 5月, 2020 3 次提交
  3. 08 5月, 2020 2 次提交
  4. 24 4月, 2020 1 次提交
  5. 27 3月, 2020 1 次提交
  6. 23 12月, 2019 5 次提交
    • J
      iwlwifi: pcie: use partial pages if applicable · cfdc20ef
      Johannes Berg 提交于
      If we have only 2k RBs like on the latest (AX210) hardware, then
      even on x86 where PAGE_SIZE is 4k we currently waste half of the
      memory.
      
      If this is the case, return partial pages from the allocator and
      track the offset in each RBD (to be able to find the data in them
      and remap them later.)
      
      This might also address other platforms with larger PAGE_SIZE by
      putting more RBs into a single large page.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      cfdc20ef
    • J
      iwlwifi: pcie: map only used part of RX buffers · 80084e35
      Johannes Berg 提交于
      We don't need to map *everything* of the RX buffers, we won't use
      that much, map only the part we're going to use. This save some
      IOMMU space (if applicable and it can deal with that) and also
      prepares a bit for mapping partial pages for 2K buffers later.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      80084e35
    • J
      iwlwifi: allocate more receive buffers for HE devices · c042f0c7
      Johannes Berg 提交于
      For HE-capable devices, we need to allocate more receive buffers as
      there could be 256 frames aggregated into a single A-MPDU, and then
      they might contain A-MSDUs as well. Until 22000 family, the devices
      are able to put multiple frames into a single RB and the default RB
      size is 4k, but starting from AX210 family this is no longer true.
      On the other hand, those newer devices only use 2k receive buffers
      (by default).
      
      Modify the code and configuration to allocate an appropriate number
      of RBs depending on the device capabilities:
      
       * 4096 for AX210 HE devices, which use 2k buffers by default,
       * 2048 for 22000 family devices which use 4k buffers by default,
       * 512 for existing 9000 family devices, which doesn't really
         change anything since that's the default before this patch,
       * 512 also for AX210/22000 family devices that don't do HE.
      
      Theoretically, for devices lower than AX210, we wouldn't have to
      allocate that many RBs if the RB size was manually increased, but
      to support that the code got more complex, and it didn't really
      seem necessary as that's a use case for monitor mode only, where
      hopefully the wasted memory isn't really much of a concern.
      
      Note that AX210 devices actually support bigger than 12-bit VID,
      which is required here as we want to allocate 4096 buffers plus
      some for quick recycling, so adjust the code for that as well.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      c042f0c7
    • J
      iwlwifi: pcie: extend hardware workaround to context-info · d84a7a65
      Johannes Berg 提交于
      After more investigation on the hardware side, it appears that the
      hardware bug regarding 2^32 boundary reaching/crossing also affects
      other uses of the DMA engine, in particular the ones triggered by
      the context-info (image loader) mechanism.
      
      It also turns out that the bug only affects devices with gen2 TX
      hardware engine, so we don't need to change context info for gen3.
      The TX path workarounds are simpler to still keep for both though.
      
      Add the workaround to that code as well; this is a lot simpler as
      we have just a single way to allocate DMA memory there.
      
      I made the algorithm recursive (with a small limit) since it's
      actually (almost) impossible to hit this today - dma_alloc_coherent
      is currently documented to always return 32-bit addressable memory
      regardless of the DMA mask for it, and so we could only get REALLY
      unlucky to get the very last page in that area.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      d84a7a65
    • J
      iwlwifi: pcie: allocate smaller dev_cmd for TX headers · a89c72ff
      Johannes Berg 提交于
      As noted in the previous commit, due to the way we allocate the
      dev_cmd headers with 324 byte size, and 4/8 byte alignment, the
      part we use of them (bytes 20..40-68) could still cross a page
      and thus 2^32 boundary.
      
      Address this by using alignment to ensure that the allocation
      cannot cross a page boundary, on hardware that's affected. To
      make that not cause more memory consumption, reduce the size of
      the allocations to the necessary size - we go from 324 bytes in
      each allocation to 60/68 on gen2 depending on family, and ~120
      or so on gen1 (so on gen1 it's a pure reduction in size, since
      we don't need alignment there).
      
      To avoid size and clearing issues, add a new structure that's
      just the header, and use kmem_cache_zalloc().
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      a89c72ff
  7. 20 12月, 2019 1 次提交
  8. 20 11月, 2019 1 次提交
  9. 15 11月, 2019 2 次提交
  10. 06 9月, 2019 9 次提交
  11. 29 6月, 2019 2 次提交
    • E
      iwlwifi: fix RF-Kill interrupt while FW load for gen2 devices · ed3e4c6d
      Emmanuel Grumbach 提交于
      Newest devices have a new firmware load mechanism. This
      mechanism is called the context info. It means that the
      driver doesn't need to load the sections of the firmware.
      The driver rather prepares a place in DRAM, with pointers
      to the relevant sections of the firmware, and the firmware
      loads itself.
      At the end of the process, the firmware sends the ALIVE
      interrupt. This is different from the previous scheme in
      which the driver expected the FH_TX interrupt after each
      section being transferred over the DMA.
      
      In order to support this new flow, we enabled all the
      interrupts. This broke the assumption that we have in the
      code that the RF-Kill interrupt can't interrupt the firmware
      load flow.
      
      Change the context info flow to enable only the ALIVE
      interrupt, and re-enable all the other interrupts only
      after the firmware is alive. Then, we won't see the RF-Kill
      interrupt until then. Getting the RF-Kill interrupt while
      loading the firmware made us kill the firmware while it is
      loading and we ended up dumping garbage instead of the firmware
      state.
      
      Re-enable the ALIVE | RX interrupts from the ISR when we
      get the ALIVE interrupt to be able to get the RX interrupt
      that comes immediately afterwards for the ALIVE
      notification. This is needed for non MSI-X only.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      ed3e4c6d
    • S
      iwlwifi: dbg: move trans debug fields to a separate struct · 91c28b83
      Shahar S Matityahu 提交于
      Unite iwl_trans debug related fields under iwl_trans_debug struct to
      increase readability and keep iwl_trans clean.
      Signed-off-by: NShahar S Matityahu <shahar.s.matityahu@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      91c28b83
  12. 01 6月, 2019 1 次提交
  13. 29 4月, 2019 1 次提交
  14. 19 4月, 2019 1 次提交
  15. 03 4月, 2019 1 次提交
  16. 22 3月, 2019 2 次提交
  17. 21 2月, 2019 1 次提交
  18. 14 2月, 2019 1 次提交
    • S
      iwlwifi: pcie: fix TX while flushing · 2ae48edc
      Sara Sharon 提交于
      When flushing TX queues no new TX should go into the system.
      However, in the following scenario we get TX:
      1. Queues are stopped and there are packets in overflow queue
      2. Station is removed and flush begins
      3. Flush empties space, and reclaim path TXes SKB from overflow
         queue.
      
      Note that the fact the queues are stopped during the process
      doesn't matter - the packet will be TXed since the TX path
      doesn't care if TX queues are stopped or not, just if there is
      space in the queue, which there is, since we just freed a
      packet.
      
      A fix here is rather complicated, since the flow is very racy.
      
      Change code not to warn if we are TXing from overflow TX.
      In case there is TX from both overflow TX and TX path we will
      miss a warning we optimally had, but we can live with that.
      
      Make sure we don't return before overflow queue is empty, otherwise
      we will think queues are empty, but they will be refilled, resulting
      with assert.
      Signed-off-by: NSara Sharon <sara.sharon@intel.com>
      Fixes: 3955525d ("iwlwifi: pcie: buffer packets to avoid overflowing Tx queues")
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      2ae48edc
  19. 04 2月, 2019 2 次提交
  20. 29 1月, 2019 1 次提交
    • J
      iwlwifi: pcie: align licensing to dual GPL/BSD · cefec29e
      Johannes Berg 提交于
      These files have a long history of code changes, but analysing
      the remaining code leads to having only a few changes that are
      not already owned by Intel, notably from
       - Andy Lutomirski <luto@amacapital.net>
       - Joonwoo Park <joonwpark81@gmail.com>
       - Kirtika Ruchandani <kirtika@chromium.org>
       - Rajat Jain <rajatja@google.com>
       - Stanislaw Gruszka <sgruszka@redhat.com>
      remaining in the code today.
      
      Note that
       - I myself was working for Intel and for any possibly code
         that might be before my employment there give permission
       - Wizery employees were working for Intel
      
      More specifically, we identified the following commits that
      (partially may) remain today:
      
      25c03d8e Joonwoo Park <joonwpark81@gmail.com>      ("iwlwifi: do not schedule tasklet when rcv unused irq")
      f36d04ab Stanislaw Gruszka <sgruszka@redhat.com>   ("iwlwifi: use dma_alloc_coherent")
      387f3381 Stanislaw Gruszka <sgruszka@redhat.com>   ("iwlwifi: fix dma mappings and skbs leak")
      2624e96c Stanislaw Gruszka <sgruszka@redhat.com>   ("iwlwifi: fix possible data overwrite in hcmd callback")
      bfe4b80e Stanislaw Gruszka <sgruszka@redhat.com>   ("iwlwifi: always check if got h/w access before write")
      d536c32b Andy Lutomirski <luto@amacapital.net>     ("iwlwifi: pcie: log when waking the NIC for hcmd submission fails")
      a6d24fad Rajat Jain <rajatja@google.com>           ("iwlwifi: pcie: dump registers when HW becomes inaccessible")
      fb12777a Kirtika Ruchandani <kirtika@chromium.org> ("iwlwifi: Add more call-sites for pcie reg dumper")
      3a73a300 Stanislaw Gruszka <sgruszka@redhat.com>   ("iwlwifi: cleanup/fix memory barriers")
      aa5affba Stanislaw Gruszka <sgruszka@redhat.com>   ("iwlwifi: dump stack when fail to gain access to the device")
      
      Align the licenses with their permission to clean up and to
      make it all identical.
      
      CC: Joonwoo Park <joonwpark81@gmail.com>
      CC: Stanislaw Gruszka <sgruszka@redhat.com>
      CC: Andy Lutomirski <luto@amacapital.net>
      CC: Rajat Jain <rajatja@google.com>
      CC: Kirtika Ruchandani <kirtika@chromium.org>
      Acked-by: NJohannes Berg <johannes@sipsolutions.net>
      Acked-by: NKirtika Ruchandani <kirtika@chromium.org>
      Acked-by: NStanislaw Gruszka <sgruszka@redhat.com>
      Acked-by: NJoonwoo Park <joonwpark81@gmail.com>
      Acked-by: NRajat Jain <rajatja@google.com>
      Acked-by: NAndy Lutomirski <luto@kernel.org>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      cefec29e