diff options
author | Chris Severance | 2019-03-10 20:49:25 -0400 |
---|---|---|
committer | Chris Severance | 2019-03-10 20:49:25 -0400 |
commit | e662affcd219f45e561fca7048a05148858a1938 (patch) | |
tree | ca9d8c68f1ac81f6c0c89d18048caddc3265a362 | |
parent | 8a18dd275b71ade2836ebd7ccff497113a6f8f68 (diff) | |
download | aur-e662affcd219f45e561fca7048a05148858a1938.tar.gz |
autu: Update to 1.42-2
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | 0000-kernel-4.18-proc_fops-to-proc_show.patch | 44 | ||||
-rw-r--r-- | 0001-kernel-5.0.0-8250_core-access_ok.patch | 26 | ||||
-rw-r--r-- | PKGBUILD | 17 |
4 files changed, 90 insertions, 5 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Wed Jun 13 21:01:28 UTC 2018 +# Mon Mar 11 00:49:25 UTC 2019 pkgbase = connecttech-cti-serial pkgdesc = tty UART driver for BlueStorm BlueHeat Xtreme/104-Plus Titan and Xtreme/104-Express families pkgver = 1.42 - pkgrel = 1 + pkgrel = 2 url = http://connecttech.com/product/pci-express-bluestorm-express/ install = connecttech-cti-serial-install.sh arch = i686 @@ -15,7 +15,11 @@ pkgbase = connecttech-cti-serial depends = linux-headers backup = etc/cti-serial-set485.sh source = file://cti_serial_142.tgz + source = 0000-kernel-4.18-proc_fops-to-proc_show.patch + source = 0001-kernel-5.0.0-8250_core-access_ok.patch sha256sums = 9833dfcac4b9116c1d22dcee16bb0533e7b3ab0ae3291c4570e716e1e991f042 + sha256sums = bfe7886f273eed35d36956c143cd07fa1c6c9448cf21f8484bb5a0872ea6d04e + sha256sums = fbb546222486ccbd3fc0cfaf44c146208a27507c20788602fcc6e77853692b00 pkgname = connecttech-cti-serial diff --git a/0000-kernel-4.18-proc_fops-to-proc_show.patch b/0000-kernel-4.18-proc_fops-to-proc_show.patch new file mode 100644 index 000000000000..3179dc230bb3 --- /dev/null +++ b/0000-kernel-4.18-proc_fops-to-proc_show.patch @@ -0,0 +1,44 @@ +--- driver/serial_core.c.orig 2018-06-11 11:13:38.000000000 -0400 ++++ driver/serial_core.c 2019-03-10 20:43:11.777035590 -0400 +@@ -1885,10 +1885,11 @@ static int uart_proc_show(struct seq_fil + for (i = 0; i < drv->nr; i++) + uart_line_info(m, drv, i); + return 0; + } + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,18,0)) + static int uart_proc_open(struct inode *inode, struct file *file) + { + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)) + return single_open(file, uart_proc_show, PDE_DATA(inode)); + #else +@@ -1902,10 +1903,11 @@ static const struct file_operations uart + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, + }; + #endif ++#endif + + #if defined(CONFIG_SERIAL_CORE_CONSOLE) || defined(CONFIG_CONSOLE_POLL) + /* + * cti_uart_console_write - write a console message to a serial port + * @port: the port to write the message +@@ -2443,13 +2445,17 @@ static const struct tty_operations uart_ + .stop = uart_stop, + .start = uart_start, + .hangup = uart_hangup, + .break_ctl = uart_break_ctl, + .wait_until_sent= uart_wait_until_sent, ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,18,0)) + #ifdef CONFIG_PROC_FS + .proc_fops = &uart_proc_fops, + #endif ++#else ++ .proc_show = &uart_proc_show, ++#endif + .tiocmget = uart_tiocmget, + .tiocmset = uart_tiocmset, + .get_icount = uart_get_icount, + #ifdef CONFIG_CONSOLE_POLL + .poll_init = uart_poll_init, diff --git a/0001-kernel-5.0.0-8250_core-access_ok.patch b/0001-kernel-5.0.0-8250_core-access_ok.patch new file mode 100644 index 000000000000..18e78399d5d3 --- /dev/null +++ b/0001-kernel-5.0.0-8250_core-access_ok.patch @@ -0,0 +1,26 @@ +--- driver/8250_core.c.orig 2018-06-11 10:29:19.000000000 -0400 ++++ driver/8250_core.c 2019-03-10 20:36:57.151744874 -0400 +@@ -4051,16 +4051,22 @@ serial8250_register_ports(struct uart_dr + static inline int pci_portnum_cti(struct uart_port *port) + { + return (port->iobase % 0x100) / 0x08; + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) ++#define compat_access_ok(u,v,w) access_ok(v,w) ++#else ++#define compat_access_ok(u,v,w) access_ok(u,v,w) ++#endif ++ + static int get_lmode_from_arg(unsigned int *value){ + + int lmode; + + //use copy_from_user if userspace pointer is valid +- if(access_ok(VERIFY_READ, (void __user *)value, sizeof(int))){ ++ if(compat_access_ok(VERIFY_READ, (void __user *)value, sizeof(int))){ + if(copy_from_user(&lmode, (void __user *)value, sizeof(int))){ + return -EFAULT; + }; + return lmode; + } @@ -1,7 +1,6 @@ # Maintainer: Chris Severance aur.severach aATt spamgourmet dott com # Todo: remove source file reference (__FILE__?) from cti_serial_core.ko -# Todo: cti driver does not show running card in lspci -k Kernel driver in use: # Todo: driver should only create /dev/ttyCTI* for number of ports found # Todo: make install for utilities # Todo: How do we configure Xtreme/104 with setserial according to readme.txt @@ -18,7 +17,7 @@ _opt_DKMS=1 # This can be toggled between installs set -u pkgname='connecttech-cti-serial' pkgver='1.42' -pkgrel='1' +pkgrel='2' pkgdesc='tty UART driver for BlueStorm BlueHeat Xtreme/104-Plus Titan and Xtreme/104-Express families' arch=('i686' 'x86_64') url='http://connecttech.com/product/pci-express-bluestorm-express/' @@ -31,8 +30,12 @@ install="${pkgname}-install.sh" _srcdir="cti_serial_${pkgver//./}" source=( "file://${_srcdir}.tgz" + '0000-kernel-4.18-proc_fops-to-proc_show.patch' # https://patchwork.kernel.org/patch/10349751/ + '0001-kernel-5.0.0-8250_core-access_ok.patch' # https://lkml.org/lkml/2019/1/4/418 ) -sha256sums=('9833dfcac4b9116c1d22dcee16bb0533e7b3ab0ae3291c4570e716e1e991f042') +sha256sums=('9833dfcac4b9116c1d22dcee16bb0533e7b3ab0ae3291c4570e716e1e991f042' + 'bfe7886f273eed35d36956c143cd07fa1c6c9448cf21f8484bb5a0872ea6d04e' + 'fbb546222486ccbd3fc0cfaf44c146208a27507c20788602fcc6e77853692b00') if [ "${_opt_DKMS}" -ne 0 ]; then depends+=('linux' 'dkms' 'linux-headers') @@ -69,6 +72,14 @@ prepare() { _install_check cd "${_srcdir}" + #cp -p driver/serial_core.c{,.orig}; false + #diff -pNau5 driver/serial_core.c{.orig,} > '0000-kernel-4.18-proc_fops-to-proc_show.patch' + patch -Nbup0 -i "${srcdir}/0000-kernel-4.18-proc_fops-to-proc_show.patch" + + #cp -p driver/8250_core.c{,.orig}; false + #diff -pNau5 driver/8250_core.c{.orig,} > '0001-kernel-5.0.0-8250_core-access_ok.patch' + patch -Nbup0 -i "${srcdir}/0001-kernel-5.0.0-8250_core-access_ok.patch" + pushd 'driver' > /dev/null # Fix permissions find -type 'f' -perm '/111' -exec chmod 644 '{}' '+' |