Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Feb 2000 20:00:56 -0500
From:      Sergey Babkin <babkin@bellatlantic.net>
To:        Olaf Hoyer <ohoyer@fbwi.fh-wilhelmshaven.de>
Cc:        Banu Ozden <ozden@research.bell-labs.com>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: scsi target mode
Message-ID:  <38ADEB48.F11A8B61@bellatlantic.net>
References:  <4.1.20000215005607.00c043c0@mail.rz.fh-wilhelmshaven.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38ADEB48.F11A8B61>