xtrx-sdr / images

Pre-built XTRX packages and firmware images
https://www.crowdsupply.com/fairwaves/xtrx
43 stars 27 forks source link

xtrx: Unable to initialize UART driver: -16 #102

Open maxspb89 opened 3 years ago

maxspb89 commented 3 years ago

I've tried to install XTRX with PCI-e adapter on Ubuntu18.04 and Ubuntu20.04. but I've got errors during driver installation. sudo modprobe xtrx

fails with "modprobe: ERROR: could not insert 'xtrx': Device or resource busy". results of dmesg: xtrx: Unable to initialize UART driver: -16 Host system is Ubuntu 18.04 uname -a : Linux test 5.4.0-70-generic #78~18.04.1-Ubuntu SMP Sat Mar 20 14:10:07 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux.

Tried to build driver manually, and recieving the same error after sudo insmod xtrx.ko. Then I've tried to remove UART checking in static int __init xtrx_init(void) and rebuild again but no PCI device is shown after sudo lspci -v -d 10ee: command so I suppose, that driver hasn't been installed.

cpjenkins commented 3 years ago

So I just ran headlong into this issue as well (Ubuntu 20.04 5.8.0-53). It looks like the uart driver major version is hardcoded as 234 in xtrx.c

I am far from an expert on kernel programming... but I believe 234 is the first major device available in the dynamic allocation block (kernel docs)... i.e. some other device on your system is getting assigned a major number before the xtrx uart driver.

As a workaround, take a look at your registered devices (cat /proc/devices) and pick a major version that isn't listed. This worked for me.

Interceptor777 commented 3 years ago

I can confirm the solution from @cpjenkins solved this issue for me. However, it's worrying that this is still hard coded.