1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00
Mirror of the FreeBSD src repository https://git.FreeBSD.org/src.git .
Go to file
John Baldwin f8190d8dc8 Major rototill of this driver to add FreeBSD bus-dma support:
- Allocate arrays of metadata for the descriptors in the rx and tx rings
  and change the ring pointers to walk the metadata array rather than the
  actual descriptor rings.  Each metadata object contains a pointer to its
  descriptor, a pointer to any associated mbuf, and a pointer to the
  associated bus_dmamap_t in the bus_dma case.  The mbuf pointers replace
  the tulip_txq and tulip_rxq local ifqueue's in the softc.
- Add lots of KTR trace entries using a local KTR_TULIP level which
  defaults to 0, but can be changed to KTR_DEV at the top of the file
  when debugging.
- Rename tulip_init(), tulip_start(), tulip_ifinit(), and tulip_ifstart()
  to tulip_init_locked(), tulip_start_locked(), tulip_init(), and
  tulip_start(), respectively, to match the convention in other drivers.
- Add a TULIP_SP_MAC() macro to encode two bytes of the MAC address into
  the setup buffer and use that in place of lots of BYTE_ORDER #ifdef's.
  Also, remove an incorrect XXX comment I added earlier, the driver was
  correct (at least it does the same thing dc(4) does).  TULIP_SP_MAC
  was shamelessly copied from DC_SP_MAC() in dc(4).
- Remove the #ifdef'd NetBSD bus-dma code and replace it with FreeBSD
  bus-dma code that not only compiles but even works at runtime.
- Use callout_init_mtx() instead of just callout_init().
- Correct the various wrapper macros for bus_dmamap_sync() for the rx
  and tx buffers to only ask for the sync ops that they actually need.
- Tidy the #ifdef TULIP_COPY_RXDATA code by expanding an #ifdef a bit
  so it becomes easier to read at the expense of a couple of duplicated
  lines of code.  Also, use m_getcl() to get an mbuf cluster rather than
  MGETHDR() followed by MCLGET().
- Maintain the ring free (ri_free) count for the rx ring metadata since
  we no longer have tulip_rxq.ifq_len around to indicate how many mbuf's
  are currently in the rx ring.
- Add code to teardown bus_dma resources when attach fails and generally
  fixup attach to do a better job of cleaning up when it fails.  This
  gets us a good bit closer to possibly having a detach method someday
  and making this driver an unloadable module.
- Add some functions that can be called from ddb to dump the state of
  a descriptor ring and to dump the state of an individual descriptor.
- Various comment grammer and spelling fixes.

I have bus-dma turned on by default, but I've left the non-bus-dma code
around so that it can be turned off to aid in debugging should any problems
turn up later on.  I'll be removing the non-bus-dma code in a subsequent
commit.
2005-08-25 20:12:43 +00:00
bin Document umask's -S option. 2005-08-17 19:44:15 +00:00
contrib - Fix checking range of strings of struct iconv_add_in in libsmb and libkiconv, 2005-08-24 12:38:26 +00:00
crypto This is sort of an MFS. Peter made these changes to the RELENG_* 2005-07-07 14:16:38 +00:00
etc Stop hard-coding an -M flag to mdmfs(8) in /etc/rc.subr. 2005-08-24 16:25:47 +00:00
games About life 2005-08-24 17:45:09 +00:00
gnu Do not place paragraph information post-macro unless required by mdoc(7). 2005-08-20 10:17:03 +00:00
include Appropriate namespace protection for memmem(3). 2005-08-25 19:46:38 +00:00
kerberos5 Bump the shared library version number of all libraries that have not 2005-07-22 17:19:05 +00:00
lib Add the function memmem(3) as found in glibc and others. 2005-08-25 18:26:58 +00:00
libexec Clean out the leftovers from the i386_set_gsbase() TLS conversion. 2005-06-29 23:15:36 +00:00
release New release notes: snd_t4dwave(4) manual page added. 2005-08-18 19:05:46 +00:00
rescue Respect the YES_HESIOD build variable. 2005-08-06 16:53:55 +00:00
sbin MFOpenBSD rev 1.9: fix a buffer overflow when processing config file 2005-08-24 00:05:04 +00:00
secure Don't install includes if NO_TOOLCHAIN 2005-08-03 09:18:59 +00:00
share Remove all references to T/TCP, which was removed several months ago. 2005-08-25 13:47:41 +00:00
sys Major rototill of this driver to add FreeBSD bus-dma support: 2005-08-25 20:12:43 +00:00
tools '-F' option behaviour was reverted, so revert previous commit. 2005-08-25 20:11:39 +00:00
usr.bin Revert previous behaviour of '-F' option and add '-L' option, which will 2005-08-25 20:10:47 +00:00
usr.sbin Fix a bug introduced in revision 1.9 which causes chkgrp to coredump on 2005-08-25 17:01:06 +00:00
COPYRIGHT
LOCKS Document the previously existing RELENG_[45]_* security branch locks. 2005-06-02 22:57:30 +00:00
MAINTAINERS Add myself as a maintainer of Bluetooth code 2005-08-25 17:14:39 +00:00
Makefile Add delete-old and delete-old-libs targets: 2005-07-23 14:23:30 +00:00
Makefile.inc1 Fix a couple of typos 2005-08-23 07:58:55 +00:00
ObsoleteFiles.inc Remove all references to T/TCP, which was removed several months ago. 2005-08-25 13:47:41 +00:00
README
UPDATING Add delete-old and delete-old-libs targets: 2005-07-23 14:23:30 +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
``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.

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.

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