Path: utzoo!attcan!uunet!zephyr.ens.tek.com!uw-beaver!rice!sun-spots-request From: "Mark_Safo.SBDERX"@xerox.com Newsgroups: comp.sys.sun Subject: Problem with Loadable device drivers on 4.1 and SCSA Keywords: SunOS Message-ID: <9948@brazos.Rice.edu> Date: 14 Jul 90 15:34:02 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 29 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 9, Issue 262, message 6 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