Unverified Commit 09212d71 authored by Martin Wimpress's avatar Martin Wimpress Committed by GitHub
Browse files

linuxPackages.mwprocapture: 1.3.0.4236 -> 1.3.0.4328

Version V1.3.0.4236 of mwprocapture (the Linux driver for the Magewell Pro Capture family) FTBFS when building against Linux 6.1 or newer. 

This patch bumps the driver version to 1.3.0.4328 that Magewell published to address this issue. The 1.3.0.4328 release notes state:

> Fix problem: driver installation may fail on an operating system with kernel version 6.1 or 6.2.

pci.patch has also been dropped as that fix is now applied upstream.
parent 183c970c
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -12,12 +12,12 @@ let
in
stdenv.mkDerivation rec {
  pname = "mwprocapture";
  subVersion = "4236";
  subVersion = "4328";
  version = "1.3.0.${subVersion}-${kernel.version}";

  src = fetchurl {
    url = "https://www.magewell.com/files/drivers/ProCaptureForLinux_${subVersion}.tar.gz";
    sha256 = "1mfgj84km276sq5i8dny1vqp2ycqpvgplrmpbqwnk230d0w3qs74";
    sha256 = "197l86ad52ijmmq5an6891gd1chhkxqiagamcchirrky4c50qs36";
  };

  nativeBuildInputs = kernel.moduleBuildDependencies;
@@ -33,8 +33,6 @@ stdenv.mkDerivation rec {
    "KERNELDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
  ];

  patches = [ ./pci.patch ];

  env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-fallthrough";

  postInstall = ''
@@ -59,7 +57,6 @@ stdenv.mkDerivation rec {
  '';

  meta = {
    broken = kernel.kernelAtLeast "5.16";
    homepage = "https://www.magewell.com/";
    description = "Linux driver for the Magewell Pro Capture family";
    license = licenses.unfreeRedistributable;
+0 −20
Original line number Diff line number Diff line
diff --git a/src/sources/avstream/capture.c b/src/sources/avstream/capture.c
index f5d256d..a104f62 100644
--- a/src/sources/avstream/capture.c
+++ b/src/sources/avstream/capture.c
@@ -288,12 +288,12 @@ static int xi_cap_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
     }
 
     if ((sizeof(dma_addr_t) > 4) &&
-            !pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
+            !dma_set_mask(&pdev->dev, DMA_BIT_MASK(64))) {
         xi_debug(1, "dma 64 OK!\n");
     } else {
         xi_debug(1, "dma 64 not OK!\n");
-        if ((pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) < 0) &&
-                (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) < 0) {
+        if ((dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)) < 0) &&
+                (dma_set_mask(&pdev->dev, DMA_BIT_MASK(32))) < 0) {
             xi_debug(0, "DMA configuration failed\n");
             goto disable_pci;
         }