0

I have an IOCREST SI-PEX50103 which is a PCI-Express Multi I/O Controller Card with 2 serial ports and 1 parallel port. It uses the vendor supplied AX99100 driver. I am running openSUSE Leap 15.2 with Kernel 5.3.18-lp152.84-default.

I have not been able to install the AX99100 driver on this Linux installation. When running the make command from the installation source directory, I get the following error message:

CC [M] /home/programming/iocrest/AX99100_LINUX_Driver_v1.0.0_Source/ax99100.o /home/programming/iocrest/AX99100_LINUX_Driver_v1.0.0_Source/ax99100.c: In function ‘receive_chars_dma_done’: /home/programming/iocrest/AX99100_LINUX_Driver_v1.0.0_Source/ax99100.c:1027:43: error: ‘ch’ undeclared (first use in this function) if (uart_handle_sysrq_char(&up->port, ch)) ^~ /home/programming/iocrest/AX99100_LINUX_Driver_v1.0.0_Source/ax99100.c:1027:43: note: each undeclared identifier is reported only once for each function it appears in

Before upgrading to Leap 15.2, I had openSUSE Leap 15.1 installed on this computer and I had no trouble installing the driver and using this card. Right now, I also have CentOS Linux 7 installed on this computer and I can install the driver and use the card on that installation.

I'm guessing there is some sort of a problem with the Kernel sources for the 5.3.18-lp152.84 kernel I am running. Any ideas you might have for locating the problem would be appreciated.

2
  • That ch var is declared locally in check_modem_status, u8 ch,lsr = *status;. It is not declared in the function receive_chars_dma_done, is not decalred globally either in the.c or .h files, and is not bounded by a kernel version check. Unless I am missing something, it's broken software that was never going to compile without making changes.
    – Bib
    Apr 23, 2022 at 12:55
  • By broken software, do you mean the function receive_chars_dma_done or the driver file? This exact same driver file was installed on a previous SUSE Leap installation and on a current CentOS 7 installation.
    – user125660
    Apr 26, 2022 at 7:35

2 Answers 2

0

UPDATE -- Had to revert grub to Linux Header kernel 5.4.0-110-low-latency and edit typos in make & install driver

Okay so I finally got this to work on contacting the vendor (StarTech) support...

  1. Vendor indicated that they tested on Linux Kernel header 5.4.0-110 for Ubuntu 20.04LTS.

    sudo apt update
    sudo apt install linux-headers-5.4.0-110 -y
    
    • update /etc/default/grub to boot to 5.4.0-110-low-latency by default vs whatever the latest that ships with Ubuntu / SUSE
  2. Download the driver from https://www.startech.com/en-us/cards-adapters/PEX1P2, fix typos in make file (vendor admitted this is a known issue). Really the main issue error for ax99100.c make install throws undeclared ch, this is resolvable by simply declaring in the script:

    char ch;
    if (uart_handle_sysrq_char(&up->port, ch))
    ...
  1. The driver build make command should now work, then on your make install command there is a missing line given the kernel directory doesn't exist. I added this with mkdir -p ... and make install works

  2. Finally, to load the driver there is a command with io & io_high... run sudo lspci -v to get your hexadecimal port values assigned for the new parallel port hardware (in my case, e010 & e000). You need to convert those hexadecimal to decimal to pass as arguments (online converter here: https://www.rapidtables.com/convert/number/hex-to-decimal.html)


ORIGINAL

Interestingly I ran into the same exact error and was so glad to see another user recently experienced. Our setup

  • Dell OptiPlex 9020
  • Ubuntu 20.04LTS, kernel 5.4.13 (you can run uname -r to check)
  • StarTech PCiE Parallel Port

On running their provided installation script from here, there are some errors...

Notably you need to change the SUBDIR=$(PWD) to M=$(shell pwd) to even run sudo make, but then you get the ch undeclared error... My thought was this is a typo / bad maintenance from the StarTech team that updates the driver Makefile.

I pinged StarTech's chat support sharing these details and they suggested the following for potential missing dependencies

Can you please give the following a shot and let me know if it works for you.

  • We’ve tested these steps when getting a similar error on a Ubuntu 20.04 machine running Kernel 5.4.0-113 and it seemed to work fine.

  • In the Makefile make sure $(PWD) is changed to $(shell pwd) in both spots (Sometimes needed depending on the customers configuration)

  • Then try:

    sudo apt-get install linux-source
    sudo apt-get install build-essential
    sudo apt-get install gcc-multilib
    sudo apt-get install linux-libc-dev:i386
    sudo apt-get install linux-headers-5.4.0-110:i386
    sudo apt-get install linux-headers-5.4.0-110
    
  • Try this command if the above does not work

    sudo ln -s /usr/include/asm-generic /usr/include/asm 
    
    • Making the link to tell the compiler that asm-generic is also asm since that may be part of the problem
  • At the end, just in case:

  sudo apt-get update        

Like I said, on our end this seemed to install the card without facing any errors. Let me know if you have any questions or if this works for you.

0

We had a similar problem on Rocky Linux kernel 5.14. discussion here

The Startech driver compiled after adding "const" to one argument in ax99100_sp.c.

static void serial99100_set_termios(struct uart_port *port, struct ktermios *termios, const struct ktermios *old)

"modprobe" failed until we turned off Secure Boot in the BIOS. Now dmesg shows ttyF0 and ttyF1.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .