From owner-freebsd-scsi@FreeBSD.ORG Wed Aug 6 07:18:38 2003 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5AE8A37B401 for ; Wed, 6 Aug 2003 07:18:38 -0700 (PDT) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id DAEB843F75 for ; Wed, 6 Aug 2003 07:18:37 -0700 (PDT) (envelope-from nate@rootlabs.com) Received: (qmail 73342 invoked by uid 1000); 6 Aug 2003 14:18:38 -0000 Date: Wed, 6 Aug 2003 07:18:38 -0700 (PDT) From: Nate Lawson To: Jingrong Xie In-Reply-To: Message-ID: <20030806071204.H73306@root.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-scsi@freebsd.org Subject: Re: AIC7899's 2 SCSI channels infect with each other in target mode? X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Aug 2003 14:18:38 -0000 On Fri, 1 Aug 2003, Jingrong Xie wrote: > I have two machine A and B, each with a 39160 card (aic7899 processor), > the Installatioin Guide of the card says, "The Adaptec SCSI Card 39160 has > two INDEPENDENT SCSI channels, ...". That is correct. > I use Nate's scsi_target on A, and my test_write_scsi.c on B to write to > Emulated Disk uninterruptedly, it works perfectly. > Also using scsi_target on B and test_write_scsi.c on A works perfectly. > But when I use the two at the same time, kernel code of scsi_target crash > like this: > > Fatal trap 12: page fault wihle in kernel mode > ...... > Stopped at targdone + 0x84: movl %eax, 0x20(%edx) > > <<<<<<<>>>>>>> > ahc1: Bus Device Reset on Ahc0(0:5:1) SCBS aborted. You shouldn't be able to do this since ahc(4) does not support simultaneous target/initiator mode. When you have two instances running and then attempt to scan the other, the ahc driver should not allow this. Still, this does appear to be a problem in targ(4) and I'll look into it. I'm very busy so it may take me a while to get my target testing rig up again. > A# scsi_target 0:5:0 > B# camcontrol rescan 0 > B# ./test_write_scsi > > B# scsi_target 1:5:0 > A# camcontrol rescan 1 > A# ./test-write_scsi I'd like to see your code for "test-write_scsi". This seems to show that you run them sequentially, not concurrently. -Nate