From owner-freebsd-scsi Mon Feb 21 22:53:20 2000 Delivered-To: freebsd-scsi@freebsd.org Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by hub.freebsd.org (Postfix) with ESMTP id 0475237B642 for ; Mon, 21 Feb 2000 22:53:18 -0800 (PST) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.9.3/8.9.1) id XAA16975; Mon, 21 Feb 2000 23:52:53 -0700 (MST) (envelope-from ken) Date: Mon, 21 Feb 2000 23:52:53 -0700 From: "Kenneth D. Merry" To: Nanda Kumar Cc: freebsd-scsi@FreeBSD.ORG Subject: Re: Help to write a SCSI block driver Message-ID: <20000221235253.A16855@panzer.kdm.org> References: <38B22C09.2B7A@procsys.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <38B22C09.2B7A@procsys.com>; from nanda@procsys.com on Tue, Feb 22, 2000 at 11:56:17AM +0530 Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Tue, Feb 22, 2000 at 11:56:17 +0530, Nanda Kumar wrote: > > I have to write a SCSI block device driver for one RAID controller we > have designed. Can anyone tell me how to go about it ? We have already > one Windows miniport driver working for the same card. Please tell me a > good sample driver to go through and if any document is available > regarding how to write a SCSI block device driver and how it interacts > with the system. I am quite new to the unix world. Well, the device model you use will really depend on what sort of interface your RAID controller presents. There are two basic categories that other RAID controllers fall into right now: - controllers that can function as a standard SCSI controller, as well as a RAID controller. (e.g. you could put a CDROM drive on the controller, and access it with standard SCSI commands) The DPT cards fall into this category. - controllers that function primarily as a RAID controller, and don't allow direct SCSI acess to devices on their busses. The AMI, Mylex, and Compaq SmartRAID controllers fall into this category. Controllers that fall into the first category would probably be best written as HBA drivers under the CAM SCSI layer. General documentation on CAM is located here: http://www.t10.org/drafts.htm#SWLAY Controllers that fall into the second category should probably written as block device drivers, like the AMI, Mylex, and Compaq drivers. The other RAID drivers are located in the following places in the FreeBSD source tree: DPT: src/sys/dev/dpt AMI: src/sys/dev/amr Mylex: src/sys/dev/mlx Compaq: src/sys/dev/ida If you want to look at plain SCSI card drivers, there are plenty to choose from as well. Here are a few samples: Adaptec AIC 7xxx chips: src/sys/dev/aic7xxx Advansys chips: src/sys/dev/advansys Symbios/LSI chips: src/sys/dev/sym Adaptec 154x-type boards: src/sys/dev/aha Ken -- Kenneth Merry ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message