From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 30 06:50:46 2005 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 F2AEC16A41F for ; Fri, 30 Sep 2005 06:50:45 +0000 (GMT) (envelope-from nsrashmi@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id 88F1643D4C for ; Fri, 30 Sep 2005 06:50:43 +0000 (GMT) (envelope-from nsrashmi@gmail.com) Received: by xproxy.gmail.com with SMTP id t4so178022wxc for ; Thu, 29 Sep 2005 23:50:43 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type; b=AIR9z+xjsrOTWn6FhVGNOLN3jM6V0td+XeEdEDX72P5GakdT1Kb39VIPE5hduLKRnemRkRqCIMKcd9MZw1n6RKraDGzZr0CH99BczJp3csM9eKov4OGI1Zs/4COOSs0aAn2FMPiyY0bVcZLOjocUk2YI8f+W5kiYzZmYr+MVjtY= Received: by 10.70.22.8 with SMTP id 8mr802072wxv; Thu, 29 Sep 2005 23:44:19 -0700 (PDT) Received: by 10.70.15.12 with HTTP; Thu, 29 Sep 2005 23:44:19 -0700 (PDT) Message-ID: <9f9993160509292344l51ee40c3o5baef7b80ce222de@mail.gmail.com> Date: Fri, 30 Sep 2005 12:14:19 +0530 From: rashmi ns To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: request:help reqd in using bus_dma functions X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rashmi ns List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 06:50:46 -0000 hello group , I am writing a network driver where in have created tags and maps for tx_desc of transmit-q-size by using these functions . 1. bus_dma_tag_create 2. bus_dmamap_create 3.bus_dmamem_alloc struct xxxx_tx_desc { DWORD data_buff; DWORD cvbcnxt; DWORD channel_no; DWORD pend_desc; }; For a packet to be transmitted a packet's address should be placed in tx_desc_q 's DWORD data_buff field and update the rest of the fields .Then h/w detects the presence of the packet and tranmits the packet now to test I want to load a buffer like (char buff[50])in tx_q space can any one tell me in which order I can use bus_dma functions .I have gone th' docs but not very sure as I'm writing n/w drivers for the first time .I'm not clear with the dma concepts . I'm getting confused kindly help Now should I use bus_dmamap_load(bus_dma_tag_t dmat, bus_dmamap_t map, voi= d *buf, bus_size_t buflen, bus_dmamap_callback_t *callback,void *callback_arg= , int flags); I'm not getting what callback func should to how to get the mapped address and place into tx_desc_q 's Thanks and regards, Member