Re: Linux as a SCSI _Target_ device?

Gerard Roudier (groudier@club-internet.fr)
Fri, 13 Nov 1998 00:30:23 +0100 (MET)


On Wed, 11 Nov 1998, Tim Smith wrote:

> On Tue, 10 Nov 1998, Jeff Noxon wrote:
> > Can anyone tell me if it would be possible to make a Linux system appear
> > to another system as a SCSI target? I want to RAID 5 a whole mess of
> ...
> > I'm guessing it would be possible with one of the Symbios chips and some
> > clever hacking. True/False? Where to start?
>
> I've never looked at the Linux SCSI code, but I've had a lot of experience
> with the predecessors of the current Symbios chips (the 53C700, 710, and
> 720...the company I worked for did most of the SCSI software for NCR
> Microelectronics back then), and from a hardware point of view, your
> guess is accurate. It doesn't even take clever hacking, because SCSI
> target mode is actually *easier* than initiator mode. It is the target
> that control a SCSI transaction.

Agreed, and you have the advantage not to have to cope with complex
context saving since the target interrupts transfers at its convenience.

Indeed, there is no problem for implementing SCSI target mode with
NCR/SYMBIOS/LSI 53c[7-8]xx chips, but Linux does not provide kernel
interface for SCSI target mode.

> In fact, target mode is easy enough that I managed to get a SCSI RAM disk
> working entirely in the 53C7xx scripting language. I had to use a 256

> byte sector size, because the chip did not have powerfull enough
> arithmetic operators to convert a 512-byte-block count into a byte count,
> but aside from that oddity, it actually worked. (I could handle 256 byte
> blocks because the necessary shift by 8 to convert could be done with
> byte-aligned memory moves).

Seems you were using chips earlier that the 720. You have been courageous,
in my opinion, to implement that with these old chips, that had a very
poor instruction set. They were only designed to directly execute SCRIPTS
out of data structures, it seems.

Regards,
Gerard.

PS: Some other SCSI chips, aic7xxx for example also allow to implement
target mode.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/