summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Severance2021-09-14 09:00:48 -0400
committerChris Severance2021-09-14 09:00:48 -0400
commit3ef4e90d031b45ae0a0438c7c31312b986eb2616 (patch)
treea67491954a709cf20dc391aa49eba7d37ef2682b
parentde2c724006c323adbd97d5b11edf13c739a05584 (diff)
downloadaur-3ef4e90d031b45ae0a0438c7c31312b986eb2616.tar.gz
autu: Update to 1.2.13-4
-rw-r--r--.SRCINFO14
-rw-r--r--0004-kernel-5.12-tty-low_latency.patch61
-rw-r--r--0005-kernel-5.13-dropped-tty_check_change.patch17
-rw-r--r--0006-kernel-5.14-unsigned-tty.patch34
-rw-r--r--PKGBUILD27
5 files changed, 149 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e500fe5a5ea7..3ebfce6eeee5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = moxa-uport16x0
pkgdesc = kernel module driver for Moxa multi port USB serial 1250 1410 1450 1610 1650 RS-232 422 485
pkgver = 1.2.13
- pkgrel = 3
+ pkgrel = 4
url = https://www.moxa.com/product/UPort_1610-8_1650-8.htm
install = moxa-uport16x0-install.sh
arch = i686
@@ -21,8 +21,18 @@ pkgbase = moxa-uport16x0
backup = etc/moxa-uport16x0-settings.sh
source = https://download.opensuse.org/repositories/hardware/openSUSE_Leap_42.3/src/moxa-1.2.13_18030617-1.1.src.rpm
source = 0003-kernel-5.0.0-dgrp_mon_ops-access_ok.patch
+ source = 0004-kernel-5.12-tty-low_latency.patch
+ source = 0005-kernel-5.13-dropped-tty_check_change.patch
+ source = 0006-kernel-5.14-unsigned-tty.patch
+ md5sums = 17a240340a322b3da2e07fc929950288
+ md5sums = 9ec720fdaaccc41648ffb6d58c45c64e
+ md5sums = 13cc25e1625f1dc8456aaf703efbe816
+ md5sums = c06ffb879ec71eb19a74eb90839f4d91
+ md5sums = b20646163937da295547dc8bf4bbaccf
sha256sums = aed6f9a1bb6e88a22b520dc6cbbb6624accea080dcaca727c0fab031868228b6
sha256sums = f753e48ea68282288bd53f045c88bd61e39a4c6cf691544953c6929888183370
+ sha256sums = 151a7c84d3815814d45cebd6d58427c27a2b3c6e06c1209d984738e94fea90d8
+ sha256sums = 4840cccfcd432b7b4f861b5b556c0445f4cd93d277c6cb0045eeebaf92190c4e
+ sha256sums = 045a3957b540ff8a9f9e401c343683a794837bda4e047759564df6ce2e8912a4
pkgname = moxa-uport16x0
-
diff --git a/0004-kernel-5.12-tty-low_latency.patch b/0004-kernel-5.12-tty-low_latency.patch
new file mode 100644
index 000000000000..a8cafd80930e
--- /dev/null
+++ b/0004-kernel-5.12-tty-low_latency.patch
@@ -0,0 +1,61 @@
+--- driver/mxuport/mx-uport.c.orig 2021-09-14 08:47:03.754388063 -0400
++++ driver/mxuport/mx-uport.c 2021-09-14 08:47:21.044774548 -0400
+@@ -594,17 +594,19 @@ static int mxuport_open(struct usb_seri
+ * Force low_latency on so that our tty_push actually forces the data through,
+ * otherwise it is scheduled, and with high data rates (like with OHCI) data
+ * can get lost.
+ */
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0))
+ #if (LINUX_VERSION_CODE > KERNEL_VERSION(3,8,0))
+ if (port->port.tty)
+ port->port.low_latency = (mx_port->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
+ #else
+ if (port->tty)
+ port->tty->low_latency = (mx_port->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
+ #endif
++#endif
+
+ /*
+ * Initial port settings
+ */
+
+@@ -1588,13 +1590,17 @@ static void mxuport_unthrottle (struct u
+ data_len = mx_data_in_queue(mx_port->read_q);
+ spin_unlock_irqrestore(&mx_port->read_splock, flags);
+
+ #if (LINUX_VERSION_CODE > KERNEL_VERSION(3,8,0))
+ if((data_len > 0) && (!atomic_read(&mx_port->read_in_progress))){
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0))
+ mx_port->port->port.low_latency = 0;
++#endif
+ mx_tty_recv(mx_port->port->tty, mx_port);
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0))
+ mx_port->port->port.low_latency = (mx_port->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
++#endif
+ }
+ #else
+ if((data_len > 0) && (!atomic_read(&mx_port->read_in_progress))){
+ mx_port->port->tty->low_latency = 0;
+ mx_tty_recv(mx_port->port->tty, mx_port);
+@@ -3035,18 +3041,20 @@ static int mx_set_serial_info(struct mxu
+
+ /*
+ * set low_latency flag
+ */
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0))
+ #if (LINUX_VERSION_CODE > KERNEL_VERSION(3,8,0))
+ if (port->port.tty)
+ port->port.low_latency = (mxport->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
+ // port->port.low_latency = (mx_port->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
+ #else
+ if (port->tty)
+ port->tty->low_latency = (mxport->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
+ #endif
++#endif
+
+ if( mx_process_txrx_fifo(mxport, new_serial.type)==0 ){
+ mxport->type = new_serial.type;
+ //if( mxport->type == PORT_16450 )
+ // printk("Notice: FIFO is disabled.\n");
diff --git a/0005-kernel-5.13-dropped-tty_check_change.patch b/0005-kernel-5.13-dropped-tty_check_change.patch
new file mode 100644
index 000000000000..491f41ff08f0
--- /dev/null
+++ b/0005-kernel-5.13-dropped-tty_check_change.patch
@@ -0,0 +1,17 @@
+--- driver/mxuport/mx-uport.c.orig 2021-09-14 08:49:18.570936486 -0400
++++ driver/mxuport/mx-uport.c 2021-09-14 08:51:19.203266750 -0400
+@@ -998,10 +998,14 @@ static void mxuport_break_ctl (struct us
+ }
+
+ return;
+ }
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,13,0))
++int tty_check_change(struct tty_struct *tty);
++#endif
++
+ #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,19))
+ static void mxuport_set_termios (struct usb_serial_port *port, struct ktermios *old_termios)
+ #else
+ static void mxuport_set_termios (struct usb_serial_port *port, struct termios *old_termios)
+ #endif
diff --git a/0006-kernel-5.14-unsigned-tty.patch b/0006-kernel-5.14-unsigned-tty.patch
new file mode 100644
index 000000000000..32b711ecb49f
--- /dev/null
+++ b/0006-kernel-5.14-unsigned-tty.patch
@@ -0,0 +1,34 @@
+--- driver/mxusbserial/mxusb-serial.c.orig 2021-09-14 08:57:20.885034201 -0400
++++ driver/mxusbserial/mxusb-serial.c 2021-09-14 08:59:10.920036474 -0400
+@@ -661,11 +661,15 @@ static int serial_write (struct tty_stru
+ #endif
+ exit:
+ return retval;
+ }
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0))
++static unsigned int serial_write_room (struct tty_struct *tty)
++#else
+ static int serial_write_room (struct tty_struct *tty)
++#endif
+ {
+ struct usb_serial_port *port = tty->driver_data;
+ int retval = -EINVAL;
+
+ if (!port)
+@@ -683,11 +687,15 @@ static int serial_write_room (struct tty
+
+ exit:
+ return retval;
+ }
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0))
++static unsigned int serial_chars_in_buffer (struct tty_struct *tty)
++#else
+ static int serial_chars_in_buffer (struct tty_struct *tty)
++#endif
+ {
+ struct usb_serial_port *port = tty->driver_data;
+ int retval = -EINVAL;
+
+ if (!port)
diff --git a/PKGBUILD b/PKGBUILD
index 3b244af6d770..4c6ce35600a0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -44,7 +44,7 @@ _servicename="${pkgname}-settings"
#pkgver='1.2'; _build='12071314'
#pkgver='1.2.9'; _build='14103017'
pkgver='1.2.13'; _build='18030617'
-pkgrel='3'
+pkgrel='4'
pkgdesc='kernel module driver for Moxa multi port USB serial 1250 1410 1450 1610 1650 RS-232 422 485'
_servicedesc='Moxa UPort persistent settings'
arch=('i686' 'x86_64')
@@ -65,9 +65,20 @@ source=(
#"http://ftp.gwdg.de/pub/opensuse/repositories/hardware/openSUSE_Tumbleweed/src/moxa-${pkgver}_${_build}-1.299.src.rpm"
"https://download.opensuse.org/repositories/hardware/openSUSE_Leap_42.3/src/moxa-${pkgver}_${_build}-1.1.src.rpm"
'0003-kernel-5.0.0-dgrp_mon_ops-access_ok.patch'
+ '0004-kernel-5.12-tty-low_latency.patch'
+ '0005-kernel-5.13-dropped-tty_check_change.patch'
+ '0006-kernel-5.14-unsigned-tty.patch'
)
+md5sums=('17a240340a322b3da2e07fc929950288'
+ '9ec720fdaaccc41648ffb6d58c45c64e'
+ '13cc25e1625f1dc8456aaf703efbe816'
+ 'c06ffb879ec71eb19a74eb90839f4d91'
+ 'b20646163937da295547dc8bf4bbaccf')
sha256sums=('aed6f9a1bb6e88a22b520dc6cbbb6624accea080dcaca727c0fab031868228b6'
- 'f753e48ea68282288bd53f045c88bd61e39a4c6cf691544953c6929888183370')
+ 'f753e48ea68282288bd53f045c88bd61e39a4c6cf691544953c6929888183370'
+ '151a7c84d3815814d45cebd6d58427c27a2b3c6e06c1209d984738e94fea90d8'
+ '4840cccfcd432b7b4f861b5b556c0445f4cd93d277c6cb0045eeebaf92190c4e'
+ '045a3957b540ff8a9f9e401c343683a794837bda4e047759564df6ce2e8912a4')
if [ "${_opt_DKMS}" -ne 0 ]; then
depends+=('linux' 'dkms' 'linux-headers')
@@ -150,6 +161,18 @@ prepare() {
#diff -pNaru5 driver/mxuport/mx-uport.c{.orig,} > '0003-kernel-5.0.0-dgrp_mon_ops-access_ok.patch'
patch -Nbup0 -i "${srcdir}/0003-kernel-5.0.0-dgrp_mon_ops-access_ok.patch"
+ #cp -p driver/mxuport/mx-uport.c{,.orig}; false
+ #diff -pNaru5 driver/mxuport/mx-uport.c{.orig,} > '0004-kernel-5.12-tty-low_latency.patch'
+ patch -Nbup0 -i "${srcdir}/0004-kernel-5.12-tty-low_latency.patch"
+
+ #cp -p driver/mxuport/mx-uport.c{,.orig}; false
+ #diff -pNaru5 driver/mxuport/mx-uport.c{.orig,} > '0005-kernel-5.13-dropped-tty_check_change.patch'
+ patch -Nbup0 -i "${srcdir}/0005-kernel-5.13-dropped-tty_check_change.patch"
+
+ #cp -p driver/mxusbserial/mxusb-serial.c{,.orig}; false
+ #diff -pNaru5 driver/mxusbserial/mxusb-serial.c{.orig,} > '0006-kernel-5.14-unsigned-tty.patch'
+ patch -Nbup0 -i "${srcdir}/0006-kernel-5.14-unsigned-tty.patch"
+
# Fix umbrella Makefile
sed -e '# Disable silent' \
-e '/make / s:\s\+-s::g' \