: Our company is considering to port the device drivers for Dialogic
: voice/voice recognition boards to Linux. We will have the source
: code for the SCO version of the driver, the trouble is we don't
: really know much about device drivers under Unix. Is there any
: literature/howto document available for this purpose ? I mean
: something like "How to write a device driver under Linux", and how
: to create loadable modules.
I ported our (Westin Hotels & Resorts) version of the Dialogic VM driver
to Linux well over a year ago. Only corporate resistance kept them from
shipping running linux systems instead of SCO Xenix 386.
In general, writing the driver was an interesting but not difficult
challenge.
Some things to look out for:
splx and friends do not exist. But, the good news is, you don't need them.
I only had to wrap a very few mission critical lines of code inside the
cli and sti handlers.
Sleep and wakeup have TOTALLY different semantics. IN Unix, sleep takes
an address and a priority. In Linux, sleep_on and sleep_on_interruptible
take a wait queue pointer.
Memory mapping and friends are not needed. You don't have to physmap and
so forth, just point at the memory segment you want directly. Very nice,
and makes driver debugging very easy.
Another note:
If at all possible, design your driver as a loadable module from the
start. This really speeds development. I was able to finish the port in
about 10 working days, due to the fact that I did not have to recompile
the kernel and reboot between tests.
Took only two more days to port the entire voice mail system, IE the
mailbox handling code, the PBX interfaces the inband and outband
signalling, etc... About 65 Megabytes of source.
: This is an interesting project, if all goes well, we will be
: shipping unattended mission-critical voice processing machines
: running under Linux.
: As far as I know, this is the biggest commercial project ever
: done with Linux, and is going to change Linux' reputation in
: regard to commercial use considerably.
: "We trust it!"
So do we, :-) Just make sure you include some kind of remote reboot
capability or a watchdog timer. NOTHING runs perfectly. :-)
--
-----------------------------------------------------------------------------
Joe Portman - Alternate Access Inc. Affordable, Reliable Internet
For questions or support, call our voice line (206) 728-8595.
-----------------------------------------------------------------------------