]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoHandle memory allocation failures in include().
brucec [Wed, 23 Feb 2011 17:17:05 +0000 (17:17 +0000)]
Handle memory allocation failures in include().

PR: i386/85652
Submitted by: Ben Thomas <bthomas at virtualiron.com>
MFC after: 3 days

13 years agoAdd a catch-all for miscellaneous RAID volumes while seeking a better
nwhitehorn [Wed, 23 Feb 2011 13:51:41 +0000 (13:51 +0000)]
Add a catch-all for miscellaneous RAID volumes while seeking a better
solution here. It would really help if CAM devices were part of newbus.

13 years agoMove the max_threads_per_proc and max_threads_hits variables to the
kib [Wed, 23 Feb 2011 13:50:24 +0000 (13:50 +0000)]
Move the  max_threads_per_proc and max_threads_hits variables to the
file where they are used. Declare the kern.threads sysctl node at the
same location. Since no external use for the variables exists, make them
static.

Discussed with: dchagin
MFC after: 1 week

13 years agoRevert previous change, the existing check was correct.
jhb [Wed, 23 Feb 2011 13:25:42 +0000 (13:25 +0000)]
Revert previous change, the existing check was correct.

Pointy hat to: jhb

13 years agoUse umtx_key objects to uniquely identify futexes. Private futexes in
jhb [Wed, 23 Feb 2011 13:23:28 +0000 (13:23 +0000)]
Use umtx_key objects to uniquely identify futexes.  Private futexes in
different processes that happen to use the same user address in the
separate processes will now be treated as distinct futexes rather than the
same futex.  We can now honor shared futexes properly by mapping them to a
PROCESS_SHARED umtx_key.  Private futexes use THREAD_SHARED umtx_key
objects.

In conjunction with: dchagin
Reviewed by: kib
MFC after: 1 week

13 years agoExpose the umtx_key structure and API to the rest of the kernel.
jhb [Wed, 23 Feb 2011 13:19:14 +0000 (13:19 +0000)]
Expose the umtx_key structure and API to the rest of the kernel.

MFC after: 3 days

13 years agoProperly handle BARs bigger than 4G. The '1' was treated as an int
jhb [Wed, 23 Feb 2011 12:58:50 +0000 (12:58 +0000)]
Properly handle BARs bigger than 4G.  The '1' was treated as an int
causing the size calculation to be truncated to the size of an int
(32-bits on all current architectures).

Submitted by: Anish  akgupt3 of gmail
MFC after: 1 week

13 years agoFix off-by-one error in check against max_threads_per_proc.
jhb [Wed, 23 Feb 2011 12:56:25 +0000 (12:56 +0000)]
Fix off-by-one error in check against max_threads_per_proc.

Submitted by: arundel
MFC after: 1 week

13 years agoCalculate and return the count in vmspace_swap_count as a vm_offset_t
brucec [Wed, 23 Feb 2011 10:28:37 +0000 (10:28 +0000)]
Calculate and return the count in vmspace_swap_count as a vm_offset_t
instead of an int to avoid overflow.

While here, clean up some style(9) issues.

PR: kern/152200
Reviewed by: kib
MFC after: 2 weeks

13 years agoFix typos - remove duplicate "is".
brucec [Wed, 23 Feb 2011 09:22:33 +0000 (09:22 +0000)]
Fix typos - remove duplicate "is".

PR: docs/154934
Submitted by: Eitan Adler <lists at eitanadler.com>
MFC after: 3 days

13 years agoRemove unnecessary controller reinitialization which resulted in
yongari [Wed, 23 Feb 2011 02:40:31 +0000 (02:40 +0000)]
Remove unnecessary controller reinitialization which resulted in
link flips during alias address insertion or dhclient operation.
While I'm here remove dc_reset() in DC_ISR_BUS_ERR case. Device is
fully reinitialized again in dc_init_locked().

13 years agoUpdate how accounting log files are rotated.
dougb [Tue, 22 Feb 2011 21:13:40 +0000 (21:13 +0000)]
Update how accounting log files are rotated.

The old version had a race between the time that the old file was
cp'ed to acct.0 and the time that 'sa -s' was run that prevented
the commands that occurred in the meantime from being backed up.

It's also arguable that the old version was inefficient in using
cp which can be a problem on a space-constrained system.

This version avoids both problems, albeit it's considerably more
complicated. The advantage of putting the log rotation in the rc.d
script is that it can handle the _enable and _file questions without
having to do gymnastics to discover either value in the periodic script.

As a side effect of reviewing the rc.d script I cleaned it up a bit.

13 years agoAdded patch-functions-upgrade which should fix some kernel panics
jpaetzel [Tue, 22 Feb 2011 19:37:12 +0000 (19:37 +0000)]
Added patch-functions-upgrade which should fix some kernel panics
doing upgrades and uninstalling linux compat ports.

Submitted by: Joerg-Christian Boehme <joerg@chaosdorf.de>
Approved by: kib (mentor, implicit)

13 years agoBetter method for grabbing disk name, dmesg may produce mangled output.
jpaetzel [Tue, 22 Feb 2011 19:18:56 +0000 (19:18 +0000)]
Better method for grabbing disk name, dmesg may produce mangled output.

Approved by: kib (mentor, implicit)

13 years agoMake sure to only accept and handle action frames which are for us. In
bschmidt [Tue, 22 Feb 2011 19:05:42 +0000 (19:05 +0000)]
Make sure to only accept and handle action frames which are for us. In
promiscuous mode we might receive stuff which otherwise gets filtered
by hardware.

13 years agoXref makefs(8).
jh [Tue, 22 Feb 2011 15:31:40 +0000 (15:31 +0000)]
Xref makefs(8).

PR: 154708
Submitted by: jhs

13 years agoFix whitespace nit.
jhb [Tue, 22 Feb 2011 14:58:14 +0000 (14:58 +0000)]
Fix whitespace nit.

13 years agoEliminate two dubious attempts at optimizing the implementation of a
alc [Tue, 22 Feb 2011 14:47:10 +0000 (14:47 +0000)]
Eliminate two dubious attempts at optimizing the implementation of a
file's last accessed, modified, and changed times:

TMPFS_NODE_ACCESSED and TMPFS_NODE_CHANGED should be set unconditionally
in tmpfs_remove() without regard to the number of hard links to the file.
Otherwise, after the last directory entry for a file has been removed, a
process that still has the file open could read stale values for the last
accessed and changed times with fstat(2).

Similarly, tmpfs_close() should update the time-related fields even if all
directory entries for a file have been removed.  In this case, the effect
is that the time-related fields will have values that are later than
expected.  They will correspond to the time at which fstat(2) is called.

In collaboration with: kib
MFC after: 1 week

13 years agoAdd support for optional distributions, installation of the ports tree and
nwhitehorn [Tue, 22 Feb 2011 13:56:59 +0000 (13:56 +0000)]
Add support for optional distributions, installation of the ports tree and
src. Fitting all of this on a single CD along with a full system requires
changing the default compression algorithm from gzip to xz.

13 years agoMFi386: revision 218926
nyan [Tue, 22 Feb 2011 13:52:03 +0000 (13:52 +0000)]
MFi386: revision 218926

  In sys/boot/i386/boot2/boot2.c, change the type of the 'opts' variable
  from uint16_t back to uint32_t.  The actual option bitmasks (RB_* and
  RBX_*) assume at least a 32 bit variable.

  Submitted by: rdivacky

13 years agoUse a single list to simplify future maintenance and ensure all list items are
lstewart [Tue, 22 Feb 2011 10:09:34 +0000 (10:09 +0000)]
Use a single list to simplify future maintenance and ensure all list items are
aligned the same (no functional change at the moment as both list items are the
same number of characters).

Sponsored by: FreeBSD Foundation
MFC after: 3 months
X-MFC with: 218912

13 years agoMake code more friendly to the non-C99 compilers - don't allocate
sobomax [Tue, 22 Feb 2011 09:11:47 +0000 (09:11 +0000)]
Make code more friendly to the non-C99 compilers - don't allocate
local variables in the `for' loop declaration. This allows trunk
newsyslog.c to be compiled on 7.x. This change should be no-op from
the functional POV.

13 years agoRegen src.conf(5) after r218941 and r218942.
uqs [Tue, 22 Feb 2011 08:21:22 +0000 (08:21 +0000)]
Regen src.conf(5) after r218941 and r218942.

13 years agoThe default for FDT has changed, rename the flag/options file.
uqs [Tue, 22 Feb 2011 08:20:12 +0000 (08:20 +0000)]
The default for FDT has changed, rename the flag/options file.

13 years agoFlesh out WITHOUT_GROFF support to DTRT.
uqs [Tue, 22 Feb 2011 08:13:49 +0000 (08:13 +0000)]
Flesh out WITHOUT_GROFF support to DTRT.

A full featured groff is required during buildworld, so build it always
and don't rely on it being present on the host system.

vgrind(1) is tightly coupled to a roff processor and will not be
built/installed when groff is disabled. Also much of the roff'ed
documentation under share/doc will not be built/installed when
WITHOUT_GROFF is defined.

Reviewed by: ru (partial)

13 years agoTeach tools/install.sh the -d directory mode.
uqs [Tue, 22 Feb 2011 08:07:17 +0000 (08:07 +0000)]
Teach tools/install.sh the -d directory mode.

Sync up with flags understood by install(1) [1], and make install(1)'s
usage output not hide the clearly documented -M flag.

PR: misc/154739 [1]
Submitted by: arundel

13 years agoFix bzero() for 64-bit.
jchandra [Tue, 22 Feb 2011 07:49:51 +0000 (07:49 +0000)]
Fix bzero() for 64-bit.

The existing implementation of bzero incorrectly clears bytes when the
start address is not word aligned. Fix it by using REG_SHI macro which
works on both 32 and 64 bit.

Submitted by: Artem Belevich (fbsdlist at src cx)

13 years ago- Fix QA issues
miwi [Tue, 22 Feb 2011 05:13:26 +0000 (05:13 +0000)]
- Fix QA issues

PR: misc/146687
Submitted by: Garrett Cooper <gcooper@FreeBSD.org>
Approved by: rwatson (mentor)

13 years ago- Remove no longer in use
miwi [Tue, 22 Feb 2011 05:10:13 +0000 (05:10 +0000)]
- Remove no longer in use

PR: kern/152354
Submitted by: vehemens <vehemens@verizon.net>
Discussion with:kib
Approved by: rwatson (mentor)

13 years agoBack out 218933 and 281934. The easy cases still worked, but some
imp [Tue, 22 Feb 2011 04:49:57 +0000 (04:49 +0000)]
Back out 218933 and 281934.  The easy cases still worked, but some
hard cases broke in worse ways than the status quo.  Back them out
until that can be resolved.

13 years agoDon't set the RTS/CTS enable bit per-scenario if the global RTS/CTS
adrian [Tue, 22 Feb 2011 04:41:04 +0000 (04:41 +0000)]
Don't set the RTS/CTS enable bit per-scenario if the global RTS/CTS
flags aren't set.

13 years agoSelect building CLANG based on ${TARGET_ARCH} and existence of
imp [Tue, 22 Feb 2011 04:07:15 +0000 (04:07 +0000)]
Select building CLANG based on ${TARGET_ARCH} and existence of
WITH{,OUT}_CLANG.  We default to yes on some archs, no on others,
unless WITHOUT_CLANG or WITH_CLANG is defined respectively.

13 years agoTesting based on MACHINE_ARCH is problematic. Default to yes to build
imp [Tue, 22 Feb 2011 04:03:33 +0000 (04:03 +0000)]
Testing based on MACHINE_ARCH is problematic.  Default to yes to build
clang.  A separate change will fix buildworld to default to yes or no
based on the target.

13 years agoShuffle around the RTS/CTS rate/duration logic.
adrian [Tue, 22 Feb 2011 00:37:53 +0000 (00:37 +0000)]
Shuffle around the RTS/CTS rate/duration logic.

* Turn ath_tx_calc_ctsduration() into a function that
  returns the ctsduration, or -1 for HT rates;
* add a printf() to ath_tx_calc_ctsduration() which will be
  very loud if somehow that function is called with an MCS
  rate;
* Add ath_tx_get_rtscts_rate() which returns the RTS/CTS
  rate to use for the given data rate, incl. the short
  preamble flag;
* Only call ath_tx_calc_ctsduration() for non-11n chipsets;
  11n chipsets don't require the rtscts duration to be
  calculated.

13 years ago* Don't setup the scenario if the try count is 0
adrian [Tue, 22 Feb 2011 00:01:19 +0000 (00:01 +0000)]
* Don't setup the scenario if the try count is 0
* Comment what else is going on during rate scenario setup

13 years agoResurrect ofw_pci_if.m from r178578.
marius [Mon, 21 Feb 2011 21:13:18 +0000 (21:13 +0000)]
Resurrect ofw_pci_if.m from r178578.

13 years agoIt is IEEE80211_SUPPORT_XXX not IEEE80211_XXX_SUPPORT.
bschmidt [Mon, 21 Feb 2011 20:02:02 +0000 (20:02 +0000)]
It is IEEE80211_SUPPORT_XXX not IEEE80211_XXX_SUPPORT.

13 years agoAdd a new mgmt subtype "ACTION NO ACK" defined in 802.11n-2009, while here
bschmidt [Mon, 21 Feb 2011 19:59:43 +0000 (19:59 +0000)]
Add a new mgmt subtype "ACTION NO ACK" defined in 802.11n-2009, while here
clean up parts of the *_recv_mgmt() functions.
- make sure appropriate counters are bumped and debug messages are printed
- order the unhandled subtypes by value and add a few missing ones
- fix some whitespace nits
- remove duplicate code in adhoc_recv_mgmt()
- remove a useless comment, probably left in while c&p

13 years agoIn sys/boot/i386/boot2/boot2.c, change the type of the 'opts' variable
dim [Mon, 21 Feb 2011 19:46:02 +0000 (19:46 +0000)]
In sys/boot/i386/boot2/boot2.c, change the type of the 'opts' variable
from uint16_t back to uint32_t.  The actual option bitmasks (RB_* and
RBX_*) assume at least a 32 bit variable.

Submitted by: rdivacky

13 years agoFix formatting of new stat sysctls; add descriptions
adrian [Mon, 21 Feb 2011 19:22:45 +0000 (19:22 +0000)]
Fix formatting of new stat sysctls; add descriptions

13 years agoAdd a new counter which tracks frames TX'ed with HT protection.
adrian [Mon, 21 Feb 2011 19:19:05 +0000 (19:19 +0000)]
Add a new counter which tracks frames TX'ed with HT protection.

13 years agoAdd a vocal warning to ath_hal_computetxtime() function is used for non-11n rates.
adrian [Mon, 21 Feb 2011 18:58:58 +0000 (18:58 +0000)]
Add a vocal warning to ath_hal_computetxtime() function is used for non-11n rates.

It's used to calculate:

* the initial per-rate entries for short/long preamble ACK durations;
* packet durations for TDMA slot decisions;
* RTS/CTS protection durations;
* updating the duration field in the 802.11 frame header

This way invalid durations will generate a warning, prompting for it to be
fixed.

13 years agoMake private functions static.
brucec [Mon, 21 Feb 2011 16:21:43 +0000 (16:21 +0000)]
Make private functions static.

PR: kern/43611
Submitted by: Matt Emmerton <matt at gsicomp.on.ca>
Reviewed by: kib
MFC after: 3 days

13 years agomdoc(7) markup.
pluknet [Mon, 21 Feb 2011 16:03:39 +0000 (16:03 +0000)]
mdoc(7) markup.

Approved by: avg (mentor), kib (mentor)
MFC after: 3 days

13 years agoDefault to the lowest negotiated rate for mgmt/multicast traffic in 11n mode
adrian [Mon, 21 Feb 2011 15:49:59 +0000 (15:49 +0000)]
Default to the lowest negotiated rate for mgmt/multicast traffic in 11n mode

The current code transmits management and multicast frames at MCS 0.
What it should do is check whether the negotiated basic set is zero (and
the MCS set is not) before making this decision.

For now, simply default to the lowest negotiated rate, rather than
MCS 0. This fixes the behaviour with at least the DLINK DIR-825, which
ACKs but silently ignores block-ack (BA) response frames.

13 years agoAdd some error checking on the return values of chdir() and calloc(). The
nwhitehorn [Mon, 21 Feb 2011 14:28:31 +0000 (14:28 +0000)]
Add some error checking on the return values of chdir() and calloc(). The
first might actually happen, so it displays the error message in a prettier
way.

Found by: Coverity Prevent(tm)
CID: 9121, 9122, 9123, 9124

13 years agoActually install the example Khelp module committed in r218545.
lstewart [Mon, 21 Feb 2011 13:22:29 +0000 (13:22 +0000)]
Actually install the example Khelp module committed in r218545.

Sponsored by: FreeBSD Foundation
MFC after: 4 weeks
X-MFC with: r218545

13 years agoGet myself a brain, move the call to init_param1() before the first use in
cognet [Mon, 21 Feb 2011 13:11:05 +0000 (13:11 +0000)]
Get myself a brain, move the call to init_param1() before the first use in
at91_machdep.c, and do it for the files I forgot the first time

Reported by: andrew
Submitted by: pluknet

13 years agoFinal commit to round out the "Five New TCP Congestion Control Algorithms for
lstewart [Mon, 21 Feb 2011 11:56:11 +0000 (11:56 +0000)]
Final commit to round out the "Five New TCP Congestion Control Algorithms for
FreeBSD" FreeBSD Foundation funded project.

- Add new man pages for the modular congestion control, Khelp and Hhook
  frameworks (cc.4, cc.9, khelp.9 and hhook.9).

- Add new man pages for each available congestion control algorithm (cc_chd.4,
  cc_cubic.4, cc_hd.4, cc_htcp.4, cc_newreno.4 and cc_vegas.4).

- Add a new man page for the Enhanced Round Trip Time (ERTT) Khelp module
  (h_ertt.4).

- Update the TCP (tcp.4) man page to mention the TCP_CONGESTION socket option,
  cross reference to cc.4 and remove references to the retired
  "net.inet.tcp.newreno" sysctl MIB variable.

In collaboration with: David Hayes <dahayes at swin edu au> and
Grenville Armitage <garmitage at swin edu au>
Sponsored by: FreeBSD Foundation
MFC after: 3 months

13 years agoThe FD_FORM ioctl used to ignore errors from the floppy controller; now when
brucec [Mon, 21 Feb 2011 09:56:08 +0000 (09:56 +0000)]
The FD_FORM ioctl used to ignore errors from the floppy controller; now when
it encounters an error it returns an error from the ioctl.
Ignore any errors when using the FD_FORM ioctl.

PR: kern/103862
MFC after: 3 days

13 years agoFix typos - remove duplicate "the".
brucec [Mon, 21 Feb 2011 09:01:34 +0000 (09:01 +0000)]
Fix typos - remove duplicate "the".

PR: bin/154928
Submitted by: Eitan Adler <lists at eitanadler.com>
MFC after:  3 days

13 years agoModify the AR5416 11na rate table to use 24mb OFDM 11a for control traffic,
adrian [Mon, 21 Feb 2011 05:10:34 +0000 (05:10 +0000)]
Modify the AR5416 11na rate table to use 24mb OFDM 11a for control traffic,
rather than MCS 0.

Using MCS0 for protecting 11a rates seems a bit silly.

13 years agoImplement setting the short preamble bit if it's needed for the current node.
adrian [Mon, 21 Feb 2011 03:52:51 +0000 (03:52 +0000)]
Implement setting the short preamble bit if it's needed for the current node.

Short preamble rates are only for legacy rates; MCS rate codes don't have a short
preamble code like this.

13 years agoAdd opteron-sse3, athlon64-sse3 and k8-sse3 cpu types to bsd.cpu.mk.
mm [Sun, 20 Feb 2011 22:32:21 +0000 (22:32 +0000)]
Add opteron-sse3, athlon64-sse3 and k8-sse3 cpu types to bsd.cpu.mk.
- add "sse3" to MACHINE_CPU for the new cpu types
- for i386, default to CPUTYPE=prescott for the new cpu types

PR: gnu/154906
Discussed with: kib, kan, dim
MFC after: 2 weeks

13 years agoBackport svn r124339 from gcc 4.3 and add opteron-sse3, athlon64-sse3
mm [Sun, 20 Feb 2011 22:25:23 +0000 (22:25 +0000)]
Backport svn r124339 from gcc 4.3 and add opteron-sse3, athlon64-sse3
and k8-sse3 cpu-types for -march=/-mtune= gcc options.
These new cpu-types include the SSE3 instruction set that is supported
by all newer AMD Athlon 64 and Opteron processors.
All three cpu-types are supported by clang and all gcc versions
starting with 4.3 SVN rev 124339 (at that time GPLv2 licensed).

PR: gnu/154906
Discussed with: kib, kan, dim
Obtained from: gcc 4.3 (r124339, GPLv2 licensed)
MFC after: 2 weeks

13 years agoClang now supports profiling, so remove the part that says it doesn't
dim [Sun, 20 Feb 2011 21:58:07 +0000 (21:58 +0000)]
Clang now supports profiling, so remove the part that says it doesn't
from sys/conf/kern.pre.mk.

13 years agoUpgrade our copy of llvm/clang to r126079, from upstream's trunk.
dim [Sun, 20 Feb 2011 19:33:47 +0000 (19:33 +0000)]
Upgrade our copy of llvm/clang to r126079, from upstream's trunk.

This contains many improvements, primarily better C++ support, an
integrated assembler for x86 and support for -pg.

13 years agoAdd notes about ASCII/Hex WEP keys
imp [Sun, 20 Feb 2011 17:54:49 +0000 (17:54 +0000)]
Add notes about ASCII/Hex WEP keys

13 years agosh: Add some tests for omitting whitespace whereever possible.
jilles [Sun, 20 Feb 2011 17:28:58 +0000 (17:28 +0000)]
sh: Add some tests for omitting whitespace whereever possible.

13 years agoRemove a hack made obsolete by the binutils 2.17 merge.
nwhitehorn [Sun, 20 Feb 2011 16:16:42 +0000 (16:16 +0000)]
Remove a hack made obsolete by the binutils 2.17 merge.

13 years agosh: Split off some special behaviour into separate tests.
jilles [Sun, 20 Feb 2011 14:18:58 +0000 (14:18 +0000)]
sh: Split off some special behaviour into separate tests.

This allows some other shells to pass the tests for basic behaviour.

13 years agoVendor import of clang trunk r126079:
dim [Sun, 20 Feb 2011 13:06:31 +0000 (13:06 +0000)]
Vendor import of clang trunk r126079:
http://llvm.org/svn/llvm-project/cfe/trunk@126079

13 years agoVendor import of llvm trunk r126079:
dim [Sun, 20 Feb 2011 12:57:14 +0000 (12:57 +0000)]
Vendor import of llvm trunk r126079:
http://llvm.org/svn/llvm-project/llvm/trunk@126079

13 years agoAdd restrict keyword to pthread_sigmask prototype and manpage.
kib [Sun, 20 Feb 2011 09:52:29 +0000 (09:52 +0000)]
Add restrict keyword to pthread_sigmask prototype and manpage.

MFC after: 1 week

13 years agoDo not clobber %rdx.
dchagin [Sun, 20 Feb 2011 07:58:30 +0000 (07:58 +0000)]
Do not clobber %rdx.
Before calling vfork() syscall the linux user-space stores the current PID
in the %rdx and restore it when the parent process will leave the kernel.

13 years agoAdd complex(3) manual page documenting our partial support for C99
murray [Sun, 20 Feb 2011 05:29:00 +0000 (05:29 +0000)]
Add complex(3) manual page documenting our partial support for C99
complex arithmetic in libm.

Reviewed by: David Schultz <das@FreeBSD.org>
MFC after: 2 weeks

13 years agoAdd a note about AXFR of important zones being available from ICANN
dougb [Sun, 20 Feb 2011 00:59:39 +0000 (00:59 +0000)]
Add a note about AXFR of important zones being available from ICANN

13 years agoAdd more udav device ID's.
hselasky [Sat, 19 Feb 2011 22:53:50 +0000 (22:53 +0000)]
Add more udav device ID's.

Submitted by: Rick van der Zwet <info@rickvanderzwet.nl>
MFC after: 7 days
Approved by: thompsa (mentor)

13 years agotmpfs_remove() isn't modifying the file's data, so it shouldn't set
alc [Sat, 19 Feb 2011 21:04:36 +0000 (21:04 +0000)]
tmpfs_remove() isn't modifying the file's data, so it shouldn't set
TMPFS_NODE_MODIFIED on the node.

PR: 152488
Submitted by: Anton Yuzhaninov
Reviewed by: kib
MFC after: 1 week

13 years ago- Add support for MosChip 9865 Single 1284 Printer port
miwi [Sat, 19 Feb 2011 17:38:51 +0000 (17:38 +0000)]
- Add support for MosChip 9865 Single 1284 Printer port

PR: kern/152663
Submitted by: Jonathan Chen <jonc@chen.org.nz>
Approved by: rwatson (mentor)

13 years agoDon't present the user with spurious errors when overwriting a disk with
nwhitehorn [Sat, 19 Feb 2011 15:22:06 +0000 (15:22 +0000)]
Don't present the user with spurious errors when overwriting a disk with
a deleted, but uncommitted, gpart.

Reported by: brucec

13 years agoUpdate the icmp example to show allowing only the safe types.
brucec [Sat, 19 Feb 2011 14:57:00 +0000 (14:57 +0000)]
Update the icmp example to show allowing only the safe types.

Suggested by: Tom Judge <tom at tomjudge.com>
MFC after: 3 days

13 years agoThe PC98 gpart module supports labels now.
nwhitehorn [Sat, 19 Feb 2011 14:49:49 +0000 (14:49 +0000)]
The PC98 gpart module supports labels now.

13 years agoDon't restore old mount options and flags if VFS_MOUNT(9) succeeds but
jh [Sat, 19 Feb 2011 14:27:14 +0000 (14:27 +0000)]
Don't restore old mount options and flags if VFS_MOUNT(9) succeeds but
vfs_export() fails. Restoring old options and flags after successful
VFS_MOUNT(9) call may cause the file system internal state to become
inconsistent with mount options and flags. Specifically the FFS super
block fs_ronly field and the MNT_RDONLY flag may get out of sync.

PR: kern/133614
Discussed on: freebsd-hackers

13 years agosh: Do not use "local" in the test runner as POSIX and ksh93 do not have it.
jilles [Sat, 19 Feb 2011 13:23:13 +0000 (13:23 +0000)]
sh: Do not use "local" in the test runner as POSIX and ksh93 do not have it.

13 years agosh: Make execution/fork1.0 work even if the basename of ${SH} is not "sh".
jilles [Sat, 19 Feb 2011 13:22:18 +0000 (13:22 +0000)]
sh: Make execution/fork1.0 work even if the basename of ${SH} is not "sh".

13 years agoAdd a utility, utxrm(8).
ed [Sat, 19 Feb 2011 11:44:04 +0000 (11:44 +0000)]
Add a utility, utxrm(8).

Most of the ports I broke when I imported utmpx, were simple management
utilities for the utmp database, allowing you to add/remove entries
manually.

Add a small tool called utxrm(8), which allows you to remove an entry
from the utmpx database by hand. This is useful when a login daemon
crashes or fails to remove the entry during shutdown.

13 years agoProperly styleify utmpx code and document error codes in man page.
ed [Sat, 19 Feb 2011 11:31:56 +0000 (11:31 +0000)]
Properly styleify utmpx code and document error codes in man page.

Submitted by: Garrett Cooper

13 years agoAdd support to set a slice name.
nyan [Sat, 19 Feb 2011 11:09:38 +0000 (11:09 +0000)]
Add support to set a slice name.

13 years agoImprove 256 color support.
ed [Sat, 19 Feb 2011 11:06:00 +0000 (11:06 +0000)]
Improve 256 color support.

- Add screen-256color,
- Improve rxvt-256color to set pa and op properly.
- Add rxvt-unicode-256color as an alias to rxvt-256color.

PR: conf/152713, conf/153164
Submitted by: Alexander Verbod and Frédéric Perrin
MFC after: 2 weeks

13 years agoMFi386: revision 218744
nyan [Sat, 19 Feb 2011 10:36:05 +0000 (10:36 +0000)]
MFi386: revision 218744

  To avoid excessive code duplication create wrapper for fill regs
  from stack frame.

13 years agoMFi386: revision 218745
nyan [Sat, 19 Feb 2011 10:32:12 +0000 (10:32 +0000)]
MFi386: revision 218745

  Remove reading of symbols from a.out loaded files.

13 years agoAllow users to create ufs1 filesystems via the noninteractive install.cfg
brucec [Sat, 19 Feb 2011 09:33:53 +0000 (09:33 +0000)]
Allow users to create ufs1 filesystems via the noninteractive install.cfg
system.

PR: bin/113979
MFC after: 3 days

13 years agoRemove the quotas option from the Startup Services menu.
brucec [Sat, 19 Feb 2011 09:24:24 +0000 (09:24 +0000)]
Remove the quotas option from the Startup Services menu.
GENERIC has no support for quotas so this option has no effect.

PR: bin/123237
Submitted by: Lawrence Mayer <lawmay3 at i12.com>
MFC after: 3 days

13 years agoIn the distribution list, 'A' is listed as the key to press to select both
brucec [Sat, 19 Feb 2011 09:08:13 +0000 (09:08 +0000)]
In the distribution list, 'A' is listed as the key to press to select both
'All' and 'Minimal'. Update the keys for Minimal and Custom to avoid the
conflict.

PR: bin/153809
Submitted by: Janne Snabb <snabb at epipe.com>
MFC after: 3 days

13 years agov_mountedhere is a member of the union. Check that the vnodes have
kib [Sat, 19 Feb 2011 07:47:25 +0000 (07:47 +0000)]
v_mountedhere is a member of the union. Check that the vnodes have
proper type before using the member.

Reported and tested by: Michael Butler <imb protected-networks net>

13 years agos/u_intXX_t/uintXX_t/g
yongari [Sat, 19 Feb 2011 03:32:10 +0000 (03:32 +0000)]
s/u_intXX_t/uintXX_t/g

13 years agoConsistently use a tab character instead of space after #define.
yongari [Sat, 19 Feb 2011 03:23:19 +0000 (03:23 +0000)]
Consistently use a tab character instead of space after #define.
No functional changes.

13 years agoCount how many frames driver lost in interrupt handler. This
yongari [Sat, 19 Feb 2011 03:01:24 +0000 (03:01 +0000)]
Count how many frames driver lost in interrupt handler. This
register is cleared on read so make sure to clear it in driver
initialization phase.

13 years agoSplit common TX/RX descriptor DMA tag to TX and RX DMA tags
yongari [Sat, 19 Feb 2011 02:47:10 +0000 (02:47 +0000)]
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

13 years agoRearrange interrupt handler a bit and remove forever loop.
yongari [Sat, 19 Feb 2011 01:37:28 +0000 (01:37 +0000)]
Rearrange interrupt handler a bit and remove forever loop.
Previously dc(4) always checked whether there is pending interrupts
and this consumed a lot of CPU cycles in interrupt handler. Limit
the number of processing for TX/RX frames to 16. Also allow sending
frames in the loop not to starve TX under high RX load.
Reading DC_ISR register should be protected with driver lock,
otherwise interrupt handler could be run(e.g. link state change)
before the completion of dc_init_locked().

While I'm here remove unneeded code.

13 years agoSend frames only when there is a valid link and driver is running
yongari [Sat, 19 Feb 2011 00:00:32 +0000 (00:00 +0000)]
Send frames only when there is a valid link and driver is running
as well as controller has enough free TX descriptors.
Remove check for number of queued frames before attempting to
transmit. I guess it was added to allow draining queued frames
even if there is no link. I'm under the impression this type of
check should be done in upper layer. No other drivers in tree do
that.

13 years agoFix a long standing bug where driver handed over RX descriptor
yongari [Fri, 18 Feb 2011 23:18:08 +0000 (23:18 +0000)]
Fix a long standing bug where driver handed over RX descriptor
ownership to controller before completion of access to the
descriptor. Driver is faking up status word so it should not give
ownership to controller until it completes RX processing.

13 years agoThere is no need to execute filter configuration when driver is not
yongari [Fri, 18 Feb 2011 23:08:05 +0000 (23:08 +0000)]
There is no need to execute filter configuration when driver is not
running. Remove wrong driver state change in dc_setfilt_xircom().
While I'm here nuke unnecessary assignments.

13 years agoMake sure to clear status word of TX descriptor in dc_list_tx_init().
yongari [Fri, 18 Feb 2011 22:58:46 +0000 (22:58 +0000)]
Make sure to clear status word of TX descriptor in dc_list_tx_init().
Do not update if_opackets if the transmission had failed.

13 years agoModify kdb_trap() so that it re-calls the dbbe_trap function as long as
mdf [Fri, 18 Feb 2011 22:25:11 +0000 (22:25 +0000)]
Modify kdb_trap() so that it re-calls the dbbe_trap function as long as
the debugger back-end has changed.  This means that switching from ddb
to gdb no longer requires a "step" which can be dangerous on an
already-crashed kernel.

Also add a capability to get from the gdb back-end back to ddb, by
typing ^C in the console window.

While here, simplify kdb_sysctl_available() by using
sbuf_new_for_sysctl(), and use strlcpy() instead of strncpy() since the
strlcpy semantic is desired.

MFC after: 1 month

13 years agoTurn off default generation of userland dot symbols on powerpc64 now that
nwhitehorn [Fri, 18 Feb 2011 21:44:53 +0000 (21:44 +0000)]
Turn off default generation of userland dot symbols on powerpc64 now that
we have a binutils that supports it. Kernel dot symbols remain on to assist
DDB.

13 years agoMerge binutils 2.17.50 to head. This brings a number of improvements to
dim [Fri, 18 Feb 2011 20:54:12 +0000 (20:54 +0000)]
Merge binutils 2.17.50 to head.  This brings a number of improvements to
x86 CPU support, better support for powerpc64, some new directives, and
many other things.  Bump __FreeBSD_version, and add a note to UPDATING.

Thanks to the many people that have helped to test this.

Obtained from: projects/binutils-2.17

13 years agosh: Test that the read builtin passes through all byte values
jilles [Fri, 18 Feb 2011 20:51:13 +0000 (20:51 +0000)]
sh: Test that the read builtin passes through all byte values
except NUL, newline and backslash.

This also passes on stable/8.

13 years agoFor controllers that have TX interrupt moderation capability,
yongari [Fri, 18 Feb 2011 20:38:05 +0000 (20:38 +0000)]
For controllers that have TX interrupt moderation capability,
request TX completion interrupt for every 8-th frames. Previously
dc(4) requested TX completion interrupt if number of queued TX
descriptors is greater than 64. This caused a lot of TX completion
interrupt under high TX load once driver queued more than 64 TX
descriptors. It's quite normal to see more than 64 queued TX
descriptors under high TX load.
This change reduces the number of TX completion interrupts to be
less than 17k under high TX load. Because this change does not
generate TX completion interrupt for each frame, add reclaiming
transmitted buffers in dc_tick not to generate false watchdog
timeouts.
While I'm here add check for queued descriptors in dc_txeof() since
there is no more work to do when there is no pending descriptors.