diff options
author | Chris Severance | 2021-09-12 23:13:31 -0400 |
---|---|---|
committer | Chris Severance | 2021-09-12 23:13:31 -0400 |
commit | 4b7da51765db3285736d036f9fd1c58e8ee3327c (patch) | |
tree | 4e96ccdd2994484292a2e93f06c7fb3a32fc5db7 | |
parent | 0592ce9bd4b81e26691640712b512634801cdd76 (diff) | |
download | aur-4b7da51765db3285736d036f9fd1c58e8ee3327c.tar.gz |
autu: Update to 1.9.40-5
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | 0007-kernel-5.14-task_struct.state-unsigned-tty.patch | 142 | ||||
-rw-r--r-- | PKGBUILD | 16 |
3 files changed, 159 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = dgrp pkgdesc = tty driver for Digi RealPort ConnectPort EtherLite Flex One CM PortServer TS IBM RAN serial console terminal servers pkgver = 1.9.40 - pkgrel = 4 + pkgrel = 5 url = https://www.digi.com/ install = dgrp-install.sh arch = i686 @@ -65,6 +65,7 @@ pkgbase = dgrp source = 0004-kernel-5.6-proc_dir_entry-proc_ops.patch source = 0005-kernel-5.12-MODULE_SUPPORTED_DEVICE.patch source = 0006-kernel-5.13-dropped-tty_check_change.patch + source = 0007-kernel-5.14-task_struct.state-unsigned-tty.patch md5sums = 175349c08d19158c88ad582c76916397 md5sums = b4af5022ba96fcc2429263cfbbe85bae md5sums = 9feebec170552c9186e713e7f5852e14 @@ -106,6 +107,7 @@ pkgbase = dgrp md5sums = c25c1fdfbdc1fa38d87e45cf1c8511c2 md5sums = 2596b5f38ef54d72af08dca05fcce369 md5sums = 60a06421a819bc65bd5ba0c3841e0500 + md5sums = 5dfc03b8f6b8d190b63271b8ef32986c sha256sums = 2044715efa7a56fccad5ac76cdca9f71bca430e8c53ce31fa5c9563da3e7906a sha256sums = 42898b9d24262de27e9b1f3067d51d01373810b7c9e4991403a7f0a5dd7a26cf sha256sums = 66f8b106a052b4807513ace92978e5e6347cef08eee39e4b4ae31c60284cc0a3 @@ -147,5 +149,6 @@ pkgbase = dgrp sha256sums = b812176f6061d135ab45facecf5a05922d9ffd5ec0a6f17c3e3a5a74729034b1 sha256sums = 82f2c244f169c1f5a9b6186e4e4436c116bd020a1be973e8be261097d38bc937 sha256sums = eaab5a80791644a24950fe0c6db2c09535655c63ed3a263eb70791ab30f86ab9 + sha256sums = 50975ac2377ffd24874746df4b820de1734f53eb322bd25ccc9d51148129a2e0 pkgname = dgrp diff --git a/0007-kernel-5.14-task_struct.state-unsigned-tty.patch b/0007-kernel-5.14-task_struct.state-unsigned-tty.patch new file mode 100644 index 000000000000..7b596123f717 --- /dev/null +++ b/0007-kernel-5.14-task_struct.state-unsigned-tty.patch @@ -0,0 +1,142 @@ +diff -pNaru5 driver/2.6.27.orig/dgrp_common.c driver/2.6.27/dgrp_common.c +--- driver/2.6.27.orig/dgrp_common.c 2021-09-12 14:45:27.901267870 -0400 ++++ driver/2.6.27/dgrp_common.c 2021-09-12 14:49:02.969431475 -0400 +@@ -192,13 +192,13 @@ void *dgrp_kzmalloc(size_t size, int pri + * + * Returns 0 on success, !0 if interrupted + */ + int dgrp_sleep(ulong ticks) + { +- current->state = TASK_INTERRUPTIBLE; ++ set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(ticks); +- current->state = TASK_RUNNING; ++ set_current_state(TASK_RUNNING); + return signal_pending(current); + } + + + +diff -pNaru5 driver/2.6.27.orig/dgrp_tty.c driver/2.6.27/dgrp_tty.c +--- driver/2.6.27.orig/dgrp_tty.c 2021-09-12 14:45:27.904601276 -0400 ++++ driver/2.6.27/dgrp_tty.c 2021-09-12 14:48:48.089087547 -0400 +@@ -107,13 +107,21 @@ static void dgrp_tty_input_stop(struct t + static void drp_wmove(struct ch_struct *, int, void*, int); + + static int dgrp_tty_open(struct tty_struct *, struct file *); + static void dgrp_tty_close(struct tty_struct *, struct file *); + static int dgrp_tty_write(struct tty_struct *, const unsigned char *, int); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) ++static unsigned int dgrp_tty_write_room(struct tty_struct *); ++#else + static int dgrp_tty_write_room(struct tty_struct *); ++#endif + static void dgrp_tty_flush_buffer(struct tty_struct *); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) ++static unsigned int dgrp_tty_chars_in_buffer(struct tty_struct *); ++#else + static int dgrp_tty_chars_in_buffer(struct tty_struct *); ++#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0) + static int dgrp_tty_ioctl(struct tty_struct *, struct file *, unsigned int, unsigned long); + #else + static int dgrp_tty_ioctl(struct tty_struct *, unsigned int, unsigned long); + #endif +@@ -733,11 +741,12 @@ static int drp_wait_ack(struct ch_struct + * Prepare the task to accept the wakeup, then + * release our locks and release control. + */ + + add_wait_queue(&nd->nd_seq_wque[in], &wait); +- current->state = TASK_INTERRUPTIBLE; ++ /* We'll retroactively apply this patch to support non Intel processors.*/ ++ set_current_state(TASK_INTERRUPTIBLE); + + DGRP_UNLOCK(nd->nd_lock, *lock_flags); + + /* + * Give up control, we'll come back if we're +@@ -765,11 +774,11 @@ if (ttylock) tty_lock(ch->port.tty); + + remove_wait_queue(&nd->nd_seq_wque[in], &wait); + + DGRP_LOCK(nd->nd_lock, *lock_flags); + +- current->state = TASK_RUNNING; ++ set_current_state(TASK_RUNNING); + + if (signal_pending(current)) + return -EINTR; + + if (nd->nd_seq_wait[in] == 0) +@@ -816,11 +825,11 @@ static void drp_my_sleep(struct ch_struc + /* + * First make sure we're ready to receive the wakeup. + */ + + add_wait_queue(&ch->ch_sleep, &wait); +- current->state = TASK_UNINTERRUPTIBLE; ++ set_current_state(TASK_UNINTERRUPTIBLE); + + /* + * Since we are uninterruptible, set a timer to + * unset the uninterruptable state in 1 second. + */ +@@ -1210,11 +1219,11 @@ static int dgrp_tty_open(struct tty_stru + * Prepare the task to accept the wakeup, then + * release our locks and release control. + */ + + add_wait_queue(&ch->ch_flag_wait, &wait); +- current->state = TASK_INTERRUPTIBLE; ++ set_current_state(TASK_INTERRUPTIBLE); + + DGRP_UNLOCK(nd->nd_lock, lock_flags); + + /* + * Give up control, we'll come back if we're +@@ -1247,11 +1256,11 @@ static int dgrp_tty_open(struct tty_stru + dbg_tty_trace(OPEN, ("tty open (%x) awake\n", + MINOR(tty_devnum(tty)))); + + DGRP_LOCK(nd->nd_lock, lock_flags); + +- current->state = TASK_RUNNING; ++ set_current_state(TASK_RUNNING); + + ch->ch_wait_count[otype]--; + + if (wait_carrier) + ch->ch_wait_carrier--; +@@ -2484,11 +2493,15 @@ static void dgrp_tty_flush_buffer(struct + + /* + * Return space available in Tx buffer + * count = ( ch->ch_tout - ch->ch_tin ) mod (TBUF_MAX - 1) + */ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) ++static unsigned int dgrp_tty_write_room(struct tty_struct *tty) ++#else + static int dgrp_tty_write_room(struct tty_struct *tty) ++#endif + { + struct un_struct *un; + struct ch_struct *ch; + int count; + +@@ -2534,11 +2547,15 @@ static int dgrp_tty_write_room(struct tt + * + * Remember that sequence number math is always with a sixteen bit + * mask, not the TBUF_MASK. + */ + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) ++static unsigned int dgrp_tty_chars_in_buffer(struct tty_struct *tty) ++#else + static int dgrp_tty_chars_in_buffer(struct tty_struct *tty) ++#endif + { + struct un_struct *un; + struct ch_struct *ch; + int count; + int count1; @@ -105,7 +105,7 @@ pkgname='dgrp' #_pkgver='1.9-39'; _dl='40002086_Z.tgz' _pkgver='1.9-40'; _dl='40002086_AA.tgz' pkgver="${_pkgver//-/.}" -pkgrel='4' +pkgrel='5' pkgdesc="tty driver for Digi ${_opt_RealPort} ConnectPort EtherLite Flex One CM PortServer TS IBM RAN serial console terminal servers" #_pkgdescshort="Digi ${_opt_RealPort} driver for Ethernet serial servers" # For when we used to generate the autorebuild from here arch=('i686' 'x86_64') @@ -194,6 +194,7 @@ source=( '0004-kernel-5.6-proc_dir_entry-proc_ops.patch' '0005-kernel-5.12-MODULE_SUPPORTED_DEVICE.patch' '0006-kernel-5.13-dropped-tty_check_change.patch' + '0007-kernel-5.14-task_struct.state-unsigned-tty.patch' ) unset _mibsrc #source_i686=('http://ftp1.digi.com/support/utilities/40002890_A.tgz') @@ -239,7 +240,8 @@ md5sums=('175349c08d19158c88ad582c76916397' '4f1c03f1cc5f440a770c080a121d998a' 'c25c1fdfbdc1fa38d87e45cf1c8511c2' '2596b5f38ef54d72af08dca05fcce369' - '60a06421a819bc65bd5ba0c3841e0500') + '60a06421a819bc65bd5ba0c3841e0500' + '5dfc03b8f6b8d190b63271b8ef32986c') sha256sums=('2044715efa7a56fccad5ac76cdca9f71bca430e8c53ce31fa5c9563da3e7906a' '42898b9d24262de27e9b1f3067d51d01373810b7c9e4991403a7f0a5dd7a26cf' '66f8b106a052b4807513ace92978e5e6347cef08eee39e4b4ae31c60284cc0a3' @@ -280,7 +282,8 @@ sha256sums=('2044715efa7a56fccad5ac76cdca9f71bca430e8c53ce31fa5c9563da3e7906a' '882019276d59e6cc15fcda1bb1dea75b01591509a2644ddb0225ef1d5a17fd1c' 'b812176f6061d135ab45facecf5a05922d9ffd5ec0a6f17c3e3a5a74729034b1' '82f2c244f169c1f5a9b6186e4e4436c116bd020a1be973e8be261097d38bc937' - 'eaab5a80791644a24950fe0c6db2c09535655c63ed3a263eb70791ab30f86ab9') + 'eaab5a80791644a24950fe0c6db2c09535655c63ed3a263eb70791ab30f86ab9' + '50975ac2377ffd24874746df4b820de1734f53eb322bd25ccc9d51148129a2e0') if [ "${_opt_DKMS}" -ne 0 ]; then depends+=('linux' 'dkms' 'linux-headers') @@ -400,6 +403,13 @@ prepare() { #diff -pNaru5 driver/2.6.27{.orig,} > '0006-kernel-5.13-dropped-tty_check_change.patch' patch -Nbup0 -i "${srcdir}/0006-kernel-5.13-dropped-tty_check_change.patch" + # unsigned write_room https://www.spinics.net/lists/linux-serial/msg42297.html + # unsigned chars_in_buffer https://www.spinics.net/lists/linux-serial/msg42299.html + # set_current_state https://linux-kernel.vger.kernel.narkive.com/xnPfKhYP/patch-2-5-52-use-set-current-state-instead-of-current-state-take-1 + #rm -f driver/2.6.27/*.orig; cp -pr driver/2.6.27{,.orig}; false + #diff -pNaru5 driver/2.6.27{.orig,} > '0007-kernel-5.14-task_struct.state-unsigned-tty.patch' + patch -Nbup0 -i "${srcdir}/0007-kernel-5.14-task_struct.state-unsigned-tty.patch" + # Standardize name of RealPort sed -e "s/RealPort/${_opt_RealPort}/gI" -i $(grep -lrF $'RealPort\nRealport' .) # grep -ri realport . | grep -vF $'RealPort\nRealport' |