Subject: Re: LSI Logic 53c1030 / mpt(4) - dma error message
To: Jachym Holecek <freza@liberouter.org>
From: Nicolas Joly <njoly@pasteur.fr>
List: current-users
Date: 02/04/2005 20:31:41
On Fri, Feb 04, 2005 at 07:43:51PM +0100, Jachym Holecek wrote:
> > > Like this:
> > > 
> > > 	printf("datalen %d mapsize %llu first page at %llx\n",
> > > 	    xs->datalen, (unsigned long long)req->dmap->dm_mapsize,
> > > 	    vtophys(xs->data));
> > > 
> > > ..and see what that says? If the datalen is <= the mapsize, then there
> > > might be something wrong with the bounce code. Also, the first physical
> > > address of the data might tell us if it is a problem with the bounce
> > > code or not.
> > 
> > Here are the first 2 values :
> > 
> > datalen 393456128 mapsize 0
> > mpt1: error 22 loading DMA map
> > sd0(mpt1:0:1:0): generic HBA error
> > findroot: unable to read block 4294967296
> > 
> > For the first page adress, i'm getting a warning i 'm unable to fix :-(
> 
> The error seems to be coming from SCISIPI layer or above (ie. the mpt(4)
> driver is probably not the culprit) -- kernel with:
> 
> 	options SCSIPI_DEBUG
> 
> could give more info. Unfortunately, I don't have an mpt device to try
> myself... Additionally, if you have another NetBSD machine to play with,
> the following patch should help you track who is enqueing the oversized
> transfer (in sys/dev/scsipi/):
> 
> --- scsipi_base.c       7 Dec 2004 23:14:03 -0000       1.123
> +++ scsipi_base.c       4 Feb 2005 18:25:05 -0000
> @@ -1720,6 +1720,9 @@
>  
> 	s = splbio();
> 	  
> +	if (xs->datalen > MAXPHYS)
> +		panic("scsipi: suspicious xfer length");
> +
> 	/*
> 	 * If the xfer is to be polled, and there are already jobs on
> 	 * the queue, we can't proceed.
> 
> If you are going to try this, make sure you are running a kernel with ddb
> enabled and when the panic gets hit, please copy the backtrace ("db> bt")
> and send it here (ok, it clearly falls off in findroot(), but seeing the
> intermediate calls might be of use).

Just got the panic during boot process, with 2 SCSIPI debug lines ...

scsibus0: waiting 2 seconds for devices to settle...
scsibus1: waiting 2 seconds for devices to settle...
atapibus0 at atabus0: 2 targets
scsipi_inqmatch: 2/5/1 <, , >
cd0 at atapibus0 drive 0: <DV-28E-B, , 1.2B> cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
cd0(viaide0:0:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA)
scsipi_inqmatch: 2/0/0 <, , >
sd0 at scsibus1 target 1 lun 0: <HITACHI, HUS103073FL3800, SA14> disk fixed
sd0: 70007 MB, 65494 cyl, 3 head, 729 sec, 512 bytes/sect x 143374805 sectors
sd0: sync (6.25ns offset 80), 16-bit (320.000MB/s) transfers, tagged queueing
ses0 at scsibus1 target 9 lun 0: <SDR, GEM318P, 1> processor fixed
ses0: SAF-TE Compliant Device
ses0: async, 8-bit transfers
panic: scsipi: suspicious xfer length

Stopped in pid 0.1 (swapper) at netbsd:cpu_Debugger+0x5:
db{0}> bt
cpu_Debugger() at netbsd:cpu_Debugger+0x5
panic() at netbsd:panic+0x1c8
scsipi_enqueue() at netbsd:scsipi_enqueue+0x1b6
scsipi_execute_xs() at netbsd:scsipi_execute_xs+0x14e
sdstart() at netbsd:sdstart+0x27a
sdstrategy() at netbsd:sdstrategy+0x1b8
spec_strategy() at netbsd:spec_strategy+0x21c
VOP_STRATEGY() at netbsd:VOP_STRATEGY+0x2a
bio_doread() at netbsd:bio_doread+0x85
bread() at netbsd:bread+0x17
spec_read() at netbsd:spec_read+0x19e
VOP_READ() at netbsd:VOP_READ+0x31
vn_rdwr() at netbsd:vn_rdwr+0xce
match_bootwedge() at netbsd:match_bootwedge+0x158
findroot() at netbsd:findroot+0x193
cpu_rootconf() at netbsd:cpu_rootconf+0x9
main() at netbsd:main+0x452

-- 
Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.