]> jspc29.x-matter.uni-frankfurt.de Git - trbnettools.git/commitdiff
JAM: fixed pexor kernel module for kernel 5.0.3
authorhades DAQ on depc418/hadeswrp01 <j.adamczewski@gsi.de>
Thu, 4 Apr 2019 12:59:23 +0000 (14:59 +0200)
committerhades DAQ on depc418/hadeswrp01 <j.adamczewski@gsi.de>
Thu, 4 Apr 2019 12:59:23 +0000 (14:59 +0200)
pexor/kernel-module/Makefile
pexor/kernel-module/pexor_trb.c

index 21012e270ce79e6f2d150fa32a0feec06bed378c..026836e02216c063f898a7da7d42e8f8a278d861 100644 (file)
@@ -16,6 +16,8 @@ PWD       := $(shell pwd)
 
 TARGETS = pexor.ko
 
+ccflags-y +=-Wno-date-time
+
 all: $(TARGETS)
 
 .PHONY: distclean
index 65fbc5633e2c005f9e140faadf3619b6dbb3c3df..4be0b38528ccc1fa83da30ba3f93a939249965ec 100644 (file)
@@ -45,6 +45,10 @@ static struct class* pexor_class;
 static dev_t pexor_devt;
 static int my_major_nr = 0;
 
+//#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0)
+static u64 pexor_dma_mask = DMA_BIT_MASK(32);
+//#endif
+
 struct dev_pexor
 {
   u32* irq_control;             /* irq control register               */
@@ -629,7 +633,6 @@ int probe(struct pci_dev* dev,
 
   /* TODO: export special things to class in sysfs ? */
 
-
   if (!IS_ERR(pexor_class)) {
     /* driver init had successfully created class, now we create device: */
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
@@ -654,6 +657,9 @@ int probe(struct pci_dev* dev,
        support here: */
     pexor_msg(KERN_ERR "Could not add PEXOR device node to /dev !");
   }
+  
+  /** JAM 4-APR-2019: try this for kernel 5.0.3*/
+  priv->class_dev->dma_mask = &pexor_dma_mask;
 
   /* init pexor_dma buffer */
   if (pexor_alloc_dma_buffer(priv, DMA_BUFFER_NUM_PAGES * PAGE_SIZE) != 0) {