ddbridge: backport to enable_msi_block, require kernel 3.8
PATCH 1/1 ddbridge: backport to enable_msi_block, require kernel 3.8
From: Daniel Scheller <[email protected]>
Backport to pci_enable_msi_block for kernels <3.14 (picked from upstream dddvb package). Also, ddbridge requires the PCI_DEVICE_SUB macro, which was added in 3.8.
Signed-off-by Daniel Scheller <[email protected]>
Tested-by Jasmin Jessich <[email protected]>
---
This should finally silence all current media_build compile issues related to the ddbridge pcie driver.
backports/backports.txt | 3 +++ backports/v3.13_ddbridge_pcimsi.patch | 29 +++++++++++++++++++++++++++++ v4l/versions.txt | 2 ++ 3 files changed, 34 insertions(+) create mode 100644 backports/v3.13_ddbridge_pcimsi.patch
backports/backports.txt +3 -0
@@ -84,6 +84,9 @@ add v3.16_netdev.patch add v3.16_wait_on_bit.patch add v3.16_void_gpiochip_remove.patch +[3.13.255] +add v3.13_ddbridge_pcimsi.patch + [3.12.255] add v3.12_kfifo_in.patch
backports/v3.13_ddbridge_pcimsi.patch new file +29 -0
@@ -0,0 +1,29 @@ +diff --git a/drivers/media/pci/ddbridge/ddbridge-main.c b/drivers/media/pci/ddbridge/ddbridge-main.c +index 9ab4736..50c3b4f 100644 +--- a/drivers/media/pci/ddbridge/ddbridge-main.c ++++ b/drivers/media/pci/ddbridge/ddbridge-main.c +@@ -129,13 +129,18 @@ static void ddb_irq_msi(struct ddb *dev, int nr) + int stat; + + if (msi && pci_msi_enabled()) { +- stat = pci_enable_msi_range(dev->pdev, 1, nr); +- if (stat >= 1) { +- dev->msi = stat; +- dev_info(dev->dev, "using %d MSI interrupt(s)\n", +- dev->msi); +- } else ++ stat = pci_enable_msi_block(dev->pdev, nr); ++ if (stat == 0) { ++ dev->msi = nr; ++ } else if (stat == 1) { ++ stat = pci_enable_msi(dev->pdev); ++ dev->msi = 1; ++ } ++ if (stat < 0) + dev_info(dev->dev, "MSI not available.\n"); ++ else ++ dev_info(dev->dev, "using %d MSI interrupts\n", ++ dev->msi); + } + } + #endif
v4l/versions.txt +2 -0
@@ -126,6 +126,8 @@ IR_SPI [3.8.0] # needs regmap lock/unlock ops DVB_TS2020 +# needs the PCI_DEVICE_SUB macro +DVB_DDBRIDGE [3.7.0] # i2c_add_mux_adapter prototype change
Signature · 1 line
2.13.0