Unable to compile Linux driver for serial card

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read how to get help
Lynette
Level 1
Level 1
Posts: 2
Joined: Sun Jul 19, 2009 9:28 pm

Unable to compile Linux driver for serial card

Postby Lynette » Sun Jul 19, 2009 9:57 pm

I have installed build essentials and have followed the instructions that came with my serial card but when I run make I get the following errors.

rm -f *.mod.c *.o *.ko .*.cmd *.symvers
make -C /lib/modules/2.6.28-11-generic/build/ SUBDIRS=/home/dreamweaver/Desktop/MCS9865_Linux modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.28-11-generic'
CC [M] /home/dreamweaver/Desktop/MCS9865_Linux/mcs9865.o
/home/dreamweaver/Desktop/MCS9865_Linux/mcs9865.c: In function ‘receive_chars’:
/home/dreamweaver/Desktop/MCS9865_Linux/mcs9865.c:622: error: ‘struct uart_info’ has no member named ‘tty’
/home/dreamweaver/Desktop/MCS9865_Linux/mcs9865.c: In function ‘receive_chars_dma_done’:
/home/dreamweaver/Desktop/MCS9865_Linux/mcs9865.c:852: error: ‘struct uart_info’ has no member named ‘tty’
/home/dreamweaver/Desktop/MCS9865_Linux/mcs9865.c: In function ‘serial9865_handle_port’:
/home/dreamweaver/Desktop/MCS9865_Linux/mcs9865.c:957: error: ‘struct uart_info’ has no member named ‘tty’
/home/dreamweaver/Desktop/MCS9865_Linux/mcs9865.c: In function ‘serial9865_probe’:
/home/dreamweaver/Desktop/MCS9865_Linux/mcs9865.c:2068: error: ‘SA_SHIRQ’ undeclared (first use in this function)
/home/dreamweaver/Desktop/MCS9865_Linux/mcs9865.c:2068: error: (Each undeclared identifier is reported only once
/home/dreamweaver/Desktop/MCS9865_Linux/mcs9865.c:2068: error: for each function it appears in.)
make[2]: *** [/home/dreamweaver/Desktop/MCS9865_Linux/mcs9865.o] Error 1
make[1]: *** [_module_/home/dreamweaver/Desktop/MCS9865_Linux] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.28-11-generic'
make: *** [default] Error 2

I really have no idea what is wrong, can anyone help me please?

Regards Lynette

User avatar
lagagnon
Level 7
Level 7
Posts: 1886
Joined: Wed Jun 17, 2009 7:38 pm
Location: an island in the Pacific...

Re: Unable to compile Linux driver for serial card

Postby lagagnon » Mon Jul 20, 2009 3:51 pm

In the source code directory whre you are compiling from is there an "configure" script? If so run "./configure" first, then make,

Lynette
Level 1
Level 1
Posts: 2
Joined: Sun Jul 19, 2009 9:28 pm

Re: Unable to compile Linux driver for serial card

Postby Lynette » Mon Jul 20, 2009 4:17 pm

Thanks for replying. No there isn't a configure file, only a makefile.

regards
Lynette

ProtocolOH
Level 1
Level 1
Posts: 2
Joined: Fri Sep 25, 2009 3:54 pm

Re: Unable to compile Linux driver for serial card

Postby ProtocolOH » Fri Sep 25, 2009 4:08 pm

BUMP. I have the exact same issue when compiling similar drivers for an MCS9901 (PCI-Express 4-port serial card):
http://www.syba.com/index.php?controller=Product&action=Info&Id=1003

Here's my output (Ubuntu 9.04, kernel 2.6.28):

Code: Select all

rm -f *.mod.c *.o *.ko .*.cmd *.symvers
make -C /lib/modules/2.6.28-15-generic/build/  SUBDIRS=/usr/local/driver/MCS9901_Linux/version1.6/starex modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.28-15-generic'
  CC [M]  /usr/local/driver/MCS9901_Linux/version1.6/starex/9900.o
/usr/local/driver/MCS9901_Linux/version1.6/starex/9900.c: In function "receive_chars":
/usr/local/driver/MCS9901_Linux/version1.6/starex/9900.c:622: error: "struct uart_info" has no member named "tty"
/usr/local/driver/MCS9901_Linux/version1.6/starex/9900.c: In function "receive_chars_dma_done":
/usr/local/driver/MCS9901_Linux/version1.6/starex/9900.c:852: error: "struct uart_info" has no member named "tty"
/usr/local/driver/MCS9901_Linux/version1.6/starex/9900.c: In function "serial9900_handle_port":
/usr/local/driver/MCS9901_Linux/version1.6/starex/9900.c:957: error: "struct uart_info" has no member named "tty"
/usr/local/driver/MCS9901_Linux/version1.6/starex/9900.c: In function "serial9900_probe":
/usr/local/driver/MCS9901_Linux/version1.6/starex/9900.c:2062: error: "SA_SHIRQ" undeclared (first use in this function)
/usr/local/driver/MCS9901_Linux/version1.6/starex/9900.c:2062: error: (Each undeclared identifier is reported only once
/usr/local/driver/MCS9901_Linux/version1.6/starex/9900.c:2062: error: for each function it appears in.)
make[2]: *** [/usr/local/driver/MCS9901_Linux/version1.6/starex/9900.o] Error 1
make[1]: *** [_module_/usr/local/driver/MCS9901_Linux/version1.6/starex] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.28-15-generic'
make: *** [default] Error 2

I suspect that these guys haven't maintained their driver code through kernel releases, and now they're selling cards that they advertise as working with "Linux 2.6.11 and higher", but with drivers that haven't been updated since about 2.6.20, judging by the comments in the source code.
http://www.drivers-download.com/Drv/MosChip/MCS9901/MCS9901_Linux.tar.gz

I've popped off emails to Syba and MOSCHIP. So... what's to do?

ProtocolOH
Level 1
Level 1
Posts: 2
Joined: Fri Sep 25, 2009 3:54 pm

Re: Unable to compile Linux driver for serial card

Postby ProtocolOH » Fri Sep 25, 2009 8:17 pm

Updated: Fat chance that we'll get any support from Moschip on this one. This is quoted from an email I received from a Syba technical support person:

Thank you for your inquiry. Currently, this driver does not support Kernel 2.6.28 on Ubuntu. Unfortunately, the chipset manufacturer has not released any driver for this new kernel. The linux driver for MSC9901 currently only tested on Kernel version 2.6.11-1.1369 that is available with Fedora Core 4, Kernel version 2.6.15 on Fedora Core 4, Kernel version 2.6.18 on Fedora Core 4 and Kernel version 2.6.21 with FC7.


In other words, "our chipset vendor is no longer supporting this part, please go away now." Classy. I would stick to either a Moxa-brand board (they supply source-level Linux drivers for all current and past products), or perhaps a board based on Oxford Semi's chips. I just ordered a Startech 4-port serial board (PEX4S952) from Buy.com for $90 shipped. It's based on the Oxford OXPCIe954, which appears in Linux kernel patch Google results (unlike the MCS9901 on my other board). Their manual says it supports Linux kernel 2.4.x or 2.6.x; we'll see.

As for supporting the Moschip boards... unless some enterprising soul wants to take Moschip's code and bring it in line with the latest kernel, I don't see their chips being supported soon if at all. This Syba board's going into our Windows workstation when I yank it.

EDIT: The Oxford Semi board works great in Linux (kernel 2.6.28). Didn't have to compile any drivers, was supported right out of the box. Startech uses these chips (OXPCI*) on several of their boards. Only alternative I can suggest. (FWIW, the Syba board auto-installed in our Vista box, so at least it's good for something.)

EDIT 2: Finally got a response back from Moschip:
MCS9901 Linux driver supports up to Kernel version 2.6.25 only.
We will update the drivers soon.

So, don't hold your breath.

Razorblade
Level 1
Level 1
Posts: 1
Joined: Tue Oct 06, 2009 6:44 am

Re: Unable to compile Linux driver for serial card

Postby Razorblade » Tue Oct 06, 2009 6:48 am

I've already sent an updated driver back to MosChip in January 2009.
I only tested it with 2.6.28, additional changes might be required for newer kernels. If this is the case just let me know...

As you can see the changes are trivial and only reflect changed function names.
Attachments
starex_2.6.28.patch.gz
Patch to starex driver to compile under Linux 2.6.28
(662 Bytes) Downloaded 944 times

joecrow
Level 1
Level 1
Posts: 1
Joined: Wed Oct 28, 2009 10:53 pm

Re: Unable to compile Linux driver for serial card

Postby joecrow » Thu Oct 29, 2009 1:35 am

NetMos Technology PCI 9865 Parallel Controller card install how-to for Ubuntu

Well, I do not have a parallel port on my computer so I bought a cheap card on Ebay. It is a no name card that came with a driver cdrom and a Linux driver called msc9865_Linux. I couldn't "Make" or "compile" anything from the driver. The instructions were to vague and after googling, it seems the driver was to old and the manufacturer stopped supporting it. I eventually found a tutorial by Lazly at http://lazly.hu/q/netmos-technology-pci ... 04-english which worked for me. It was not very detailed but I managed. Even though it is already in English, I modified and rewrote it here so it makes more sense and added more detailes.

Im using ubuntu 8.10 but this will work with 9.04 and others. As I explained above, I too tried to install an old printer with a parallel card and was going around in circles with the driver and installation instructions. I googled 'til my fingers were raw and still nothing. However, the following how-to solved my problem without using any driver!

First, make sure your system "sees" the card with the following:
$ sudo lspci
...
03:06.2 Parallel controller: NetMos Technology PCI 9865 Multi-I/O Controller
...
Scroll down until you see something similar to the above. As you can see, my system sees the card and identified the parallel port. By the way, there were two serial ports listed on the same card. Which I will not be using. Anyway,...

$ sudo cat /proc/ioports | grep parport
<nothing>

$ sudo modprobe -r lp
$ sudo modprobe -r parport_pc

$ sudo lspci -v
...
03:06.2 Parallel controller: NetMos Technology PCI 9865 Multi-I/O Controller (prog-if 03)
Subsystem: Device a000:2000
Flags: bus master, medium devsel, latency 64, IRQ 10
I/O ports at e000 [size=8]
I/O ports at d800 [size=8]
Memory at febfb000 (32-bit, non-prefetchable) [size=4K]
Memory at febfa000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [48] Power Management version 2
...
Note the I/O port above listed as being at e000. It will probably be different on yours. In the following command replace mine with whatever yours may be.

$ sudo modprobe parport_pc io=0xe000
$ sudo modprobe lp

$ sudo /etc/init.d/cups restart

At this point, my printer started printing so I stopped, but you may need to install your printer drivers. If that is the case, Use the official Ubuntu printer setup GUI.

Before you reboot your system, you still need to edit a couple of files so you can keep printing when the system is restarted. The first file, has to be created and the info added to it. The second file should already exist so you just need to add the line to it. So go ahead and create the file "parport_pc" in the directory as indicated below. Then edit it with your fav text editor. I used Nano in my examples.

$ sudo nano /etc/modprobe.d/parport_pc
options parport_pc io=0xe000

Once the file "parport_pc" is created and the option above is added, edit the next file to make sure it all works after rebooting.
$ sudo nano /etc/modules
...
parport_pc
lp
...

That's all. I've been using Ubuntu for a year now and love it but I'm not an expert so maybe other here can further help you along. I hope this method helps others. Later, JoeCrow

luboss
Level 1
Level 1
Posts: 1
Joined: Tue Feb 02, 2010 10:07 am

Re: Unable to compile Linux driver for serial card

Postby luboss » Tue Feb 02, 2010 10:11 am

Hello,

I've got the driver to work but I have problem with printing on serial port.
There are extra blank lines. Has someone similar problem?
Can someone advise how to get it to work properly with stty or setserial?

Thanks

Blue Thunder
Level 1
Level 1
Posts: 3
Joined: Fri Apr 04, 2008 12:47 am

Re: Unable to compile Linux driver for serial card

Postby Blue Thunder » Tue Mar 16, 2010 10:09 pm

Can't really help, but just thought I'd post some info for those looking for a Linux compatible parallel/serial board.

Couldn't find a Startek board where I live (Aust), so I started trying to find one that used an Oxford Semi chip (as suggested by ProtocolOH). Everything I came across seemed to use the Moschip chip, but I finally found a HP parallel+serial board (part number: KD062AA) which appeared to use an Oxford Semi chip, so I ordered one. Turns out it does use an Oxford chip - OX16PCI954 to be specific.

Anyways it worked perfectly in Mint 7 (Linux kernel 2.6.28), no drivers to muck about with, just "plug & play". Much better than the parallel to usb adapter I bought (couldn't even print using that). Finally I can use my outdated Canon BJC-210 :P

Now to see if it works on Windows...

prunee
Level 1
Level 1
Posts: 1
Joined: Thu Jan 20, 2011 2:06 am

Re: Unable to compile Linux driver for serial card

Postby prunee » Mon Jan 24, 2011 1:54 am

How can I boot my windows os after i have installed fedora? I needed to installed Fedora Linux for school, I want to keep Fedora but also would like to boot windows up whenever I'm not using Fedora. The problem is I can't boot windows up because Fedora is my default Operating System Now.


Return to “Hardware Support”

Who is online

Users browsing this forum: Antbat and 2 guests