Linux 的 PCIe DMA 驱动程序
PCIe DMA Driver for Linux
我目前正在研究 Virtex 7 FPGA。我正在尝试为 linux 安装 PCIe DMA 驱动程序。但它给了我以下错误:
错误:函数‘pci_enable_msix’的隐式声明[-Werror=implicit-function-declaration]
有人可以帮我解决这个错误吗?
Linux 4.8 将其替换为 pci_enable_msix_range
。您可以这样修复它:
#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
Linux cross reference 是解决此类问题的非常好的资源,因为您可以探索 API 内核版本的变化。
我目前正在研究 Virtex 7 FPGA。我正在尝试为 linux 安装 PCIe DMA 驱动程序。但它给了我以下错误:
错误:函数‘pci_enable_msix’的隐式声明[-Werror=implicit-function-declaration]
有人可以帮我解决这个错误吗?
Linux 4.8 将其替换为 pci_enable_msix_range
。您可以这样修复它:
#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
Linux cross reference 是解决此类问题的非常好的资源,因为您可以探索 API 内核版本的变化。