dragonfly.git
5 years agocommitter(7): Add some lines about MFCing.
Sascha Wildner [Sun, 22 Feb 2009 08:46:13 +0000 (09:46 +0100)]
committer(7): Add some lines about MFCing.

5 years agoPotential fix for panic during shutdown.
Nicolas Thery [Sat, 21 Feb 2009 12:05:27 +0000 (13:05 +0100)]
Potential fix for panic during shutdown.

When a tty is revoked, the opencount of its associated vnode is forced to
zero and calling vop_stdclose() on this vnode causes a panic.  Call therefore
vop_stdclose() from spec_close() if and only if the opencount is strictly
positive.

I haven't managed to reproduce the original panic locally, hence the
"potential" above.

Reported-by: Thomas Nikolajsen <thomas.nikolajsen@mail.dk>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue715>

5 years agomsdosfs: replace bzero() with M_ZERO.
Nicolas Thery [Sat, 21 Feb 2009 10:39:04 +0000 (11:39 +0100)]
msdosfs: replace bzero() with M_ZERO.

5 years agoinstaller: Re-add the TEST_DEV command which was removed accidentally.
Sascha Wildner [Sat, 21 Feb 2009 08:52:43 +0000 (09:52 +0100)]
installer: Re-add the TEST_DEV command which was removed accidentally.

This should make command_add_ensure_dev() work again (to test if a
partition exists and create it if it doesn't).

Reported-by: M.K. <mk@freeweb.ozi.nu>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1292>

5 years agoasf(8): Fix example and clean up a bit.
Sascha Wildner [Sat, 21 Feb 2009 08:39:44 +0000 (09:39 +0100)]
asf(8): Fix example and clean up a bit.

While here, remove 's' from getopt() in asf.c since we do not support that
option (yet).

5 years agoamr: style(9)
Sascha Wildner [Fri, 20 Feb 2009 15:10:12 +0000 (16:10 +0100)]
amr: style(9)

5 years agoSync with FreeBSD
Matthias Schmidt [Fri, 20 Feb 2009 14:31:07 +0000 (15:31 +0100)]
Sync with FreeBSD

5 years agomake/Makefile: Adjust hash table creation for pkgsrc.
Sascha Wildner [Fri, 20 Feb 2009 12:15:15 +0000 (13:15 +0100)]
make/Makefile: Adjust hash table creation for pkgsrc.

5 years agomake/Makefile: Remove CVS id handling.
Sascha Wildner [Fri, 20 Feb 2009 10:19:27 +0000 (11:19 +0100)]
make/Makefile: Remove CVS id handling.

5 years agomakesyscalls.sh: Remove CVS id handling and clean up a bit.
Sascha Wildner [Fri, 20 Feb 2009 10:08:42 +0000 (11:08 +0100)]
makesyscalls.sh: Remove CVS id handling and clean up a bit.

5 years agoConstify yp_dir in various places (unbreaks buildworld).
Sascha Wildner [Thu, 19 Feb 2009 23:35:40 +0000 (00:35 +0100)]
Constify yp_dir in various places (unbreaks buildworld).

5 years agorpcgen(1): Raise WARNS to 6.
Sascha Wildner [Thu, 19 Feb 2009 21:49:43 +0000 (22:49 +0100)]
rpcgen(1): Raise WARNS to 6.

5 years agoypmatch(1): Raise WARNS to 6 & fix warnings.
Sascha Wildner [Thu, 19 Feb 2009 20:57:31 +0000 (21:57 +0100)]
ypmatch(1): Raise WARNS to 6 & fix warnings.

5 years agonl(1): Raise WARNS to 6 & fix warnings.
Sascha Wildner [Thu, 19 Feb 2009 20:54:08 +0000 (21:54 +0100)]
nl(1): Raise WARNS to 6 & fix warnings.

5 years agoypcat(1): Raise WARNS to 6 & fix warnings.
Sascha Wildner [Thu, 19 Feb 2009 16:53:34 +0000 (17:53 +0100)]
ypcat(1): Raise WARNS to 6 & fix warnings.

5 years agoRemove cxconfig, which was never compiled and never installed.
Sascha Wildner [Thu, 19 Feb 2009 13:23:59 +0000 (14:23 +0100)]
Remove cxconfig, which was never compiled and never installed.

5 years agoypxfr(8): Ansify, raise WARNS to 3, fix warnings.
Sascha Wildner [Thu, 19 Feb 2009 11:00:30 +0000 (12:00 +0100)]
ypxfr(8): Ansify, raise WARNS to 3, fix warnings.

5 years agoman9/Makefile: Add missing backslash.
Sascha Wildner [Thu, 19 Feb 2009 10:03:32 +0000 (11:03 +0100)]
man9/Makefile: Add missing backslash.

5 years agoAdd an ioctl(9) manual page.
Sascha Wildner [Thu, 19 Feb 2009 09:30:16 +0000 (10:30 +0100)]
Add an ioctl(9) manual page.

Adapted-from: NetBSD
Submitted-by: Stathis Kamperis <ekamperi@gmail.com>
5 years agoLiveDVD: Fix installer when it is run in the console.
Sascha Wildner [Wed, 18 Feb 2009 15:03:10 +0000 (16:03 +0100)]
LiveDVD: Fix installer when it is run in the console.

The LiveDVD was recently changed to not auto-start X11 anymore, meaning
the installer can now be run from within X11 (after manually starting
it) or from the console. However, the latter case requires ttyv1 to be
free because the console installer will log stuff on ttyv1. When started
from X11, this output goes to a different window (which is why ttyv1
was configured normally on the LiveDVD).

Reported-by: matthias
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1289>

5 years agofsck_msdosfs: check next cluster index for validity before using it
Simon Schubert [Wed, 18 Feb 2009 10:57:53 +0000 (11:57 +0100)]
fsck_msdosfs: check next cluster index for validity before using it

The boot->FSNext index can wind up to be out of range, thus leading to a
segfault when trying to check whether it is pointing to a free cluster.
Check for it being in range before using it as an index into the fat
array.

5 years agoFix warning in kernel.
Nicolas Thery [Mon, 16 Feb 2009 21:37:26 +0000 (22:37 +0100)]
Fix warning in kernel.

5 years agoFix typo.
Nicolas Thery [Mon, 16 Feb 2009 21:03:21 +0000 (22:03 +0100)]
Fix typo.

5 years agogetent(1): Raise WARNS to 6.
Sascha Wildner [Tue, 17 Feb 2009 15:21:40 +0000 (16:21 +0100)]
getent(1): Raise WARNS to 6.

5 years agotruncate(1): Raise WARNS to 6 and fix all warnings.
Sascha Wildner [Tue, 17 Feb 2009 15:18:33 +0000 (16:18 +0100)]
truncate(1): Raise WARNS to 6 and fix all warnings.

5 years agofind(1): Raise WARNS to 6 and fix all warnings.
Sascha Wildner [Tue, 17 Feb 2009 15:13:47 +0000 (16:13 +0100)]
find(1): Raise WARNS to 6 and fix all warnings.

5 years agofinger(1): Raise WARNS to 6 and fix all warnings.
Sascha Wildner [Tue, 17 Feb 2009 15:09:26 +0000 (16:09 +0100)]
finger(1): Raise WARNS to 6 and fix all warnings.

5 years agoRemove WARNS?=6 from Makefiles where it is already in ../Makefile.inc.
Sascha Wildner [Tue, 17 Feb 2009 14:56:34 +0000 (15:56 +0100)]
Remove WARNS?=6 from Makefiles where it is already in ../Makefile.inc.

5 years agom4(1): Oops, WARNS?=6 is in usr.bin/Makefile.inc already.
Sascha Wildner [Tue, 17 Feb 2009 14:51:42 +0000 (15:51 +0100)]
m4(1): Oops, WARNS?=6 is in usr.bin/Makefile.inc already.

5 years agom4(1): Raise WARNS to 6 and fix warnings.
Sascha Wildner [Tue, 17 Feb 2009 14:50:01 +0000 (15:50 +0100)]
m4(1): Raise WARNS to 6 and fix warnings.

5 years agoroute: Replicate mask_rnhead to each CPU; unbreak genmask support.
Sepherosa Ziehau [Sat, 7 Feb 2009 04:51:35 +0000 (12:51 +0800)]
route: Replicate mask_rnhead to each CPU; unbreak genmask support.

- mask_rnhead stores netmask and is read-write accessed by the per-cpu
  routing functions, so its replication is necessary.
- Unbreak genmask support by always adding genmask at the beginning of
  the route_output() and searching for the per-cpu genmask before
  assigning it to the per-cpu rtentry.

5 years agobacktrace: Use print_backtrace()
Sepherosa Ziehau [Fri, 6 Feb 2009 11:37:24 +0000 (19:37 +0800)]
backtrace: Use print_backtrace()

5 years agoroute: Suppress duplicated rtmsgs on ARP input path.
Sepherosa Ziehau [Mon, 2 Feb 2009 12:08:57 +0000 (20:08 +0800)]
route: Suppress duplicated rtmsgs on ARP input path.

5 years agoroute: Suppress duplicated rtmsgs on route_output(RTM_CHANGE) path
Sepherosa Ziehau [Mon, 2 Feb 2009 10:59:23 +0000 (18:59 +0800)]
route: Suppress duplicated rtmsgs on route_output(RTM_CHANGE) path

5 years agoroute: Suppress duplicated rtmsgs generated by rtlookup() in rt_setgate()
Sepherosa Ziehau [Mon, 2 Feb 2009 09:56:48 +0000 (17:56 +0800)]
route: Suppress duplicated rtmsgs generated by rtlookup() in rt_setgate()

Add 'generate_report' parameter to rt_setgate().  In rt_setgate(), instead
of passing RTL_REPORTMSG to rtlookup(), we pass 'generated_report' to
rtlookup().

For rtrequset1(RTM_ADD) and rtredirect(), which always go through all CPUs,
we only need to generate rtmsg on CPU0.  For {arp,atm,nd6}_rtrequest(),
there is no need to generated rtmsg.

5 years agortsock: Fill in the correct rtm_index for RTM_ADD and RTM_CHANGE messages.
Sepherosa Ziehau [Sun, 1 Feb 2009 04:02:16 +0000 (12:02 +0800)]
rtsock: Fill in the correct rtm_index for RTM_ADD and RTM_CHANGE messages.

Obtained-from: OpenBSD via FreeBSD (part of net/rtsock.c rev1.133)

5 years agortsock: Use M_ASSERTPKTHDR()
Sepherosa Ziehau [Sun, 1 Feb 2009 03:18:29 +0000 (11:18 +0800)]
rtsock: Use M_ASSERTPKTHDR()

5 years agortsock: Break long line
Sepherosa Ziehau [Sun, 1 Feb 2009 03:16:21 +0000 (11:16 +0800)]
rtsock: Break long line

5 years agortsock: Fill in the rtm_index field whenever we have an interface pointer.
Sepherosa Ziehau [Sun, 1 Feb 2009 03:13:45 +0000 (11:13 +0800)]
rtsock: Fill in the rtm_index field whenever we have an interface pointer.

Obtained-from: FreeBSD (net/rtsock.c rev1.123)

5 years agortsock: White space
Sepherosa Ziehau [Sun, 1 Feb 2009 03:07:24 +0000 (11:07 +0800)]
rtsock: White space

5 years agortsock: Use rtsearch_global() for RTM_GET
Sepherosa Ziehau [Sat, 31 Jan 2009 10:33:42 +0000 (18:33 +0800)]
rtsock: Use rtsearch_global() for RTM_GET

5 years agortsock: Unbreak RTM_LOCK support by using rtsearch_global()
Sepherosa Ziehau [Sat, 31 Jan 2009 10:08:25 +0000 (18:08 +0800)]
rtsock: Unbreak RTM_LOCK support by using rtsearch_global()

5 years agoroute: Add rtsearch_global(), which is used to fix RTM_CHANGE support.
Sepherosa Ziehau [Sat, 31 Jan 2009 09:54:12 +0000 (17:54 +0800)]
route: Add rtsearch_global(), which is used to fix RTM_CHANGE support.

rtsearch_global() forwards a netmsg to each CPUs.  On each CPU, it
uses radix tree lookup function to locate the requested route, if the
route is found, then call the passed in callback.  The callback could
return error thus terminate the message forwarding.  If the requested
route was not found on any of the CPUs, then ESRCH is replied on the
last CPU.

5 years agortsock: Minor style change
Sepherosa Ziehau [Sat, 31 Jan 2009 05:26:18 +0000 (13:26 +0800)]
rtsock: Minor style change

5 years agortsock: Fix a reversed condition
Sepherosa Ziehau [Sat, 31 Jan 2009 05:16:59 +0000 (13:16 +0800)]
rtsock: Fix a reversed condition

5 years agortsock: Fix !SO_USELOOPBACK support in route_output()
Sepherosa Ziehau [Sat, 31 Jan 2009 04:07:32 +0000 (12:07 +0800)]
rtsock: Fix !SO_USELOOPBACK support in route_output()

Old BSD code assumes that rts_input() is synchronous, so clear/set
sp_family could be used to skip the current rawcb.  However, our
rts_input() is asynchronous, thus the clear/set sp_family trick no
longer takes any effect.

Reimplement the rawcb skipping in the following way:
- Record the address of rawcb to be skipped in netmsg.
- Extend raw_input() interface to accept a 'skip' argument.  At the
  beginning of the rawcb list iteration, check the address of the
  current rawcb against the 'skip'.

5 years agobusdma(9): Dup i386 busdma_machdep.c to vkernel
Sepherosa Ziehau [Thu, 29 Jan 2009 11:25:37 +0000 (19:25 +0800)]
busdma(9): Dup i386 busdma_machdep.c to vkernel

5 years agobusdma(9): Dup i386 busdma_machdep.c to amd64
Sepherosa Ziehau [Thu, 29 Jan 2009 11:24:33 +0000 (19:24 +0800)]
busdma(9): Dup i386 busdma_machdep.c to amd64

5 years agoUnbreak LINT build
Sepherosa Ziehau [Thu, 29 Jan 2009 10:51:10 +0000 (18:51 +0800)]
Unbreak LINT build

5 years agosis(4): Rework busdma(9) related bits
Sepherosa Ziehau [Thu, 29 Jan 2009 08:25:56 +0000 (16:25 +0800)]
sis(4): Rework busdma(9) related bits

- RX/TX descriptor rings need to be 4bytes aligned.
- RX buffers need to be 4bytes aligned.
- Create TX/RX buffer busdma map at attaching time and destroy them
  at detaching time.
- Rework sis_newbuf() by utilizing bus_dmamap_load_mbuf_segment().
- Factor sis_setup_rxdesc() out of sis_newbuf() and call it on RX
  error handling path.
- Rework sis_encap() by utilizing bus_dmamap_load_mbuf_defrag().
- Correct IFF_OACTIVE handling in sis_start()/sis_txeof().

5 years agosis(4): Move software specific fields out of hardware descriptor structure
Sepherosa Ziehau [Thu, 29 Jan 2009 03:39:40 +0000 (11:39 +0800)]
sis(4): Move software specific fields out of hardware descriptor structure

5 years agobce(4): Remove unnecessary bus_dmamap_sync()
Sepherosa Ziehau [Wed, 28 Jan 2009 12:16:51 +0000 (20:16 +0800)]
bce(4): Remove unnecessary bus_dmamap_sync()

5 years agobce(4): Adjust RX path to avoid fatal error caused by busdma failure
Sepherosa Ziehau [Tue, 27 Jan 2009 14:53:18 +0000 (22:53 +0800)]
bce(4): Adjust RX path to avoid fatal error caused by busdma failure

- Create tmp busdma map for loading mbuf on RX path, so busdma map
  loading failure will not be fatal.
- Don't unload RX buffer's busdma map until we could make sure that
  new RX buffer could be loaded.
- On RX path, if error happens, we only need to reconfigure RX desc,
  so just call bce_setup_rxdesc_std().
- Make sure that sw_chain_cons and sw_chain_prod are same, else
  log error and reconfigure the RX desc indiced by sw_chain_cons.
- Utilize bus_dmamap_load_mbuf_segment().

5 years agobce(4): Factor RX desc setup out of bce_newbuf_std()
Sepherosa Ziehau [Tue, 27 Jan 2009 09:00:27 +0000 (17:00 +0800)]
bce(4): Factor RX desc setup out of bce_newbuf_std()

5 years agobce(4): Utilize bus_dmamap_load_mbuf_defrag()
Sepherosa Ziehau [Tue, 27 Jan 2009 05:05:12 +0000 (13:05 +0800)]
bce(4): Utilize bus_dmamap_load_mbuf_defrag()

5 years agobce(4): Use coherent for non-buffer data storage
Sepherosa Ziehau [Tue, 27 Jan 2009 04:37:30 +0000 (12:37 +0800)]
bce(4): Use coherent for non-buffer data storage

- Utilize bus_dmamem_coherent_any()
- Put RX/TX pages into coherent memory
- Don't sync coherent memory

5 years agobce(4): Correct parameters passed to busdma(9) functions
Sepherosa Ziehau [Tue, 27 Jan 2009 03:20:33 +0000 (11:20 +0800)]
bce(4): Correct parameters passed to busdma(9) functions

5 years agostge(4): Remove unnecessary bus_dmamap_sync()
Sepherosa Ziehau [Mon, 26 Jan 2009 14:07:10 +0000 (22:07 +0800)]
stge(4): Remove unnecessary bus_dmamap_sync()

5 years agostge(4): Adjust TX path
Sepherosa Ziehau [Mon, 26 Jan 2009 13:53:25 +0000 (21:53 +0800)]
stge(4): Adjust TX path

- Utilize bus_dmamap_load_mbuf_defrag()
- Sync TX buffer before setup the TX desc
- In stge_{txeof,start}(), use the same condition to clear/set IFF_OACTIVE

5 years agostge(4): Utilize bus_dmamap_load_mbuf_segment()
Sepherosa Ziehau [Mon, 26 Jan 2009 12:25:41 +0000 (20:25 +0800)]
stge(4): Utilize bus_dmamap_load_mbuf_segment()

5 years agostge(4): Don't sync coherent memory
Sepherosa Ziehau [Mon, 26 Jan 2009 12:08:15 +0000 (20:08 +0800)]
stge(4): Don't sync coherent memory

5 years agostge(4): Adjust the error handling code on stge_dma_alloc()
Sepherosa Ziehau [Mon, 26 Jan 2009 12:05:03 +0000 (20:05 +0800)]
stge(4): Adjust the error handling code on stge_dma_alloc()

5 years agostge(4): Utilize bus_dmamem_coherent_any()
Sepherosa Ziehau [Mon, 26 Jan 2009 11:45:29 +0000 (19:45 +0800)]
stge(4): Utilize bus_dmamem_coherent_any()

5 years agostge(4): Regroup busdma tag creation; prepare for the upcoming changes
Sepherosa Ziehau [Mon, 26 Jan 2009 11:31:44 +0000 (19:31 +0800)]
stge(4): Regroup busdma tag creation; prepare for the upcoming changes

5 years agostge(4): Correct parameters passed to busdma(9) functions
Sepherosa Ziehau [Mon, 26 Jan 2009 11:22:07 +0000 (19:22 +0800)]
stge(4): Correct parameters passed to busdma(9) functions

5 years agoet(4): Utilize bus_dmamap_load_mbuf_{segment,defrag}()
Sepherosa Ziehau [Mon, 26 Jan 2009 07:11:56 +0000 (15:11 +0800)]
et(4): Utilize bus_dmamap_load_mbuf_{segment,defrag}()

5 years agoet(4): Split RX/TX mbuf busdma tag
Sepherosa Ziehau [Mon, 26 Jan 2009 06:52:42 +0000 (14:52 +0800)]
et(4): Split RX/TX mbuf busdma tag

5 years agoet(4): Don't sync coherent memory
Sepherosa Ziehau [Mon, 26 Jan 2009 06:21:00 +0000 (14:21 +0800)]
et(4): Don't sync coherent memory

5 years agoet(4): Utilize bus_dmamem_coherent_any()
Sepherosa Ziehau [Mon, 26 Jan 2009 05:26:12 +0000 (13:26 +0800)]
et(4): Utilize bus_dmamem_coherent_any()

5 years agobusdma(9): Add bus_dmamem_coherent_any()
Sepherosa Ziehau [Mon, 26 Jan 2009 05:24:48 +0000 (13:24 +0800)]
busdma(9): Add bus_dmamem_coherent_any()

This function is a simplified version of bus_dmamem_coherent(),
see the comment in sys/bus_dma.h for details.

5 years agoet(4): Utilize bus_dmamem_coherent()
Sepherosa Ziehau [Mon, 26 Jan 2009 04:29:38 +0000 (12:29 +0800)]
et(4): Utilize bus_dmamem_coherent()

5 years agoet(4): Correct parameters passed to busdma(9) functions
Sepherosa Ziehau [Mon, 26 Jan 2009 04:09:08 +0000 (12:09 +0800)]
et(4): Correct parameters passed to busdma(9) functions

5 years agomsk(4): Align TX buffer to 64bytes boundary instead of 8bytes boundary
Sepherosa Ziehau [Mon, 26 Jan 2009 03:05:06 +0000 (11:05 +0800)]
msk(4): Align TX buffer to 64bytes boundary instead of 8bytes boundary

The correct alignment boundary is found out by using busdma(9)'s
alignment constraint.  However, it seems that using in-place copy
results in better performance than let busdma(9) to bounce misaligned
TX buffer, especially with tiny packets; probably due to the "in-place"

5 years agomsk(4): Align TX buffer to 8bytes boundary to improve TX performance
Sepherosa Ziehau [Sun, 25 Jan 2009 07:39:40 +0000 (15:39 +0800)]
msk(4): Align TX buffer to 8bytes boundary to improve TX performance

The performance improvement is ~100Mbps (from 83xMbps to 93xMbps) for
bulk data.  This is accidentally found by forcing msk(4) to bounce TX
buffers to lower address during a busdma(4) test (bounce pages are
PAGE_SIZE aligned).

5 years agobusdma(9): Obey alignment constraint by default
Sepherosa Ziehau [Sun, 25 Jan 2009 03:38:56 +0000 (11:38 +0800)]
busdma(9): Obey alignment constraint by default

5 years agomsk(4): Avoid busdma map leakage on error handling path
Sepherosa Ziehau [Sun, 25 Jan 2009 03:17:47 +0000 (11:17 +0800)]
msk(4): Avoid busdma map leakage on error handling path

5 years agomsk(4): Adjust TX path
Sepherosa Ziehau [Sun, 25 Jan 2009 03:09:55 +0000 (11:09 +0800)]
msk(4): Adjust TX path

- Utilize bus_dmamap_load_mbuf_defrag().
- Fix the IFF_OACTIVE setting in msk_start().  This restores the
  fragmented UDP output performance.
- Sync TX buffer before setup TX desc.
- Remove unnecessary bus_dmamap_sync().

5 years agomsk(4): Utilize bus_dmamap_load_mbuf_segment()
Sepherosa Ziehau [Sun, 25 Jan 2009 02:26:31 +0000 (10:26 +0800)]
msk(4): Utilize bus_dmamap_load_mbuf_segment()

5 years agomsk(4): Utilize bus_dmamem_coherent() and don't sync coherent memory
Sepherosa Ziehau [Sun, 25 Jan 2009 02:06:01 +0000 (10:06 +0800)]
msk(4): Utilize bus_dmamem_coherent() and don't sync coherent memory

5 years agomsk(4): Correct parameters passed to busdma(9) functions
Sepherosa Ziehau [Sat, 24 Jan 2009 09:04:06 +0000 (17:04 +0800)]
msk(4): Correct parameters passed to busdma(9) functions

5 years agosk(4): Utilize bus_dmamap_load_mbuf_defrag()
Sepherosa Ziehau [Sat, 24 Jan 2009 06:59:14 +0000 (14:59 +0800)]
sk(4): Utilize bus_dmamap_load_mbuf_defrag()

5 years agosk(4): Adjust RX path a little bit
Sepherosa Ziehau [Sat, 24 Jan 2009 06:33:42 +0000 (14:33 +0800)]
sk(4): Adjust RX path a little bit

- Utilize bus_dmamap_load_mbuf_segment()
- Don't try m_devget(); it does not help much, if the NIC is quenched
  by the peer, e.g. by line rate fragmented UDP datagrams
- Move bus_dmamap_sync() from sk_rxeof() into sk_newbuf_std()

5 years agosk(4): Rework busdma(9) related bits
Sepherosa Ziehau [Sat, 24 Jan 2009 05:56:27 +0000 (13:56 +0800)]
sk(4): Rework busdma(9) related bits

- According to data sheet, sk(4) does support 64bits address space.
  However, the RX/TX descriptors' high 32bits must be same, i.e.
  descriptors' can't spread above and below 4Gbytes boundary.  Since
  sk(4)'s RX/TX descriptors are in contiguous memory, this means we
  only need to make sure that the contiguous memory does not cross
  4Gbytes boundary.
- RX/TX descriptors' is 8bytes aligned not 64bytes aligned.
- Split RX/TX descriptor rings.
- Use bus_dmamem_coherent() to allocate RX/TX descriptor rings.
- Don't sync coherent memory.

5 years agosk(4): Adjust TX path a little bit.
Sepherosa Ziehau [Fri, 23 Jan 2009 12:01:10 +0000 (20:01 +0800)]
sk(4): Adjust TX path a little bit.

5 years agorl(4): Don't use magic number
Sepherosa Ziehau [Fri, 23 Jan 2009 10:40:18 +0000 (18:40 +0800)]
rl(4): Don't use magic number

5 years agorl(4): Rework busdma(9) related bits
Sepherosa Ziehau [Fri, 23 Jan 2009 10:31:25 +0000 (18:31 +0800)]
rl(4): Rework busdma(9) related bits

- Correct parameters passed to busdma(9) functions.
- Split RX/TX busdma tag.
- Use bus_dmamem_coherent() to allocate RX buffers.
- Create TX buffer busdma map at attach time and destroy them only
  at detach time.
- Rework rl_encap().
- Don't sync RX buffers, which is coherent memory.

5 years agobge(4): Remove unnecessary bus_dmamap_sync()
Sepherosa Ziehau [Fri, 23 Jan 2009 07:45:54 +0000 (15:45 +0800)]
bge(4): Remove unnecessary bus_dmamap_sync()

5 years agobge(4): Utilize bus_dmamap_load_mbuf_{defrag,segment}()
Sepherosa Ziehau [Fri, 23 Jan 2009 07:43:36 +0000 (15:43 +0800)]
bge(4): Utilize bus_dmamap_load_mbuf_{defrag,segment}()

5 years agobge(4): Rework bge_newbuf_{std,jumbo}()
Sepherosa Ziehau [Fri, 23 Jan 2009 07:15:00 +0000 (15:15 +0800)]
bge(4): Rework bge_newbuf_{std,jumbo}()

- Always fill the std RX ring, instead of leaving it half full.
  On modern system, 1MBytes non-contiguous memory will not be
  the source of trouble.
- Record RX buffer's physical address along with the RX mbuf.
- Factor out bge_setup_rxdesc_{std,jumbo}(); call them if RX errors
  happen.
- Move RX std buffer busdma map sync/unload into bge_newbuf_std()
- Use temporary busdma map to load RX std buffer, so that the busdma
  map loading failure will not be fatal.

5 years agobge(4): Split RX/TX mbuf busdma tags
Sepherosa Ziehau [Fri, 23 Jan 2009 04:35:27 +0000 (12:35 +0800)]
bge(4): Split RX/TX mbuf busdma tags

5 years agobge(4): Don't sync coherent memory
Sepherosa Ziehau [Fri, 23 Jan 2009 04:05:35 +0000 (12:05 +0800)]
bge(4): Don't sync coherent memory

5 years agobge(4): Utilize bus_dmamem_coherent()
Sepherosa Ziehau [Fri, 23 Jan 2009 03:55:17 +0000 (11:55 +0800)]
bge(4): Utilize bus_dmamem_coherent()

5 years agobge(4): Correct busdma parameters
Sepherosa Ziehau [Fri, 23 Jan 2009 03:36:19 +0000 (11:36 +0800)]
bge(4): Correct busdma parameters

5 years agoif_bgereg.h: Remove extra white space
Sepherosa Ziehau [Fri, 23 Jan 2009 03:13:19 +0000 (11:13 +0800)]
if_bgereg.h: Remove extra white space

5 years agobusdma(9): Update FreeBSD RSCID.
Sepherosa Ziehau [Fri, 23 Jan 2009 02:47:55 +0000 (10:47 +0800)]
busdma(9): Update FreeBSD RSCID.

5 years agobusdma(9): Don't record/use boundary in bounce zone
Sepherosa Ziehau [Thu, 22 Jan 2009 13:08:48 +0000 (21:08 +0800)]
busdma(9): Don't record/use boundary in bounce zone

Bounce zone's boundary does not make any sense for PAGE_SIZE
contiguous allocation which also aligned on multiple or one
PAGE_SIZE.

5 years agobusdma(9): Use the passed in 'flags' instead of hard coding BUS_DMA_NOWAIT
Sepherosa Ziehau [Thu, 22 Jan 2009 12:45:01 +0000 (20:45 +0800)]
busdma(9): Use the passed in 'flags' instead of hard coding BUS_DMA_NOWAIT

5 years agojme(4): Don't sync coherent memory
Sepherosa Ziehau [Thu, 22 Jan 2009 12:30:57 +0000 (20:30 +0800)]
jme(4): Don't sync coherent memory

5 years agore(4): Don't sync coherent memory
Sepherosa Ziehau [Thu, 22 Jan 2009 12:13:07 +0000 (20:13 +0800)]
re(4): Don't sync coherent memory

5 years agonfe(4): Coherent memory does not need to be synced
Sepherosa Ziehau [Thu, 22 Jan 2009 12:12:51 +0000 (20:12 +0800)]
nfe(4): Coherent memory does not need to be synced