How to write a device driver?

How to write a device driver?

Post by Jim Re » Sat, 06 Jun 1992 01:19:20



I'm trying to port a pseudo-device driver to aix 3.2.  So far, I've got
about a dozen lines of device driver code, and hundreds of lines of
"methods," and I'm going blind trying to learn about odm and friends from
the info exploder.  Is it really this hard?  What I could really use is some
good examples.  The examples I have include some method code, but what I
need is a step-by-step "here is how to install your driver."  Things like
where to put the methods once I've written them, which methods are really
necessary, shortcuts, etc.
 
 
 

How to write a device driver?

Post by Monica Lu » Sat, 06 Jun 1992 01:48:45


We have users who telnet from non-IBM machines (mostly VAX-VMS and
Ultrix machines) all using vt100 keyboards.  Consistently, ctrl-s,
ctrl-q, ctrl-c don't work properly inside EMACS and ctrl-c doesn't
work at the command line either.

We are using AIX 3.1 and would like to know what we need to do either
on the AIX side or the VAX side to get the correct emulation.  All
help/suggestions appreciated.

Apologies in advance if this question has previously been asked and
answered.

 
 
 

How to write a device driver?

Post by John Ger » Sun, 07 Jun 1992 08:14:57


I've had this sort of problem myself (although not personally on VAX ),
and it can usually be fixed by examining the 'stty' settings and/or
the 'telnet' defaults.  For example, the ctrl-s/ctrl-q problems result
because the terminal driver is using them for xon/xoff flow control.
If 'stty -a' shows "ixon", then try 'stty -ixon' BEFORE invoking 'telnet'.
As for ctrl-c, there are more ways for both 'stty' and 'telnet' to
interfere with it.

In any event, you should consult the documentation for 'stty' and
'telnet' on the client systems.

--

 
 
 

How to write a device driver?

Post by Rudy Chukr » Wed, 10 Jun 1992 08:27:30


|> I'm trying to port a pseudo-device driver to aix 3.2.  So far, I've got
|> about a dozen lines of device driver code, and hundreds of lines of
|> "methods," and I'm going blind trying to learn about odm and friends from
|> the info exploder.  Is it really this hard?  What I could really use is some
|> good examples.  The examples I have include some method code, but what I
|> need is a step-by-step "here is how to install your driver."  Things like
|> where to put the methods once I've written them, which methods are really
|> necessary, shortcuts, etc.
In my opinion, its quite hard if you are relying totally on Info.
Id recommend an IBM published manual, "Writing a Device Driver for AIX
Version 3.2"  order number GG24-3629.  12 pages are devoted to config methods,
22 pages to packaging (installp et. al.), 19 pp to ODM, and a diskette of
real source code that you dont have to type in , even.

Ask your IBM marketing suit on how to buy one.
--
*********************************************************************
Rudy Chukran            |       EMAIL:            
IBM AIX Porting Center  | RSCS: CHUKRAN at AUSTIN


Austin, Texas 78758     | Voice: 512-838-4674  Tieline: 678-4674
*********************************************************************

 
 
 

1. to write or not to write a BLASTED device driver

I have read the Solaris DDI/DDK manual cover to cover more than once,
and I am following the example source provided (pio.c to keep it
simple) win sun_device_drivers.tar.

I am at a point where my driver appears to be added but fails to attach.
Now the part that has me irked is - I CANT see any error messages I have
written out through "cmn_err()"

man syslog
man syslog.conf allowed me to reconfigure my /etc/syslog.conf as
follows:

*.alert;*.crit;*.emerg;*.err;*.warning          *
*.notice;*.debug                                *

Technically all error messages /notices should appear in any users
console - (not a problem since root is the only user on the spare
Ultra Sparc 5 development system I have set aside for this project).

ANy one know why I cant get any output - (dmesg - has nothing here
as well) from my driver routine calls to "cmn_err()"? I am pretty
certain that i am getting passed the probe() routine because if I
insert a statement that triggers a segmentation fault - the system
dumps core ... but this is no way to debug a driver ;)

Furthermore, what is exit code 11 - from below?

make install
cp bt878drv /usr/kernel/drv/sparcv9
add_drv -v -i "pci109e,878" bt878drv
exit status = 0
devfsadm: driver failed to attach: bt878drv
exit status = 11
Warning: Driver (bt878drv) successfully added to system but failed to attach
Driver (bt878drv) installed.

Thanks

2. De-referencing pointer to ...?

3. user space device driver can't write to isa device

4. looking for an example that uses pipes and exec

5. Writing control codes to device through a device driver

6. can you help me understand what's going on?

7. Device driver calling another device driver.

8. good software?-------true screen saver builder

9. Device driver question (generic device driver)

10. The Parallel port API- I need to write a device driver...!

11. Learning to write a device driver for SCSI...

12. How To Get Device-Driver-Writing Info for 3B2?

13. Writing Unix device drivers..