From owner-freebsd-doc@FreeBSD.ORG Thu Jun 26 01:30:11 2003 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E722237B405 for ; Thu, 26 Jun 2003 01:30:11 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 090BE4403B for ; Thu, 26 Jun 2003 01:30:09 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h5Q8U9Up040537 for ; Thu, 26 Jun 2003 01:30:09 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h5Q8U9TI040536; Thu, 26 Jun 2003 01:30:09 -0700 (PDT) Resent-Date: Thu, 26 Jun 2003 01:30:09 -0700 (PDT) Resent-Message-Id: <200306260830.h5Q8U9TI040536@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Hartmut Brandt Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1C22937B404 for ; Thu, 26 Jun 2003 01:30:07 -0700 (PDT) Received: from mailhub.fokus.fraunhofer.de (mailhub.fokus.fraunhofer.de [193.174.154.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 88FD74403D for ; Thu, 26 Jun 2003 01:30:05 -0700 (PDT) (envelope-from brandt@fokus.fraunhofer.de) Received: from beagle.fokus.fraunhofer.de (beagle [193.175.132.100]) h5Q8U4Q24678 for ; Thu, 26 Jun 2003 10:30:04 +0200 (MEST) Received: from beagle.fokus.fraunhofer.de (localhost [127.0.0.1]) h5Q8U4bR074556 for ; Thu, 26 Jun 2003 10:30:04 +0200 (CEST) (envelope-from hbb@beagle.fokus.fraunhofer.de) Received: (from hbb@localhost)h5Q8U397074555; Thu, 26 Jun 2003 10:30:03 +0200 (CEST) (envelope-from hbb) Message-Id: <200306260830.h5Q8U397074555@beagle.fokus.fraunhofer.de> Date: Thu, 26 Jun 2003 10:30:03 +0200 (CEST) From: Hartmut Brandt To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: docs/53751: bus_dma(9) incorrectly documents BUS_DMA_ALLOCNOW X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Hartmut Brandt List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2003 08:30:12 -0000 >Number: 53751 >Category: docs >Synopsis: bus_dma(9) incorrectly documents BUS_DMA_ALLOCNOW >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Thu Jun 26 01:30:09 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Hartmut Brandt >Release: FreeBSD 5.1-CURRENT i386 >Organization: Fraunhofer Fokus >Environment: System: FreeBSD beagle.fokus.fraunhofer.de 5.1-CURRENT FreeBSD 5.1-CURRENT #7: Thu Jun 19 12:19:27 CEST 2003 hbb@beagle.fokus.fraunhofer.de:/opt/obj/usr/src/sys/BEAGLE i386 >Description: The explanaition of the BUS_DMA_ALLOCNOW flag to bus_dma_tag_create is correct only if that tag is used for just one map. This is because bus_dma_tag_create tries to allocate bounce pages based only on the size of the desired mapping. It cannot now how many maps will be created using that tag. One example where it doesn't work are network drivers which will use on tag to map all the receive or transmit buffers. Each mapped buffer may require its own bounce buffer, but tag_create has allocated only space for one map. Therefor bus_dmamap_load_mbuf will return either EINPROGRESS (if called without BUS_DMA_NOWAIT) or ENOMEM when it fails to allocate bounce buffers. >How-To-Repeat: Look at the code in i386/i386/busdma_machdep.c >Fix: Either document a short version of the above or completly overhaul the bus dma stuff :-) >Release-Note: >Audit-Trail: >Unformatted: