Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Jun 2006 14:01:08 +0200
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Jimmy Olgeni <olgeni@uli.it>
Cc:        freebsd-hackers@FreeBSD.org
Subject:   Re: bus_dmamap_load_uio and uiomove
Message-ID:  <20060606120108.GF74562@garage.freebsd.pl>
In-Reply-To: <20060530143518.C36362@server.localdomain.net>
References:  <20060530143518.C36362@server.localdomain.net>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
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@FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQFEhW6EForvXbEpPzQRAlAcAJ0Ur51Nxqvyd6mwKbacKAirzQXqiQCglGzU
CidF70hGu1FRcMaKANFi7GM=
=qWgz
-----END PGP SIGNATURE-----

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