]> asedeno.scripts.mit.edu Git - linux.git/commit
iwlwifi: pcie: extend hardware workaround to context-info
authorJohannes Berg <johannes.berg@intel.com>
Thu, 5 Dec 2019 08:31:07 +0000 (09:31 +0100)
committerLuca Coelho <luciano.coelho@intel.com>
Mon, 23 Dec 2019 09:33:04 +0000 (11:33 +0200)
commitd84a7a654a66eead599cfd4f436d1f921e01074f
tree7cae2d5b2e73c5b2981c71d82519210880881e9d
parent2763bba6328c53c455d8f7f5302b80030551c31b
iwlwifi: pcie: extend hardware workaround to context-info

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: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info.c
drivers/net/wireless/intel/iwlwifi/pcie/internal.h
drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c