scsi_target driver on FreeBSD 4.7
chuck_tuffli at agilent.com
Wed Jan 7 09:26:02 PST 2004
On Wed, Jan 07, 2004 at 08:16:05AM -0800, Chhavi Kansal wrote:
> Hi all,
> I want to write a scsi target driver to send some vendor
> specific commands to the scsi disk. For that I have modified the
Uh, who is sending the commands? Is the initiator sending a vendor
specific command that the target driver passes along to the disk? Or,
is the CAM/SIM driver receiving a command and translating it into a
vendor specific command? Can you describe your setup a little bit
> scsi_target.c. But it doesn't seems to be loading properly. I've
> given printf's to all the functions. But it doesn't printing the
> printf for init() function itself.
Which HBA are you using (QLogic, ...)? Is the backing store the SCSI
Disk Emulator (share/examples/scsi_target) or something else?
> Do you have any idea, if I need to add anything in the existing
> scsi_target.c available in sys/cam/scsi dir.
> How can we register a scsi driver module to the cam interface.
It looks very similar to the initiator case that is documented (i.e.
xpt_bus_register()). One difference is that the driver needs to set
the target_sprt variable in the ccb->cpi structure. See the isp(4)
driver for an example.
> Is there any document where I can look to the flow of the driver calls. ?
Use the code ;)
I'm not 100% sure on this, but my understanding is that the disk
emulator tells the CAM target driver how many IO's it can handle by
allocating and sending ccb_accept_tio structures to the driver via
Once the SIM driver receives a CDB, it copies the CDB info to one of
the ATIO structures and completes the command with xpt_done().
> Any pointer would be of great help ...
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
> freebsd-scsi at freebsd.org mailing list
> To unsubscribe, send any mail to "freebsd-scsi-unsubscribe at freebsd.org"
Chuck Tuffli <chuck_tuffli AT NO_SPAM agilent DOT com>
Agilent Technologies, Storage Area Networking
More information about the freebsd-scsi