bus_dmamap_load_uio and uiomove

Pawel Jakub Dawidek pjd at FreeBSD.org
Tue Jun 6 12:03:49 UTC 2006


On Tue, May 30, 2006 at 02:49:22PM +0200, Jimmy Olgeni wrote:
+> 
+> Hello,
+> 
+> Just quick busdma question...
+> 
+> I'm currently upgrading a custom device driver to use bus_dmamap_load_uio rather than uiomove. Everything works fine, but calls to "write" fail unless I set uio->uio_resid 
+> to 0 by hand (as I'm not using uiomove anymore).
+> 
+> Am I supposed to set uio_resid by hand when using bus_dmamap_load_uio, or is there a better way to signal that all the data in uio was used?

From what I see, bus_dmamap_load_uio() is using uio_resid as the number
of bytes to proceed, so it has to be set before the call.

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20060606/185761a6/attachment.pgp


More information about the freebsd-hackers mailing list