hifn(4) DMA fix for review

Patrick Lamaiziere patfbsd at davenulle.org
Sun May 9 22:16:25 UTC 2010


Le Fri, 07 May 2010 12:13:20 -0700,
Oleksandr Tymoshenko <gonzo at bluezbox.com> a écrit :

Hi,

>      Proposed patch addresses hifn(4) problems on FreeBSD/mips.
> Current implementation keeps some of the state information (indexes in
> buffers, etc) in DMA-mapped memory and bus_dma code invalidates them
> during sync operations. This fix moves data that doesn't belong to DMA
> ring to softc structure.

I do not have any comment but I will try on my Soekris (the next
weekend) if it can help.

I noticed several things in hifn, if you want to look:
http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/130286

IMHO some locks are missing in the use of sc->sc_sessions (the array
containing the sessions) : in hifn_newsession(), if there is no space
left in sc->sc_sessions, a new array is allocated and the sessions are
copied to it. Unfortunaly, sc->sc_sessions is used in hifn_process
without any lock and we use some pointers on the array (my patch should
addresses this if I remember...).

Regards.


More information about the freebsd-hackers mailing list