diff options
author | Chris Severance | 2021-09-12 23:14:29 -0400 |
---|---|---|
committer | Chris Severance | 2021-09-12 23:14:29 -0400 |
commit | 68e9e6417fb2fe9a3023320409eac2bb31234e61 (patch) | |
tree | 9e7d33c6620c7c9739bc19da98c895c0f59810a2 | |
parent | 27e7451d22ae437d565dd9609a0308b908c3616e (diff) | |
download | aur-68e9e6417fb2fe9a3023320409eac2bb31234e61.tar.gz |
autu: Update to 8.00-3
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | 0005-kernel-5.14-unsigned-tty-flow-tty.patch | 109 | ||||
-rw-r--r-- | PKGBUILD | 16 |
3 files changed, 126 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = nslink pkgdesc = tty driver and firmware update for Comtrol DeviceMaster, RTS, LT, PRO, 500, UP, RPSH-SI, RPSH, and Serial port Hub console terminal device server pkgver = 8.00 - pkgrel = 2 + pkgrel = 3 url = http://www.comtrol.com/ install = nslink-install.sh arch = i686 @@ -28,17 +28,20 @@ pkgbase = nslink source = 0002-kernel-5.6-proc_dir_entry-proc_ops.patch source = 0003-tty_unregister_driver-void.patch source = 0004-kernel-5.12-tty-low_latency.patch + source = 0005-kernel-5.14-unsigned-tty-flow-tty.patch md5sums = b59906d80268e69a24c211b398ffd10c md5sums = e3ffb36acfdd321c919e44d477f0774a md5sums = 581cd5f582ed20c7cf85a4df23a9f78a md5sums = 36fcfa504772df4aabbde9f23d5459d5 md5sums = 7e0659716e30c6e2ff5c16f20aac07be md5sums = 4e0c61dc0c5da4c3125db7ac1e481aac + md5sums = 93e85c98fd375285887b78f2df44ce01 sha256sums = 092859a3c198f8e3f5083a752eab0af74ef71dce59ed503d120792be13cc5fa3 sha256sums = d21c5eeefdbf08a202a230454f0bf702221686ba3e663eb41852719bb20b75fb sha256sums = 5a4e2713a8d1fe0eebd94fc843839ce5daa647f9fa7d88f62507e660ae111073 sha256sums = cbaa55f16357688b992a7d7c0f2fb56225edda286d97595918c50e05005d1318 sha256sums = 7b7718789a4a23c3f16094f93b9fc0d8a5915e67e6a0aedef17cdb6adb22a1ac sha256sums = a48cdf948f907b00919c3a2dadbaa2c41c28891d689195e072765c39b0b4af49 + sha256sums = 12c55d7b898b5cdcd09d6927fef1585a702fde356e8e039e7e85bbce64f3eed8 pkgname = nslink 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..9c8fce087cff --- /dev/null +++ b/0005-kernel-5.14-unsigned-tty-flow-tty.patch @@ -0,0 +1,109 @@ +--- nslink.c.orig 2021-09-12 22:30:11.942180898 -0400 ++++ nslink.c 2021-09-12 22:30:37.085578537 -0400 +@@ -1401,11 +1401,17 @@ retry: + + /* + * Transmit characters in our transmit buffer + */ + if (info->x_char || +- (info->xmit_cnt && info->tty && !info->tty->hw_stopped && !info->tty->stopped)) { ++ (info->xmit_cnt && info->tty && !info->tty->hw_stopped && ! ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) ++ info->tty->flow.stopped ++#else ++ info->tty->stopped ++#endif ++ )) { + if (!hdlc_xmit(si, skb, info, pstate)) + send_packet = 1; + } + } else if (info->remote_status == REM_OPEN_PORT) { + if (hdlc_1byte_cmd(si, skb, i, RK_REMOTE_STATUS, REM_OPEN_PORT)) { +@@ -3484,11 +3490,17 @@ static void nrp_start(struct tty_struct + /* + * Start the transmitter remotely, if we ever add a stop + * transmitter to nrp_stop. + */ + +- if (info->xmit_cnt <= 0 || tty->stopped || tty->hw_stopped || ++ if (info->xmit_cnt <= 0 || ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) ++ tty->flow.stopped ++#else ++ tty->stopped ++#endif ++ || tty->hw_stopped || + !info->xmit_buf) + return; + + info->si->need_to_send = 1; + if (info->si->use_tcp == 0) +@@ -3692,11 +3704,16 @@ static void nrp_flush_chars(struct tty_s + pstate = &info->si->port_state[info->portnum]; + if (pstate) + space = get_tx_space_remote(pstate); + + if (space <= WAKEUP_CHARS || info->xmit_cnt <= 0 || +- tty->stopped || tty->hw_stopped || !info->xmit_buf) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) ++ tty->flow.stopped ++#else ++ tty->stopped ++#endif ++ || tty->hw_stopped || !info->xmit_buf) + return; + + info->si->need_to_send = 1; + if (info->si->use_tcp == 0) { + if (info->xmit_cnt > 64) +@@ -3813,11 +3830,15 @@ end: + /* + * Return the number of characters that can be sent. We estimate + * only using the in-memory transmit buffer only, and ignore the + * potential space in the remote end. + */ ++#if LINUX_VERSION_CODE >= VERSION_CODE(5,14,0) ++static unsigned int nrp_write_room(struct tty_struct *tty) ++#else + static int nrp_write_room(struct tty_struct *tty) ++#endif + { + struct nr_port *info = (struct nr_port *) tty->driver_data; + int ret; + + if (nslink_paranoia_check(info, "nrp_write_room")) +@@ -3834,11 +3855,15 @@ static int nrp_write_room(struct tty_str + + /* + * Return the number of characters in the buffer. Again, this only + * counts those characters in the in-memory transmit buffer. + */ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) ++static unsigned int nrp_chars_in_buffer(struct tty_struct *tty) ++#else + static int nrp_chars_in_buffer(struct tty_struct *tty) ++#endif + { + struct nr_port *info = (struct nr_port *) tty->driver_data; + + if (nslink_paranoia_check(info, "nrp_chars_in_buffer")) + return 0; +@@ -4617,11 +4642,17 @@ static void tcp_send_remote_cmds(struct + info->update_action = 0; + info->action_register = 0; + } + if (info->x_char || + (info->xmit_cnt && info->tty && +- !info->tty->hw_stopped && !info->tty->stopped)) { ++ !info->tty->hw_stopped && ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) ++ !info->tty->flow.stopped ++#else ++ !info->tty->stopped ++#endif ++ )) { + if (tcp_room(si, bi, 4)) { + bi = 0; + continue; + } + dc = tcp_out_data(buf, bi, info, pstate, si); @@ -25,7 +25,7 @@ _opt_defaultmode='660' # default: 620 set -u pkgname='nslink' pkgver='8.00' -pkgrel='2' +pkgrel='3' pkgdesc='tty driver and firmware update for Comtrol DeviceMaster, RTS, LT, PRO, 500, UP, RPSH-SI, RPSH, and Serial port Hub console terminal device server' # UP is not explicitly supported by NS-Link, only by the firmware updater. _pkgdescshort="Comtrol DeviceMaster ${pkgname} TTY driver" @@ -51,19 +51,22 @@ source=( '0002-kernel-5.6-proc_dir_entry-proc_ops.patch' '0003-tty_unregister_driver-void.patch' '0004-kernel-5.12-tty-low_latency.patch' + '0005-kernel-5.14-unsigned-tty-flow-tty.patch' ) md5sums=('b59906d80268e69a24c211b398ffd10c' 'e3ffb36acfdd321c919e44d477f0774a' '581cd5f582ed20c7cf85a4df23a9f78a' '36fcfa504772df4aabbde9f23d5459d5' '7e0659716e30c6e2ff5c16f20aac07be' - '4e0c61dc0c5da4c3125db7ac1e481aac') + '4e0c61dc0c5da4c3125db7ac1e481aac' + '93e85c98fd375285887b78f2df44ce01') sha256sums=('092859a3c198f8e3f5083a752eab0af74ef71dce59ed503d120792be13cc5fa3' 'd21c5eeefdbf08a202a230454f0bf702221686ba3e663eb41852719bb20b75fb' '5a4e2713a8d1fe0eebd94fc843839ce5daa647f9fa7d88f62507e660ae111073' 'cbaa55f16357688b992a7d7c0f2fb56225edda286d97595918c50e05005d1318' '7b7718789a4a23c3f16094f93b9fc0d8a5915e67e6a0aedef17cdb6adb22a1ac' - 'a48cdf948f907b00919c3a2dadbaa2c41c28891d689195e072765c39b0b4af49') + 'a48cdf948f907b00919c3a2dadbaa2c41c28891d689195e072765c39b0b4af49' + '12c55d7b898b5cdcd09d6927fef1585a702fde356e8e039e7e85bbce64f3eed8') if [ "${_opt_DKMS}" -ne 0 ]; then depends+=('linux' 'dkms' 'linux-headers') @@ -101,6 +104,13 @@ prepare() { #diff -pNau5 nslink.c{.orig,} > '0004-kernel-5.12-tty-low_latency.patch' patch -Nbup0 -i "${srcdir}/0004-kernel-5.12-tty-low_latency.patch" + # tty.stopped https://lore.kernel.org/lkml/20210505091928.22010-13-jslaby@suse.cz/ + # 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 + #cp -p nslink.c{,.orig}; false + #diff -pNau5 nslink.c{.orig,} > '0005-kernel-5.14-unsigned-tty-flow-tty.patch' + patch -Nbup0 -i "${srcdir}/0005-kernel-5.14-unsigned-tty-flow-tty.patch" + # Make package compatible #cp -p 'install.sh' 'install.sh.Arch' # testmode for diff comparison sed -e '# Fix some paths' \ |