我在ubuntu 16.04 64位系统下编译XDMA驱动“Xilinx_Answer_65444_Linux_Files”,报了一个错误。
xdma-core.c:4321:8: error: implicit declaration of function ‘pci_enable_msix’ [-Werror=implicit-function-declaration]
rc = pci_enable_msix(pdev, lro->entry, req_nvec);
原因是ubuntu 内核版本和驱动版本不一致。
Linux 4.8 replaced it with pci_enable_msix_range. You can fix it like this:
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,8,0)
rc = pci_enable_msix(pdev, lro->entry, req_nvec);
#else
rc = pci_enable_msix_range(pdev, lro->entry, req_nvec, req_nvec);
#endif