From owner-freebsd-scsi Thu Sep 5 1:54:14 2002 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 7186937B400 for ; Thu, 5 Sep 2002 01:54:10 -0700 (PDT) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 1992043E72 for ; Thu, 5 Sep 2002 01:54:06 -0700 (PDT) (envelope-from nate@rootlabs.com) Received: (qmail 1468 invoked by uid 1000); 5 Sep 2002 08:54:08 -0000 Date: Thu, 5 Sep 2002 01:54:08 -0700 (PDT) From: Nate Lawson To: hackers@freebsd.org, scsi@freebsd.org Subject: New scsi_target code Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 I have rewritten the scsi_target driver and usermode client with a much simpler model suggested by Justin Gibbs. The kernel driver receives commands in the form of CCBs via write(2) and returns completed CCBs to usermode via read(2). The included sample client is much simpler as well, implementing only RBC (simple hard drive command set). What is this useful for? It allows anyone with an HBA to emulate various SCSI target devices for reverse engineering initiator implementations, debugging, host-host communication, and many other uses. Because it operates at the CAM layer, it should work with multiple transports (parallel SCSI, FC, ...) Currently, the code works to the point of passing camcontrol rescan and a few reads and writes with two Adaptec 2940U2Ws (ahc driver). However, there is an unknown bug where after a few commands (even just TUR), the target hangs after sending a CTIO and the initiator aborts the command. As such, the code is ALPHA QUALITY and may hang your system. For more information, see the included README and manpages. Comments are needed and appreciated. http://www.root.org/~nate/freebsd/ -Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message