installation of driver 6.24 under ubuntu 10.xx

This forum covers PCAN-Linux and Linux development issues concerning our products

installation of driver 6.24 under ubuntu 10.xx

Postby Michael » Mon 7. Mar 2011, 16:39

hey,

trying to install the latest driver under ubuntu 10.04 or 10.10 i just get an error in pcan_fops.c line 144:
Code: Select all
In file included from /home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_fops.c:144:
/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_fops_linux.c: In function ‘wait_until_fifo_empty’:
/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_fops_linux.c:56: error: implicit declaration of function ‘schedule’
/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_fops_linux.c: In function ‘pcan_ioctl_read’:
/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_fops_linux.c:143: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_fops_linux.c:143: error: (Each undeclared identifier is reported only once
/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_fops_linux.c:143: error: for each function it appears in.)
/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_fops_linux.c:143: error: implicit declaration of function ‘signal_pending’
/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_fops_linux.c: In function ‘pcan_ioctl_write’:
/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_fops_linux.c:179: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_fops_linux.c: In function ‘pcan_read’:
/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_fops_linux.c:498: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_fops_linux.c: In function ‘pcan_write’:
/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_fops_linux.c:652: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)


I try to compile with the following params:
Code: Select all
DBG     = NO_DEBUG
MOD     = NO_MODVERSIONS
PAR     = NO_PARPORT_SUBSYSTEM
USB     = NO_USB_SUPPORT
PCI     = PCI_SUPPORT
PCIEC   = NO_PCIEC_SUPPORT
DNG     = NO_DONGLE_SUPPORT
ISA     = NO_ISA_SUPPORT
PCC     = NO_PCCARD_SUPPORT
NET     = NETDEV_SUPPORT
RT      = NO_RT

VERBOSE = 1


Unfortunately i couldn't remeber how i fixed it at the last install...
Please, can you help me getting the driver running?
Michael
 
Posts: 5
Joined: Mon 7. Mar 2011, 16:30

Re: installation of driver 6.24 under ubuntu 10.xx

Postby Michael » Mon 7. Mar 2011, 19:26

I just added

Code: Select all
#include <linux/sched.h>


in pcan.h, but I'm still not sure how i handled it last time...
Michael
 
Posts: 5
Joined: Mon 7. Mar 2011, 16:30

Re: installation of driver 6.24 under ubuntu 10.xx

Postby calvinium » Tue 8. Mar 2011, 03:17

I've personally tried both 6.24 and the 7.0-beta on Ubuntu 10.10 and both work fine. Since the programs I work on/with don't have SocketCAN support (yet), I always compile with "NET=NO_NET_DEV_SUPPORT". Try extracting a fresh copy of the source (ie, without any of the changes you made while trying to get it working) and execute the following in the source folder:

Code: Select all
make clean; make NET=NO_NETDEV_SUPPORT


I recently had the grand idea of getting a dkms build package assembled for Debian/Ubuntu. If I can find the time to do so, I'll send you a copy to try out.
calvinium
 
Posts: 1
Joined: Tue 8. Mar 2011, 02:54

Re: installation of driver 6.24 under ubuntu 10.xx

Postby Michael » Tue 8. Mar 2011, 10:52

except the line mentioned above, i'm using a fresh source - but i need to use socket can..
Michael
 
Posts: 5
Joined: Mon 7. Mar 2011, 16:30

Re: installation of driver 6.24 under ubuntu 10.xx

Postby M.Maidhof » Tue 8. Mar 2011, 15:41

Hi,

please send the output of the whole make process, this will be helpfull to see which kernel version you are using

Did you use the latest patch for the 6.24 driver?

regards

Michael Maidhof
M.Maidhof
Support
Support
 
Posts: 357
Joined: Wed 22. Sep 2010, 14:00
Location: Darmstadt, Germany

Re: installation of driver 6.24 under ubuntu 10.xx

Postby Michael » Tue 8. Mar 2011, 20:22

no, i didn't patch the source, i will try

sry, i should have mentioned that the line above fixed the problem :oops:

but here some output:

original (without the additional include) source without patch
Code: Select all
***
*** Host machine kernel version=2.6.32-29-generic
*** Driver kernel version=2.6.32-29-generic
*** Path to kernel sources=/usr/src/linux-headers-2.6.32-29-generic
*** use KBUILD=yes
***
make -C /usr/src/linux-headers-2.6.32-29-generic SUBDIRS=/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver        EXTRA_CFLAGS="-I/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver        -DNO_DEBUG -DNO_MODVERSIONS -DNO_PARPORT_SUBSYSTEM -DNO_USB_SUPPORT -DPCI_SUPPORT -DNO_PCIEC_SUPPORT -DNO_ISA_SUPPORT -DNO_DONGLE_SUPPORT -DNO_PCCARD_SUPPORT -DNETDEV_SUPPORT -DNO_RT " V=1 modules
make[1]: Betrete Verzeichnis '/usr/src/linux-headers-2.6.32-29-generic'
test -e include/linux/autoconf.h -a -e include/config/auto.conf || (      \
   echo;                        \
   echo "  ERROR: Kernel configuration is invalid.";      \
   echo "         include/linux/autoconf.h or include/config/auto.conf are missing.";   \
   echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";   \
   echo;                        \
   /bin/false)
mkdir -p /home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/.tmp_versions ; rm -f /home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/.tmp_versions/*
make -f scripts/Makefile.build obj=/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver
  gcc -Wp,-MD,/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/.pcan_main.o.d  -nostdinc -isystem /usr/lib/gcc/i486-linux-gnu/4.4.3/include  -Iinclude  -I/usr/src/linux-headers-2.6.32-29-generic/arch/x86/include -include include/linux/autoconf.h -Iubuntu/include  -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i586 -mtune=generic -maccumulate-outgoing-args -Wa,-mtune=generic32 -ffreestanding -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=1024 -fno-omit-frame-pointer -fno-optimize-sibling-calls -pg -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-dwarf2-cfi-asm -fconserve-stack -I/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver -DNO_DEBUG -DNO_MODVERSIONS -DNO_PARPORT_SUBSYSTEM -DNO_USB_SUPPORT -DPCI_SUPPORT -DNO_PCIEC_SUPPORT -DNO_ISA_SUPPORT -DNO_DONGLE_SUPPORT -DNO_PCCARD_SUPPORT -DNETDEV_SUPPORT -DNO_RT  -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(pcan_main)"  -D"KBUILD_MODNAME=KBUILD_STR(pcan)"  -c -o /home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/.tmp_pcan_main.o /home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_main.c
  set -e ; perl /usr/src/linux-headers-2.6.32-29-generic/scripts/recordmcount.pl "i386" "32" "objdump" "objcopy" "gcc" "ld" "nm" "" "" "1" "/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_main.o";
  gcc -Wp,-MD,/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/.pcan_fops.o.d  -nostdinc -isystem /usr/lib/gcc/i486-linux-gnu/4.4.3/include  -Iinclude  -I/usr/src/linux-headers-2.6.32-29-generic/arch/x86/include -include include/linux/autoconf.h -Iubuntu/include  -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i586 -mtune=generic -maccumulate-outgoing-args -Wa,-mtune=generic32 -ffreestanding -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=1024 -fno-omit-frame-pointer -fno-optimize-sibling-calls -pg -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-dwarf2-cfi-asm -fconserve-stack -I/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver -DNO_DEBUG -DNO_MODVERSIONS -DNO_PARPORT_SUBSYSTEM -DNO_USB_SUPPORT -DPCI_SUPPORT -DNO_PCIEC_SUPPORT -DNO_ISA_SUPPORT -DNO_DONGLE_SUPPORT -DNO_PCCARD_SUPPORT -DNETDEV_SUPPORT -DNO_RT  -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(pcan_fops)"  -D"KBUILD_MODNAME=KBUILD_STR(pcan)"  -c -o /home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/.tmp_pcan_fops.o /home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_fops.c
In file included from /home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_fops.c:144:
/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_fops_linux.c: In function ‘wait_until_fifo_empty’:
/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_fops_linux.c:56: error: implicit declaration of function ‘schedule’
/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_fops_linux.c: In function ‘pcan_ioctl_read’:
/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_fops_linux.c:143: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_fops_linux.c:143: error: (Each undeclared identifier is reported only once
/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_fops_linux.c:143: error: for each function it appears in.)
/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_fops_linux.c:143: error: implicit declaration of function ‘signal_pending’
/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_fops_linux.c: In function ‘pcan_ioctl_write’:
/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_fops_linux.c:179: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_fops_linux.c: In function ‘pcan_read’:
/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_fops_linux.c:498: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_fops_linux.c: In function ‘pcan_write’:
/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_fops_linux.c:652: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
make[2]: *** [/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver/src/pcan_fops.o] Fehler 1
make[1]: *** [_module_/home/vmusr/Entwicklung/peak-linux-driver-6.24/driver] Fehler 2
make[1]: Verlasse Verzeichnis '/usr/src/linux-headers-2.6.32-29-generic'
make: *** [all] Fehler 2
Michael
 
Posts: 5
Joined: Mon 7. Mar 2011, 16:30

Re: installation of driver 6.24 under ubuntu 10.xx

Postby Michael » Tue 8. Mar 2011, 20:33

mybe i'm to stupid using the patch...
1) downloading fresh source and the patch
2) try to use it how described and get all patches rejected...

–p0.rej
Code: Select all
--- release_notes.txt   2011-01-13 10:46:05.000000000 +0100
+++ release_notes.txt   2011-02-11 16:13:37.000000000 +0100
@@ -1,2 +1,8 @@
-2011-01-12 - v6.24 - content:
-- Handle PCMCIA cards in v2.6.35 kernel
+2011-01-12 - 6.24 - content:
+- Handle PCMCIA cards in 2.6.35 kernel
+
+2011-01-18 - 6.24.2 - content:
+- Support 2.6.37 kernel
+
+2011-02-11 - 6.24.3 - content:
+- Support 2.6.37 kernel and PCMCIA
--- pcan_common.h   2011-01-13 10:46:05.000000000 +0100
+++ pcan_common.h   2011-02-11 16:16:26.000000000 +0100
@@ -185,7 +185,7 @@
#define CURRENT_RELEASE "Release_20110113_n"  // $name$
#define PCAN_VERSION_MAJOR             6
#define PCAN_VERSION_MINOR             24
-#define PCAN_VERSION_SUBMINOR          0
+#define PCAN_VERSION_SUBMINOR          3
#define CURRENT_VERSIONSTRING          __stringify(PCAN_VERSION_MAJOR)"."__stringify(PCAN_VERSION_MINOR)"."__stringify(PCAN_VERSION_SUBMINOR)


--- pcan_fops_linux.c   2010-02-14 23:38:55.000000000 +0100
+++ pcan_fops_linux.c   2011-02-11 16:12:44.000000000 +0100
@@ -422,7 +422,11 @@

//----------------------------------------------------------------------------
// is called at user ioctl() call
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)
int pcan_ioctl(struct inode *inode, struct file *filep, unsigned int cmd, unsigned long arg)
+#else
+long pcan_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
+#endif
{
   int err;
   struct fileobj *fobj = (struct fileobj *)filep->private_data;
@@ -741,7 +745,11 @@
   release:    pcan_release,
   read:       pcan_read,
   write:      pcan_write,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)
   ioctl:      pcan_ioctl,
+#else
+  unlocked_ioctl: pcan_ioctl,
+#endif
   poll:       pcan_poll,
};

--- pcan_main.h   2010-09-26 22:44:05.000000000 +0200
+++ pcan_main.h   2011-02-11 16:12:44.000000000 +0100
@@ -68,8 +68,12 @@
#endif

#ifdef PCCARD_SUPPORT
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)
#include <pcmcia/cs_types.h>
+#endif
#include <pcmcia/cs.h>
+#endif
#include <pcmcia/cistpl.h>
#include <pcmcia/ds.h>
#endif
--- pcan_pccard-2.6.17.c   2011-01-12 14:15:30.000000000 +0100
+++ pcan_pccard-2.6.17.c   2011-02-11 16:12:44.000000000 +0100
@@ -54,6 +54,7 @@

//****************************************************************************
// helper function to get retrieved configuraton
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
static int pcan_pccard_conf_check(struct pcmcia_device *link, cistpl_cftable_entry_t *cfg,
                                 cistpl_cftable_entry_t *dflt, unsigned int vcc, void *private)
{
@@ -63,17 +64,45 @@
   {
     cistpl_io_t  *io  = (cfg->io.nwin > 0) ? &cfg->io  : &dflt->io;

+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)
     link->io.BasePort1     = io->win[0].base;
     link->io.NumPorts1     = io->win[0].len;
     link->io.Attributes1   = IO_DATA_PATH_WIDTH_8; // only this kind of access is yet supported
     link->io.IOAddrLines   = io->flags &  CISTPL_IO_LINES_MASK;

     if (pcmcia_request_io(link, &link->io) == 0)
+#else
+    struct resource *pr = link->resource[0];
+
+    pr->start = io->win[0].base;
+    pr->end = io->win[0].len;
+    pr->name = dev_name(&link->dev);
+    pr->flags |= IO_DATA_PATH_WIDTH_8; // only this kind of access is yet supported
+    link->io_lines = io->flags &  CISTPL_IO_LINES_MASK;
+
+    if (pcmcia_request_io(link) == 0)
+#endif
+
       return 0;
   }

   return -ENODEV;
}
+#else
+static int pcan_pccard_conf_check(struct pcmcia_device *link, void *private)
+{
+   struct resource *pr = link->resource[0];
+
+   DPRINTK(KERN_DEBUG "%s: %s()\n", DEVICE_NAME, __FUNCTION__);
+
+   pr->name = dev_name(&link->dev);
+   pr->flags &= ~IO_DATA_PATH_WIDTH;
+   pr->flags |= IO_DATA_PATH_WIDTH_8; // only this kind of access is yet supported
+   link->io_lines = 10;
+
+   return pcmcia_request_io(link);
+}
+#endif


#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
@@ -208,6 +237,10 @@

   DPRINTK(KERN_DEBUG "%s: pccard_plugin(0x%p)\n", DEVICE_NAME, link);

+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)
+  link->config_flags |= CONF_AUTO_SET_IO;
+#endif
+
   if ((last_ret = pcmcia_loop_config(link, pcan_pccard_conf_check, NULL)))
   {
     printk(KERN_WARNING "%s: pcmcia_loop_config() = %d!", DEVICE_NAME, last_ret);
@@ -239,35 +272,45 @@
   /* (this the job of pccard_create_all_devices() call below) */
#endif

+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
   link->conf.Attributes = CONF_ENABLE_IRQ;
   link->conf.IntType    = INT_MEMORY_AND_IO;
   link->conf.Present    = PRESENT_OPTION | PRESENT_STATUS;
   if ((last_ret = pcmcia_request_configuration(link, &link->conf)))
   {
     printk(KERN_WARNING "%s: pcmcia_request_configuration() = %d!", DEVICE_NAME, last_ret);
+#else
+  link->config_flags |= CONF_ENABLE_IRQ;
+  link->config_regs = PRESENT_OPTION;
+  if ((last_ret = pcmcia_enable_device(link)))
+  {
+     printk(KERN_WARNING "%s: pcmcia_enable_device() = %d!", DEVICE_NAME, last_ret);
+#endif
     goto fail;
   }

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)
-  DPRINTK(KERN_DEBUG "%s: pccard found: base1=0x%04x, size=%d, irq=%d\n", DEVICE_NAME, link->io.BasePort1, link->io.NumPorts1, link->irq.AssignedIRQ);
-
   // init (cardmgr) devices associated with that card (is that necessary?)
   card->node.major = pcan_drv.nMajor;
   card->node.minor = PCCARD_MINOR_BASE;
   strcpy(card->node.dev_name, DEVICE_NAME);
   link->dev_node = &card->node;
+  card->commonIrq = link->irq.AssignedIRQ;
#else
-  DPRINTK(KERN_DEBUG "%s: pccard found: base1=0x%04x, size=%d, irq=%d\n", DEVICE_NAME, link->io.BasePort1, link->io.NumPorts1, link->irq);
+  card->commonIrq = link->irq;
#endif

-  // create device descriptors associated with the card - get relevant parts to get independent from dev_link_t
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)
   card->basePort  = link->io.BasePort1;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)
-  card->commonIrq = link->irq;
+  card->numPort = link->io.NumPorts1;
#else
-  card->commonIrq = link->irq.AssignedIRQ;
+  card->basePort = link->resource[0]->start;
+  card->numPort = link->resource[0]->end;
#endif

+  DPRINTK(KERN_DEBUG "%s: pccard found: base1=0x%04x, size=%d, irq=%d\n", DEVICE_NAME, card->basePort, card->numPort, card->commonIrq);
+
+  // create device descriptors associated with the card - get relevant parts to get independent from dev_link_t
   last_ret = pccard_create_all_devices(card);
   if (last_ret)
     goto fail;
--- pcan_pccard.c   2011-01-12 14:15:30.000000000 +0100
+++ pcan_pccard.c   2011-02-11 16:15:21.000000000 +0100
@@ -43,8 +43,12 @@
#include <linux/string.h>
#include <linux/ioport.h>

+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)
#include <pcmcia/cs_types.h>
+#endif
#include <pcmcia/cs.h>
+#endif
#include <pcmcia/cistpl.h>
#include <pcmcia/ds.h>
#include <pcmcia/cisreg.h>
@@ -119,6 +123,11 @@
   pcan_drv.pccarddrv.remove     = pccard_detach;
   pcan_drv.pccarddrv.suspend    = pccard_suspend;
   pcan_drv.pccarddrv.resume     = pccard_resume;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)
+  /* this version sets pccarddrv->drv.name with pccarddrv.name => */
+  /* it must be a valid pointer too */
+  pcan_drv.pccarddrv.name       = DEVICE_NAME;
+#endif
   #endif

   return pcmcia_register_driver(&pcan_drv.pccarddrv);
--- pcan_pccard_kernel.h   2011-01-12 14:15:30.000000000 +0100
+++ pcan_pccard_kernel.h   2011-02-11 16:12:44.000000000 +0100
@@ -44,8 +44,12 @@
#include <linux/timer.h>         // to support activity scan

#include <linux/types.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)
#include <pcmcia/cs_types.h>
+#endif
#include <pcmcia/cs.h>
+#endif
#include <pcmcia/cistpl.h>
#include <pcmcia/ds.h>

@@ -65,6 +69,7 @@
   dev_link_t link;
#endif
   u_int      basePort;                       // base of io area for all channels
+  u_int      numPort;
   u_int      commonIrq;                      // irq for all channels
   u_int      commonPort;                     // channels commonly used port
   struct     pcandev *dev[PCCARD_CHANNELS];  // point to associated channels
--- pcan_usb_kernel.c   2010-02-14 23:38:55.000000000 +0100
+++ pcan_usb_kernel.c   2011-02-11 16:12:44.000000000 +0100
@@ -223,7 +223,8 @@
   int nResult = 0;
   register purb_t pt;

-  // DPRINTK(KERN_DEBUG "%s: pcan_set_parameter()\n", DEVICE_NAME);
+  DPRINTK(KERN_DEBUG "%s: %s(): ->EP#%02Xh\n", DEVICE_NAME, __FUNCTION__,
+dev->port.usb.Endpoint[1].ucNumber);

   // don't do anything with non-existent hardware
   if (!dev->ucPhysicallyInstalled)
@@ -295,7 +296,8 @@
   register purb_t pt;
   USB_PORT *u = &dev->port.usb;

-  DPRINTK(KERN_DEBUG "%s: pcan_hw_getcontrol_urb(%d, %d)\n", DEVICE_NAME, function, number);
+  DPRINTK(KERN_DEBUG "%s: %s(): <-EP#%02Xh\n", DEVICE_NAME, __FUNCTION__,
+dev->port.usb.Endpoint[0].ucNumber);

   // don't do anything with non-existent hardware
   if (!dev->ucPhysicallyInstalled)


how to patch the driver?
Michael
 
Posts: 5
Joined: Mon 7. Mar 2011, 16:30

Re: installation of driver 6.24 under ubuntu 10.xx

Postby M.Maidhof » Wed 9. Mar 2011, 10:22

Hi,

on our linux website (where you have downloaded the patch) there is an info on how to use the patch:

Usage:
Copy the patch into the peak-linux-driver-6.24 directory

$ cd peak-linux-driver-6.24
$ patch –p0 < peak-linux-driver-6.24.3.patch

but you are using a kernel 2.6.32, so the patch is not really necessary than.

In your output of your make process some problems regarding your kernel configuration are displayed:

echo; \
echo " ERROR: Kernel configuration is invalid."; \
echo " include/linux/autoconf.h or include/config/auto.conf are missing."; \
echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo; \

perhaps it will be helpfull to fix this issue first

regards

Michael Maidhof
M.Maidhof
Support
Support
 
Posts: 357
Joined: Wed 22. Sep 2010, 14:00
Location: Darmstadt, Germany


Return to Linux