Date: Mon, 10 May 2010 00:16:37 +0200 From: Patrick Lamaiziere <patfbsd@davenulle.org> To: Oleksandr Tymoshenko <gonzo@bluezbox.com> Cc: freebsd-hackers@freebsd.org, Sam Leffler <sam@freebsd.org> Subject: Re: hifn(4) DMA fix for review Message-ID: <20100510001637.2a564cd5@davenulle.org> In-Reply-To: <4BE46650.7010008@bluezbox.com> References: <4BE46650.7010008@bluezbox.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Le Fri, 07 May 2010 12:13:20 -0700, Oleksandr Tymoshenko <gonzo@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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100510001637.2a564cd5>