Bug 53751 - bus_dma(9) incorrectly documents BUS_DMA_ALLOCNOW
Summary: bus_dma(9) incorrectly documents BUS_DMA_ALLOCNOW
Status: Open
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-26 09:30 UTC by Hartmut Brandt
Modified: 2018-04-11 20:41 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hartmut Brandt freebsd_committer 2003-06-26 09:30:09 UTC
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.

Fix: 

Either document a short version of the above or completly overhaul the bus dma
stuff :-)
How-To-Repeat: 
Look at the code in i386/i386/busdma_machdep.c
Comment 1 Bruce M Simpson freebsd_committer 2004-07-03 07:42:17 UTC
Responsible Changed
From-To: freebsd-doc->hmp

This is hmp's manor
Comment 2 gnats freebsd_committer 2007-07-31 06:52:32 UTC
Responsible Changed
From-To: hmp->freebsd-doc
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:05 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped