Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eqnx kernel module failing to load #2

Open
francistheodorecatte opened this issue Mar 20, 2017 · 6 comments
Open

eqnx kernel module failing to load #2

francistheodorecatte opened this issue Mar 20, 2017 · 6 comments

Comments

@francistheodorecatte
Copy link

Well, it worked once, and now the module isn't working.

Using modprobe will load the module, but /dev/ttyQxx doesn't populate, and the sstty program says no breakout board was found. If I try loading the module using insmod it gives me:
insmod: ERROR: could not insert module ./drv/eqnx.ko: Invalid module format

dmesg only elaborates by saying
[ 289.905792] eqnx: no symbol version for module_layout

Literally all I did between it working and not working was reboot?

@francistheodorecatte
Copy link
Author

Here's the log from running make build:
eqnx_build_new3.txt

@francistheodorecatte
Copy link
Author

francistheodorecatte commented Mar 20, 2017

Figured it out; there's something funky with the eqnx driver's card 'database.'

Here's the workaround I found:

user@felony:~/git/eqnx/utils$ sudo modprobe -r eqnx
user@felony:~/git/eqnx/utils$ sudo rm -r /etc/eqnx
user@felony:~/git/eqnx/utils$ sudo modprobe eqnx
user@felony:~/git/eqnx/utils$ sudo ./ssmkn

EQNX: Logged at Mon Mar 20 12:10:22 2017
EQNX: running ssmkn
EQNX: Updating devices. Please be patient
EQNX: Board type SST-16P No panel found in PCI slot 0. Configured as board 1.
This is a new board.
EQNX: ssmkn complete
user@felony:~/git/eqnx/utils$ sudo ./sstty -c
Board 1 id 0xc8 SST-16P No panel Slot 0

And now the /dev/ttyQ devices showed back up. Not sure why deleting the eqnx folder (only contains a database and logfile) and reloading the module fixed it? But it did.

@francistheodorecatte
Copy link
Author

The only problem is trying to test the serial ports doesn't work.

user@felony:~$ cat help > /dev/ttyQ1a1
-bash: /dev/ttyQ1a1: No such device

And trying to get the port topology from ssdiag nets:
ssdiag

Looks like ssmkn isn't detecting my port panel? This card/port panel works fine under Windows so not sure what the issue is.

@gregsidelinger
Copy link
Owner

Is ssmkn even still needed? I thought udev handled creating all the dev entries. If I recall correctly the board hot plugging was not working so the board needed to be plugged in when the driver is loaded. What does dmesg log when the driver is loaded.

@francistheodorecatte
Copy link
Author

None of the dev files populate until I run ssmkn now.

user@felony:~/git/eqnx/utils$ dmesg | tail
....
[ 395.099154] init_module()
[ 395.099159] Loading Equinox SuperSerial Technology Device Driver Version 4.12e
[ 395.099162] Copyright (c) 1989-2007 Equinox Systems Inc. All Rights Reserved.
[ 395.106451] EQNX SST Board 0 : id 80c8 (SST-16P No panel)
[ 395.125429] EQNX: Driver Enabled for 1 board(s).

The log file in /etc/eqnx has the following line after running ssmkn:

EQNX: Current Configuration
Logical Physical Bus Slot I/O port Board Type/Revision
1 1 4 0 xxx 80C8 0 245 SST-16P No panel

So I checked udev and it says there's no device node at /dev/ttyQ1a1:

user@felony:~$ udevadm info --name=/dev/ttyQ1a1 --attribute-walk
device node not found

On a fresh boot if I just modprobe the driver, LSPCI doesn't report the driver as being in use by the card:

user@felony:~$ lspci -vvvnn | grep SST
0d:00.0 Serial controller [0700]: Equinox Systems, Inc. SST-16P Adapter [113f:80c8] (prog-if 80)

And no ttyQ devices appear in /dev.

If I run ssmkn, the ttyQ device files appear in /dev, lspci still doesn't report a driver in use, and bash/stty/etc. still say no such device. The ttyQ files have a major number 245 and minor numbers 0 through 15:

user@felony:~$ ls -al /dev/ttyQ*
crw-rw-rw- 1 root root 245, 0 Mar 21 05:29 /dev/ttyQ1a1
crw-rw-rw- 1 root root 245, 9 Mar 21 05:29 /dev/ttyQ1a10
crw-rw-rw- 1 root root 245, 10 Mar 21 05:29 /dev/ttyQ1a11
crw-rw-rw- 1 root root 245, 11 Mar 21 05:29 /dev/ttyQ1a12
crw-rw-rw- 1 root root 245, 12 Mar 21 05:29 /dev/ttyQ1a13
crw-rw-rw- 1 root root 245, 13 Mar 21 05:29 /dev/ttyQ1a14
crw-rw-rw- 1 root root 245, 14 Mar 21 05:29 /dev/ttyQ1a15
crw-rw-rw- 1 root root 245, 15 Mar 21 05:29 /dev/ttyQ1a16
crw-rw-rw- 1 root root 245, 1 Mar 21 05:29 /dev/ttyQ1a2
crw-rw-rw- 1 root root 245, 2 Mar 21 05:29 /dev/ttyQ1a3
crw-rw-rw- 1 root root 245, 3 Mar 21 05:29 /dev/ttyQ1a4
crw-rw-rw- 1 root root 245, 4 Mar 21 05:29 /dev/ttyQ1a5
crw-rw-rw- 1 root root 245, 5 Mar 21 05:29 /dev/ttyQ1a6
crw-rw-rw- 1 root root 245, 6 Mar 21 05:29 /dev/ttyQ1a7
crw-rw-rw- 1 root root 245, 7 Mar 21 05:29 /dev/ttyQ1a8
crw-rw-rw- 1 root root 245, 8 Mar 21 05:29 /dev/ttyQ1a9

The bizarre thing is driver populated the dev entries that first time I loaded the module with insmod, but every time I use modprobe, it doesn't work. I'd retry insmod but there's still that issue of "invalid module format"....

@francistheodorecatte
Copy link
Author

francistheodorecatte commented Mar 21, 2017

user@felony:~/git/eqnx$ sudo modinfo ./drv/eqnx.ko
filename: /home/user/git/eqnx/./drv/eqnx.ko
license: GPL
description: Equinox SST Driver
author: Mike Straub
vermagic: 3.16.39 SMP mod_unload modversions
license: GPL
depends:
vermagic: 3.16.39 SMP mod_unload modversions

Well, looks like it compiled for kernel version 3.16.39 instead of 3.16.0-4-amd64?

EDIT:
Wiped my kernel sources, recreated them, rebuilt the module, and ran depmod.

I can now load the kernel module using insmod, but the dev entries still don't populate...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants