diff options
author | Shahar S Matityahu | 2018-11-20 08:46:33 +0100 |
---|---|---|
committer | Luca Coelho | 2019-02-04 11:27:17 +0100 |
commit | 7e316572c9c547d5c8b9d86abb37576e2e5a470c (patch) | |
tree | 7edae499a8d23ab3aa34ad5e23914adef0973014 /drivers/net/wireless/intel/iwlwifi/fw | |
parent | iwlwifi: dbg_ini: give better naming to region struct fields (diff) | |
download | kernel-qcow2-linux-7e316572c9c547d5c8b9d86abb37576e2e5a470c.tar.gz kernel-qcow2-linux-7e316572c9c547d5c8b9d86abb37576e2e5a470c.tar.xz kernel-qcow2-linux-7e316572c9c547d5c8b9d86abb37576e2e5a470c.zip |
iwlwifi: fix bad dma handling in page_mem dumping flow
Prior to gen2 we allocate the paging memory via alloc_pages
which requires passing ownership on the memory between the
cpu and the device using dma_sync_single_for_cpu and
dma_sync_single_for_device.
Add missing dma_sync_single_for_device in iwl_dump_paging
after copying the memory.
since gen2, we allocate the paging memory using dma_alloc_coherent
which does not need passing ownership between the cpu and device.
Remove unneeded call to dma_sync_single_for_cpu in
iwl_trans_pcie_dump_data prior to copying the memory.
Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Fixes: 5538409ba393 ("iwlwifi: pcie: support page dumping in wrt in gen2")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/fw')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c index 35c2b1a23d10..d16a8a4f0c3f 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c @@ -815,6 +815,9 @@ static void iwl_dump_paging(struct iwl_fw_runtime *fwrt, DMA_BIDIRECTIONAL); memcpy(paging->data, page_address(pages), PAGING_BLOCK_SIZE); + dma_sync_single_for_device(fwrt->trans->dev, addr, + PAGING_BLOCK_SIZE, + DMA_BIDIRECTIONAL); (*data) = iwl_fw_error_next_data(*data); } } |