From owner-freebsd-current Wed Jan 15 15:16:32 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B7DA137B401; Wed, 15 Jan 2003 15:16:30 -0800 (PST) Received: from genius.tao.org.uk (genius.tao.org.uk [212.135.162.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id E370B43F5B; Wed, 15 Jan 2003 15:16:29 -0800 (PST) (envelope-from joe@genius.tao.org.uk) Received: by genius.tao.org.uk (Postfix, from userid 100) id F23D14692; Wed, 15 Jan 2003 23:15:39 +0000 (GMT) Date: Wed, 15 Jan 2003 23:15:39 +0000 From: Josef Karthauser To: Thomas Moestl Cc: Maxime Henrion , current@FreeBSD.org Subject: Re: Bus DMA for USB - compilation problems. Message-ID: <20030115231539.GB14326@genius.tao.org.uk> Mail-Followup-To: Josef Karthauser , Thomas Moestl , Maxime Henrion , current@FreeBSD.org References: <20030115195607.GA13076@genius.tao.org.uk> <20030115200519.GH16775@elvis.mu.org> <20030115202033.GA13368@genius.tao.org.uk> <20030115215804.GA286@crow.dom2ip.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KFztAG8eRSV9hGtP" Content-Disposition: inline In-Reply-To: <20030115215804.GA286@crow.dom2ip.de> User-Agent: Mutt/1.5.3i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --KFztAG8eRSV9hGtP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 15, 2003 at 10:58:04PM +0100, Thomas Moestl wrote: >=20 > DMAADDR is: > =09 > #define DMAADDR(dma, o) ((dma)->block->map->dm_segs[0].ds_addr + (dma)-= >offs + (o)) >=20 > struct usb_dma_block starts like: >=20 > typedef struct usb_dma_block { > bus_dma_tag_t tag; > bus_dmamap_t map; >=20 > However, bus_dmamap_t (like bus_dma_tag_t) is supposed to be opaque to > users of the busdma interface on FreeBSD. Our implementations enforce > this by defining it as: >=20 > typedef struct bus_dmamap *bus_dmamap_t; >=20 > , and by not exporting struct bus_dmamap in public headers. >=20 > The DMA addresses are obtained by writing an appropriate callback > routine to process them and passing it to bus_dmamap_load(). > The usb_mem.c will need some other changes to work on FreeBSD, since > our busdma code has diverged from NetBSD's quite a bit. >=20 Is ours documented anywhere, or is converting usb_mem.c to our style something that you could help me with? Joe --=20 Josef Karthauser (joe@tao.org.uk) http://www.josef-k.net/ FreeBSD (cvs meister, admin and hacker) http://www.uk.FreeBSD.org/ Physics Particle Theory (student) http://www.pact.cpes.sussex.ac.uk/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D An eclectic mix of fact an= d theory. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --KFztAG8eRSV9hGtP Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iEYEARECAAYFAj4l65sACgkQXVIcjOaxUBZJHwCeJxb0Niy7hbqyXv7ndf6DAWuQ k4sAoIXyI+h55DzGoNMpv6KF7SnsfkAs =p3e7 -----END PGP SIGNATURE----- --KFztAG8eRSV9hGtP-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message