Comments (6)
Kernel patch with the change: https://patchwork.kernel.org/patch/9505893/
An example of how to migrate to the new API: https://patchwork.kernel.org/patch/9505891/
from xtrx_linux_pcie_drv.
This is a patch attempt :
diff --git a/xtrx.c b/xtrx.c
index ba0ec9a..b09972c 100644
--- a/xtrx.c
+++ b/xtrx.c
@@ -1058,7 +1058,7 @@ static int xtrx_probe(struct pci_dev *pdev,
init_waitqueue_head(&xtrxdev->queue_other);
init_waitqueue_head(&xtrxdev->onepps_ctrl);
- err = pci_enable_msi_range(pdev, XTRX_MSI_COUNT, XTRX_MSI_COUNT);
+ err = pci_alloc_irq_vectors(pdev, XTRX_MSI_COUNT, XTRX_MSI_COUNT, PCI_IRQ_MSI);
if (err == XTRX_MSI_COUNT) {
xtrxdev->inttype = XTRX_MSI_4;
It builds fine, but until I actually verified it works I won't do a pull request.
from xtrx_linux_pcie_drv.
Seems to work fine, feel free to apply :)
from xtrx_linux_pcie_drv.
diff --git a/xtrx.c b/xtrx.c
index ba0ec9a..01215a2 100644
--- a/xtrx.c
+++ b/xtrx.c
@@ -38,6 +38,7 @@
#include <linux/device.h>
#include <linux/time.h>
#include <linux/pps_kernel.h>
+#include <linux/version.h>
#include <asm/page.h>
#include <asm/io.h>
#include <asm/uaccess.h>
@@ -1058,7 +1059,11 @@ static int xtrx_probe(struct pci_dev *pdev,
init_waitqueue_head(&xtrxdev->queue_other);
init_waitqueue_head(&xtrxdev->onepps_ctrl);
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(4,11,0)
err = pci_enable_msi_range(pdev, XTRX_MSI_COUNT, XTRX_MSI_COUNT);
+#else
+ err = pci_alloc_irq_vectors(pdev, XTRX_MSI_COUNT, XTRX_MSI_COUNT, PCI_IRQ_MSI);
+#endif
if (err == XTRX_MSI_COUNT) {
xtrxdev->inttype = XTRX_MSI_4;
from xtrx_linux_pcie_drv.
Nice, thank you!
from xtrx_linux_pcie_drv.
Merged
from xtrx_linux_pcie_drv.
Related Issues (8)
- Copy Paste Error Mapping Bar 1
- DKMS build fails on a Linux 6.3.3-surface based system due to a read-only vm_area_struct member. HOT 4
- Timer API changes at some point HOT 4
- Compilation errors on gcc 7.3 on arm64 4.4.132 kernel. HOT 11
- EspressoBin (aarch64): SPI IRQ error 11 (3) HOT 7
- Encountering errors on transfers every 90 seconds or so HOT 4
- Bus Error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xtrx_linux_pcie_drv.