From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 6 12:03:38 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8857616B480 for ; Tue, 6 Jun 2006 12:03:38 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC53343D73 for ; Tue, 6 Jun 2006 12:03:30 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id EFBE55136C; Tue, 6 Jun 2006 14:03:29 +0200 (CEST) Received: from localhost (pjd.wheel.pl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id C798051306; Tue, 6 Jun 2006 14:03:23 +0200 (CEST) Date: Tue, 6 Jun 2006 14:01:08 +0200 From: Pawel Jakub Dawidek To: Jimmy Olgeni Message-ID: <20060606120108.GF74562@garage.freebsd.pl> References: <20060530143518.C36362@server.localdomain.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hK8Uo4Yp55NZU70L" Content-Disposition: inline In-Reply-To: <20060530143518.C36362@server.localdomain.net> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r535 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-hackers@FreeBSD.org Subject: Re: bus_dmamap_load_uio and uiomove X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jun 2006 12:03:49 -0000 --hK8Uo4Yp55NZU70L Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 30, 2006 at 02:49:22PM +0200, Jimmy Olgeni wrote: +>=20 +> Hello, +>=20 +> Just quick busdma question... +>=20 +> I'm currently upgrading a custom device driver to use bus_dmamap_load_ui= o rather than uiomove. Everything works fine, but calls to "write" fail unl= ess I set uio->uio_resid=20 +> to 0 by hand (as I'm not using uiomove anymore). +>=20 +> Am I supposed to set uio_resid by hand when using bus_dmamap_load_uio, o= r is there a better way to signal that all the data in uio was used? =46rom 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. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --hK8Uo4Yp55NZU70L Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFEhW6EForvXbEpPzQRAlAcAJ0Ur51Nxqvyd6mwKbacKAirzQXqiQCglGzU CidF70hGu1FRcMaKANFi7GM= =qWgz -----END PGP SIGNATURE----- --hK8Uo4Yp55NZU70L--