Bug#1029135: xtrx-dkms: xtrx module fails to build for kernel version 6.1

2023-01-20 Thread Ying-Chun Liu (PaulLiu)

Hi all,

I plan to do NMU to fix this bug. The debdiff is as attachment.
I'll wait for 3 days to see if anyone objects. And I'll upload it to 
delay/10 queue.


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/changelog2022-11-17 
13:30:42.0 +0800
+++ xtrx-dkms-0.0.1+git20190320.5ae3a3e/debian/changelog2023-01-21 
03:20:02.0 +0800
@@ -1,3 +1,11 @@
+xtrx-dkms (0.0.1+git20190320.5ae3a3e-3.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix dkms build failure with kernel 6.1 (Closes: #1029135)
+- add debian/patches/0002-xtrx.c-fix-build-error-with-kernel-6.1.patch
+
+ -- Ying-Chun Liu (PaulLiu)   Sat, 21 Jan 2023 03:20:02 
+0800
+
 xtrx-dkms (0.0.1+git20190320.5ae3a3e-3.1) 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
1970-01-01 08:00:00.0 +0800
+++ 
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.0 +0800
@@ -0,0 +1,27 @@
+Description: xtrx.c: fix build error with kernel 6.1
+ uart_ops.set_termios type changes a little in kernel 6.1. Thus
+ we need to change xtrx_uart_set_termios() third parameter as a
+ 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) 
+Last-Update: 2023-01-21
+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
+@@ -361,8 +361,13 @@ static void xtrx_uart_shutdown(struct ua
+ }
+ 
+ static void xtrx_uart_set_termios(struct uart_port *port,
+-   struct ktermios *new,
+-   struct ktermios *old)
++struct ktermios *new,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0)
++struct ktermios *old
++#else
++const struct ktermios *old
++#endif
++  )
+ {
+   unsigned long flags;
+ 
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   2022-11-17 
13:30:42.0 +0800
+++ xtrx-dkms-0.0.1+git20190320.5ae3a3e/debian/patches/series   2023-01-21 
03:20:02.0 +0800
@@ -1 +1,2 @@
 0001-xtrx-fix-PCI-DMA-allow-free-with-kernel-5.18.patch
+0002-xtrx.c-fix-build-error-with-kernel-6.1.patch


OpenPGP_0x44173FA13D05.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Bug#1029135: xtrx-dkms: xtrx module fails to build for kernel version 6.1

2023-01-20 Thread Ying-Chun Liu (PaulLiu)

forwarded 1029135 https://github.com/xtrx-sdr/xtrx_linux_pcie_drv/pull/15
thanks

I fixed this bug. The patch is as attachment.

Yours,
Paul

Description: xtrx.c: fix build error with kernel 6.1
 uart_ops.set_termios type changes a little in kernel 6.1. Thus
 we need to change xtrx_uart_set_termios() third parameter as a
 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) 
Last-Update: 2023-01-21
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
@@ -361,8 +361,13 @@ static void xtrx_uart_shutdown(struct ua
 }
 
 static void xtrx_uart_set_termios(struct uart_port *port,
- struct ktermios *new,
- struct ktermios *old)
+  struct ktermios *new,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0)
+  struct ktermios *old
+#else
+  const struct ktermios *old
+#endif
+	)
 {
 	unsigned long flags;
 


OpenPGP_0x44173FA13D05.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Bug#1029135: xtrx-dkms: xtrx module fails to build for kernel version 6.1

2023-01-18 Thread Gerasimos Melissaratos
Package: xtrx-dkms
Version: 0.0.1+git20190320.5ae3a3e-3.1
Severity: serious
Tags: ftbfs
Justification: fails to build from source
X-Debbugs-Cc: gme...@mikroskosmos.gr

Dear Maintainer,

While installing linux-image-6.1.0-1-amd64 dpkg tries to build xtrx-dkms for
this kernel and fails with the following log file:
=
DKMS make.log for xtrx-0.0.1+git20190320.5ae3a3e-3.1 for kernel 6.1.0-1-amd64
(x86_64)
Wed Jan 18 02:21:45 PM EET 2023
make: Entering directory '/usr/src/linux-headers-6.1.0-1-amd64'
  CC [M]  /var/lib/dkms/xtrx/0.0.1+git20190320.5ae3a3e-3.1/build/xtrx.o
/var/lib/dkms/xtrx/0.0.1+git20190320.5ae3a3e-3.1/build/xtrx.c:518:27: error:
initialization of ‘void (*)(struct uart_port *, struct ktermios *, const struct
ktermios *)’ from incompatible pointer type ‘void (*)(struct uart_port *,
struct ktermios *, struct ktermios *)’ [-Werror=incompatible-pointer-types]
  518 | .set_termios= xtrx_uart_set_termios,
  |   ^
/var/lib/dkms/xtrx/0.0.1+git20190320.5ae3a3e-3.1/build/xtrx.c:518:27: note:
(near initialization for ‘xtrx_uart_ops.set_termios’)
cc1: some warnings being treated as errors
make[1]: *** [/usr/src/linux-headers-6.1.0-1-common/scripts/Makefile.build:255:
/var/lib/dkms/xtrx/0.0.1+git20190320.5ae3a3e-3.1/build/xtrx.o] Error 1
make: *** [/usr/src/linux-headers-6.1.0-1-common/Makefile:2017:
/var/lib/dkms/xtrx/0.0.1+git20190320.5ae3a3e-3.1/build] Error 2
make: Leaving directory '/usr/src/linux-headers-6.1.0-1-amd64
=

Thus the whole process of installing kernel 6.1 fails with an error.


-- System Information:
Debian Release: bookworm/sid
  APT prefers testing
  APT policy: (800, 'testing'), (730, 'stable-security'), (710, 'stable'), 
(500, 'stable-updates'), (450, 'unstable'), (10, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 6.0.0-6-amd64 (SMP w/12 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages xtrx-dkms depends on:
ii  dkms  3.0.10-1

xtrx-dkms recommends no packages.

xtrx-dkms suggests no packages.

-- no debconf information