NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/42662: iop driver makes kernel crash or freeze



Manuel Bouyer <bouyer%antioche.eu.org@localhost> writes:

> On Sat, Jan 30, 2010 at 06:42:37PM +0300, Aleksej Saushev wrote:
>> I applied it to the current instead, it crashes with the same diagnostic
>> message and similar backtrace, only it seems to do it a bit later.
>> I can try to replace as many instances of the pattern as needed,
>> can you recommend how many of them? All in that subroutine?
>
> All of them, mixing PRE and POST in bus_dma(9) is not allowed.
> I also found one mistake where a PRE should have been a POST.
> Please try the attached patch (still against netbsd-5).

The following fixes the problem for me, I can boot installation CD and
have access to disk storage (am able to read disklabel).

--- sys/dev/i2o/iop.c   21 Oct 2009 21:12:05 -0000      1.77
+++ sys/dev/i2o/iop.c   8 Feb 2010 17:19:57 -0000
@@ -928,7 +928,7 @@
            BUS_DMASYNC_PREWRITE);
        memset(st, 0, sizeof(*st));
        bus_dmamap_sync(sc->sc_dmat, sc->sc_scr_dmamap, 0, sizeof(*st),
-           BUS_DMASYNC_PREREAD|BUS_DMASYNC_POSTWRITE);
+           BUS_DMASYNC_POSTWRITE);
 
        if ((rv = iop_post(sc, (u_int32_t *)&mf)) != 0)
                return (rv);
@@ -993,7 +993,7 @@
            BUS_DMASYNC_PREWRITE);
        *sw = 0;
        bus_dmamap_sync(sc->sc_dmat, sc->sc_scr_dmamap, 0, sizeof(*sw),
-           BUS_DMASYNC_PREREAD|BUS_DMASYNC_POSTWRITE);
+           BUS_DMASYNC_POSTWRITE);
 
        if ((rv = iop_post(sc, mb)) != 0)
                return (rv);


Home | Main Index | Thread Index | Old Index