Subject: Re: Announce: DEC AlphaServer 8400 is coming
To: Jason Thorpe <thorpej@shagadelic.org>
From: Michael L. Hitch <mhitch@lightning.msu.montana.edu>
List: port-alpha
Date: 07/28/2005 22:13:48
On Thu, 28 Jul 2005, Jason Thorpe wrote:

>
> On Jul 27, 2005, at 10:11 PM, Michael L. Hitch wrote:
>
> >   Aha - I see what happened, but not why yet.  The sgmap_load
> > checks the
> > flags passed as an argument for BUS_DMA_READ being zero, an the
> > sgmap_unload checks the flags in map->_dm_flags.  The problem
> > occurs when
> > BUS_DMA_READ is cleared in the passed argument, but is set in
> > map->_dm_flags.  I don't know why that is yet.
>
> Ok, here is an actual patch to try.
>
> If this works for you, will you please check it in?  I am going to be
> away from my source tree machine until Sunday night starting in about
> 2 hours.

Nope:

Kernelized RAIDframe activated
scsibus0: waiting 2 seconds for devices to settle...
scsibus1: waiting 2 seconds for devices to settle...
stray isa irq 14
atapibus0 at atabus0: 2 targets
scsibus2: waiting 2 seconds for devices to settle...
cd0 at atapibus0 drive 0: <HL-DT-ST CD-ROM GCR-8480B, , 2.11> cdrom
removable
scsibus3: waiting 2 seconds for devices to settle...
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 1
cd0(aceride0:0:0): using PIO mode 4, Ultra-DMA mode 1 (using DMA)
panic: kernel diagnostic assertion "(map->_dm_flags &
(BUS_DMA_READ|BUS_DMA_WRITE)) == 0" failed: file
"/usr/NetBSD-current/src/sys/arch/alpha/common/bus_dma.c", line 246
Stopped in pid 3.1 (mlxtask) at netbsd:cpu_Debugger+0x4:        ret
zero,(ra
)
db{0}> t
cpu_Debugger() at netbsd:cpu_Debugger+0x4
panic() at netbsd:panic+0x208
__assert() at netbsd:__assert+0x3c
_bus_dmamap_load_direct() at netbsd:_bus_dmamap_load_direct+0x14c
mlx_ccb_map() at netbsd:mlx_ccb_map+0x64
mlx_enquire() at netbsd:mlx_enquire+0xb4
mlx_periodic() at netbsd:mlx_periodic+0x204
mlx_periodic_thread() at netbsd:mlx_periodic_thread+0xd4
exception_return() at netbsd:exception_return
--- root of call graph ---

I wonder if the mlx driver is not doing a bus_dmamap_unload somewhere,
and leaving the flags set?

--
Michael L. Hitch			mhitch@montana.edu
Computer Consultant
Information Technology Center
Montana State University	Bozeman, MT	USA