From owner-freebsd-scsi Mon Feb 28 7:58:46 2000 Delivered-To: freebsd-scsi@freebsd.org Received: from mass.cdrom.com (castles529.castles.com [208.214.165.93]) by hub.freebsd.org (Postfix) with ESMTP id 36D4D37B8AA for ; Mon, 28 Feb 2000 07:58:41 -0800 (PST) (envelope-from msmith@mass.cdrom.com) Received: from mass.cdrom.com (localhost [127.0.0.1]) by mass.cdrom.com (8.9.3/8.9.3) with ESMTP id HAA07891; Mon, 28 Feb 2000 07:58:23 -0800 (PST) (envelope-from msmith@mass.cdrom.com) Message-Id: <200002281558.HAA07891@mass.cdrom.com> X-Mailer: exmh version 2.1.1 10/15/1999 To: nanda@procsys.com Cc: freebsd-scsi@FreeBSD.ORG Subject: Re: IOCTL support in SCSI block driver In-reply-to: Your message of "Mon, 28 Feb 2000 17:13:00 +0530." <38BA5F43.69C0@procsys.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 28 Feb 2000 07:58:23 -0800 From: Mike Smith Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > Hi, > > I had obtained some clarifications from you regarding writing a SCSI > block driver. I have a few more questions ? > > 1). I want the SCSI block driver to support IOCTL's passed to that. > Basically this is used to communicate with the firmware and get some > statistics and also use some facilities like upgrading of firmware etc. > > 2). Is there anyway to write the SCSI block driver bypassing the CAM > layer ? We are planning to write the device driver in 3.4 FreeBSD which > is the stable version now. From these two questions, it's quite clear that your device should not be using CAM for I/O. Please take a few moments to look at how the Compaq Smart Array, AMI MegaRAID and Mylex DAC960 drivers work; you'll discover that you can achieve your goal with a lot less code and effort that way. To answer 1), look at the Mylex driver (sys/dev/mlx), which has a control device (/dev/mlx) which handles per-controller ioctls as well as handling per-device ioctls on the /dev/mlxd nodes. For 2), you should _definitely_ write for 4.x and backport. Writing for 3.x leaves you with a driver with no future, wheras developing for 4.x means that you're already up to date with the current (soon to be stable) release, and you won't have to bring your driver forwards at a later date. -- \\ Give a man a fish, and you feed him for a day. \\ Mike Smith \\ Tell him he should learn how to fish himself, \\ msmith@freebsd.org \\ and he'll hate you for a lifetime. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message