diff options
author | Chris Severance | 2021-09-14 10:10:21 -0400 |
---|---|---|
committer | Chris Severance | 2021-09-14 10:10:21 -0400 |
commit | 8ac53877e67231432c7eb8bd6d4153e821e61af5 (patch) | |
tree | aca15b236f222eb4c5c497e5f71c19b9db37fcf5 | |
parent | 47086a747d865c113481a18e5dcb2ab9a7cdc903 (diff) | |
download | aur-8ac53877e67231432c7eb8bd6d4153e821e61af5.tar.gz |
autu: Update to 2.0.5_0-1
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | 0001-kernel-4.7-async-initialized.patch | 17 | ||||
-rw-r--r-- | 0002-kernel-5.12-tty-low_latency.patch | 44 | ||||
-rw-r--r-- | 0003-kernel-5.14-task_struct.state-unsigned-tty-flow-tty.patch | 89 | ||||
-rw-r--r-- | PKGBUILD | 39 |
5 files changed, 195 insertions, 15 deletions
@@ -1,7 +1,7 @@ pkgbase = sunix-snx pkgdesc = kernel module driver for Sunix SUN1889 SUN1989 SUN1999 SUN2212 SUN2410 UL7502AQ UL7512EQ UL7522EQ PCI PCIe multi I/O parallel serial RS-232 422 485 port Dell Lenovo Acer Startech - pkgver = 2.0.4_3 - pkgrel = 3 + pkgver = 2.0.5_0 + pkgrel = 1 url = http://www.sunix.com/ install = sunix-snx-install.sh arch = i686 @@ -16,10 +16,17 @@ pkgbase = sunix-snx depends = linux depends = dkms depends = linux-headers - source = http://www.sunix.com/en/download.php?file=driver&file_link=download/driver/2017/20171122180114_snx_V2.0.4.3.tar.gz - source = 0000-Kernel-4-15-timers.patch - sha256sums = 5103e25929f5d33a924be1fe1fc824a804fae9c80e3869417b5558ae31330756 - sha256sums = eb9cb3cf971023442925b4eacdf8ac47b1b48172b30d8943312865aa92f19976 + source = http://www.sunix.com/en/download.php?file=driver&file_link=download/driver/2021/20210407180737_snx_V2.0.5.0.tar.xz + source = 0001-kernel-4.7-async-initialized.patch + source = 0002-kernel-5.12-tty-low_latency.patch + source = 0003-kernel-5.14-task_struct.state-unsigned-tty-flow-tty.patch + md5sums = effaa874994bde6047afe2ea3e023cf6 + md5sums = 71564d580faaf72ab3518c298883742e + md5sums = e3604145fb2b1678da395a600e4cf1ed + md5sums = a16e94419d504663c50d3d7522b0c019 + sha256sums = bfc5e68c0ef21266a11db62e3cd0bc3a523207afcf2bb989f2437caf86086d35 + sha256sums = 4ea9275ca8122543c25f17112d4c374dc39de32e3d9d1d0aa5488bacd514750d + sha256sums = ab0ef161b7c7053299b18ab9b697047d37142e9e88d53d40ac087f64522a55dd + sha256sums = 12a9d8f11c60cef0e70d0d5cba684146beb32eef76e7519728e2e4453f671251 pkgname = sunix-snx - diff --git a/0001-kernel-4.7-async-initialized.patch b/0001-kernel-4.7-async-initialized.patch new file mode 100644 index 000000000000..16d4e1213701 --- /dev/null +++ b/0001-kernel-4.7-async-initialized.patch @@ -0,0 +1,17 @@ +diff -pNaru5 snx_V2.0.5.0.orig-0000/driver/snx_main.c snx_V2.0.5.0/driver/snx_main.c +--- snx_V2.0.5.0.orig-0000/driver/snx_main.c 2019-04-01 15:47:02.000000000 -0400 ++++ snx_V2.0.5.0/driver/snx_main.c 2021-09-14 09:27:18.672123751 -0400 +@@ -1197,11 +1197,13 @@ static int sunix_ser_port_table_init(voi + sp->port.pb_info = sb->pb_info; + sp->port.irq = sb->irq; + sp->port.line = n; + sp->port.uartclk = sp->port.baud_base * 16; + sp->port.iotype = SNX_UPIO_PORT; ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0)) + sp->port.flags = ASYNC_SHARE_IRQ; ++#endif + sp->port.ldisc_stop_rx = 0; + spin_lock_init(&sp->port.lock); + + if (sp->port.chip_flag == SUN1889_HWID) { + sp->port.snx_type = SNX_SER_PORT_SUN1889; diff --git a/0002-kernel-5.12-tty-low_latency.patch b/0002-kernel-5.12-tty-low_latency.patch new file mode 100644 index 000000000000..2ea39ac28205 --- /dev/null +++ b/0002-kernel-5.12-tty-low_latency.patch @@ -0,0 +1,44 @@ +diff -pNaru5 snx_V2.0.5.0.orig-0000/driver/snx_serial.c snx_V2.0.5.0/driver/snx_serial.c +--- snx_V2.0.5.0.orig-0000/driver/snx_serial.c 2019-04-01 15:41:10.000000000 -0400 ++++ snx_V2.0.5.0/driver/snx_serial.c 2021-09-14 09:42:59.377335355 -0400 +@@ -1035,20 +1035,22 @@ static int snx_ser_set_info(struct snx_s + port->custom_divisor = new_serial.custom_divisor; + state->close_delay = close_delay; + state->closing_wait = closing_wait; + port->fifosize = new_serial.xmit_fifo_size; + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 12, 0)) + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)) + + tport->low_latency = (port->flags & SNX_UPF_LOW_LATENCY) ? 1 : 0; + + #else + + if (state->info->tty) { + state->info->tty->low_latency = (port->flags & SNX_UPF_LOW_LATENCY) ? 1 : 0; + } + #endif ++#endif + + + check_and_exit: + retval = 0; + if (port->type == PORT_UNKNOWN) { +@@ -3381,15 +3383,17 @@ static int snx_ser_open(struct tty_struc + } + + state->port->suspended = 1; + tty->driver_data = state; + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 12, 0)) + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)) + tport->low_latency = (state->port->flags & SNX_UPF_LOW_LATENCY) ? 1 : 0; + #else + tty->low_latency = (state->port->flags & SNX_UPF_LOW_LATENCY) ? 1 : 0; + #endif ++#endif + + #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)) + tty->alt_speed = 0; + #endif + state->info->tty = tty; diff --git a/0003-kernel-5.14-task_struct.state-unsigned-tty-flow-tty.patch b/0003-kernel-5.14-task_struct.state-unsigned-tty-flow-tty.patch new file mode 100644 index 000000000000..053dc9c1f886 --- /dev/null +++ b/0003-kernel-5.14-task_struct.state-unsigned-tty-flow-tty.patch @@ -0,0 +1,89 @@ +diff -pNaru5 snx_V2.0.5.0.orig-0000/driver/snx_serial.c snx_V2.0.5.0/driver/snx_serial.c +--- snx_V2.0.5.0.orig-0000/driver/snx_serial.c 2021-09-14 09:44:32.674917745 -0400 ++++ snx_V2.0.5.0/driver/snx_serial.c 2021-09-14 09:46:34.705937002 -0400 +@@ -65,18 +65,26 @@ static _INLINE_ void __snx_ser_put_char( + static int snx_ser_put_char(struct tty_struct *, unsigned char); + #else + static void snx_ser_put_char(struct tty_struct *, unsigned char); + #endif + static void snx_ser_flush_chars(struct tty_struct *); ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) ++static unsigned int snx_ser_chars_in_buffer(struct tty_struct *); ++#else + static int snx_ser_chars_in_buffer(struct tty_struct *); ++#endif + static void snx_ser_flush_buffer(struct tty_struct *); + static void snx_ser_send_xchar(struct tty_struct *, char); + static void snx_ser_throttle(struct tty_struct *); + static void snx_ser_unthrottle(struct tty_struct *); + static int snx_ser_get_info(struct snx_ser_state *, struct serial_struct *); + static int snx_ser_set_info(struct snx_ser_state *, struct serial_struct *); ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) ++static unsigned int snx_ser_write_room(struct tty_struct *); ++#else + static int snx_ser_write_room(struct tty_struct *); ++#endif + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 10)) + static int snx_ser_write(struct tty_struct *, const unsigned char *, int); + #else + static int snx_ser_write(struct tty_struct *, int, const unsigned char *, int); + #endif +@@ -522,10 +530,13 @@ static void snx_ser_stop(struct tty_stru + spin_lock_irqsave(&port->lock, flags); + sunix_ser_stop_tx(port, 1); + spin_unlock_irqrestore(&port->lock, flags); + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) ++#define stopped flow.stopped /* tty->stopped */ ++#endif + + static void __snx_ser_start(struct tty_struct *tty) + { + struct snx_ser_state *state = tty->driver_data; + struct snx_ser_port *port = state->port; +@@ -752,11 +763,15 @@ static void snx_ser_flush_chars(struct t + + snx_ser_start(tty); + } + + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) ++static unsigned int snx_ser_chars_in_buffer(struct tty_struct *tty) ++#else + static int snx_ser_chars_in_buffer(struct tty_struct *tty) ++#endif + { + struct snx_ser_state *state = NULL; + int line = SNX_SER_DEVNUM(tty); + + if (line >= SNX_SER_TOTAL_MAX) { +@@ -1074,11 +1089,15 @@ exit: + + return retval; + } + + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) ++static unsigned int snx_ser_write_room(struct tty_struct *tty) ++#else + static int snx_ser_write_room(struct tty_struct *tty) ++#endif + { + struct snx_ser_state *state = NULL; + int line = SNX_SER_DEVNUM(tty); + int status = 0; + +@@ -1492,11 +1511,11 @@ static int snx_ser_wait_modem_status(str + } + + cprev = cnow; + } + +- current->state = TASK_RUNNING; ++ set_current_state(TASK_RUNNING); + remove_wait_queue(&state->info->delta_msr_wait, &wait); + + return ret; + } + @@ -93,8 +93,9 @@ set -u # http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Startech pkgname='sunix-snx' #pkgver='2.0.4_2'; _dl='2016/20160706173626' -pkgver='2.0.4_3'; _dl='2017/20171122180114' -pkgrel='3' +#pkgver='2.0.4_3'; _dl='2017/20171122180114' +pkgver='2.0.5_0'; _dl='2021/20210407180737' +pkgrel='1' pkgdesc='kernel module driver for Sunix SUN1889 SUN1989 SUN1999 SUN2212 SUN2410 UL7502AQ UL7512EQ UL7522EQ PCI PCIe multi I/O parallel serial RS-232 422 485 port Dell Lenovo Acer Startech' arch=('i686' 'x86_64') url='http://www.sunix.com/' @@ -106,16 +107,26 @@ makedepends=('gzip' 'findutils' 'sed' 'diffutils' 'patch') install="${pkgname}-install.sh" _srcdir="snx_V${pkgver//_/.}" source=( - "http://www.sunix.com/en/download.php?file=driver&file_link=download/driver/${_dl}_snx_V${pkgver//_/.}.tar.gz" + # DO NOT switch link to https. It doesn't work. + "http://www.sunix.com/en/download.php?file=driver&file_link=download/driver/${_dl}_snx_V${pkgver//_/.}.tar.xz" #"http://www.sunix.com.tw/en/download.php?pid=1479&file=driver&file_link=download/driver/${_dl}_snx_V${pkgver//_/.}.tar.gz" # http://dpdk.org/dev/patchwork/patch/22003/ [dpdk-dev] kni: fix build with kernel 4.11 lib/librte_eal/linuxapp/kni/compat.h lib/librte_eal/linuxapp/kni/kni_dev.h # http://dpdk.org/dev/patchwork/patch/22037/ # http://rglinuxtech.com/?p=1930 # https://forum.manjaro.org/t/error-with-rtl8812au/24066 - '0000-Kernel-4-15-timers.patch' + #'0000-Kernel-4-15-timers.patch' + '0001-kernel-4.7-async-initialized.patch' + '0002-kernel-5.12-tty-low_latency.patch' + '0003-kernel-5.14-task_struct.state-unsigned-tty-flow-tty.patch' ) -sha256sums=('5103e25929f5d33a924be1fe1fc824a804fae9c80e3869417b5558ae31330756' - 'eb9cb3cf971023442925b4eacdf8ac47b1b48172b30d8943312865aa92f19976') +md5sums=('effaa874994bde6047afe2ea3e023cf6' + '71564d580faaf72ab3518c298883742e' + 'e3604145fb2b1678da395a600e4cf1ed' + 'a16e94419d504663c50d3d7522b0c019') +sha256sums=('bfc5e68c0ef21266a11db62e3cd0bc3a523207afcf2bb989f2437caf86086d35' + '4ea9275ca8122543c25f17112d4c374dc39de32e3d9d1d0aa5488bacd514750d' + 'ab0ef161b7c7053299b18ab9b697047d37142e9e88d53d40ac087f64522a55dd' + '12a9d8f11c60cef0e70d0d5cba684146beb32eef76e7519728e2e4453f671251') if [ "${_opt_DKMS}" -ne 0 ]; then depends+=('linux' 'dkms' 'linux-headers') @@ -180,9 +191,21 @@ prepare() { sed -e 's:\r$::g' -i $(grep -slrF $'\r') - #cp -pr "${srcdir}/${_srcdir}"{,.orig-0000} + #cp -pr "${srcdir}/${_srcdir}"{,.orig-0000}; false #diff -pNaru5 snx_V2.0.4.3{.orig-0000,} > '0000-Kernel-4-15-timers.patch' - patch -Nup1 -i "${srcdir}/0000-Kernel-4-15-timers.patch" + #patch -Nup1 -i "${srcdir}/0000-Kernel-4-15-timers.patch" + + #cp -pr "${srcdir}/${_srcdir}"{,.orig-0000}; false + #diff -pNaru5 snx_V2.0.5.0{.orig-0000,} > '0001-kernel-4.7-async-initialized.patch' + patch -Nup1 -i "${srcdir}/0001-kernel-4.7-async-initialized.patch" + + #cp -pr "${srcdir}/${_srcdir}"{,.orig-0000}; false + #diff -pNaru5 snx_V2.0.5.0{.orig-0000,} > '0002-kernel-5.12-tty-low_latency.patch' + patch -Nup1 -i "${srcdir}/0002-kernel-5.12-tty-low_latency.patch" + + #cp -pr "${srcdir}/${_srcdir}"{,.orig-0000}; false + #diff -pNaru5 snx_V2.0.5.0{.orig-0000,} > '0003-kernel-5.14-task_struct.state-unsigned-tty-flow-tty.patch' + patch -Nup1 -i "${srcdir}/0003-kernel-5.14-task_struct.state-unsigned-tty-flow-tty.patch" # Kernel 3,4,5 all use the same makefile. Trim out everything but Kernel 4 mv driver/Makefile{,.Arch} |