Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Jan 2004 09:20:02 -0800
From:      Chuck Tuffli <chuck_tuffli@agilent.com>
To:        Chhavi Kansal <chhavi_kansal@yahoo.com>
Cc:        freebsd-scsi@freebsd.org
Subject:   Re: scsi_target driver on FreeBSD 4.7
Message-ID:  <20040107172002.GD9945@cre85086tuf.rose.agilent.com>
In-Reply-To: <20040107161605.95908.qmail@web21501.mail.yahoo.com>
References:  <20040107161605.95908.qmail@web21501.mail.yahoo.com>

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

>     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
write().

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 ...
>  
> regards,
> Chhavi
>  
> 
> 
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
> _______________________________________________
> freebsd-scsi@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-scsi
> To unsubscribe, send any mail to "freebsd-scsi-unsubscribe@freebsd.org"

-- 
Chuck Tuffli    <chuck_tuffli AT NO_SPAM agilent DOT com>
Agilent Technologies, Storage Area Networking



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