Problem with Loadable device drivers on 4.1 and SCSA

"Mark_Safo.SBDERX" at xerox.com "Mark_Safo.SBDERX" at xerox.com
Sun Jul 15 01:34:02 AEST 1990


I'm writing a device driver for a SCSI Scanner and want to be able to load
it on to a running kernel using modload. My machine is a Sparcstation 1
running SunOS 4.1 and the dd uses routines from SCSA.  I've followed the
Device drivers manual example (pp93-95) very closely incorporating the
wrapper in to the code. [Incidentally, the manual doesn't mention that
vdldrv is different on Sun4c architectures (dev_ops replaces mb_ctlr,
mb_driver, mb_device, plus values for no. of controllers and devices).]

I attempt to load the driver with:

	modload ss.o -exec ss_load.sh

where ss_load.sh creates the device nodes specified by modload.  Loading
fails and the message "can't load this module: Invalid argument" is
displayed.

Now, using the trace command it seems that loading fails on the second
ioctl command to /dev/vd (the VDLOAD command) - it returns EINVAL (invalid
argument). The first ioctl call, VDGETVADDR, seems to be succesful. Prior
to that, ld seems to have done it's job properly in that all symbols have
been resolved and it generates the file "ss".

Can anyone shed any light on this problem? Is it complicated by the use of
SCSA?  This is just an outline of the problem. I will provide more detail
if required.

Thanks,

Mark Safo



More information about the Comp.sys.sun mailing list