Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Apr 2003 09:05:29 -0400
From:      Jake Burkholder <jake@locore.ca>
To:        Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
Cc:        cvs-src@FreeBSD.org
Subject:   Re: cvs commit: src/sys/i386/i386 busdma_machdep.c
Message-ID:  <20030414130528.GD97094@locore.ca>
In-Reply-To: <ybsr8851msd.wl@ett.sat.t.u-tokyo.ac.jp>
References:  <200304140419.h3E4Jgwi070671@repoman.freebsd.org> <20030414073329.GC97094@locore.ca> <ybsr8851msd.wl@ett.sat.t.u-tokyo.ac.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
Apparently, On Mon, Apr 14, 2003 at 05:54:58PM +0900,
	Hidetoshi Shimokawa said words to the effect of;

> At Mon, 14 Apr 2003 03:33:29 -0400,
> Jake Burkholder wrote:
> > 
> > Apparently, On Sun, Apr 13, 2003 at 09:19:42PM -0700,
> > 	Hidetoshi Shimokawa said words to the effect of;
> > 
> > > simokawa    2003/04/13 21:19:42 PDT
> > > 
> > >   FreeBSD src repository
> > > 
> > >   Modified files:
> > >     sys/i386/i386        busdma_machdep.c 
> > >   Log:
> > >   * Use _bus_dmamap_load_buffer() and respect maxsegsz in bus_dmamap_load().
> > >   Ignoring maxsegsz may lead to fatal data corruption for some devices.
> > >   ex. SBP-2/FireWire
> > 
> > Hmm.  _bus_dmamap_load_buffer doesn't handle delayed loads due to lack
> > of resources like bus_dmamap_load does (did).  I think you will need to
> > respect BUS_DMA_WAITOK/BUS_DMA_NOWAIT in the flags argument to
> > _bus_dmamap_load_buffer, and pass BUS_DMA_WAITOK in bus_dmamap_load and
> > BUS_DMA_NOWAIT in other cases.  If _bus_dmamap_load_buffer runs out of
> > resources it should return EINPROGRESS and queue the request if
> > BUS_DMA_WAITOK is specified, or return ENOMEM if BUS_DMA_NOWAIT is specified.
> 
> You are right. How about this patch?

[ snip ]

Yes, looks good to me, thanks.

Jake



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030414130528.GD97094>