cvs commit: src/sys/i386/i386 busdma_machdep.c
Jake Burkholder
jake at locore.ca
Mon Apr 14 06:04:31 PDT 2003
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
More information about the cvs-src
mailing list