Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Feb 2000 11:12:39 +0530
From:      Nanda Kumar <nanda@procsys.com>
To:        Mike Smith <msmith@freebsd.org>
Cc:        freebsd-scsi@FreeBSD.ORG
Subject:   Re: IOCTL support in SCSI block driver
Message-ID:  <38BB5C4F.7A9D@procsys.com>
References:  <200002281558.HAA07891@mass.cdrom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,


>Mike Smith wrote:
> 
> > 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.

Actaully we were planning to write the SCSI block driver for FreeBSD
version 3.4 (Now we are looking into 4.x after your suggestion) and i
was going through the source code of the SCSI block device drivers of
DPT,Qlogic and Adaptec. And i found that all of them are interfacing
with the CAM layer. So i thaught all the SCSI block device drivers
should interface with the CAM layer. Is this assumption true in FreeBSD
3.4 ?

If we can bypass CAM and write a SCSI block driver which results with a
lot of less code, then why someone has to write a driver which uses CAM
interface ?

> 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.
> 

I couldn't find these in FreeBSD 3.4 source code.

> 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.
> 

Will the drivers changes significantly from 3.4 to 4.x ? So far i was
seeing only the FreeBSD 3.4 drivers.

Regards,
Nandan

> --
> \\ 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?38BB5C4F.7A9D>