summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Severance2021-09-14 11:44:14 -0400
committerChris Severance2021-09-14 11:44:14 -0400
commitb7fd9ffbafed58f491d64bcd121810ac9f0a6083 (patch)
tree1108362f3376737e2c1df839175baf81c0760a91
parent9899f09296a1ab5afbef8b54a615eee0b437ada7 (diff)
downloadaur-b7fd9ffbafed58f491d64bcd121810ac9f0a6083.tar.gz
autu: Update to 3.9.2_4-3
-rw-r--r--.SRCINFO15
-rw-r--r--0002-kernel-4.7-async-initialized.patch18
-rw-r--r--0003-kernel-5.12-tty-low_latency.patch31
-rw-r--r--0004-tty_unregister_driver-void.patch32
-rw-r--r--0005-kernel-5.14-unsigned-tty-flow-tty.patch47
-rw-r--r--PKGBUILD34
6 files changed, 172 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1942459badc9..498b400f60e1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = perle-serial
pkgdesc = kernel module driver for Perle UltraPort SI Express PCI-RAS modem SPEED LE multi I/O serial parallel RS-232 422 485 port
pkgver = 3.9.2_4
- pkgrel = 2
+ pkgrel = 3
url = https://www.perle.com/downloads/mp_speedle.shtml
install = perle-serial-install.sh
arch = i686
@@ -20,12 +20,23 @@ pkgbase = perle-serial
source = https://www.perle.com/downloads/drivers/ultraport/linux/perle-serial-3.9.2-4.tgz
source = 0000-kernel-4.11-signal_pending.patch
source = 0001-kernel-5.6-proc_dir_entry-proc_ops.patch
+ source = 0002-kernel-4.7-async-initialized.patch
+ source = 0003-kernel-5.12-tty-low_latency.patch
+ source = 0004-tty_unregister_driver-void.patch
+ source = 0005-kernel-5.14-unsigned-tty-flow-tty.patch
md5sums = 85e9617af62fcab55c684fa8e4b26987
md5sums = 52f87acfeb5f5820a74ad6aa74d18acf
md5sums = 6dac46dc8f094dd8f8b760a68414bd0b
+ md5sums = f97869736f93fb70b9f034106697c0a2
+ md5sums = d85366f7566046dbd580850fbfa640e0
+ md5sums = 7d7c57fc3a46599aebede7f940c5c5a8
+ md5sums = 47a81ca7f524a3e86abb72ae872bac74
sha256sums = d9d61a941ecfd2ff41d5450557eb9071d934497dbd10229e97c8f88b48cb9a58
sha256sums = 691e0d8d348ab9f19f0398ff79e0d4780d5110e3dd11acf3261e3f73b2983ea1
sha256sums = 31e0d244d22b16d2c0b783e38bac2d96a53cbe0ce14f2fe11142a8691ce952aa
+ sha256sums = 8dcb2c32d641cef471fe45db1e122492a82b3439c55be8c530758d519eeae289
+ sha256sums = 3e2b44baf4d8e29ce5e084485f0882a8f06a1d1b045a93ffa5cdd2f8112d1bfa
+ sha256sums = 7c0c4af907e68a2641beffd20bf487b47cf58ca79dea45276b5046fe81f436bc
+ sha256sums = 0c942db9e9a5f41873cc2ba6edae3372da672e8f82ea5c1266a2c905d4373319
pkgname = perle-serial
-
diff --git a/0002-kernel-4.7-async-initialized.patch b/0002-kernel-4.7-async-initialized.patch
new file mode 100644
index 000000000000..03a177bad8f1
--- /dev/null
+++ b/0002-kernel-4.7-async-initialized.patch
@@ -0,0 +1,18 @@
+diff -pNaru5 perle-serial-3.9.2.orig-0002/pserial/perle-serial.c perle-serial-3.9.2/pserial/perle-serial.c
+--- perle-serial-3.9.2.orig-0002/pserial/perle-serial.c 2021-09-14 11:10:48.772141908 -0400
++++ perle-serial-3.9.2/pserial/perle-serial.c 2021-09-14 11:10:59.679207370 -0400
+@@ -70,10 +70,14 @@
+ * SERIAL_PARANOIA_CHECK
+ * Check the magic number for the async_structure where
+ * ever possible.
+ */
+
++#undef __KERNEL__
++#include <linux/tty_flags.h>
++#define __KERNEL__ 1
++
+ #include <linux/version.h>
+ #if ! defined (LINUX_VERSION_CODE)
+ #error "Kernel version is not set"
+ #endif
+
diff --git a/0003-kernel-5.12-tty-low_latency.patch b/0003-kernel-5.12-tty-low_latency.patch
new file mode 100644
index 000000000000..e2d22d7cca06
--- /dev/null
+++ b/0003-kernel-5.12-tty-low_latency.patch
@@ -0,0 +1,31 @@
+diff -pNaru5 perle-serial-3.9.2.orig-0003/pserial/perle-serial.c perle-serial-3.9.2/pserial/perle-serial.c
+--- perle-serial-3.9.2.orig-0003/pserial/perle-serial.c 2021-09-14 11:15:23.675520937 -0400
++++ perle-serial-3.9.2/pserial/perle-serial.c 2021-09-14 11:19:15.647322399 -0400
+@@ -2446,11 +2446,13 @@ static int set_serial_info(struct ps_asy
+ info->flags = ((state->flags & ~ASYNC_INTERNAL_FLAGS) |
+ (info->flags & ASYNC_INTERNAL_FLAGS));
+ state->custom_divisor = new_serial.custom_divisor;
+ state->close_delay = new_serial.close_delay * HZ/100;
+ state->closing_wait = new_serial.closing_wait * HZ/100;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0)
+ TTY_LOW_LATENCY(info->tty) = (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
++#endif
+ info->xmit_fifo_size = state->xmit_fifo_size =
+ new_serial.xmit_fifo_size;
+
+ if ((state->type != PORT_UNKNOWN) && state->port) {
+ /* UltraPort 16 SI uses 16 bytes per port */
+@@ -3626,11 +3628,13 @@ static int ps_open(struct tty_struct *tt
+ printk("ps_open %s%d, count = %d\n", tty->driver->name, info->line,
+ info->state->count);
+ #endif
+ #endif
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0)
+ TTY_LOW_LATENCY(info->tty) = (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
++#endif
+
+ /*
+ * This relies on lock_kernel() stuff so wants tidying for 2.5
+ */
+ if (!tmp_buf) {
diff --git a/0004-tty_unregister_driver-void.patch b/0004-tty_unregister_driver-void.patch
new file mode 100644
index 000000000000..17aad89be682
--- /dev/null
+++ b/0004-tty_unregister_driver-void.patch
@@ -0,0 +1,32 @@
+diff -pNaru5 perle-serial-3.9.2.orig-0004/pserial/perle-serial.c perle-serial-3.9.2/pserial/perle-serial.c
+--- perle-serial-3.9.2.orig-0004/pserial/perle-serial.c 2021-09-14 11:26:40.756869474 -0400
++++ perle-serial-3.9.2/pserial/perle-serial.c 2021-09-14 11:26:52.547298877 -0400
+@@ -5201,26 +5201,23 @@ void ps_unregister_serial(int line)
+ }
+
+ static void __exit ps_fini(void)
+ {
+ // unsigned long flags;
+- int e1;
+ int i;
+ struct ps_async_struct *info;
+
+ printk(KERN_INFO "Unloading %s: version %s\n", serial_name, serial_version);
+ #ifdef USE_PS_TIMER
+ del_timer_sync(&serial_timer);
+ #endif
+
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+ remove_bh( PERLE_SERIAL_BH );
+- if ((e1 = tty_unregister_driver(&serial_driver)))
+- printk("serial: failed to unregister Perle's serial driver (%d)\n", e1);
++ tty_unregister_driver(&serial_driver);
+ #else
+- if ((e1 = tty_unregister_driver(serial_driver)))
+- printk("serial: failed to unregister Perle's serial driver (%d)\n", e1);
++ tty_unregister_driver(serial_driver);
+ put_tty_driver(serial_driver);
+ #endif
+ for (i = 0; i < NR_PORTS; i++) {
+ if ((info = ps_table[i].info)) {
+ // if (info->state->XRflatreg) // This code causes oops. Remove for now plus all other Sleep calls.
diff --git a/0005-kernel-5.14-unsigned-tty-flow-tty.patch b/0005-kernel-5.14-unsigned-tty-flow-tty.patch
new file mode 100644
index 000000000000..7b08e33116d8
--- /dev/null
+++ b/0005-kernel-5.14-unsigned-tty-flow-tty.patch
@@ -0,0 +1,47 @@
+diff -pNaru5 perle-serial-3.9.2.orig-0005/pserial/perle-serial.c perle-serial-3.9.2/pserial/perle-serial.c
+--- perle-serial-3.9.2.orig-0005/pserial/perle-serial.c 2021-09-14 11:28:43.064657062 -0400
++++ perle-serial-3.9.2/pserial/perle-serial.c 2021-09-14 11:31:16.193566625 -0400
+@@ -947,10 +947,14 @@ static _INLINE_ void receive_chars(struc
+ #else
+ tty_flip_buffer_push(tty);
+ #endif
+ }
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0))
++#define stopped flow.stopped /* tty->stopped */
++#endif
++
+ static _INLINE_ void transmit_chars(struct ps_async_struct *info, int *intr_done)
+ {
+ int count;
+
+ /* echo suppression logic */
+@@ -2195,20 +2199,28 @@ static int ps_write(struct tty_struct *
+ }
+ #endif // > 2.6.10
+
+
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0))
++static unsigned int ps_write_room(struct tty_struct *tty)
++#else
+ static int ps_write_room(struct tty_struct *tty)
++#endif
+ {
+ struct ps_async_struct *info = (struct ps_async_struct *)tty->driver_data;
+
+ if (ps_paranoia_check(info, tty, "ps_write_room"))
+ return 0;
+ return CIRC_SPACE(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE);
+ }
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0))
++static unsigned int ps_chars_in_buffer(struct tty_struct *tty)
++#else
+ static int ps_chars_in_buffer(struct tty_struct *tty)
++#endif
+ {
+ struct ps_async_struct *info = (struct ps_async_struct *)tty->driver_data;
+
+ if (ps_paranoia_check(info, tty, "ps_chars_in_buffer"))
+ return 0;
diff --git a/PKGBUILD b/PKGBUILD
index d06f24a98c4c..b3c2a3bca299 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -79,7 +79,7 @@ pkgname='perle-serial'
#_pkgver='3.9.0-14'
_pkgver='3.9.2-4'
pkgver="${_pkgver//-/_}"
-pkgrel='2'
+pkgrel='3'
pkgdesc='kernel module driver for Perle UltraPort SI Express PCI-RAS modem SPEED LE multi I/O serial parallel RS-232 422 485 port'
arch=('i686' 'x86_64')
url='https://www.perle.com/downloads/mp_speedle.shtml'
@@ -93,13 +93,25 @@ source=(
"https://www.perle.com/downloads/drivers/ultraport/linux/perle-serial-${_pkgver}.tgz"
'0000-kernel-4.11-signal_pending.patch'
'0001-kernel-5.6-proc_dir_entry-proc_ops.patch'
+ '0002-kernel-4.7-async-initialized.patch'
+ '0003-kernel-5.12-tty-low_latency.patch'
+ '0004-tty_unregister_driver-void.patch'
+ '0005-kernel-5.14-unsigned-tty-flow-tty.patch'
)
md5sums=('85e9617af62fcab55c684fa8e4b26987'
'52f87acfeb5f5820a74ad6aa74d18acf'
- '6dac46dc8f094dd8f8b760a68414bd0b')
+ '6dac46dc8f094dd8f8b760a68414bd0b'
+ 'f97869736f93fb70b9f034106697c0a2'
+ 'd85366f7566046dbd580850fbfa640e0'
+ '7d7c57fc3a46599aebede7f940c5c5a8'
+ '47a81ca7f524a3e86abb72ae872bac74')
sha256sums=('d9d61a941ecfd2ff41d5450557eb9071d934497dbd10229e97c8f88b48cb9a58'
'691e0d8d348ab9f19f0398ff79e0d4780d5110e3dd11acf3261e3f73b2983ea1'
- '31e0d244d22b16d2c0b783e38bac2d96a53cbe0ce14f2fe11142a8691ce952aa')
+ '31e0d244d22b16d2c0b783e38bac2d96a53cbe0ce14f2fe11142a8691ce952aa'
+ '8dcb2c32d641cef471fe45db1e122492a82b3439c55be8c530758d519eeae289'
+ '3e2b44baf4d8e29ce5e084485f0882a8f06a1d1b045a93ffa5cdd2f8112d1bfa'
+ '7c0c4af907e68a2641beffd20bf487b47cf58ca79dea45276b5046fe81f436bc'
+ '0c942db9e9a5f41873cc2ba6edae3372da672e8f82ea5c1266a2c905d4373319')
_opt_SERIAL=1 # This is for bug testing dkms only. All cards have serial ports so this should always be enabled.
@@ -179,6 +191,22 @@ prepare() {
#cp -pr "${srcdir}/${_srcdir}"{,.orig-0001}; false
#diff -pNaru5 perle-serial-3.9.2{.orig-0001,} > '0001-kernel-5.6-proc_dir_entry-proc_ops.patch'
patch -Nup1 -i "${srcdir}/0001-kernel-5.6-proc_dir_entry-proc_ops.patch"
+
+ #cp -pr "${srcdir}/${_srcdir}"{,.orig-0002}; false
+ #diff -pNaru5 perle-serial-3.9.2{.orig-0002,} > '0002-kernel-4.7-async-initialized.patch'
+ patch -Nup1 -i "${srcdir}/0002-kernel-4.7-async-initialized.patch"
+
+ #cp -pr "${srcdir}/${_srcdir}"{,.orig-0003}; false
+ #diff -pNaru5 perle-serial-3.9.2{.orig-0003,} > '0003-kernel-5.12-tty-low_latency.patch'
+ patch -Nup1 -i "${srcdir}/0003-kernel-5.12-tty-low_latency.patch"
+
+ #cp -pr "${srcdir}/${_srcdir}"{,.orig-0004}; false
+ #diff -pNaru5 perle-serial-3.9.2{.orig-0004,} > '0004-tty_unregister_driver-void.patch'
+ patch -Nup1 -i "${srcdir}/0004-tty_unregister_driver-void.patch"
+
+ #cp -pr "${srcdir}/${_srcdir}"{,.orig-0005}; false
+ #diff -pNaru5 perle-serial-3.9.2{.orig-0005,} > '0005-kernel-5.14-unsigned-tty-flow-tty.patch'
+ patch -Nup1 -i "${srcdir}/0005-kernel-5.14-unsigned-tty-flow-tty.patch"
set +u
}