summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2021-09-10 04:02:59 -0500
committerJohn Klug <john.klug@multitech.com>2021-09-10 04:21:37 -0500
commit772f50fd23e575e69b8d0d912fb6dfcc903b3470 (patch)
tree9f30943fb559f04254e5610a00e4ed0c6c9f5163
parente6647688deb733302254d52ace74e8d8812b366c (diff)
downloadmts-io-772f50fd23e575e69b8d0d912fb6dfcc903b3470.tar.gz
mts-io-772f50fd23e575e69b8d0d912fb6dfcc903b3470.tar.bz2
mts-io-772f50fd23e575e69b8d0d912fb6dfcc903b3470.zip
Fix kernel regression, put radio reset monitor on all products
-rw-r--r--configure.ac2
-rw-r--r--io-module/machine/mt100eocg.c3
-rw-r--r--io-module/machine/mtcap.c3
-rw-r--r--io-module/machine/mtcap3.c3
-rw-r--r--io-module/machine/mtcdt.c7
-rw-r--r--io-module/machine/mtcpm.c5
-rw-r--r--io-module/machine/mths.c3
-rw-r--r--io-module/machine/mtre.c3
-rw-r--r--io-module/mts_io_module.h2
-rw-r--r--io-module/radio_udev_discovery.c10
10 files changed, 35 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 857cf12..7c25e08 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([mts-io], [4.7.1])
+AC_INIT([mts-io], [4.7.2])
AC_CONFIG_SRCDIR([util/mts_util_lora2_reset.c])
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER([config.h])
diff --git a/io-module/machine/mt100eocg.c b/io-module/machine/mt100eocg.c
index ac00143..5bb8007 100644
--- a/io-module/machine/mt100eocg.c
+++ b/io-module/machine/mt100eocg.c
@@ -243,6 +243,9 @@ static struct attribute *mt100eocg_platform_attributes[] = {
&dev_attr_adc2.attr,
&dev_attr_adc3.attr,
+ // UDEV notification of radio discovery
+ &dev_attr_radio_udev_discovery.attr,
+ &dev_attr_radio_reset_monitor.attr,
NULL,
};
diff --git a/io-module/machine/mtcap.c b/io-module/machine/mtcap.c
index e013f14..9db1218 100644
--- a/io-module/machine/mtcap.c
+++ b/io-module/machine/mtcap.c
@@ -586,6 +586,9 @@ static struct attribute *mtcap_0_0_platform_attributes[] = {
&dev_attr_radio_reset_backoff_index.attr,
&dev_attr_radio_reset_backoff_seconds.attr,
+ // UDEV notification of radio discovery
+ &dev_attr_radio_udev_discovery.attr,
+ &dev_attr_radio_reset_monitor.attr,
NULL,
};
diff --git a/io-module/machine/mtcap3.c b/io-module/machine/mtcap3.c
index 8d2f3c4..587a024 100644
--- a/io-module/machine/mtcap3.c
+++ b/io-module/machine/mtcap3.c
@@ -489,6 +489,9 @@ static struct attribute *mtcap3_0_0_platform_attributes[] = {
&dev_attr_radio_enable_mtcap3.attr,
+ // UDEV notification of radio discovery
+ &dev_attr_radio_udev_discovery.attr,
+ &dev_attr_radio_reset_monitor.attr,
NULL,
};
diff --git a/io-module/machine/mtcdt.c b/io-module/machine/mtcdt.c
index aabbc2d..b753a9e 100644
--- a/io-module/machine/mtcdt.c
+++ b/io-module/machine/mtcdt.c
@@ -405,6 +405,10 @@ static struct attribute *mtcdt_platform_attributes[] = {
&dev_attr_radio_reset_backoffs.attr,
&dev_attr_radio_reset_backoff_index.attr,
&dev_attr_radio_reset_backoff_seconds.attr,
+
+ // UDEV notification of radio discovery
+ &dev_attr_radio_udev_discovery.attr,
+ &dev_attr_radio_reset_monitor.attr,
NULL,
};
@@ -446,6 +450,9 @@ static struct attribute *mtcdt_0_1_platform_attributes[] = {
&dev_attr_radio_reset_backoff_index.attr,
&dev_attr_radio_reset_backoff_seconds.attr,
+ // UDEV notification of radio discovery
+ &dev_attr_radio_udev_discovery.attr,
+ &dev_attr_radio_reset_monitor.attr,
NULL,
};
diff --git a/io-module/machine/mtcpm.c b/io-module/machine/mtcpm.c
index 964b766..6ed4c6c 100644
--- a/io-module/machine/mtcpm.c
+++ b/io-module/machine/mtcpm.c
@@ -207,7 +207,10 @@ static struct attribute *mtcpm_platform_attributes[] = {
&dev_attr_radio_reset_backoffs.attr,
&dev_attr_radio_reset_backoff_index.attr,
&dev_attr_radio_reset_backoff_seconds.attr,
-
+
+ // UDEV notification of radio discovery
+ &dev_attr_radio_udev_discovery.attr,
+ &dev_attr_radio_reset_monitor.attr,
NULL,
};
diff --git a/io-module/machine/mths.c b/io-module/machine/mths.c
index b74e69f..565f6c6 100644
--- a/io-module/machine/mths.c
+++ b/io-module/machine/mths.c
@@ -872,6 +872,9 @@ static struct attribute *mths_0_0_platform_attributes[] = {
&dev_attr_led_e_gpio.attr,
&dev_attr_led_f_gpio_mths.attr,
+ // UDEV notification of radio discovery
+ &dev_attr_radio_udev_discovery.attr,
+ &dev_attr_radio_reset_monitor.attr,
NULL,
};
diff --git a/io-module/machine/mtre.c b/io-module/machine/mtre.c
index e3df31c..6a59ebe 100644
--- a/io-module/machine/mtre.c
+++ b/io-module/machine/mtre.c
@@ -273,6 +273,9 @@ static struct attribute *mtre_0_0_platform_attributes[] = {
&dev_attr_oem_string2.attr,
#endif
+ // UDEV notification of radio discovery
+ &dev_attr_radio_udev_discovery.attr,
+ &dev_attr_radio_reset_monitor.attr,
NULL,
};
diff --git a/io-module/mts_io_module.h b/io-module/mts_io_module.h
index 15e4b9a..eca15a3 100644
--- a/io-module/mts_io_module.h
+++ b/io-module/mts_io_module.h
@@ -5,7 +5,7 @@
* MTAC cards.
*/
-#define DRIVER_VERSION "v4.7.1"
+#define DRIVER_VERSION "v4.7.2"
#define DRIVER_AUTHOR "Multitech Systems"
#define DRIVER_DESC "MTS-IO Controller"
#define DRIVER_NAME "mts-io"
diff --git a/io-module/radio_udev_discovery.c b/io-module/radio_udev_discovery.c
index c6cc98a..88f5d0d 100644
--- a/io-module/radio_udev_discovery.c
+++ b/io-module/radio_udev_discovery.c
@@ -52,9 +52,13 @@ verify_vpid(struct sig_pid_radio_reset_monitor_s *p)
mutex_unlock(&mts_io_mutex);
rcu_read_lock();
vpid1 = find_vpid((pid_t)pid0);
- if(vpid1 != NULL)
- vcount = refcount_read(&vpid1->count);
- else
+ if(vpid1 != NULL) {
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)
+ vcount = refcount_read(&vpid1->count);
+ #else
+ vcount = atomic_read(&vpid1->count);
+ #fi
+ } else
vcount = 0;
rcu_read_unlock();
mutex_lock(&mts_io_mutex);