From owner-freebsd-scsi@FreeBSD.ORG Tue Jun 3 14:33:57 2003 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CE0EF37B401 for ; Tue, 3 Jun 2003 14:33:57 -0700 (PDT) Received: from aramis.rutgers.edu (aramis.rutgers.edu [128.6.4.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1164043FA3 for ; Tue, 3 Jun 2003 14:33:57 -0700 (PDT) (envelope-from bohra@cs.rutgers.edu) Received: from cs.rutgers.edu (sirtaki.rutgers.edu [128.6.171.146]) by aramis.rutgers.edu (8.11.7+Sun/8.8.8) with ESMTP id h53LXtk29390; Tue, 3 Jun 2003 17:33:55 -0400 (EDT) Message-ID: <3EDD1302.6090102@cs.rutgers.edu> Date: Tue, 03 Jun 2003 17:28:34 -0400 From: Aniruddha Bohra User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Nate Lawson References: <3ED3CCFF.4080507@cs.rutgers.edu> <20030602235514.J22029@root.org> In-Reply-To: <20030602235514.J22029@root.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-scsi@FreeBSD.org Subject: Re: Emulating a SCSI device X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jun 2003 21:33:58 -0000 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