From 7b8b457722aafc7a51ce86bff000ba07ddf000c0 Mon Sep 17 00:00:00 2001 From: Li Dongyang Date: Tue, 11 Jun 2019 00:47:14 -0700 Subject: [PATCH] LU-12270 o2iblnd: pci_unmap_addr() removed in 4.19 Since kernel 4.19 the pci_unmap_addr() wrappers have been removed, along with linux/pci-dma.h We can use the good old DEFINE_DMA_UNMAP_ADDR instead of DECLARE_PCI_UNMAP_ADDR. Linux-commit: 18b01b16e8bae9cd227909f6e6d2783d74855f65 This patch is back-ported from the following one: Lustre-commit: 0cae491cc6d3cc949972366a3fdfdf32dfea5912 Lustre-change: https://review.whamcloud.com/34827 Test-Parameters:trivial Signed-off-by: Li Dongyang Change-Id: I387bd3d1c4e8c3bc75400ce1be05132fb25f8a50 Reviewed-by: James Simmons Reviewed-by: Chris Horn Reviewed-by: Yang Sheng Reviewed-on: https://review.whamcloud.com/35157 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- lnet/klnds/o2iblnd/o2iblnd.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lnet/klnds/o2iblnd/o2iblnd.h b/lnet/klnds/o2iblnd/o2iblnd.h index f048033..c7d6288 100644 --- a/lnet/klnds/o2iblnd/o2iblnd.h +++ b/lnet/klnds/o2iblnd/o2iblnd.h @@ -43,7 +43,6 @@ #endif -#include #include #include #include @@ -65,9 +64,6 @@ #include #include #include -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,32) -#include -#endif #include #include @@ -564,7 +560,7 @@ struct kib_rx { /* receive message */ /* message buffer (I/O addr) */ __u64 rx_msgaddr; /* for dma_unmap_single() */ - DECLARE_PCI_UNMAP_ADDR(rx_msgunmap); + DEFINE_DMA_UNMAP_ADDR(rx_msgunmap); /* receive work item... */ struct ib_recv_wr rx_wrq; /* ...and its memory */ @@ -604,7 +600,7 @@ struct kib_tx { /* transmit message */ /* message buffer (I/O addr) */ __u64 tx_msgaddr; /* for dma_unmap_single() */ - DECLARE_PCI_UNMAP_ADDR(tx_msgunmap); + DEFINE_DMA_UNMAP_ADDR(tx_msgunmap); /** sge for tx_msgaddr */ struct ib_sge tx_msgsge; /* # send work items */ -- 1.8.3.1