From 09212d71c1fd70d66f79f03236aa39c451bb924f Mon Sep 17 00:00:00 2001 From: Martin Wimpress <304639+flexiondotorg@users.noreply.github.com> Date: Thu, 16 Mar 2023 16:05:00 +0000 Subject: [PATCH] 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. --- .../linux/mwprocapture/default.nix | 7 ++----- pkgs/os-specific/linux/mwprocapture/pci.patch | 20 ------------------- 2 files changed, 2 insertions(+), 25 deletions(-) delete mode 100644 pkgs/os-specific/linux/mwprocapture/pci.patch diff --git a/pkgs/os-specific/linux/mwprocapture/default.nix b/pkgs/os-specific/linux/mwprocapture/default.nix index 0eedc5e08a1f..681307a00b29 100644 --- a/pkgs/os-specific/linux/mwprocapture/default.nix +++ b/pkgs/os-specific/linux/mwprocapture/default.nix @@ -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; diff --git a/pkgs/os-specific/linux/mwprocapture/pci.patch b/pkgs/os-specific/linux/mwprocapture/pci.patch deleted file mode 100644 index b6b22d6143bf..000000000000 --- a/pkgs/os-specific/linux/mwprocapture/pci.patch +++ /dev/null @@ -1,20 +0,0 @@ -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; - }