]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:18:28 +0000 (11:18 +0200)
commit4a78a5edb6eaa221da121721a469fd0826e27ef1
treeb21daa2e3a0837875b6fe1910e9099c3b2336245
parent911bce23e3dc5d4a451ee6a60b1554576d39c96c
iavf: Fix adminq error handling

commit 2fddc6157aa5e103287c60471149c766adb24ffb upstream.

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: 003409b7882c ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/intel/iavf/iavf_adminq.c