Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Feb 2000 07:58:23 -0800
From:      Mike Smith <msmith@freebsd.org>
To:        nanda@procsys.com
Cc:        freebsd-scsi@FreeBSD.ORG
Subject:   Re: IOCTL support in SCSI block driver 
Message-ID:  <200002281558.HAA07891@mass.cdrom.com>
In-Reply-To: Your message of "Mon, 28 Feb 2000 17:13:00 %2B0530." <38BA5F43.69C0@procsys.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200002281558.HAA07891>