Subject: Re: Specifying targets on other esp controllers
To: Peter Galbavy <peter@wonderland.org>
From: Chris Torek <torek@BSDI.COM>
List: port-sparc
Date: 03/07/1994 15:55:23
>esp1 at sbus0 slot 2 offset 0x200000 pri 3: ESP100A, clock = 25 MHz, ID = 7
>target 5 on esp1 not configured

>My question is, how do I configure devices (disk) on extra controllers.

You must configure a target that can be found on esp1.

>I currently have the same as TDR2:

>tg0     at scsi? target 3
>sd0     at tg0 drive 0
>tg1     at scsi? target 1
>sd1     at tg1 drive 0

This says that two targets---targets are separate
pieces of hardware that, on most SCSI drives these days, are inside
the same box as the drive, but they are still logically a separate piece
of hardware and hence get a separate device driver---can be found
on any device that presents a scsi interface (the two `scsi?'s).

>Now, I think I do:

>tg4	at scsi1 target 2
>sd4	at tg4 drive 0

>Seem to make sense... ? But I get "scsi1" undeclared.

If you want target 2 on esp1 (and no other target on any other esp
chip) to match `tg4', say

	tg4 at esp1 target 2

If you want tg4 to match at any esp anywhere, just say

	tg4 at esp? target ?

But there is a better way, if the netbsd kernel handles it: just say

	tg* at esp? target ?

and whatever your highest specific tg (above, tg1), other targets will
cause a new tg2, tg3, etc., to spring into being and match at any esp
on any target number.  (The non-star matches will happen first, so that
`tg0 at scsi? target 3' will happen before tg2 suddenly springs into
being.)

You will then need to put at least one sd in to match against the
new target.

Note that there is no requirement that tg4 have sd4.  If you have
a really old scsi target board, it will have wires coming out of
it for use with up to eight drives.  You can then have `sd0 at tg0'
and `sd1 at tg0' and ... and `sd7 at tg0'; the next combination
would then be `sd8 at tg1'.  Of course, no one has such boards, or
if they do, the boards are nonfunctional anyway.  Still, this is what
the tg's are all about.

Chris

------------------------------------------------------------------------------