Monday, April 20, 2009

Spinning into control

After completing the changes from semaphors to spinlocks, the driver seems to have gained much stability. The locking mechanism is based off of the pl2302 driver. Currently the device will lose data if under heavy load. The other driver also made me realize (assuming its done correctly!) that I don't need to lock nearly as much as I thought I did. To help testing, I am making a serial program that can work with shell scripts. The only two command line programs that I know that work with serial are screen and minicom, neither of which is for automated use.
During this upgrade, additional register accesses were decoded into human readable defines and a few translation errors I had made earlier were fixed. These were due to the baud rate latch divisor multiplexing. Basically, if a certain register had a special value on the chip, it causes register addresses to actually write to different data.
As things develop, I will lock the code more properly. Currently you could easily generate unexpected output on the serial port due to a number of race conditions from multiple users. A prime example is the issues arrising from the divisor multiplexing. Future revisions will lock these as it is found to be safe and necessary. However, any locking errors right now will not result in system instabiility, just unexpected results on the serial port.

Friday, April 17, 2009

Misc updates

Seems that the MosChip site virus may have been a google bug. In any case, I have a beta tester now for my driver. She/he is using virtual machines to run the dongles through Windows and would like to use them directly on Linux.
The code is being converted to spinlocks and is modeled off of another driver, the pl2303. It is another USB-serial converter that I have and has very clean code, so makes a good model.

Friday, April 3, 2009

Need some DDT

Although it wasn't so bad getting it to transmit and receive data, getting the driver to behave stably has been elusive. In particular, the locking scheme is not working. Code modifications are under way to base the locking scheme off of the pl2302 USB-serial driver. mos7703 currently uses mutexes, but I'm converting the code to spinlocks since this was generally recommended to me anyway. I also posted on hoping to get someone to take a look at it, but didn't recieve any responses. See it at Once I get more of a reasonably solid driver working, I'll post to the Linux Kernel Mailling List.
I've also recieved techniques for keeping compatibility across kernels. I've managed to clean up the code and use less preprocessor logic. This mostly involves using some high level wrapper functions for different kernels, and then using a few inline core functions to do the actual logic. Also trying to clean up some of the ugly macros around this.

Sunday, February 22, 2009

One more reason to use my driver

MosChip is now listed as a malicious site by Google:
In case the link breaks, it says:

What happened when Google visited this site?

Of the 204 pages we tested on the site over the past 90 days, 1 page(s) resulted in malicious software being downloaded and installed without user consent. The last time Google visited this site was on 2009-02-22, and the last time suspicious content was found on this site was on 2009-02-21.

Malicious software includes 9 exploit(s), 1 scripting exploit(s), 1 trojan(s). Successful infection resulted in an average of 45 new processes on the target machine.

Malicious software is hosted on 1 domain(s), including

This site was hosted on 1 network(s) including AS6130 (ADN).

I don't think the site honestly has bad intent, they just seem to not be very careful. So I'll go with that they were hacked. I tried to download some PDF from a different site (that probably linked to MosChip) and it tried to download an exe instead. I wonder how effective viruses are under WINE?

Versions posted

A download page is now up. Check it out at:

Friday, February 13, 2009

Initial posting

Welcome to the Moschip 7703 USB-Serial driver for Linux. Thanks to RCOS for supporting this!