From 96836cb1869523063016b13ff22f5c273e6d5ef8 Mon Sep 17 00:00:00 2001 From: Paul Hollinsky Date: Tue, 27 Aug 2019 18:39:21 -0400 Subject: [PATCH] v2.0.2 Add support for older kernels Tested working properly back to 4.4 Disabled aliasing for kernels <4.15 Required, as these kernels do not have netdevice aliasing Use the correct format specifier for (s)size_t Resolves a compile-time warning on 32-bit Check the return type of copy_from_user Resolves a compile-time warning on ARM Standardize kernel version checking Requires icsscand >= v2.0.1 icsscand v2.0.0 will not work with older kernels, and would display an obscure error --- CHANGELOG | 21 +++++++++++++++++++++ README.md | 2 +- intrepid.c | 8 +++++--- 3 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 CHANGELOG diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 0000000..ad59dcc --- /dev/null +++ b/CHANGELOG @@ -0,0 +1,21 @@ +v2.0.2 + Add support for older kernels + Tested working properly back to 4.4 + Disabled aliasing for kernels <4.15 + Required, as these kernels do not have netdevice aliasing + Use the correct format specifier for (s)size_t + Resolves a compile-time warning on 32-bit + Check the return type of copy_from_user + Resolves a compile-time warning on ARM + Standardize kernel version checking + Requires icsscand >= v2.0.1 + icsscand v2.0.0 will not work with older kernels, and would display an obscure error + +v2.0.1 + Resolve runtime warning message on changing MTU + Reviewed our locking behavior, made tweaks where necessary + +v2.0.0 + Full rewrite + Initial release with CAN-FD support + Requires icsscand >= v2.0.0 \ No newline at end of file diff --git a/README.md b/README.md index c14cb4f..2bf3a27 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Version 2.0.1 +Version 2.0.2 This is the kernel object portion of the Intrepid Control Systems SocketCAN support. For SocketCAN to work with Intrepid devices you will need to have this kernel object loaded on your system. Once the module is built and loaded run [icsscand](https://github.com/intrepidcs/icsscand) to turn on SocketCAN support. diff --git a/intrepid.c b/intrepid.c index 39b9048..248aa5d 100644 --- a/intrepid.c +++ b/intrepid.c @@ -57,7 +57,7 @@ #define KO_DESC "Netdevice driver for Intrepid CAN/Ethernet devices" #define KO_MAJOR 2 #define KO_MINOR 0 -#define KO_PATCH 1 +#define KO_PATCH 2 #define KO_VERSION str(KO_MAJOR) "." str(KO_MINOR) "." str(KO_PATCH) #define KO_VERSION_INT (KO_MAJOR << 16) | (KO_MINOR << 8) | KO_PATCH @@ -624,9 +624,11 @@ static long intrepid_dev_ioctl(struct file *fp, unsigned int cmd, unsigned long case SIOCGCLIENTVEROK: /* Here we can do checks to see if the usermode daemon is * a compatible version with us. We don't enforce anything - * on the kernel side. For now, being version 2.X.X is good. + * on the kernel side. icsscand v2.0.0 will not work with + * older kernels, and would display an obscure error, thus + * we want to ask the user to update to v2.0.1 or later */ - if (VER_MAJ_FROM_INT(arg) == 2) + if (VER_MAJ_FROM_INT(arg) == 2 && (VER_MIN_FROM_INT(arg) > 0 || VER_PATCH_FROM_INT(arg) >= 1)) ret = 0; /* ok to start */ else ret = 1;