]> git.baikalelectronics.ru Git - kernel.git/commit
iwlwifi: pcie: fix DMA memory mapping / unmapping
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Thu, 4 Jan 2018 07:19:13 +0000 (09:19 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 5 Jan 2018 11:54:22 +0000 (13:54 +0200)
commitaf10ad151303c95e3067df5b83f40f9e060db561
tree96d8269dc0ec465dda6c7a437ff6b7daabcea29d
parent3c6aad3e43d194e21dd7adc7e7a76f5e406d5ea7
iwlwifi: pcie: fix DMA memory mapping / unmapping

22000 devices (previously referenced as A000) can support
short transmit queues. This means that we have less DMA
descriptors (TFD) for those shorter queues.
Previous devices must still have 256 TFDs for each queue
even if those 256 TFDs point to fewer buffers.

When I introduced support for the short queues for 22000
I broke older devices by assuming that they can also have
less TFDs in their queues. This led to several problems:

1) the payload of the commands weren't unmapped properly
   which caused the SWIOTLB to complain at some point.
2) the hardware could get confused and we get hardware
   crashes.

The corresponding bugzilla entries are:

https://bugzilla.kernel.org/show_bug.cgi?id=198201
https://bugzilla.kernel.org/show_bug.cgi?id=198265

Cc: stable@vger.kernel.org # 4.14+
Fixes: dfed1e772fdd ("iwlwifi: pcie: support short Tx queues for A000 device family")
Reviewed-by: Sharon, Sara <sara.sharon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/intel/iwlwifi/pcie/internal.h
drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c
drivers/net/wireless/intel/iwlwifi/pcie/tx.c