yongari [Wed, 31 Jan 2007 00:24:11 +0000 (00:24 +0000)]
MFC if_re.c rev 1.83 to RELENG_6.
It seems that enabling Tx and Rx before setting descriptor DMA
addresses shall access invalid descriptor DMA addresses on PCIe
hardwares and then panicked the system.
To fix it set descriptor DMA addresses before enabling Tx and Rx
such that hardware can see valid descriptor DMA addresses. Also
set RL_EARLY_TX_THRESH before starting Tx and Rx.
marius [Tue, 30 Jan 2007 14:16:24 +0000 (14:16 +0000)]
MFC: if_re.c 1.82, if_rlreg.h 1.64
o In re_newbuf() and re_encap() if re_dma_map_desc() aborts the mapping
operation as it ran out of free descriptors or if there are too many
segments in the first place, call bus_dmamap_unload() in order to
unload the already loaded segments.
For trying to map the defragmented mbuf (chain) in re_encap() this
introduces re_dma_map_desc() setting arg.rl_maxsegs to 0 as a new
failure mode. Previously we just ignored this case, corrupting our
view of the TX ring.
o In re_txeof():
- Don't clear IFF_DRV_OACTIVE unless there are at least 4 free TX
descriptors. Further down the road re_encap() will bail if there
aren't at least 4 free TX descriptors, causing re_start() to
abort and prepend the dequeued mbuf again so it makes no sense
to pretend we could process mbufs again when in fact we won't.
While at it replace this magic 4 with a macro RL_TX_DESC_THLD
throughout this driver.
- Don't cancel the watchdog timeout as soon as there's at least one
free TX descriptor but instead only if all descriptors have been
handled. It's perfectly normal, especially in the DEVICE_POLLING
case, that re_txeof() is called when only a part of the enqueued
TX descriptors have been handled, causing the watchdog to be
disarmed prematurely.
o In re_encap():
- If m_defrag() fails just drop the packet like other NIC drivers
do. This should only happen when there's a mbuf shortage, in which
case it was possible to end up with an IFQ full of packets which
couldn't be processed as they couldn't be defragmented as they
were taking up all the mbufs themselves. This includes adjusting
re_start() to not trying to prepend the mbuf (chain) if re_encap()
has freed it.
- Remove dupe initialization of members of struct rl_dmaload_arg to
values that didn't change since trying to process the fragmented
mbuf chain.
While at it remove an unused member from struct rl_dmaload_arg.
o In re_start() remove a abandoned, banal comment. The corresponding
code was moved to re_attach() some time ago.
marius [Tue, 30 Jan 2007 14:00:59 +0000 (14:00 +0000)]
MFC: if_re.c 1.80, if_rlreg.h 1.63
- Use the re_tick() callout instead of if_slowtimo() for driving
re_watchdog() in order to avoid races accessing if_timer.
- Use bus_get_dma_tag() so re(4) works on platforms requiring it;
though for RELENG_6 this is a NOOP so far and just MFC'ed for diff
reduction.
- Remove invalid BUS_DMA_ALLOCNOW when creating the parent DMA tag
and the tags that are used for static memory allocations.
- Don't bother to set if_mtu to ETHERMTU, ether_ifattach() does that.
- Remove an unused variable in re_intr().
mlaier [Tue, 30 Jan 2007 12:46:05 +0000 (12:46 +0000)]
MFC, subr_firmware.c 1.7:
In case we are supplied with an imagename that matches a module, but not a
firmware in that module (eventhough this is a programming error) - drop
the reference to the module again.
marius [Tue, 30 Jan 2007 10:55:32 +0000 (10:55 +0000)]
MFC: 1.70 (partial), 1.74
- Sync descriptions of RL_HWREV_8168_SPIN{1,2} with HEAD (merge botch
of rev. 1.70 in rev. 1.46.2.17).
- Consistently use if_printf() only in interface methods: if_start(),
if_watchdog, etc., or in functions used only in these methods.
In all other functions in the driver use device_printf().
csjp [Mon, 29 Jan 2007 17:48:33 +0000 (17:48 +0000)]
MFC the AUDIT_SYSCALL_{EXIT|ENTER} macros. This unbreaks auditing for
amd64 by allocating and committing audit records for syscalls. It should
be noted that the submission of userspace records are not affected by
this bug.
sam [Sun, 28 Jan 2007 04:10:40 +0000 (04:10 +0000)]
MFC: half- and quarter-rate channel support
enable write of most hw.ath sysctl knobs
remove public safety band bandaids w/ more recent hal available
allow net80211 to install default rate sets
kientzle [Sat, 27 Jan 2007 06:44:54 +0000 (06:44 +0000)]
MFC: synchronize libarchive with FreeBSD-CURRENT. This includes
the following:
* License updates.
* Fixes for FreeBSD/arm
* New read_open_filename, read_open_memory
* New write_open_filename, write_open_memory
* Write-blocking cleanup (cperciva@)
* Adjust API so read_open/write_open funcs only need public API
* Portability improvements (casts, include guards, etc.)
* Properly pad sparse archive entries with blocks of zero bytes (cperciva@)
* Correct copy of data to file when very large reads are possible
* Be more flexible about dir permissions to avoid some fixups
* Correct skip handling for entries over 2G (cperciva@)
* ISO9660: skip entries faster, support entries over 2G
* Tar: correct position accounting when skipping large entries (cperciva@)
* Support unbuffered write as a special case (blocksize=0) (cperciva@)
* Documentation corrections, improvements
* Spelling corrections (cperciva@)
* Improve some internal error returns
A few of these changes break the API/ABI and are therefore conditional
on the version number. FreeBSD 6 will continue to use libarchive 1.x,
which will continue to use the old API/ABI. When all of these changes
are ready, the libarchive version number will be changed in -CURRENT
to enable the new API. Hopefully, this will allow the actual source
to remain identical between FreeBSD 6 and 7; only the version
parameters in the Makefile will be different.
cperciva [Tue, 23 Jan 2007 12:13:29 +0000 (12:13 +0000)]
MFC revisions 1.48-1.50:
* Print error messages where appropriate, and print the right one.
* Properly handle errors in archive_write_close.
* Correct resource leak in @<archive> handling.
delphij [Sat, 20 Jan 2007 07:05:55 +0000 (07:05 +0000)]
MFC revision 1.4
date: 2006/12/20 17:10:53; author: delphij; state: Exp; lines: +5 -0
On amd64 platform, use linux32 headers so 32-bit Linux applications
would be able to work with aac(4).
This approach is used by some other drivers as well. However, we
need a more generic way to do this in order to avoid having to
special case headers in individual drivers for each platform.
csjp [Sat, 20 Jan 2007 02:19:57 +0000 (02:19 +0000)]
MFC hosts.allow revision 1.22
Since NIS is an RPC based service, add a note that when adjusting access
controls in NIS, similar access controls should be considered for the
rpcbind as well.
csjp [Sat, 20 Jan 2007 02:19:09 +0000 (02:19 +0000)]
MFC df.c revision 1.66
Based on The Open Group Base Specifications Issue 6 IEEE Std 1003.1, our
current implementation of df(1) is does not properly format the output under
certain conditions. Right now -kP and -Pk are not the same thing. Further,
when we set the BLOCKSIZE environment variable, we use "1k" instead of "1024",
making the header display incorrectly.
jhb [Fri, 19 Jan 2007 23:01:34 +0000 (23:01 +0000)]
MFC: Change the life cycle of bpf interface objects to close attach/detach
races with bpf(4). This includes shims to preserve the ABI for any old
modules. For more details see the commit log for 1.166 of sys/net/bpf.c.
delphij [Thu, 18 Jan 2007 16:14:19 +0000 (16:14 +0000)]
MFC if_bce.c (1.23-24), if_bcereg.h (1.11):
- Instead of if_watchdog/if_timer interface use our own timer
that piggybacks on bce_tick() callout.
- Instead of unconditionally resetting the controller, try to
skip the reset in case we got a pause frame, like em(4) did.
- Lock bce_tick() using callout_init_mtx().
Add a new address cache type called sticky. On an interface marked sticky any
address learned by the bridge is made permanent, the address will not age out
and most importantly will not migrate to another interface.
This can be used to stop mac address poisoning or clients roaming in much the
same way as static entries without the hassle of preloading the table.