Add support for kernels 5.1+
	Tested on 5.3.0 (Ubuntu 19.10)
pull/10/head v2.0.3
Paul Hollinsky 2019-11-06 10:14:53 -05:00
parent 96836cb186
commit d75acfa8a5
3 changed files with 12 additions and 3 deletions

View File

@ -1,3 +1,7 @@
v2.0.3
Add support for kernels 5.1+
Tested on 5.3.0 (Ubuntu 19.10)
v2.0.2 v2.0.2
Add support for older kernels Add support for older kernels
Tested working properly back to 4.4 Tested working properly back to 4.4

View File

@ -1,4 +1,4 @@
Version 2.0.2 Version 2.0.3
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. 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.

View File

@ -57,7 +57,7 @@
#define KO_DESC "Netdevice driver for Intrepid CAN/Ethernet devices" #define KO_DESC "Netdevice driver for Intrepid CAN/Ethernet devices"
#define KO_MAJOR 2 #define KO_MAJOR 2
#define KO_MINOR 0 #define KO_MINOR 0
#define KO_PATCH 2 #define KO_PATCH 3
#define KO_VERSION str(KO_MAJOR) "." str(KO_MINOR) "." str(KO_PATCH) #define KO_VERSION str(KO_MAJOR) "." str(KO_MINOR) "." str(KO_PATCH)
#define KO_VERSION_INT (KO_MAJOR << 16) | (KO_MINOR << 8) | KO_PATCH #define KO_VERSION_INT (KO_MAJOR << 16) | (KO_MINOR << 8) | KO_PATCH
@ -92,6 +92,11 @@ MODULE_VERSION(KO_VERSION);
#define KERNEL_CHECKS_MTU_RANGE (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) #define KERNEL_CHECKS_MTU_RANGE (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
#define KERNEL_FAULT_TAKES_VMA (LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0)) #define KERNEL_FAULT_TAKES_VMA (LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0))
#define KERNEL_SUPPORTS_ALIASES (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)) #define KERNEL_SUPPORTS_ALIASES (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
#define KERNEL_DEFINES_VM_FAULT_T (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
#if KERNEL_DEFINES_VM_FAULT_T == 0
typedef int vm_fault_t;
#endif
struct intrepid_pending_tx_info { struct intrepid_pending_tx_info {
int tx_box_index; int tx_box_index;
@ -651,7 +656,7 @@ static long intrepid_dev_ioctl(struct file *fp, unsigned int cmd, unsigned long
* *
* Starting in kernel version 4.11, (struct vm_operations_struct *)->fault() no * Starting in kernel version 4.11, (struct vm_operations_struct *)->fault() no
* longer takes the vma parameter (since it resides in vmf) */ * longer takes the vma parameter (since it resides in vmf) */
static int intrepid_vm_fault( static vm_fault_t intrepid_vm_fault(
#if KERNEL_FAULT_TAKES_VMA #if KERNEL_FAULT_TAKES_VMA
struct vm_area_struct *vma, struct vm_area_struct *vma,
#endif #endif