bus/pci: avoid call to DMA mask check
authorAlejandro Lucero <alejandro.lucero@netronome.com>
Thu, 1 Nov 2018 19:53:27 +0000 (19:53 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 5 Nov 2018 00:02:08 +0000 (01:02 +0100)
commitec200687132acc351e077ae525fa271e6b636114
treed339b846c48e84a39b454dbd429af3e8c8293d60
parent9d157736061f1a9f9080be9df8e59a2d4b05d408
bus/pci: avoid call to DMA mask check

Calling rte_mem_check_dma_mask when memory has not been initialized
yet is wrong. This patch use rte_mem_set_dma_mask instead.

Once memory initialization is done, the dma mask set will be used
for checking memory mapped is within the specified mask.

Fixes: fe822eb8c565 ("bus/pci: use IOVA DMA mask check when setting IOVA mode")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/bus/pci/linux/pci.c