*BSD News Article 1627


Return to BSD News archive

Xref: sserve comp.unix.bsd:1660 comp.unix.internals:4860
Path: sserve!manuel!munnari.oz.au!mips!mips!sdd.hp.com!cs.utexas.edu!sun-barr!sh.wide!wnoc-tyo-news!soum.co.jp!jmasgw!green!rai!tetsuji
From: tetsuji@rai.juice.or.jp (Tetsuji Rai)
Newsgroups: comp.unix.bsd,comp.unix.internals
Subject: Writing a device driver for CDROM
Keywords: bsd devicedriver cdrom
Message-ID: <1992Jun20.152106.159@rai.juice.or.jp>
Date: 20 Jun 92 15:21:06 GMT
Organization: Rai's home in Tokyo
Lines: 23


  Hi, netters..

  I'm trying to write a device driver for a CDROM drive(Sony's 7211)
on BSD/386.    This unix comes with source files(as you should know), and 
I'm writing for AHA1542B which is supported by BSD/386.   
     My question is very fundamental; when the "match" routine and the 
"attach" routine should be called.    The scsi source files coming with 
BSD/386 are for hard disks and tape drives; ie non-removable devices, so 
"match" and "attach" routine(sdmatch and sdattach, internally) are called 
upon booting.    As for CDROM, the device is often changed, so I assume
sdattach should be called each time it is mounted.   When is it actually
on other systems ?

   Additionally, anyone has recommendation for books for those purposes ?

  Any help I can get is appreciated.  Thank you!

---
RRR              Tetsuji Rai    tetsuji@rai.juice.or.jp
R  R   aaa   i    5-12-21, Toyotamakita, Nerimaku, Tokyo 176, Japan
RRR   a  a   i   voice: +81-3-3557-3936   fax: +81-3-3993-0323
R  R  aaaaa  i