FreeBSD src
Go to file
Pyun YongHyeon 5f14ee2363 Split common TX/RX descriptor DMA tag to TX and RX DMA tags
respectively and fix all bus_dma(9) issues seen when bounce buffers
are used.
 o Setup frame handling had no bus_dmamap_sync(9) which prevented
   driver from configuring RX filter. Add missing bus_dmamap_sync(9)
   in both dc_setfilt_21143()/dc_setfilt_xircom() and dc_txeof().
 o Use bus_addr_t for DMA segment instead of using u_int32_t.
 o Introduce dc_dma_alloc()/dc_dma_free() functions to allocate/free
   DMA'able memory.
 o Create two DMA descriptor list for each TX/RX lists. This change
   will minimize the size of bounce buffers that would be used in
   each TX/RX path.  Previously driver had to copy both TX/RX lists
   when bounce buffer is active.
 o 21143 data sheet says descriptor list requires 4 bytes alignment.
   Remove PAGE_SIZE alignment restriction and use
   sizeof(struct dc_dec).
 o Setup frame requires 4 bytes alignment.  Remove PAGE_SIZE
   alignment restriction and use sizeof(struct dc_dec).
 o Add missing DMA map unload for both setup frame and TX/RX
   descriptor list.
 o Overhaul RX handling logic such that make driver always allocate
   new RX buffer with dc_newbuf(). Previously driver allowed to
   copy received frame with m_devget(9) after passing the
   descriptor ownership to controller. This can lead to passing
   wrong frame to upper stack.
 o Introduce dc_discard_rxbuf() which will discard received frame
   and reuse loaded DMA map and RX mbuf.
 o Correct several wrong bus_dmamap_sync(9) usage in dc_rxeof and
   dc_txeof. The TX/RX descriptor lists are updated by both driver
   and HW so READ/WRITE semantics should be used.
 o If driver failed to allocate new RX buffer, update if_iqdrops
   counter instead of if_ierrors since driver received the frame
   without errors.
 o Make sure to unload loaded setup frame DMA map in dc_txeof and
   clear the mark of setup frame of the TX descriptor in dc_txeof().
 o Add check for possible TX descriptor overruns in dc_encap() and
   move check for free buffer to caller, dc_start_locked().
 o Swap the loaded DMA map and the last DMA map for multi-segmented
   frames. Since dc_txeof() assumes the last descriptor of the
   frame has the DMA map, driver should swap the first and the last
   DMA map in dc_encap(). Previously driver tried to unload
   not-yet-loaded DMA map such that the loaded DMA map was not
   unloaded at all for multi-segmented frames.
 o Rewrite DC_RXDESC/DC_TXDESC macro to simpler one.
 o Remove definition of ETHER_ALIGN, it's already defined in
   ethernet.h.

With this changes, dc(4) works with bounce buffers and it shall
also fix issues which might have shown in PAE environments.

Tested by:	marius
2011-02-19 02:47:10 +00:00
bin test: Note that this is used both as a normal program and a shell builtin. 2011-02-15 22:17:47 +00:00
cddl When building libzpool on ia64 or sparc64, don't add the .note.GNU-stack 2011-02-15 22:28:15 +00:00
contrib Turn off default generation of userland dot symbols on powerpc64 now that 2011-02-18 21:44:53 +00:00
crypto Fix Incorrectly formatted ClientHello SSL/TLS handshake messages could 2011-02-12 21:30:46 +00:00
etc Import bsdinstall. This is meant to be (eventually in conjunction with 2011-02-18 14:54:34 +00:00
games Move potentially offensive fortune to fortunes-o. 2011-02-13 18:18:56 +00:00
gnu Merge binutils 2.17.50 to head. This brings a number of improvements to 2011-02-18 20:54:12 +00:00
include Install iodev.h. 2011-02-17 15:10:13 +00:00
kerberos5 Fix a typo. 2010-01-09 18:53:03 +00:00
lib Turn off default generation of userland dot symbols on powerpc64 now that 2011-02-18 21:44:53 +00:00
libexec Turn off default generation of userland dot symbols on powerpc64 now that 2011-02-18 21:44:53 +00:00
release Add release notes for xz update to 5.0.0. 2011-02-11 14:55:17 +00:00
rescue Break out the rules which generate crunchgen'ed binaries into a separate 2010-11-13 03:11:27 +00:00
sbin Add the -j option to enable soft updates journaling when creating 2011-02-16 06:00:27 +00:00
secure Fix some leftover binaries and shared libraries in the system that still 2011-02-15 22:03:09 +00:00
share cxgbe(4) - NIC driver for Chelsio T4 (Terminator 4) based 10Gb/1Gb adapters. 2011-02-18 08:00:26 +00:00
sys Split common TX/RX descriptor DMA tag to TX and RX DMA tags 2011-02-19 02:47:10 +00:00
tools sh: Test that the read builtin passes through all byte values 2011-02-18 20:51:13 +00:00
usr.bin Replace hard-coded value by Julian2Gregorian converter function. 2011-02-18 13:41:45 +00:00
usr.sbin Merge binutils 2.17.50 to head. This brings a number of improvements to 2011-02-18 20:54:12 +00:00
COPYRIGHT Happy New Year 2011. 2010-12-31 18:07:16 +00:00
LOCKS Update LOCKS syntax. 2008-06-05 19:47:58 +00:00
MAINTAINERS Add a comment to MAINTAINERS indicating that sbin/routed is in fact 2010-04-10 12:29:09 +00:00
Makefile - Add a new UNIVERSE_TARGET variable for 'make universe'. If it is set, 2011-02-10 18:54:52 +00:00
Makefile.inc1 Hmmm, specifying TARGET and TARGET_ARCH in the environment doesn't 2011-02-11 04:03:39 +00:00
Makefile.mips Retire TARGET_ABI. 2011-01-07 20:26:33 +00:00
ObsoleteFiles.inc Add some obsolete manpages. 2011-02-02 21:09:30 +00:00
README Add the cddl/ directory. 2010-11-14 11:32:56 +00:00
UPDATING Merge binutils 2.17.50 to head. This brings a number of improvements to 2011-02-18 20:54:12 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The ``world''
target should only be used in cases where the source tree has not
changed from the currently running version.  See:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

The ``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

cddl		Various commands and libraries under the Common Development
		and Distribution License.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html