Cannot load pcan driver for pci card

This forum covers PCAN-Linux and Linux development issues concerning our products
Post Reply
Dadou
Posts: 5
Joined: Wed 6. Jun 2018, 09:38

Cannot load pcan driver for pci card

Post by Dadou » Wed 6. Jun 2018, 09:58

Hello,

I am trying to use a pcan PCI card (model IPEH-002065) and I am facing issues concerning the driver:

The compilation and installation run fine but when I try to load the driver, dmesg shows this error:
[ 244.175374] pcan: Release_20171027_n (le)
[ 244.175378] pcan: driver config [mod] [isa] [pci] [pec] [dng] [par] [usb] [pcc] [net]
[ 244.175493] pcan: pcan_pci_sja1000_probe() check_mem_region(fbef0000h, 4096) err=-16
[ 244.175516] pcan: probe of 0000:08:00.0 failed with error -16
[ 244.175550] usbcore: registered new interface driver pcan
[ 244.175562] pcan: major 247.
After that, the can card is not detected: cat /proc/can returns
*------------- PEAK-System CAN interfaces (http://www.peak-system.com) -------------
*------------- Release_20171027_n (8.5.1) Jun 5 2018 15:56:56 --------------
*---------- [mod] [isa] [pci] [pec] [dng] [par] [usb] [pcc] [net] -----------
*--------------------- 0 interfaces @ major 247 found -----------------------
*n -type- -ndev- --base-- irq --btr- --read-- --write- --irqs-- -errors- status
I am using the latest version of the driver (8.5.1), and I also tried installing several previous versions without success. The computer runs Ubuntu 14.04, kernel version 3.13.0-88-generic.

lscpi|grep CAN returns:
08:00.0 Network controller: PEAK-System Technik GmbH PCAN-PCI CAN-Bus controller (rev 02)
so the pci card seems to be detected, but the driver is not loading properly.
Note that I tried the card on another machine running ubuntu 16.04 with a 4.4.0-127-generic kernel and it worked fine.

Any idea what might be causing this ? I can provide more information on request.

Thank you

User avatar
S.Grosjean
Software Development
Software Development
Posts: 357
Joined: Wed 4. Jul 2012, 17:02

Re: Cannot load pcan driver for pci card

Post by S.Grosjean » Wed 6. Jun 2018, 10:46

Hi,

Error -16 says that the the related I/O memory region is already reserved in the system.

Can you type:

Code: Select all

$ sudo cat /proc/vmallocinfo | grep fbef0000
And give us the output please?

Regards,

Stéphane
— Stéphane

Dadou
Posts: 5
Joined: Wed 6. Jun 2018, 09:38

Re: Cannot load pcan driver for pci card

Post by Dadou » Wed 6. Jun 2018, 11:08

Hi, thank you for your quick reply.

Here is the output:
0xffffc90011b5c000-0xffffc90011b5e000 8192 pcan_pci_probe+0x1a3/0x6b0 [pcan] phys=fbef0000 ioremap
I am not sure how to interpret this output...
Please tell me if you need any other information.

Regards

User avatar
S.Grosjean
Software Development
Software Development
Posts: 357
Joined: Wed 4. Jul 2012, 17:02

Re: Cannot load pcan driver for pci card

Post by S.Grosjean » Wed 6. Jun 2018, 11:17

Hi,

This wants to say that the pcan driver already handles the PCAN-PCI card.

Can you please type:

Code: Select all

$ dmesg
Then reboot your system, and as soon as you log in, type:

Code: Select all

$ dmesg
again.

Thanks,

Stéphane
— Stéphane

Dadou
Posts: 5
Joined: Wed 6. Jun 2018, 09:38

Re: Cannot load pcan driver for pci card

Post by Dadou » Wed 6. Jun 2018, 11:22

Now that I think of it I may have missed something: I did not pay enough attention in the first place but the error I posted previously is not the one that occurs at boot, buts when I unload the driver with 'rmmod pcan' and load it again with 'modprobe pcan'

At boot, when Linux tries to load the module for the first time, I get a different error, sorry for the confusion (I pasted this one to avoid the clutter from other drivers loading at the same time during boot).

At boot, dmesg shows :
...
[ 7.675325] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[ 7.675326] lpc_ich: Resource conflict(s) found affecting gpio_ich
[ 7.691926] [drm] Initialized drm 1.1.0 20060810
[ 7.692897] CAN device driver interface
[ 7.704963] Bluetooth: Core ver 2.17
[ 7.704976] NET: Registered protocol family 31
[ 7.704977] Bluetooth: HCI device and connection manager initialized
[ 7.704984] Bluetooth: HCI socket layer initialized
[ 7.704986] Bluetooth: L2CAP socket layer initialized
[ 7.704989] Bluetooth: SCO socket layer initialized
[ 7.710507] pcan: module verification failed: signature and/or required key missing - tainting kernel
[ 7.711274] pcan: Release_20171027_n (le)
[ 7.711276] pcan: driver config [mod] [isa] [pci] [pec] [dng] [par] [usb] [pcc] [net]
[ 7.713669] usbcore: registered new interface driver btusb
[ 7.716878] pcan: pci device minor 0 found
[ 7.716895] pcan: create_one_pci_device(CAN1) discarded: err -6
[ 7.717045] usbcore: registered new interface driver pcan
[ 7.717061] pcan: major 247.
...
I suppose the interesting line is "pcan: create_one_pci_device(CAN1) discarded: err -6"

Sorry for the misleading information.

Dadou
Posts: 5
Joined: Wed 6. Jun 2018, 09:38

Re: Cannot load pcan driver for pci card

Post by Dadou » Wed 6. Jun 2018, 11:32

I just performed a reboot, here you can find the complete output of dmesg as requested :
https://pastebin.com/sy1ma30N
(I could not paste it here since it is too long)

Thank you

User avatar
S.Grosjean
Software Development
Software Development
Posts: 357
Joined: Wed 4. Jul 2012, 17:02

Re: Cannot load pcan driver for pci card

Post by S.Grosjean » Wed 6. Jun 2018, 15:16

Hi,

Thanks your answer.

Err -6 means that there is a problem with probing the SJA1000 of the PCAN-PCI.

Could you try to put it into another PCI slot?

Regards,

Stéphane
— Stéphane

Dadou
Posts: 5
Joined: Wed 6. Jun 2018, 09:38

Re: Cannot load pcan driver for pci card

Post by Dadou » Wed 6. Jun 2018, 17:04

Hi again,

Sadly this is the only available PCI slot on the motherboard, I tried unplugging and pluging it again multiple times without success. I will try to get my hands on any other PCI card to test the slot. If it does not work, it will confirm that the problem comes from the computer.

Thank you for your help

Post Reply