Hi all,

I've fixed this bug.
I plan to do NMU after 10 days if no one complains.
It will be uploaded to delay/10 queue.
The debdiff is as attachment.


Yours,
Paul
diff -Nru xtrx-dkms-0.0.1+git20190320.5ae3a3e/debian/changelog 
xtrx-dkms-0.0.1+git20190320.5ae3a3e/debian/changelog
--- xtrx-dkms-0.0.1+git20190320.5ae3a3e/debian/changelog        2023-01-21 
03:20:02.000000000 +0800
+++ xtrx-dkms-0.0.1+git20190320.5ae3a3e/debian/changelog        2023-06-24 
04:22:04.000000000 +0800
@@ -1,3 +1,11 @@
+xtrx-dkms (0.0.1+git20190320.5ae3a3e-3.3) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix dkms build failure with kernel 6.3 (Closes: #1038003)
+    - add debian/patches/0003-xtrx.c-fix-build-error-with-kernel-6.3.patch
+
+ -- Ying-Chun Liu (PaulLiu) <paul...@debian.org>  Sat, 24 Jun 2023 04:22:04 
+0800
+
 xtrx-dkms (0.0.1+git20190320.5ae3a3e-3.2) unstable; urgency=low
 
   * Non-maintainer upload.
diff -Nru 
xtrx-dkms-0.0.1+git20190320.5ae3a3e/debian/patches/0002-xtrx.c-fix-build-error-with-kernel-6.1.patch
 
xtrx-dkms-0.0.1+git20190320.5ae3a3e/debian/patches/0002-xtrx.c-fix-build-error-with-kernel-6.1.patch
--- 
xtrx-dkms-0.0.1+git20190320.5ae3a3e/debian/patches/0002-xtrx.c-fix-build-error-with-kernel-6.1.patch
        2023-01-21 03:20:02.000000000 +0800
+++ 
xtrx-dkms-0.0.1+git20190320.5ae3a3e/debian/patches/0002-xtrx.c-fix-build-error-with-kernel-6.1.patch
        2023-06-24 04:22:04.000000000 +0800
@@ -4,6 +4,7 @@
  const pointer when building with kernel version >= 6.1
 Forwarded: https://github.com/xtrx-sdr/xtrx_linux_pcie_drv/pull/15
 Author: Ying-Chun Liu (PaulLiu) <paul...@debian.org>
+Bug-Debian: http://bugs.debian.org/1029135
 Last-Update: 2023-01-21
 Index: xtrx-dkms-0.0.1+git20190320.5ae3a3e/xtrx.c
 ===================================================================
diff -Nru 
xtrx-dkms-0.0.1+git20190320.5ae3a3e/debian/patches/0003-xtrx.c-fix-build-error-with-kernel-6.3.patch
 
xtrx-dkms-0.0.1+git20190320.5ae3a3e/debian/patches/0003-xtrx.c-fix-build-error-with-kernel-6.3.patch
--- 
xtrx-dkms-0.0.1+git20190320.5ae3a3e/debian/patches/0003-xtrx.c-fix-build-error-with-kernel-6.3.patch
        1970-01-01 08:00:00.000000000 +0800
+++ 
xtrx-dkms-0.0.1+git20190320.5ae3a3e/debian/patches/0003-xtrx.c-fix-build-error-with-kernel-6.3.patch
        2023-06-24 04:22:04.000000000 +0800
@@ -0,0 +1,58 @@
+From 68d80b30a74db6c767f9b4d555d7243930c955c4 Mon Sep 17 00:00:00 2001
+From: "Ying-Chun Liu (PaulLiu)" <paul...@debian.org>
+Date: Sat, 24 Jun 2023 04:19:51 +0800
+Forwarded: https://github.com/myriadrf/xtrx_linux_pcie_drv/pull/17
+Bug-Debian: http://bugs.debian.org/1038003
+Last-Update: 2023-06-24
+Subject: [PATCH] xtrx.c: fix build error with kernel 6.3
+
+vma->vm_flags is now read-only. We need to use vm_flags_set() instead.
+
+Please refer kernel commit bc292ab00f6c
+("mm: introduce vma->vm_flags wrapper functions")
+
+Signed-off-by: Ying-Chun Liu (PaulLiu) <paul...@debian.org>
+---
+ xtrx.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+Index: xtrx-dkms-0.0.1+git20190320.5ae3a3e/xtrx.c
+===================================================================
+--- xtrx-dkms-0.0.1+git20190320.5ae3a3e.orig/xtrx.c
++++ xtrx-dkms-0.0.1+git20190320.5ae3a3e/xtrx.c
+@@ -1072,7 +1072,11 @@ static int xtrxfd_mmap(struct file *filp
+                       return -EINVAL;
+               }
+               //vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 3, 0)
+               vma->vm_flags |= VM_LOCKED;
++#else
++              vm_flags_set(vma, VM_LOCKED);
++#endif
+ 
+               if (remap_pfn_range(vma, vma->vm_start,
+                                                       
virt_to_phys((void*)((unsigned long)xtrxdev->shared_mmap)) >> PAGE_SHIFT,
+@@ -1087,7 +1091,11 @@ static int xtrxfd_mmap(struct file *filp
+               unsigned long pfn;
+               int bar = (region == REGION_CTRL) ? 0 : 1;
+               vma->vm_page_prot = pgprot_device(vma->vm_page_prot);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 3, 0)
+               vma->vm_flags |= VM_IO;
++#else
++              vm_flags_set(vma, VM_IO);
++#endif
+               pfn = pci_resource_start(xtrxdev->pdev, bar) >> PAGE_SHIFT;
+ 
+               if (io_remap_pfn_range(vma, vma->vm_start, pfn,
+@@ -1112,7 +1120,11 @@ static int xtrxfd_mmap(struct file *filp
+               }
+ 
+               //vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 3, 0)
+               vma->vm_flags |= VM_LOCKED;
++#else
++              vm_flags_set(vma, VM_LOCKED);
++#endif
+ 
+               for (i = 0, off = 0; i < BUFS; ++i, off += bufsize) {
+ #ifdef VA_DMA_ADDR_FIXUP
diff -Nru xtrx-dkms-0.0.1+git20190320.5ae3a3e/debian/patches/series 
xtrx-dkms-0.0.1+git20190320.5ae3a3e/debian/patches/series
--- xtrx-dkms-0.0.1+git20190320.5ae3a3e/debian/patches/series   2023-01-21 
03:20:02.000000000 +0800
+++ xtrx-dkms-0.0.1+git20190320.5ae3a3e/debian/patches/series   2023-06-24 
04:21:41.000000000 +0800
@@ -1,2 +1,3 @@
 0001-xtrx-fix-PCI-DMA-allow-free-with-kernel-5.18.patch
 0002-xtrx.c-fix-build-error-with-kernel-6.1.patch
+0003-xtrx.c-fix-build-error-with-kernel-6.3.patch

Attachment: OpenPGP_0x44173FA13D058888.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to