From owner-freebsd-scsi Fri Sep 28 11: 8:56 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from joy.pdl.cmu.edu (JOY.PDL.CMU.EDU [128.2.134.110]) by hub.freebsd.org (Postfix) with ESMTP id 26C2037B40C for ; Fri, 28 Sep 2001 11:08:45 -0700 (PDT) Received: (from bucy@localhost) by joy.pdl.cmu.edu (8.11.4/8.11.4) id f8SI8fU06165 for freebsd-scsi@freebsd.org; Fri, 28 Sep 2001 14:08:41 -0400 Date: Fri, 28 Sep 2001 14:08:41 -0400 From: "John S. Bucy" To: freebsd-scsi@freebsd.org Subject: more target mode hacking... Message-ID: <20010928140840.G261@joy.pdl.cmu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org So I've hacked scsi_target.c to return all scsi commands to the userland process as atios .. but I'm having trouble making the userland process do anything useful, e.g. respond to an INQUIRY. Questions: 1. Do you need to TARGIOCSETISTATE before responding to any command or just commands which resulted in error? 2. How are read() and write() on the target device involved in bus transfers? To respond do the INQUIRY, do I cam_fill_ctio() to set up the ccb containing the struct scsi_inquiry_data and then TARGIOCCOMMAND to pass it back to the initiator? Or do I somehow write() the scsi_inquiry_data struct on the target device? thanks john To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message