From owner-freebsd-scsi Tue Apr 21 04:44:19 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA21364 for freebsd-scsi-outgoing; Tue, 21 Apr 1998 04:44:19 -0700 (PDT) (envelope-from owner-freebsd-scsi@FreeBSD.ORG) Received: from spinner.netplex.com.au (spinner.netplex.com.au [202.12.86.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA21239; Tue, 21 Apr 1998 11:43:47 GMT (envelope-from peter@netplex.com.au) Received: from spinner.netplex.com.au (localhost [127.0.0.1]) by spinner.netplex.com.au (8.8.8/8.8.8/Spinner) with ESMTP id TAA19500; Tue, 21 Apr 1998 19:42:31 +0800 (WST) (envelope-from peter@spinner.netplex.com.au) Message-Id: <199804211142.TAA19500@spinner.netplex.com.au> X-Mailer: exmh version 2.0.2 2/24/98 To: "Justin T. Gibbs" cc: gibbs@FreeBSD.ORG, scsi@FreeBSD.ORG Subject: Re: ahh, I think I see part of the problem.. (CAM bouncing) In-reply-to: Your message of "Tue, 21 Apr 1998 00:20:39 CST." <199804210624.AAA03372@pluto.plutotech.com> Date: Tue, 21 Apr 1998 19:42:30 +0800 From: Peter Wemm Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org "Justin T. Gibbs" wrote: > >I tried the previous patch that you posted but had a pretty spectacular > >explosion on a BT545S.. It "found" devices all the way up to da11 (at > >target 2 lun 5) and failed to mount root. The probes were reporting > >garbage.. Hmm.. Are all the allocations being zeroed? > > I don't think that is the problem. It is more likely caused by using > the wrong dmat on line 261 of bt_isa.c: > > if (bus_dmamem_alloc(bt->sense_dmat, <= Used to be mailbox_dm at > > This would allocate the incorrect amount of sense bounce space causing > untold trouble. Just to be sure, I tried this diff and it still fails with the broken probes. --- bt_isa.c.save Tue Apr 21 00:59:42 1998 +++ bt_isa.c Tue Apr 21 15:15:23 1998 @@ -268,7 +268,7 @@ bt->init_level++; /* And permanently map them */ - bus_dmamap_load(bt->sense_dmat, bt->sense_dmamap, + bus_dmamap_load(bt->mailbox_dmat, bt->sense_dmamap, bt->sense_buffers, bt->max_ccbs * sizeof(*bt->sense_buffers), btmapsensebuffers, bt, /*flags*/0); In this particular case I've been using the 545S since it panics on startup rather than after the system is 95% of the way through booting. After the bad probe, it finally fails with things like: sd0: invalid partition table (or is that invalid partition magic?) error 22: panic: cannot mount root (2) If I do a trace at that point, the nesting is so deep that it scrolls well off the screen so I can't see the more interesting top few stack frames. Do you have a nutshell summary of what all the bus dma calls do so that I have a better chance of finding more useful hints as to what's wrong? Also, what is the function of this variable? static bus_addr_t bounce_lowaddr = BUS_SPACE_MAXADDR; It's set to 0xffffffff. (2^32-1) but appears to be used in a role that I'd almost expect that it was meant to be 0x00ffffff.. On the other hand, it almost looks stale too since contigmalloc always gives a good page. Cheers, -Peter -- Peter Wemm Netplex Consulting To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message