Subject: Re: NetBSD-1.5S-5 on U30
To: None <eeh@netbsd.org>
From: Andrey Petrov <and@genesyslab.com>
List: port-sparc64
Date: 03/20/2001 17:08:50
On Wed, Mar 21, 2001 at 12:48:41AM -0000, eeh@netbsd.org wrote:
>
> I saw this before sbus streaming cache was fixed by adding
> BUS_DMA_COHERENT flags to bus_dmamap_load in hme.c.
> I think iommu.c changes from BUS_DMA_COHERENT to BUS_DMA_STREAMING
> broke the driver(s). The fix should be straightforward
> replacing those defines in all sbus-related drivers to new define.
> The patch for hme.c is below.
>
> Andrey
>
> Index: hme.c
> ===================================================================
> RCS file: /cvsroot/syssrc/sys/dev/ic/hme.c,v
> retrieving revision 1.20
> diff -c -r1.20 hme.c
> *** hme.c 2000/12/14 06:27:25 1.20
> --- hme.c 2001/03/21 00:27:56
> ***************
> *** 232,238 ****
> /* Load the buffer */
> if ((error = bus_dmamap_load(dmatag, sc->sc_dmamap,
> sc->sc_rb.rb_membase, size, NULL,
> ! BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) != 0) {
> printf("%s: DMA buffer map load error %d\n",
> sc->sc_dev.dv_xname, error);
> bus_dmamem_free(dmatag, &seg, rseg);
> --- 232,238 ----
> /* Load the buffer */
> if ((error = bus_dmamap_load(dmatag, sc->sc_dmamap,
> sc->sc_rb.rb_membase, size, NULL,
> ! BUS_DMA_NOWAIT|BUS_DMA_STREAMING)) != 0) {
> printf("%s: DMA buffer map load error %d\n",
> sc->sc_dev.dv_xname, error);
> bus_dmamem_free(dmatag, &seg, rseg);
>
> This is actually exactly the opposite of what you
> want. BUS_DMA_STREAMING == !BUS_DMA_COHERENT.
>
> Eduardo
>
oops, I should've upgraded to -current before I spoke, I'm still on 1.5R.
I'll test it shortly.
Andrey