]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mlx4_core: fix FMR unmapping to allow remapping afterward
authorMoshe Lazer <moshel@mellanox.com>
Sun, 8 Sep 2013 06:59:09 +0000 (08:59 +0200)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 7 Jul 2015 21:45:12 +0000 (14:45 -0700)
commit1a2fb2295b1378d7b3e4f139e121db6989c6a271
tree34d89f9243d0f6a80c0c61a70e688c7d32452097
parent132f5df5d803d5e3a16703508615f760d7415f4a
mlx4_core: fix FMR unmapping to allow remapping afterward

The FMR common use flow (as implemented in fmr_pool) is:
 - Allocate FMR (ib_alloc_fmr)
 - Use the FMR to remap DMA memory until remaps limit
   exceeded (ib_map_phys_fmr)
 - Unmap the FMR (ib_unmap_fmr)
 - Use the FMR to remap DMA memory until remaps limit
   exceeded (ib_map_phys_fmr)
 - ...

The current implementation of mlx4_fmr_unmap is not following
this use flow since it is using the HW2SW MPT command.
The HW2SW MPT command notifies the FW that the MPT entry is
not used by HW anymore. The FW may act according to this information,
therefore it is not safe for the driver to manipulate the MPT
directly.  The patch fixes this by manipulating the MPT directly
to unmap the memory instead of using the HW2SW MPT command.

Signed-off-by: Moshe Lazer <moshel@mellanox.com>
(Ported from Mellanox OFED 2.4)

Signed-off-by: Mukesh Kacker <mukesh.kacker@oracle.com>
drivers/net/ethernet/mellanox/mlx4/mr.c