From owner-freebsd-hackers Fri Feb 18 16:53:41 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp02.teb1.iconnet.net (smtp02.teb1.iconnet.net [209.3.218.43]) by hub.freebsd.org (Postfix) with ESMTP id 8584037BB22 for ; Fri, 18 Feb 2000 16:53:35 -0800 (PST) (envelope-from babkin@bellatlantic.net) Received: from bellatlantic.net (client-117-231.bellatlantic.net [151.198.117.231]) by smtp02.teb1.iconnet.net (8.9.1/8.9.1) with ESMTP id TAA27390; Fri, 18 Feb 2000 19:53:09 -0500 (EST) Message-ID: <38ADEB48.F11A8B61@bellatlantic.net> Date: Fri, 18 Feb 2000 20:00:56 -0500 From: Sergey Babkin X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 4.0-19990626-CURRENT i386) X-Accept-Language: ru, en MIME-Version: 1.0 To: Olaf Hoyer Cc: Banu Ozden , freebsd-hackers@FreeBSD.ORG Subject: Re: scsi target mode References: <4.1.20000215005607.00c043c0@mail.rz.fh-wilhelmshaven.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Olaf Hoyer wrote: > > >a. settings on the controller card (e.g. scsi id, termination) > >b. freebsd configuration on the initiator and target PCs. > > (e.g. do we use scsi_pt.c, scsi_target.c, etc). > > > >here's a diagram depicting what we want to do. we're trying to setup > >a PC (PC2 below) with an adaptec controller to act as an emulated disk. > >PC 1 will access the disks on PC 2. > > > > ______________ ______________________________ > >| PC1 | scsi cable | PC2 scsi bus | > >| adaptec 2940 | ================= | adaptec 2940 ======== disk | > >| SCSI ID=7 | | SCSI ID=0 SCSI ID=5 | > >|______________| |______________________________| > > > Hi! > > Well, I'd rather try (for simplification) following combo: > > I won't connect the two 2940 directly. What's the problem ? The only trick is to get termination right: enable it at the ends of the bus and disable it in the middle. Otherwise there is nothing special and I use configurations like this (mupti-path I/O and clusters) routinely at work. Also independently of the location of the cards on the bus you may have to disable the Adaptec BIOS to get the machines booted. But getting the Adaptec working as a target device may be quite tough if possible at all because it's firmware mey not be able of that. The card of choice for target applications is Symbios 8xx. Symbios even provides an example of a simple disk simulator for DOS in theis driver developer's kit. The next obstacle is that AFAIK scsi_target.c is not implementation of a target device. It is a pass-through interface for the host to pas sthe commands to any otherwise un-identified SCSI device. Some time ago I've written the target mode code for the Symbios cards, including a simple disk emulator (to the degree that it looked like a disk but did not store anything written to it) and a SCSI extender through FastEthernet. This was my little private enterprise but now as its commercial value is zero I feel ready to give the code. But the last version to which I ported it was early '98 3.0-current, so it would need considerable efforts to be ported to the current -current. And the software is not of production but of more prototype level of quality: it generally works but if errors or unexpected conditions happen they are not handled well. Actually, I'm even willing to port it, clean up and provide a generic target mode API if the FreeBSD core team would agree to commit it to the system. -SB To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message