LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices



Reply
 
Search this Thread
Old 03-27-2009, 05:18 PM   #1
mcfluffin
LQ Newbie
 
Registered: Mar 2009
Distribution: CentOS
Posts: 2

Rep: Reputation: 0
mos7703 serial driver


I am writing a device driver for the MosChip 7703 USB-serial converter. In short, I am looking for someone to do a rough look over the code and give suggestions. I am pretty new at this stuff and was hoping to get some first help somewhere before trying to post onto the Linux Kernel Mailing List. My primary references are Linux Device Drivers (3rd edition) and the kernel sources (for both API and examples).
The latest version as of this post can be found here:
http://mcfluffin.110mb.com/document/...0.2.1.1.tar.gz
Currently, it has the following issues:
-Locking is faulty. I does have tendency to freeze, so I am likely doing something fundamentally wrong somewhere. Should I even use semaphores? LDD recommends several different types of locks, I figured this was as good as the others to start with.
-The only program I've used to test with is screen (ie "screen /dev/ttyUSB0 9600")
-Tested with both MosChip and non-MosChip devices at the other end. Interestingly enough
-Known issue that formatting does not entirely match kernel standards, I'll fix this later as I eliminate the core issues. Its a lot closer than the original driver was anyway
-Some features such as high speed rates and ioctls are intentionally not implemented since the smaller feature set is unstable
-Should more or less work/compile between kernels 2.6.18 and 2.6.28, inclusive
-There isn't really installation support yet (ie make install)
Any help is really appreciated. Thanks!
 
Old 04-12-2009, 12:36 PM   #2
omega71122
Member
 
Registered: Mar 2005
Location: Central Ohio, USA
Distribution: Fedora 7 x86_64 (home server), IPCop (home gateway), CentOS (work laptop), lots more at work.
Posts: 32

Rep: Reputation: 15
I don't have any development experience, but I do have a couple USB to Serial dongles that use this chip (these) and I'd be happy to help test. I tried compiling and inserting your module on my laptop (Thinkpad R60 running CentOS 5.2 at the time), and the system completely locked up after running the script. No kernel panic, no nothing - it just stopped working.

That kernel was (if memory serves) 2.6.18-92.1.22.el5 on CentOS 5.2. I have since updated my kernel and the OS to 5.3 but haven't tried it again. When I get a chance I will try it again and post my results.
 
Old 04-12-2009, 10:24 PM   #3
omega71122
Member
 
Registered: Mar 2005
Location: Central Ohio, USA
Distribution: Fedora 7 x86_64 (home server), IPCop (home gateway), CentOS (work laptop), lots more at work.
Posts: 32

Rep: Reputation: 15
Just tried it again on the updated kernel - same type of crash and burn. I noticed the Caps Lock light blinking after the crash.

Code:
{blue:608:~} $ uname -a
Linux blue.mydomain 2.6.18-128.1.6.el5.centos.plus #1 SMP Thu Apr 2 12:53:36 EDT 2009 i686 i686 i386 GNU/Linux
{blue:609:~} $ cat /etc/redhat-release 
CentOS release 5.3 (Final)
{blue:610:~} $
If you want I will try to get you a kernel core dump file.
 
Old 04-20-2009, 12:03 PM   #4
mcfluffin
LQ Newbie
 
Registered: Mar 2009
Distribution: CentOS
Posts: 2

Original Poster
Rep: Reputation: 0
Hi,
Thanks for trying out the driver. I have implemented a new version using spinlocks that seems to be more stable. I am doing some more testing to make sure its at least reasonably stable. I haven't had it freeze yet with this new version, but I had it do a call trace, presumably from a double free. I think I know what the issue is on the double free and am testing out the fix. FYI, my primary development is in fact CentOS 5.2 and 5.3, so that should help with keeping initial testing a little narrower and hopefully help with at least some stability issues right now.
Thanks for the help!

Edit:
Seems to work nicely after I fixed the double free issue. If you want to try it out, I have a version here:
http://mcfluffin.110mb.com/document/...0.2.2.0.tar.gz
The biggest issue is that it drops some chars if you transmit too fast. I'm going to implement buffering, probably as done in pl2302 and hopefully that will fix the problem.

Last edited by mcfluffin; 04-21-2009 at 03:07 PM. Reason: Added link
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
working of the 8250 Serial Driver. ashlesha Linux - Software 0 11-14-2006 08:39 PM
serial mouse driver for 2.6 kernel ??? pingu_penguin Linux - Software 5 03-07-2005 09:04 AM
Driver for serial port vasanthraghavan Linux - Software 0 01-31-2005 04:52 PM
serial port driver? abhay7182 Linux - Software 1 08-26-2004 06:32 AM
serial driver Madhukar Linux - General 0 08-24-2004 08:05 AM


All times are GMT -5. The time now is 03:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration