diff options
author | Chris Severance | 2018-05-24 00:07:37 -0400 |
---|---|---|
committer | Chris Severance | 2018-05-24 00:07:37 -0400 |
commit | 45a2a107e9e821c23f8c0ab1cca1a3b05f06d0bd (patch) | |
tree | 2f974991b57fd3b38243ca46483c682ee6d57d17 | |
parent | 06780ab60de6c1fae415f88e1b894cfb40566cb8 (diff) | |
download | aur-45a2a107e9e821c23f8c0ab1cca1a3b05f06d0bd.tar.gz |
autu: Update to 1.9.38-1
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | 0000-Kernel-4-13-CLASS_ATTR_STRING.patch | 62 | ||||
-rw-r--r-- | 0001-Kernel-4-15-timers.patch | 147 | ||||
-rw-r--r-- | PKGBUILD | 25 |
4 files changed, 238 insertions, 2 deletions
@@ -1,5 +1,5 @@ # Generated by mksrcinfo v8 -# Fri Sep 1 16:34:34 UTC 2017 +# Thu May 24 04:07:36 UTC 2018 pkgbase = dgrp pkgdesc = tty driver for Digi RealPort ConnectPort EtherLite Flex One CM PortServer TS IBM RAN serial console terminal servers pkgver = 1.9.38 @@ -58,6 +58,8 @@ pkgbase = dgrp source = http://ftp1.digi.com/support/utilities/40002709_C.mib source = http://ftp1.digi.com/support/utilities/rfc1316.mib source = http://ftp1.digi.com/support/utilities/rfc1317.mib + source = 0000-Kernel-4-13-CLASS_ATTR_STRING.patch + source = 0001-Kernel-4-15-timers.patch sha256sums = e474518da5b3feddd1f4dd0083ac8125e34ba07da9884cbd3ebd1955006891d7 sha256sums = 42898b9d24262de27e9b1f3067d51d01373810b7c9e4991403a7f0a5dd7a26cf sha256sums = 66f8b106a052b4807513ace92978e5e6347cef08eee39e4b4ae31c60284cc0a3 @@ -89,6 +91,8 @@ pkgbase = dgrp sha256sums = c471cafa43503a40d43b42acd8bc6ef49db29e55a74e0494c85f729ea45fe243 sha256sums = 5cac7ce2e6f043127f314b93694af021ae7820ffb5bf3de343da7a240d05e9c8 sha256sums = 8654496d83c083e457e8bb9bae2b1e71804d156a38c284d89872d0125eba947d + sha256sums = 61500188b388fd1eb52ec970150cf098d855b8ba09a8efb8192803eebefaba03 + sha256sums = 06b0eb6f6f7108d869e869edb5f09669bc90575efcd2f151311f024a834c4001 pkgname = dgrp diff --git a/0000-Kernel-4-13-CLASS_ATTR_STRING.patch b/0000-Kernel-4-13-CLASS_ATTR_STRING.patch new file mode 100644 index 000000000000..72db944aa13f --- /dev/null +++ b/0000-Kernel-4-13-CLASS_ATTR_STRING.patch @@ -0,0 +1,62 @@ +diff -pNaru5 dgrp-1.9.orig/driver/2.6.27/dgrp_sysfs.c dgrp-1.9/driver/2.6.27/dgrp_sysfs.c +--- dgrp-1.9.orig/driver/2.6.27/dgrp_sysfs.c 2017-07-11 13:01:13.000000000 -0400 ++++ dgrp-1.9/driver/2.6.27/dgrp_sysfs.c 2018-04-13 21:02:27.542053022 -0400 +@@ -57,21 +57,24 @@ + + static struct class *dgrp_class; + struct device *dgrp_class_nodes_dev; + struct device *dgrp_class_global_settings_dev; + +- ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,13,0) + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) + static ssize_t dgrp_class_version_show(struct class *class, struct class_attribute *attr, char *buf) + #else + static ssize_t dgrp_class_version_show(struct class *class, char *buf) + #endif + { + return snprintf(buf, PAGE_SIZE, "%s\n", DIGI_VERSION); + } + static CLASS_ATTR(driver_version, 0400, dgrp_class_version_show, NULL); +- ++#else ++// CLASS_ATTR_STRING first appeared in 2.6.34 ++static CLASS_ATTR_STRING(driver_version, 0400, __stringify(PAGE_SIZE) DIGI_VERSION); ++#endif + + static ssize_t dgrp_class_register_with_sysfs_show(struct device *c, struct device_attribute *attr, char *buf) + { + return snprintf(buf, PAGE_SIZE, "1\n"); + } +@@ -186,11 +189,15 @@ void dgrp_create_class_sysfs_files(void) + { + int ret = 0; + int max_majors = 1U << (32 - MINORBITS); + + dgrp_class = class_create(THIS_MODULE, "digi_realport"); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,13,0) + ret = class_create_file(dgrp_class, &class_attr_driver_version); ++#else ++ ret = class_create_file(dgrp_class, &class_attr_driver_version.attr); ++#endif + + dgrp_class_global_settings_dev = device_create(dgrp_class, NULL, + MKDEV(0, max_majors + 1), NULL, "driver_settings"); + + ret = sysfs_create_group(&dgrp_class_global_settings_dev->kobj, +@@ -218,11 +225,15 @@ void dgrp_remove_class_sysfs_files(void) + } + + sysfs_remove_group(&dgrp_class_global_settings_dev->kobj, + &dgrp_global_settings_attribute_group); + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,13,0) + class_remove_file(dgrp_class, &class_attr_driver_version); ++#else ++ class_remove_file(dgrp_class, &class_attr_driver_version.attr); ++#endif + + device_destroy(dgrp_class, MKDEV(0, max_majors + 1)); + device_destroy(dgrp_class, MKDEV(0, max_majors + 2)); + class_destroy(dgrp_class); + } diff --git a/0001-Kernel-4-15-timers.patch b/0001-Kernel-4-15-timers.patch new file mode 100644 index 000000000000..cd46476bb286 --- /dev/null +++ b/0001-Kernel-4-15-timers.patch @@ -0,0 +1,147 @@ +diff -pNaru5 dgrp-1.9.orig/driver/2.6.27/dgrp_net_ops.c dgrp-1.9/driver/2.6.27/dgrp_net_ops.c +--- dgrp-1.9.orig/driver/2.6.27/dgrp_net_ops.c 2018-04-13 21:29:37.489330195 -0400 ++++ dgrp-1.9/driver/2.6.27/dgrp_net_ops.c 2018-04-13 21:26:42.150695586 -0400 +@@ -87,11 +87,15 @@ static long node_active_count; /* one + * the poller + */ + static long poll_round; /* Timer rouding factor */ + static ulong poll_time; /* Time of next poll */ + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) + static void poll_handler(ulong dummy); ++#else ++static void poll_handler(struct timer_list *dummy); ++#endif + static void poll_start_timer(ulong time); + static struct timer_list poll_timer = { function: poll_handler }; + + + /* +@@ -175,11 +179,15 @@ int register_net_device(struct nd_struct + struct proc_dir_entry *de; + + if (!globals_initialized) { + globals_initialized = 1; + spin_lock_init(&GLBL(poll_lock)); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) + init_timer(&poll_timer); ++#else ++ timer_setup(&poll_timer,poll_handler,0); ++#endif + } + + ID_TO_CHAR(node->nd_ID, buf); + + len = strlen(buf); +@@ -4689,11 +4697,15 @@ static int test_perm(int mode, int op) + * waiter needs to be woken up, and (b) whether the poller needs to + * be rescheduled. + * + ******************************************************************************/ + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) + static void poll_handler(ulong dummy) ++#else ++static void poll_handler(struct timer_list *dummy) ++#endif + { + struct nd_struct *nd; + link_t *lk; + ulong freq; + ulong lock_flags; +@@ -4933,13 +4945,17 @@ static void poll_handler(ulong dummy) + return; + } + + static void poll_start_timer(ulong time) + { ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) + init_timer(&poll_timer); + poll_timer.function = poll_handler; + poll_timer.data = 0; ++#else ++ timer_setup(&poll_timer,poll_handler,0); ++#endif + poll_timer.expires = time; + add_timer(&poll_timer); + } + + /* +diff -pNaru5 dgrp-1.9.orig/driver/2.6.27/dgrp_tty.c dgrp-1.9/driver/2.6.27/dgrp_tty.c +--- dgrp-1.9.orig/driver/2.6.27/dgrp_tty.c 2018-04-13 21:29:37.492330190 -0400 ++++ dgrp-1.9/driver/2.6.27/dgrp_tty.c 2018-04-13 20:36:29.458050323 -0400 +@@ -783,13 +783,25 @@ if (ttylock) tty_lock(ch->port.tty); + + /* + * This function is just used as a callback for timeouts + * waiting on the ch_sleep flag. + */ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) + static void wake_up_drp_sleep_timer(unsigned long ptr) + { + struct ch_struct *ch = (struct ch_struct *) ptr; ++#else ++struct ch_timer_list { ++ struct timer_list tl; ++ struct ch_struct *ch; ++}; ++ ++static void wake_up_drp_sleep_timer(struct timer_list *ptr) ++{ ++ struct ch_timer_list *chtl = (struct ch_timer_list *) ptr; ++ struct ch_struct *ch = chtl->ch; ++#endif + if (ch) + wake_up(&ch->ch_sleep); + } + + +@@ -797,11 +809,16 @@ static void wake_up_drp_sleep_timer(unsi + * Set up our own sleep that can't be cancelled + * until our timeout occurs. + */ + static void drp_my_sleep(struct ch_struct *ch) + { ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) + struct timer_list drp_wakeup_timer; ++#else ++ struct ch_timer_list drp_wakeup_timer_ch; ++#define drp_wakeup_timer (drp_wakeup_timer_ch.tl) ++#endif + DECLARE_WAITQUEUE(wait, current); + + /* + * First make sure we're ready to receive the wakeup. + */ +@@ -812,23 +829,30 @@ static void drp_my_sleep(struct ch_struc + /* + * Since we are uninterruptible, set a timer to + * unset the uninterruptable state in 1 second. + */ + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) + init_timer(&drp_wakeup_timer); + drp_wakeup_timer.function = wake_up_drp_sleep_timer; + drp_wakeup_timer.data = (unsigned long) ch; + drp_wakeup_timer.expires = jiffies + (1 * HZ); + add_timer(&drp_wakeup_timer); ++#else ++ timer_setup(&drp_wakeup_timer_ch.tl,wake_up_drp_sleep_timer,0); ++ drp_wakeup_timer_ch.ch=ch; ++#endif ++ drp_wakeup_timer.expires = jiffies + (1 * HZ); ++ add_timer(&drp_wakeup_timer); + + schedule(); + + del_timer(&drp_wakeup_timer); + + remove_wait_queue(&ch->ch_sleep, &wait); + } +- ++#undef drp_wakeup_timer + + /***************************************************************************** + * + * Function: + * @@ -11,6 +11,19 @@ # Digi bug: mbrowse reports a few parsing errors in MIB # Digi bug: make compatible with OpenSSL 1.1 # Digi bug: transfer hangs if unit is repowered during live connection. Tested in 4.11, 4.9, and 4.4 +# Digi bug: tty* takes up to an hour to reappear after unit is powered up after a long time being off +# Nov 29 06:16:50 springport drpd[715]: drpd(ag,128.0.0.92) Cannot connect to server - Connection timed out +# Nov 29 07:21:21 springport drpd[715]: drpd(ag,128.0.0.92) Cannot connect to server - Connection timed out +# Nov 29 08:25:51 springport drpd[715]: drpd(ag,128.0.0.92) Cannot connect to server - Connection timed out +# Nov 29 09:30:22 springport drpd[715]: drpd(ag,128.0.0.92) Cannot connect to server - Connection timed out +# Nov 29 10:34:53 springport drpd[715]: drpd(ag,128.0.0.92) Cannot connect to server - Connection timed out +# Nov 29 11:39:24 springport drpd[715]: drpd(ag,128.0.0.92) Cannot connect to server - Connection timed out +# Nov 29 12:43:54 springport drpd[715]: drpd(ag,128.0.0.92) Cannot connect to server - Connection timed out +# Nov 29 13:48:25 springport drpd[715]: drpd(ag,128.0.0.92) Cannot connect to server - Connection timed out +# Nov 29 14:52:56 springport drpd[715]: drpd(ag,128.0.0.92) Cannot connect to server - Connection timed out +# Nov 29 15:57:26 springport drpd[715]: drpd(ag,128.0.0.92) Cannot connect to server - Connection timed out +# Arch Kernel 4.16: do_IRQ: 7.36 No irq handler for vector +# does not occur in Manjaro Kernel 4.16 # Digi Realport driver for Arch Linux. See Digi release notes for supported products. @@ -162,6 +175,8 @@ source=( 'ftp://ftp1.digi.com/support/utilities/AddpClient.zip' 'dgrp-patch-signal_pending-kernel-4-11.patch' "${_mibs[@]/#/${_mibsrc}}" + '0000-Kernel-4-13-CLASS_ATTR_STRING.patch' # https://www.digi.com/support/forum/67157/realport-compile-error-with-fedora-27-kernel-4-14-14 https://www.digi.com/support/forum/65817/class_attr_driver_version-error-compiling-in-kernel-4-13 + '0001-Kernel-4-15-timers.patch' # https://forum.blackmagicdesign.com/viewtopic.php?uid=16&f=3&t=68382&start=0 ) unset _mibsrc #source_i686=('http://ftp1.digi.com/support/utilities/40002890_A.tgz') @@ -197,7 +212,9 @@ sha256sums=('e474518da5b3feddd1f4dd0083ac8125e34ba07da9884cbd3ebd1955006891d7' '731e05fc551367faa6ad5dc317eedf305388ab12db196c0a1361a3d01bd35279' 'c471cafa43503a40d43b42acd8bc6ef49db29e55a74e0494c85f729ea45fe243' '5cac7ce2e6f043127f314b93694af021ae7820ffb5bf3de343da7a240d05e9c8' - '8654496d83c083e457e8bb9bae2b1e71804d156a38c284d89872d0125eba947d') + '8654496d83c083e457e8bb9bae2b1e71804d156a38c284d89872d0125eba947d' + '61500188b388fd1eb52ec970150cf098d855b8ba09a8efb8192803eebefaba03' + '06b0eb6f6f7108d869e869edb5f09669bc90575efcd2f151311f024a834c4001') if [ "${_opt_DKMS}" -ne 0 ]; then depends+=('linux' 'dkms' 'linux-headers') @@ -333,6 +350,12 @@ prepare() { -e '/^dgrp_init_module/,/^$/ s@version: %s@& Arch Linux@g' \ -i driver/[0-9]*/dgrp_driver.c + #diff -pNaru5 dgrp-1.9{.orig,} > '../0000-Kernel-4-13-CLASS_ATTR_STRING.patch' + patch -Nbup1 < "${srcdir}/0000-Kernel-4-13-CLASS_ATTR_STRING.patch" + + #diff -pNaru5 dgrp-1.9{.orig,} > '../0001-Kernel-4-15-timers.patch' + patch -Nbup1 < "${srcdir}/0001-Kernel-4-15-timers.patch" + set +u } |