From owner-freebsd-scsi Wed Jul 4 10:59:27 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from beppo.feral.com (beppo.feral.com [192.67.166.79]) by hub.freebsd.org (Postfix) with ESMTP id AF5B237B409 for ; Wed, 4 Jul 2001 10:59:24 -0700 (PDT) (envelope-from mjacob@feral.com) Received: from beppo (mjacob@beppo [192.67.166.79]) by beppo.feral.com (8.11.3/8.11.3) with ESMTP id f64HxMS12578; Wed, 4 Jul 2001 10:59:22 -0700 (PDT) (envelope-from mjacob@feral.com) Date: Wed, 4 Jul 2001 10:59:22 -0700 (PDT) From: Matthew Jacob X-Sender: mjacob@beppo Reply-To: mjacob@feral.com To: Ben Cc: scsi@freebsd.org Subject: target mode usage quick primer In-Reply-To: <200107041708.KAA31613@geocrawler.com> 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 On Wed, 4 Jul 2001, Ben wrote: > This message was sent from Geocrawler.com by "Ben" > > > Dear Matthew, > I have connected two PCs running FreeBSD 4.3 > each with an adaptec 39160 adapter.These two > apaters are connected through a SCSI cable. One > of the SCSI ID is set to 6,the other is set to 7. > I am trying to make one machine running under > target mode. What I did is to change > AHC_TMODE_ENABLE to 1 and rebuild the > kernel.After I reboot these two systems,nothing > is new. Could you point out how I shold test the > target mode?Thank you very much. > Ben You need the drivers device scsi_target device scsi_targ_bh in your kernel as well as enabling target mode support in either the Adaptec driver or the the QLogic driver. Note that while the QLogic driver supports simultaneous initiator/target mode operation, the last I checked, the Adaptec doesn't, so for your h/w, you have to have the initiator side *not* have AHC_TMODE_ENABLE on. You might probably want to put device pt in the initiator side. Once you boot the target mode side, you'll eee wildcard enabling via the targbh driver so that commands to non-existent luns have somebody to actually respond. Then go off and compile /usr/share/examples/scsi_target/scsi_target.c and enable a lun for real. Then boot the initiator side or camcontrol rescan the initiator side. -matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message