Emulating a SCSI device
Aniruddha Bohra
bohra at cs.rutgers.edu
Tue Jun 3 14:33:58 PDT 2003
Nate Lawson wrote:
>On Tue, 27 May 2003, Aniruddha Bohra wrote:
>
>
>> I am trying to write a SIM module for FreeBSD which basically
>>emulates a SCSI controller with a disk attached at target 0 lun 0.
>>
>>
>
>What is your hardware? Are you using sys/cam/scsi/scsi_target and
>src/share/examples/scsi_target?
>
>
There is a LSI logic(mpt) SCSI controller in the system. However that is
immaterial as
I am trying to get a large memory buffer to act as a disk.
I would emulate a SCSI controller, so will handle the low level SCSI
commands myself by accessing the
memory.
I will look at the above.
>> I go as far as the action function of the controller getting called
>>with a XPT_PATH_INQ - where I fill in the fake data.
>>
>> Nothing happens after that. I have looked for documentation
>>of how to get the psuedo disk attached to the da driver but did
>>not make much headway.
>>
>>
>
>You have to call xpt_done() on the CCB to send it back to the caller.
>
>
I do that - Is there something special that I need to write in the ccb
header so that the caller
identifies the "device" as a disk ?
Thanks for the response.
Aniruddha
More information about the freebsd-scsi
mailing list