[comp.sys.sun] Problem with Loadable device drivers on 4.1 and SCSA

"Mark_Safo.SBDERX"@xerox.com (07/14/90)

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

jeffz@sun.com (Jeffrey Zank - SBus Software) (07/23/90)

> 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.

Thats because SCSI drivers are currently not modloadable.  There is no
support for it in the code.  That does not mean its not possible to
implement.

-jeffz-

"Mark_Safo.SBDERX"@xerox.com (08/13/90)

Although I had very little response to my question concerning modloading
device drivers using Sun's Common SCSI Architecture I have been told by my
the technical experts at Sun (after a few weeks dialogue with them) that
IT'S NOT POSSIBLE!!!. None of the documentation states this but I think
that this is an extremely vital piece of information to omit from the
documentation. I wasted a hell of a lot of time on something that turned
out to be impossible.

Yours, annoyed,
  Mark