Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rochester!cornell!batcomputer!hurf From: hurf@batcomputer.tn.cornell.edu (Hurf Sheldon) Newsgroups: comp.unix.wizards Subject: Re: Device driver for DRV11WA Message-ID: <1909@batcomputer.tn.cornell.edu> Date: Tue, 23-Dec-86 15:55:18 EST Article-I.D.: batcompu.1909 Posted: Tue Dec 23 15:55:18 1986 Date-Received: Wed, 24-Dec-86 05:37:18 EST References: <3456@curly.ucla-cs.UCLA.EDU> <500@rayssd.RAY.COM> Reply-To: hurf@batcomputer.UUCP (Hurf Sheldon) Distribution: world Organization: Theory Center, Cornell University, Ithaca NY Lines: 117 In article <500@rayssd.RAY.COM> dhb@rayssd.RAY.COM (David H. Brierley) writes: >In article <3456@curly.ucla-cs.UCLA.EDU> tso@CS.UCLA.EDU (Kam Sing Tso) writes: >>We need a device driver for DRV11WA working on >>BSD4.2/3 running on a MicroVAX II. I will >>appreciate any pointers to one. Thanks in >>advance. >> >>Kam S. Tso, (818) 354-4847 > >This question comes up every month or so and I usually send the poster a >nice little mail message but I thought I would post the message to the >net this time in the hopes of maybe helping more people in one fell swoop. > >1. There is no such thing as a generic DR11W/DR11B/DRV11WA/etc driver > under UNIX. The major problem is that the DR11 is not really a *real* > device but is just an interface to a user supplied device. Each i/o > operation is pretty much that, a generic i/o operation. The command > that is passed to the DR11 does not really mean anything to the DR11, > it means something to the user supplied device. The only way you > could do a generic driver under UNIX is to force the user to preceed > each read/write with an ioctl call to specify what the function bits > should be set to. This would be useful, however, as a generic starting point into the minefield of device drivers in general & dr[v]11's specifically. Besides - what would be the real performance difference if the register setups were done in user software & used ioctl to pass them? The drv11 is well documented so a driver that would allow you to just set CSR value or just say dmatransfer(some value) would be of great value (to me at least). > >2. Point 1 should not be taken to mean that the situation is hopeless. > There are drivers available for the DR11 that can be customized for > your specific situation. What you need to do is to define exactly > what type of device you are connecting, including some info on how the > device functions, and also define what type of functionality you need > from the driver. Given this information, the people that have DR11 > drivers can see if their particular driver can be easily adapted to > your situation. Some examples of the types of descriptions you should > be giving are as follows: > My try: I need a driver for a drv11 on a uVaxII/Ultrix1.2 for a Hammamatsu Digitizing camera. I have to pass valus in & get values out in DMA mode, set & read CSR values prior to data transfer & interface as kindly as possible with user software > >3. One other thing you are going to run into is that sometimes the companies that > develop these drivers are either not willing or not allowed (due to contractual > agreements) to distribute them. I called Hammamatsu - they told ME to call THEM when I got a driver working under unix! > For example, I have working version of examples > "a" and "b" above but am only allowed to give out copies of "a". The reason for > this is that "a" is a modified version of a driver that was originally sent out > as part of 4.2BSD (even though it didn't work) but "b" was developed in-house > using funding from a military contract. Therefore, "a" can be sent out because > it was originally, and still is, public domain (kinda sorta) but "b" is owned by > the Navy and the only way you can get it is to have the Navy tell me to give it > to you. Who in the Navy? (We are an ONR associate lab) > >4. As a final course of action, you should post a message asking if anyone is willing > to give you advice on how to write a driver for a DR11. If you don't have any > experience writing drivers ..... I am getting it the hard way right now. I am having a problem getting the data transferred from my software to the board. I have been using a write() but does the kernal map to the uio & buf structs? If so how do I read them in the driver? (The drv11 should be loaded with the address of the data, not the data & I can't get a handle on how to handle the transfer) Why is this such a black art & are there any really useful texts or workshops? > >I hope this has been of use to at least a few of you. It has and it is appreciated. I mailed the comments below but they bounced Hence the commented response > >-- >David H. Brierley >Raytheon Submarine Signal Division; Portsmouth RI; (401)-847-8000 x4073 >smart mailer or arpanet: dhb@rayssd.ray.com >old dumb mailer or uucp: {cbosgd,gatech,ihnp4,linus!raybed2} !rayssd!dhb What is rayssd's numerical address? I read your note with interest. We have a Hammamatsu camera on a drv11 that was originally on an 11/23(Minc 11). A DEC friend sent me a unibus dr11 driver to hack on but I am having some problems getting the DMA registers read correctly. I have just learned there is an undocumented timing restriction in some early drv11's that would preclude them running on a microvax so I am about to spring for a new drv11-WA. However, I would appreciate a copy of your driver to compare with what I have & hopefully learn from [it]. thanks, hurf Hurf Sheldon Arpa.css: hurf@ionvax.tn.cornell.edu Lab of Plasma Studies 369 Upson Hall phone: 607 255 7267 Cornell University Ithaca, N.Y. 14853 Cc: Bcc: