common/sfc_efx/base: support NIC DMA memory regions API
authorAndrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Wed, 17 Nov 2021 07:05:44 +0000 (10:05 +0300)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 17 Nov 2021 11:37:07 +0000 (12:37 +0100)
commit60fb370c7bc95cdf74dd00a0ab0d779e21d71b23
tree2504c4a25cac2d8c3a5450e472fc6a7420644523
parent7dc01afc0e85056f73d3a14b47e16cfaf0d96192
common/sfc_efx/base: support NIC DMA memory regions API

NIC DMA memory regions API allows to establish mapping of DMA addresses
used by NIC to host IOVA understood by the host when IOMMU is absent
and NIC cannot address entire host IOVA space because of too small
DMA mask.

The API does not allow to address entire host IOVA space, but allows
arbitrary regions of the space really used for the NIC DMA.

A DMA region needs to be mapped in order to perform MCDI initialization.
Since the NIC has not been probed at that point, its configuration cannot
be accessed and there an UNKNOWN mapping type is assumed.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
drivers/common/sfc_efx/base/ef10_nic.c
drivers/common/sfc_efx/base/efx.h
drivers/common/sfc_efx/base/efx_impl.h
drivers/common/sfc_efx/base/efx_mcdi.c
drivers/common/sfc_efx/base/efx_mcdi.h
drivers/common/sfc_efx/base/efx_nic.c
drivers/common/sfc_efx/base/siena_nic.c
drivers/common/sfc_efx/version.map