]> git.baikalelectronics.ru Git - kernel.git/commit
iavf: Fix adminq error handling
authorPrzemyslaw Patynowski <przemyslawx.patynowski@intel.com>
Tue, 19 Jul 2022 09:16:52 +0000 (11:16 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Fri, 12 Aug 2022 15:22:55 +0000 (08:22 -0700)
commit1726f5ee1196b36634ff34cc6fd901aa2c7937cc
treeec16b941b6daec579084406b2281999d5809348c
parent6e7c40bbfeec4ac0478de077bb56d6dd4c41aeb8
iavf: Fix adminq error handling

iavf_alloc_asq_bufs/iavf_alloc_arq_bufs allocates with dma_alloc_coherent
memory for VF mailbox.
Free DMA regions for both ASQ and ARQ in case error happens during
configuration of ASQ/ARQ registers.
Without this change it is possible to see when unloading interface:
74626.583369: dma_debug_device_change: device driver has pending DMA allocations while released from device [count=32]
One of leaked entries details: [device address=0x0000000b27ff9000] [size=4096 bytes] [mapped with DMA_BIDIRECTIONAL] [mapped as coherent]

Fixes: 082b6d89c93b ("i40evf: init code and hardware support")
Signed-off-by: Przemyslaw Patynowski <przemyslawx.patynowski@intel.com>
Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
Tested-by: Marek Szlosek <marek.szlosek@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/iavf/iavf_adminq.c