diff options
author | Chris Severance | 2018-06-05 00:23:20 -0400 |
---|---|---|
committer | Chris Severance | 2018-06-05 00:23:20 -0400 |
commit | 303829ddc99b1d6924ee8b01b2fe63afe8a47d1a (patch) | |
tree | 452221c81d776fe22c1c0059c31d2cdacf47ef98 | |
parent | ff38857ec1dfcdc8c936c6e561b5de919d3f1571 (diff) | |
download | aur-303829ddc99b1d6924ee8b01b2fe63afe8a47d1a.tar.gz |
autu: Update to 2.0.4_3-1
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | 0000-Kernel-4-15-timers.patch | 143 | ||||
-rw-r--r-- | PKGBUILD | 46 | ||||
-rw-r--r-- | sunix-patch-alt_speed-kernel-4-13.patch | 12 | ||||
-rw-r--r-- | sunix-patch-signal_pending-kernel-4-11.patch | 14 |
5 files changed, 175 insertions, 56 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Sat Sep 30 01:41:13 UTC 2017 +# Tue Jun 5 04:23:20 UTC 2018 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_2 - pkgrel = 2 + pkgver = 2.0.4_3 + pkgrel = 1 url = http://www.sunix.com/ install = sunix-snx-install.sh arch = i686 @@ -18,12 +18,10 @@ pkgbase = sunix-snx depends = linux depends = dkms depends = linux-headers - source = http://www.sunix.com.tw/en/download.php?pid=1479&file=driver&file_link=download/driver/2016/20160706173626_snx_V2.0.4.2.tar.gz - source = sunix-patch-signal_pending-kernel-4-11.patch - source = sunix-patch-alt_speed-kernel-4-13.patch - sha256sums = 56ef81518184116bd4fd158e39d0e5ceace53f26f85398371bb230d44da4ff9a - sha256sums = b589ba0e9d18638b26c8584cefaa5ed500a4984b9d03ed1d6863ba34a559742c - sha256sums = 7743a276081292b6b97fc6a836e1a8331eb10396619882bb611b81b971df3988 + 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 pkgname = sunix-snx diff --git a/0000-Kernel-4-15-timers.patch b/0000-Kernel-4-15-timers.patch new file mode 100644 index 000000000000..7f2a788e3866 --- /dev/null +++ b/0000-Kernel-4-15-timers.patch @@ -0,0 +1,143 @@ +diff -pNaru5 snx_V2.0.4.3.orig-0000/driver/snx_common.h snx_V2.0.4.3/driver/snx_common.h +--- snx_V2.0.4.3.orig-0000/driver/snx_common.h 2018-06-04 09:18:05.640354280 -0400 ++++ snx_V2.0.4.3/driver/snx_common.h 2018-06-04 09:18:05.657020853 -0400 +@@ -893,10 +893,11 @@ static inline void snx_ser_insert_char + /******************************************************* + sunix serial port struct + *******************************************************/ + struct sunix_ser_port + { ++ /* port must be first */ + struct snx_ser_port port; + struct timer_list timer; + struct list_head list; + + unsigned int capabilities; +diff -pNaru5 snx_V2.0.4.3.orig-0000/driver/snx_ieee1284.c snx_V2.0.4.3/driver/snx_ieee1284.c +--- snx_V2.0.4.3.orig-0000/driver/snx_ieee1284.c 2009-11-02 13:53:54.000000000 -0500 ++++ snx_V2.0.4.3/driver/snx_ieee1284.c 2018-06-04 09:18:05.657020853 -0400 +@@ -8,31 +8,53 @@ static void sunix_parport_ieee1284_wakeu + + + static struct snx_parport *port_from_cookie[SNX_PAR_TOTAL_MAX]; + + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) + static void sunix_timeout_waiting_on_port(unsigned long cookie) + { ++#else ++struct sp_timer_list { ++ struct timer_list tl; ++ unsigned long cookie; ++}; ++ ++static void sunix_timeout_waiting_on_port(struct timer_list *ptr) ++{ ++ struct sp_timer_list *sptl = (struct sp_timer_list *) ptr; ++ unsigned long cookie = sptl->cookie; ++#endif + sunix_parport_ieee1284_wakeup(port_from_cookie[cookie % SNX_PAR_TOTAL_MAX]); + } + + + int sunix_parport_wait_event(struct snx_parport *port, signed long timeout) + { + int ret; ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) + struct timer_list timer; ++#else ++ struct sp_timer_list snx_timer_ch; ++#endif + + if (!port->physport->cad->timeout) + { + return 1; + } + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) + init_timer (&timer); +- timer.expires = jiffies + timeout; + timer.function = sunix_timeout_waiting_on_port; +- port_from_cookie[port->number % PARPORT_MAX] = port; + timer.data = port->number; ++#else ++#define timer (snx_timer_ch.tl) ++ timer_setup(&timer,sunix_timeout_waiting_on_port,0); ++ snx_timer_ch.cookie = port->number; ++#endif ++ timer.expires = jiffies + timeout; ++ port_from_cookie[port->number % PARPORT_MAX] = port; + + add_timer (&timer); + ret = down_interruptible(&port->physport->ieee1284.irq); + + +@@ -41,10 +63,11 @@ int sunix_parport_wait_event(struct snx_ + ret = 1; + } + + return ret; + } ++#undef timer + + + int sunix_parport_poll_peripheral(struct snx_parport *port, unsigned char mask, unsigned char result, int usec) + { + int count = usec / 5 + 2; +diff -pNaru5 snx_V2.0.4.3.orig-0000/driver/snx_serial.c snx_V2.0.4.3/driver/snx_serial.c +--- snx_V2.0.4.3.orig-0000/driver/snx_serial.c 2017-10-13 02:54:10.000000000 -0400 ++++ snx_V2.0.4.3/driver/snx_serial.c 2018-06-04 09:19:55.559736715 -0400 +@@ -132,11 +132,15 @@ static void sunix_ser_enable_ms( + static void sunix_ser_break_ctl(struct snx_ser_port *, int); + static int sunix_ser_startup(struct snx_ser_port *); + static void sunix_ser_shutdown(struct snx_ser_port *); + static unsigned int sunix_ser_get_divisor(struct snx_ser_port *, unsigned int); + static void sunix_ser_set_termios(struct snx_ser_port *, struct SNXTERMIOS *, struct SNXTERMIOS *); ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0)) + static void sunix_ser_timeout(unsigned long); ++#else ++static void sunix_ser_timeout(struct timer_list *); ++#endif + + + static _INLINE_ void sunix_ser_receive_chars(struct sunix_ser_port *, unsigned char *); + static _INLINE_ void sunix_ser_transmit_chars(struct sunix_ser_port *); + static _INLINE_ void sunix_ser_check_modem_status(struct sunix_ser_port *, unsigned char); +@@ -4415,13 +4419,19 @@ static void sunix_ser_set_termios(struct + + spin_unlock_irqrestore(&sp->port.lock, flags); + } + + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0)) + static void sunix_ser_timeout(unsigned long data) + { + struct sunix_ser_port *sp = (struct sunix_ser_port *)data; ++#else ++static void sunix_ser_timeout(struct timer_list *tl) ++{ ++ struct sunix_ser_port *sp = from_timer(sp,tl,timer); ++#endif + unsigned int timeout; + unsigned int iir; + + iir = READ_UART_IIR(sp); + +@@ -5054,13 +5064,17 @@ extern int sunix_ser_register_ports(stru + + sp->port.line = i; + + if (sp->port.iobase) + { ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0)) + init_timer(&sp->timer); + + sp->timer.function = sunix_ser_timeout; ++#else ++ timer_setup(&sp->timer,sunix_ser_timeout,0); ++#endif + + sp->mcr_mask = ~0; + sp->mcr_force = 0; + + ret = sunix_ser_add_one_port(drv, &sp->port); @@ -2,6 +2,9 @@ _opt_DKMS=1 # This can be toggled between installs +# Todo: Unable to trigger timer to see if it works +# Todo: modprobe snx with conflicting major, again modeprobe snx crashes kernel + # ls -l /dev/ttySNX* # lsmod | grep snx # lspci -v | grep -A4 -i snx @@ -89,8 +92,9 @@ set -u # https://pkgs.org/download/snx-kmp-default # OpenSUSE # http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Startech pkgname='sunix-snx' -pkgver='2.0.4_2' -pkgrel='2' +#pkgver='2.0.4_2'; _dl='2016/20160706173626' +pkgver='2.0.4_3'; _dl='2017/20171122180114' +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/' @@ -100,18 +104,18 @@ url='http://www.sunix.com/' license=('GPL' 'custom') makedepends=('gzip' 'findutils' 'sed' 'diffutils' 'patch') install="${pkgname}-install.sh" +_srcdir="snx_V${pkgver//_/.}" source=( - "http://www.sunix.com.tw/en/download.php?pid=1479&file=driver&file_link=download/driver/2016/20160706173626_snx_V${pkgver//_/.}.tar.gz" + "http://www.sunix.com/en/download.php?file=driver&file_link=download/driver/${_dl}_snx_V${pkgver//_/.}.tar.gz" + #"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 - 'sunix-patch-signal_pending-kernel-4-11.patch' - 'sunix-patch-alt_speed-kernel-4-13.patch' + '0000-Kernel-4-15-timers.patch' ) -sha256sums=('56ef81518184116bd4fd158e39d0e5ceace53f26f85398371bb230d44da4ff9a' - 'b589ba0e9d18638b26c8584cefaa5ed500a4984b9d03ed1d6863ba34a559742c' - '7743a276081292b6b97fc6a836e1a8331eb10396619882bb611b81b971df3988') +sha256sums=('5103e25929f5d33a924be1fe1fc824a804fae9c80e3869417b5558ae31330756' + 'eb9cb3cf971023442925b4eacdf8ac47b1b48172b30d8943312865aa92f19976') if [ "${_opt_DKMS}" -ne 0 ]; then depends+=('linux' 'dkms' 'linux-headers') @@ -140,11 +144,14 @@ _install_check() { prepare() { set -u _install_check + cd "${_srcdir}" # Make package compatible and fix some version problems - #cp -p 'driver/Makefile' 'driver/Makefile.Arch' + #cp -p 'driver/Makefile'{,.Arch} sed -e 's: /lib/modules/: /usr/lib/modules/:g' \ -e '/^install:/,/^$/ s: /usr/lib/: "${DESTDIR}"/usr/lib/:g' \ + -e '# New cache folder for gcc 8' \ + -e 's/^clean.*:$/&\n\trm -rf .cache.mk/g' \ -e '# What sort of make clean deletes files out of system folders?' \ -e '/^clean/,/^$/ s: /usr/lib/: "${DESTDIR}"/usr/lib/:g' \ -e '# Prevent file deletion for DKMS' \ @@ -161,35 +168,32 @@ prepare() { -e '/findstring / s:uname -a:uname -r:g ' \ -i 'driver/Makefile' sed -e '/^install:/,/^$/ s: /usr/: "${DESTDIR}"/usr/:g' -i 'snxdump/Makefile' 'snxterm/Makefile' + ! test -s 'driver/Makefile.Arch' || echo "${}" # Prevent conflict with /dev/kfd major 242 linux>=4.9. Not present in linux=4.4. linux>4.4 not tested. sed -e '/^#define SNX_[A-Z][A-Z][A-Z]_MAJOR/ s:24:23:g' \ -e '# Remove UTF BOM' \ - -e 's:\xEF\xBB\xBF::g' \ + -e '1 s:\xEF\xBB\xBF::g' \ -i 'driver/snx_common.h' - # diff -pNau3 driver/snx_common.h{.orig,} > 'sunix-patch-signal_pending-kernel-4-11.patch' - patch -Nbup0 < 'sunix-patch-signal_pending-kernel-4-11.patch' - # diff -pNau3 driver/snx_serial.c{.orig,} > 'sunix-patch-alt_speed-kernel-4-13.patch' - patch -Nbup0 < 'sunix-patch-alt_speed-kernel-4-13.patch' - - # Fix kernel harding error. Must do in sed in case version changes. We put in more than necessary in case the version gets shorter. - sed -e 's:^\(#define SNX_DRIVER_VERSION .*\)":\1\\0\\0\\0\\0\\0\\0\\0\\0":g' -i 'driver/snx_common.h' - - # Forgot to clean tarball - 'ma'ke -s -j1 clean sed -e 's:\r$::g' -i $(grep -slrF $'\r') + + cp -pr "${srcdir}/${_srcdir}"{,.orig-0000} + #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" set +u } build() { set -u + cd "${_srcdir}" make -s -j1 # too small for parallel make set +u } package() { set -u + cd "${_srcdir}" if [ "${_opt_DKMS}" -eq 0 ]; then # I don't want Linux version info showing on AUR web. After a few months 'linux<0.0.0' makes it look like an out of date package. local _kernelversionsmall="$(uname -r)" @@ -229,7 +233,7 @@ EOF ) "${pkgdir}/usr/share/applications/sunix-snxterm.desktop" if [ "${_opt_DKMS}" -ne 0 ]; then - rm -rf "${pkgdir}/usr/lib/modules/" + rm -r "${pkgdir}/usr/lib/modules/" local _dkms="${pkgdir}/usr/src/${pkgname}-${pkgver}" install -Dm644 <(cat << EOF # Automatically generated by ${pkgname}-${pkgver} PKGBUILD from Arch Linux AUR diff --git a/sunix-patch-alt_speed-kernel-4-13.patch b/sunix-patch-alt_speed-kernel-4-13.patch deleted file mode 100644 index c2426e84c727..000000000000 --- a/sunix-patch-alt_speed-kernel-4-13.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- driver/snx_serial.c.orig 2015-07-23 03:16:58.000000000 -0400 -+++ driver/snx_serial.c 2017-09-29 21:22:27.651754374 -0400 -@@ -3697,7 +3697,9 @@ static int snx_ser_open(struct tty_struc - tty->low_latency = (state->port->flags & SNX_UPF_LOW_LATENCY) ? 1 : 0; - #endif - -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,13,0)) - tty->alt_speed = 0; -+#endif - state->info->tty = tty; - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)) diff --git a/sunix-patch-signal_pending-kernel-4-11.patch b/sunix-patch-signal_pending-kernel-4-11.patch deleted file mode 100644 index f2009806b349..000000000000 --- a/sunix-patch-signal_pending-kernel-4-11.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- driver/snx_common.h.orig 2017-07-03 20:34:17.129581538 -0400 -+++ driver/snx_common.h 2017-07-03 20:34:17.129581538 -0400 -@@ -40,7 +40,11 @@ - #endif - - #include <linux/errno.h> -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) -+#include <linux/sched/signal.h> -+#else - #include <linux/signal.h> -+#endif - #include <linux/tty.h> - #include <linux/tty_flip.h> - #include <linux/serial.h> |