]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoDecrease ACPI-fast timecounter quality to 900 and increase HPET timecounter
jkim [Mon, 23 May 2011 20:12:36 +0000 (20:12 +0000)]
Decrease ACPI-fast timecounter quality to 900 and increase HPET timecounter
quality to 950.  HPET on modern platforms usually have better resolution and
lower latency than ACPI timer.  Effectively this changes default timecounter
hardware from ACPI-fast to HPET by default when both are available.

Discussed with: avg

13 years agoRework store and forward configuration of TX MAC FIFO. Basically it
yongari [Mon, 23 May 2011 20:09:32 +0000 (20:09 +0000)]
Rework store and forward configuration of TX MAC FIFO. Basically it
enables store and forward mode except for jumbo frame on Yukon
Ultra.

13 years agoBKVASIZE was bumped to 16k more than a decade ago.
ru [Mon, 23 May 2011 19:59:01 +0000 (19:59 +0000)]
BKVASIZE was bumped to 16k more than a decade ago.

13 years agoDo not blindly clear entire GPHY control register. It seems some
yongari [Mon, 23 May 2011 19:58:08 +0000 (19:58 +0000)]
Do not blindly clear entire GPHY control register. It seems some
bits of the register is used for other purposes such that clearing
these bits resulted in unexpected results such as corrupted RX
frames or missing LE status updates.  For old controllers like
Yukon EC it had no effect but it caused all kind of troubles on
Yukon Supreme.
This change shall improve stability of controllers like Yukon
Ultra, Ultra2, Extreme, Optima and Supreme.

13 years agoexpr -> sh arithmetic expansion
ru [Mon, 23 May 2011 19:57:12 +0000 (19:57 +0000)]
expr -> sh arithmetic expansion

13 years agoContinue to refine inpcb reference counting and locking, in preparation for
rwatson [Mon, 23 May 2011 19:32:02 +0000 (19:32 +0000)]
Continue to refine inpcb reference counting and locking, in preparation for
reworking of inpcbinfo locking:

(1) Convert inpcb reference counting from manually manipulated integers to
    the refcount(9) KPI.  This allows the refcount to be managed atomically
    with an inpcb read lock rather than write lock, or even with no inpcb
    lock at all.  As a result, in_pcbref() also no longer requires an inpcb
    lock, so can be performed solely using the lock used to look up an
    inpcb.

(2) Shift more inpcb freeing activity from the in_pcbrele() context (via
    in_pcbfree_internal) to the explicit in_pcbfree() context.  This means
    that the inpcb refcount is increasingly used only to maintain memory
    stability, not actually defer the clean up of inpcb protocol parts.
    This is desirable as many of those protocol parts required the pcbinfo
    lock, which we'd like not to acquire in in_pcbrele() contexts.  Document
    this in comments better.

(3) Introduce new read-locked and write-locked in_pcbrele() variations,
    in_pcbrele_rlocked() and in_pcbrele_wlocked(), which allow the inpcb to
    be properly unlocked as needed.  in_pcbrele() is a wrapper around the
    latter, and should probably go away at some point.  This makes it
    easier to use this weak reference model when holding only a read lock,
    as will happen in the future.

This may well be safe to MFC, but some more KBI analysis is required.

Reviewed by:    bz
MFC after:      3 weeks
Sponsored by:   Juniper Networks, Inc.

13 years agoIn init_dynamic_kenv(), ignore environment strings exceeding the
jh [Mon, 23 May 2011 16:40:44 +0000 (16:40 +0000)]
In init_dynamic_kenv(), ignore environment strings exceeding the
KENV_MNAMELEN + 1 + KENV_MVALLEN + 1 length limit to avoid buffer
overflow in getenv(). Currenly loader(8) doesn't limit the length of
environment strings.

PR: kern/132104
MFC after: 1 month

13 years agoMove from passing a wildcard boolean to a general set up lookup flags into
rwatson [Mon, 23 May 2011 15:23:18 +0000 (15:23 +0000)]
Move from passing a wildcard boolean to a general set up lookup flags into
in_pcb_lport(), in_pcblookup_local(), and in_pcblookup_hash(), and similarly
for IPv6 functions.  In the future, we would like to support other flags
relating to locking strategy.

This change doesn't appear to modify the KBI in practice, as callers already
passed in INPLOOKUP_WILDCARD rather than a simple boolean.

MFC after:      3 weeks
Reviewed by:    bz
Sponsored by:   Juniper Networks, Inc.

13 years agoA number of quite incremental refinements to struct inpcbinfo's definition:
rwatson [Mon, 23 May 2011 13:51:57 +0000 (13:51 +0000)]
A number of quite incremental refinements to struct inpcbinfo's definition:

(1) Add a locking guide for inpcbinfo.
(2) Annotate inpcbinfo fields with synchronisation information; not all
    annotations are 100% satisfactory.
(3) Reorder inpcbinfo fields so that the lock is at the head of the
    structure, and close to fields it protects.
(4) Sort fields that will eventually be hashlock/pcbgroup-related together
    even though they remain locked by ipi_lock for now.

Reviewed by: bz
Sponsored by: Juniper Networks
X-MFC after: KBI analysis required

13 years agoMatch symbolic link handling behavior with GNU gzip, bzip2 and xz:
delphij [Mon, 23 May 2011 09:40:21 +0000 (09:40 +0000)]
Match symbolic link handling behavior with GNU gzip, bzip2 and xz:

When we are operating on a symbolic link pointing to an existing
file, bail out by default, but go ahead if -f is specified.

Submitted by: arundel
MFC after: 2 weeks

13 years agoDiff reduction against NetBSD. The most notable change is to zdiff(1) to
delphij [Mon, 23 May 2011 09:02:44 +0000 (09:02 +0000)]
Diff reduction against NetBSD.  The most notable change is to zdiff(1) to
handle more file formats including bzip2 and xz.

MFC after: 2 weeks

13 years agoFix clang warnings.
benl [Sun, 22 May 2011 22:17:06 +0000 (22:17 +0000)]
Fix clang warnings.

Approved by: philip (mentor)

13 years agoFix clang warnings.
benl [Sun, 22 May 2011 22:16:19 +0000 (22:16 +0000)]
Fix clang warnings.

Approved by: philip (mentor)

13 years agoFix clang warnings.
benl [Sun, 22 May 2011 22:15:42 +0000 (22:15 +0000)]
Fix clang warnings.

Approved by: philip (mentor)

13 years agoFix clang warnings.
benl [Sun, 22 May 2011 22:15:16 +0000 (22:15 +0000)]
Fix clang warnings.

Approved by: philip (mentor)

13 years agoFix clang compile warnings.
benl [Sun, 22 May 2011 22:14:15 +0000 (22:14 +0000)]
Fix clang compile warnings.

Approved by: philip (mentor)

13 years agoMerge r221912 from largeSMP project branch:
attilio [Sun, 22 May 2011 21:35:03 +0000 (21:35 +0000)]
Merge r221912 from largeSMP project branch:
Fix a long-standing bug in cpuset_thread0() where only the first part
of cs_mask is set full.

Submitted by: anonymous
MFC after: 1 week

13 years agoMerge r221901 from largeSMP project branch:
attilio [Sun, 22 May 2011 21:31:36 +0000 (21:31 +0000)]
Merge r221901 from largeSMP project branch:
Increase the size of cg_count in order to enable usage of > 127 CPUs.
cg_children is also bumped in order to keep the structure naturally
padded, even if this is not strictly necessary.

Submitted and tested by: sbruno

13 years agoFix the zfs file system so that it uses the lock
rmacklem [Sun, 22 May 2011 21:04:32 +0000 (21:04 +0000)]
Fix the zfs file system so that it uses the lock
flags argument added to VFS_FHTOVP() by r222167.

Reviewed by: pjd

13 years agoMerge r221614,221696,221737,221840 from largeSMP project branch:
attilio [Sun, 22 May 2011 20:55:54 +0000 (20:55 +0000)]
Merge r221614,221696,221737,221840 from largeSMP project branch:
Rewrite atomic operations for powerpc in order to achieve the following:
- Produce a type-clean implementation (in terms of functions arguments
  and returned values) for the primitives.
- Fix errors with _long() atomics where they ended up with the wrong
  arguments to be accepted.
- Follow the sys/type.h specifics that define the numbered types starting
  from standard C types.
- Let _ptr() version to not auto-magically cast arguments, but leave
  the burden on callers, as _ptr() atomic is intended to be used
  relatively rarely.

Fix cfi in order to support the latest point.

In collabouration with: bde
Tested by: andreast, nwhitehorn, jceel
MFC after: 2 weeks

13 years agoFix the ufs/ffs file system so that it uses the lock
rmacklem [Sun, 22 May 2011 20:39:07 +0000 (20:39 +0000)]
Fix the ufs/ffs file system so that it uses the lock
flags argument added to VFS_FHTOVP() by r222167.

Reviewed by: mckusick

13 years agoAdd analogs to the -chrp-boot and -prep-boot options to mkisofs.
nwhitehorn [Sun, 22 May 2011 19:56:14 +0000 (19:56 +0000)]
Add analogs to the -chrp-boot and -prep-boot options to mkisofs.

13 years agoregen
imp [Sun, 22 May 2011 18:34:11 +0000 (18:34 +0000)]
regen

13 years agoAdd the description properly...
imp [Sun, 22 May 2011 18:23:17 +0000 (18:23 +0000)]
Add the description properly...

13 years agoAdd documentation for WITHOUT_KERNEL_SYMBOLS
imp [Sun, 22 May 2011 18:12:59 +0000 (18:12 +0000)]
Add documentation for WITHOUT_KERNEL_SYMBOLS

13 years agoEliminate duplicate #include's.
alc [Sun, 22 May 2011 18:11:41 +0000 (18:11 +0000)]
Eliminate duplicate #include's.

13 years agoBackwards compatibility hacks to allow kernels to be built via config
imp [Sun, 22 May 2011 18:09:51 +0000 (18:09 +0000)]
Backwards compatibility hacks to allow kernels to be built via config
wihtout updating world (good transition aide for -current, but also
allows kernels to be built on -stable the old way too).  This likely
should go away around FreeBSD 10.0 or so.

13 years agoStart to usher INSTALL_NODEBUG hack out the door. Add new
imp [Sun, 22 May 2011 18:01:52 +0000 (18:01 +0000)]
Start to usher INSTALL_NODEBUG hack out the door.  Add new
WITH{OUT,}_KERNEL_SYMBOLS (defaulting to WITH).  In the fullness of
time, likely around 2020, INSTALL_NODEBUG will be removed.  For now,
don't print a warning when using INSTALL_NODEBUG, but that will be
coming soon.

13 years agoCorrect an error in r222163. Unless UMA_MD_SMALL_ALLOC is defined,
alc [Sun, 22 May 2011 17:46:16 +0000 (17:46 +0000)]
Correct an error in r222163.  Unless UMA_MD_SMALL_ALLOC is defined,
startup_alloc() must be used until uma_startup2() is called.

Reported by: jh

13 years agoOn amd64, change clang's default triple to 'x86_64-unknown-freebsd9.0',
dim [Sun, 22 May 2011 16:32:44 +0000 (16:32 +0000)]
On amd64, change clang's default triple to 'x86_64-unknown-freebsd9.0',
similar to what we do for binutils.  When clang's default triple starts
with 'amd64-', it does not pass a proper -target-cpu option to its
first stage.

This can lead to problems, for example when structs are memcpy'd, and
clang erroneously assumes they are 16-byte aligned.  It will then use
the 'movaps' SSE instruction to implement the copy, which results in a
bus error if the struct is really 8-byte aligned.

I encountered this issue when gcc's /usr/libexec/cc1 started crashing
with SIGBUS, after rebuilding world with clang ToT, but it also affects
the version of clang that we have in the tree.  We were just lucky until
now, apparently. :)

13 years agosh: Remove obsolete token type TENDBQUOTE.
jilles [Sun, 22 May 2011 15:24:56 +0000 (15:24 +0000)]
sh: Remove obsolete token type TENDBQUOTE.

This token type was related to Almquist's original version of backquotes
that could not nest and fell into disuse fairly soon.

13 years agoFix more typos to be a good example.
uqs [Sun, 22 May 2011 14:23:48 +0000 (14:23 +0000)]
Fix more typos to be a good example.

Found by: codespell

13 years agoFix some typos under bin/
uqs [Sun, 22 May 2011 14:03:46 +0000 (14:03 +0000)]
Fix some typos under bin/

Found by: codespell

13 years agoFix a bunch of typos and a couple of whitespace nits.
uqs [Sun, 22 May 2011 14:03:38 +0000 (14:03 +0000)]
Fix a bunch of typos and a couple of whitespace nits.

Helped by: codespell and vim's spellchecker

13 years agoRe-encode files from ISO-8859-1 to UTF-8
uqs [Sun, 22 May 2011 14:03:30 +0000 (14:03 +0000)]
Re-encode files from ISO-8859-1 to UTF-8

13 years agoRemove typos, tabs-after-spaces and EOL whitespace. Convert to UTF-8.
uqs [Sun, 22 May 2011 14:03:21 +0000 (14:03 +0000)]
Remove typos, tabs-after-spaces and EOL whitespace. Convert to UTF-8.

13 years agosh: Add test for r222173.
jilles [Sun, 22 May 2011 12:15:14 +0000 (12:15 +0000)]
sh: Add test for r222173.

13 years agosh: Fix bss-based buffer overflow in . builtin.
jilles [Sun, 22 May 2011 12:12:28 +0000 (12:12 +0000)]
sh: Fix bss-based buffer overflow in . builtin.

If the length of a directory in PATH together with the given filename
exceeded FILENAME_MAX (which may happen even for pathnames that work), a
static buffer was overflown.

The static buffer is unnecessary, we can use the stalloc() stack.

Obtained from: NetBSD
MFC after: 1 week

13 years agoFix typo in unused function name
uqs [Sun, 22 May 2011 09:58:48 +0000 (09:58 +0000)]
Fix typo in unused function name

Submitted by: arundel

13 years agoUpdate URLs and fix regex to work with current version of the files.
uqs [Sun, 22 May 2011 09:48:25 +0000 (09:48 +0000)]
Update URLs and fix regex to work with current version of the files.

13 years agoAdd a lock flags argument to the VFS_FHTOVP() file system
rmacklem [Sun, 22 May 2011 01:07:54 +0000 (01:07 +0000)]
Add a lock flags argument to the VFS_FHTOVP() file system
method, so that callers can indicate the minimum vnode
locking requirement. This will allow some file systems to choose
to return a LK_SHARED locked vnode when LK_SHARED is specified
for the flags argument. This patch only adds the flag. It
does not change any file system to use it and all callers
specify LK_EXCLUSIVE, so file system semantics are not changed.

Reviewed by: kib

13 years agosh: Expand aliases after assignments and redirections.
jilles [Sat, 21 May 2011 22:03:06 +0000 (22:03 +0000)]
sh: Expand aliases after assignments and redirections.

13 years agoRecognize HIO_FLUSH requests.
pjd [Sat, 21 May 2011 20:21:20 +0000 (20:21 +0000)]
Recognize HIO_FLUSH requests.

MFC after: 1 week

13 years ago1. Prior to r214782, UMA did not support multipage allocations before
alc [Sat, 21 May 2011 17:43:43 +0000 (17:43 +0000)]
1. Prior to r214782, UMA did not support multipage allocations before
uma_startup2() was called.  Thus, setting the variable "booted" to true in
uma_startup() was ok on machines with UMA_MD_SMALL_ALLOC defined, because
any allocations made after uma_startup() but before uma_startup2() could be
satisfied by uma_small_alloc().  Now, however, some multipage allocations
are necessary before uma_startup2() just to allocate zone structures on
machines with a large number of processors.  Thus, a Boolean can no longer
effectively describe the state of the UMA allocator.  Instead, make "booted"
have three values to describe how far initialization has progressed.  This
allows multipage allocations to continue using startup_alloc() until
uma_startup2(), but single-page allocations may begin using
uma_small_alloc() after uma_startup().

2. With the aforementioned change, only a modest increase in boot pages is
necessary to boot UMA on a large number of processors.

3. Retire UMA_MD_SMALL_ALLOC_NEEDS_VM.  It has only been used between
r182028 and r204128.

Reviewed by: attilio [1], nwhitehorn [3]
Tested by: sbruno

13 years agoFix typo, it is MPDU not MDPU.
bschmidt [Sat, 21 May 2011 16:41:41 +0000 (16:41 +0000)]
Fix typo, it is MPDU not MDPU.

13 years agoFix a typo, it is MPDU not MDPU.
bschmidt [Sat, 21 May 2011 16:34:53 +0000 (16:34 +0000)]
Fix a typo, it is MPDU not MDPU.

13 years agosh: Add test for positional parameters with more than one digit.
jilles [Sat, 21 May 2011 14:52:26 +0000 (14:52 +0000)]
sh: Add test for positional parameters with more than one digit.

This also passes on stable/8.

13 years agoThe Merlin analog register bank is from 0x7800 -> 0x78fc; fix the code
adrian [Sat, 21 May 2011 09:23:18 +0000 (09:23 +0000)]
The Merlin analog register bank is from 0x7800 -> 0x78fc; fix the code
to reflect this.

13 years agosh: Implement the cd -e flag proposed for the next POSIX issue.
jilles [Fri, 20 May 2011 22:55:18 +0000 (22:55 +0000)]
sh: Implement the cd -e flag proposed for the next POSIX issue.

This reflects failure to determine the pathname of the new directory in the
exit status (1). Normally, cd returns successfully if it did chdir() and the
call was successful.

In POSIX, -e only has meaning with -P; because our -L is not entirely
compliant and may fall back to -P mode, -e has some effect with -L as well.

13 years agoAdd a new knob to atkbd(4) to enable typematic rate detection on boot,
delphij [Fri, 20 May 2011 22:36:17 +0000 (22:36 +0000)]
Add a new knob to atkbd(4) to enable typematic rate detection on boot,
which is now disabled by default.  The detection is known to cause hangs
on boot with some new Lenovo laptops on FreeBSD/amd64.

Reported by: gnn
Discussed with: jkim
MFC after: 3 months

13 years agoThe statically configured (permanent) ARP entries are removed when an
qingli [Fri, 20 May 2011 19:12:20 +0000 (19:12 +0000)]
The statically configured (permanent) ARP entries are removed when an
interface is brought down, even though the interface address is still
valid. This patch maintains the permanent ARP entries as long as the
interface address (having the same prefix as that of the ARP entries)
is valid.

Reviewed by: delphij
MFC after: 5 days

13 years agoDatasheet says vge(4) controllers support DAC but it seems that's
yongari [Fri, 20 May 2011 18:27:13 +0000 (18:27 +0000)]
Datasheet says vge(4) controllers support DAC but it seems that's
not true on old PCI based controllers.  DAC configuration is read
from EEPROM in device reset phase and driver can override DAC
configuration.  However I guess there is an undocumented reason why
EEPROM configuration does not enable DAC so do not blindly override
DAC configuration.  Recent PCIe based controllers are supposed to
support 64bit DMA so allow 64bit DMA only on PCIe based controllers.

PR: kern/157184
MFC after: 1 week

13 years ago- add missing options and arguments to program's usage()
ru [Fri, 20 May 2011 17:35:10 +0000 (17:35 +0000)]
- add missing options and arguments to program's usage()
  and sync it with manpage's SYNOPSIS

- generally clean up a manpage's formatting

Reviewed by: edwin

13 years agoFix spelling errors.
alc [Fri, 20 May 2011 17:28:00 +0000 (17:28 +0000)]
Fix spelling errors.

13 years agoAdd missing header file.
pluknet [Fri, 20 May 2011 17:03:23 +0000 (17:03 +0000)]
Add missing header file.

MFC after: 1 week

13 years agoRemove unnecessary controller reinitialization by checking
yongari [Fri, 20 May 2011 17:01:22 +0000 (17:01 +0000)]
Remove unnecessary controller reinitialization by checking
IFF_DRV_RUNNING flag.  Previously running dhclient or adding alias
addresses reinitialized controller and it resulted in unnecessary
link flips.

Reviewed by: marius

13 years agosh: Allow terminating a heredoc with a terminator at EOF without a newline.
jilles [Fri, 20 May 2011 16:03:36 +0000 (16:03 +0000)]
sh: Allow terminating a heredoc with a terminator at EOF without a newline.

This is sometimes used with eval or old-style command substitution, and most
shells other than ash derivatives allow it.

It can also be used with scripts that violate POSIX's requirement on the
application that they end in a newline (scripts must be text files except
that line length is unlimited).

Example:
v=`cat <<EOF
foo
EOF`
echo $v

This commit does not add support for the similar construct with new-style
command substitution, like
v=$(cat <<EOF
foo
EOF)
This continues to require a newline after the terminator.

13 years agoEliminate a redundant #include. ("vm/vm_param.h" already includes
alc [Fri, 20 May 2011 15:26:31 +0000 (15:26 +0000)]
Eliminate a redundant #include.  ("vm/vm_param.h" already includes
"machine/vmparam.h".)

13 years agoSpelling in P_HADTHREADS.
pluknet [Fri, 20 May 2011 14:32:28 +0000 (14:32 +0000)]
Spelling in P_HADTHREADS.

MFC after: 1 week

13 years agoFix the description of the "paddr" keyword. It shows a process
pluknet [Fri, 20 May 2011 14:07:08 +0000 (14:07 +0000)]
Fix the description of the "paddr" keyword.  It shows a process
pointer just like a dublicating "uprocp".

MFC after: 1 week

13 years agoCorrect typos in comments, no functional changes.
bcr [Fri, 20 May 2011 11:29:09 +0000 (11:29 +0000)]
Correct typos in comments, no functional changes.

Found by: codespell
Reviewed by: kaiw
MFC after: 1 week

13 years agoDocument IPv6 support.
pjd [Fri, 20 May 2011 11:21:39 +0000 (11:21 +0000)]
Document IPv6 support.

MFC after: 3 weeks

13 years agoIf no listen address is specified, bind by default to:
pjd [Fri, 20 May 2011 11:16:25 +0000 (11:16 +0000)]
If no listen address is specified, bind by default to:

tcp4://0.0.0.0:8457
tcp6://[::]:8457

MFC after: 3 weeks

13 years agoRename ipv4/ipv6 to tcp4/tcp6.
pjd [Fri, 20 May 2011 11:15:27 +0000 (11:15 +0000)]
Rename ipv4/ipv6 to tcp4/tcp6.

MFC after: 3 weeks

13 years agoNow that hell is fully frozen it is good time to add IPv6 support to HAST.
pjd [Fri, 20 May 2011 11:14:05 +0000 (11:14 +0000)]
Now that hell is fully frozen it is good time to add IPv6 support to HAST.

MFC after: 3 weeks

13 years agoAllow [ ] characters in strings. They might be used in IPv6 addresses.
pjd [Fri, 20 May 2011 11:10:39 +0000 (11:10 +0000)]
Allow [ ] characters in strings. They might be used in IPv6 addresses.

MFC after: 3 weeks

13 years agoRename tcp4 to tcp in preparation for IPv6 support.
pjd [Fri, 20 May 2011 11:09:02 +0000 (11:09 +0000)]
Rename tcp4 to tcp in preparation for IPv6 support.

MFC after: 3 weeks

13 years agoRename proto_tcp4.c to proto_tcp.c in preparation for IPv6 support.
pjd [Fri, 20 May 2011 11:06:17 +0000 (11:06 +0000)]
Rename proto_tcp4.c to proto_tcp.c in preparation for IPv6 support.

MFC after: 2 weeks

13 years agoIn preparation for IPv6 support allow to specify multiple addresses to
pjd [Thu, 19 May 2011 23:18:42 +0000 (23:18 +0000)]
In preparation for IPv6 support allow to specify multiple addresses to
listen on.

MFC after: 3 weeks

13 years agoFix typo.
yongari [Thu, 19 May 2011 23:13:08 +0000 (23:13 +0000)]
Fix typo.

Submitted by: brad at OpenBSD

13 years agoFix typos in comments, no functional changes.
bcr [Thu, 19 May 2011 20:35:40 +0000 (20:35 +0000)]
Fix typos in comments, no functional changes.

Found by:       codespell
Reviewed by:    alfred
MFC after:      1 week

13 years agoSimplify t4_os_find_pci_capability.
np [Thu, 19 May 2011 19:37:41 +0000 (19:37 +0000)]
Simplify t4_os_find_pci_capability.

MFC after: 3 days

13 years agoStyle fixes:
jhb [Thu, 19 May 2011 17:22:48 +0000 (17:22 +0000)]
Style fixes:
- Sort forward declarations of structures.
- Prefer uint64_t to u_int64_t.

13 years agoFix clang warnings.
benl [Thu, 19 May 2011 15:18:35 +0000 (15:18 +0000)]
Fix clang warnings.

Approved by: philip (mentor)

13 years agoWhen adding examples to man-pages, try to make them at least
phk [Thu, 19 May 2011 13:42:19 +0000 (13:42 +0000)]
When adding examples to man-pages, try to make them at least
look like they might work.

Prodded by: Vadim Goncharov

13 years agoPut AN back after finding out that tzsetup(1) will complain that
edwin [Thu, 19 May 2011 13:09:39 +0000 (13:09 +0000)]
Put AN back after finding out that tzsetup(1) will complain that
it doesn't exist. It will be removed again once the tzdata distribution
files have been updated with the replacements for AN.

13 years agoAdd support for the SIIG Cyber 2S PCIe adapter. It is based on an
jhb [Thu, 19 May 2011 11:41:12 +0000 (11:41 +0000)]
Add support for the SIIG Cyber 2S PCIe adapter.  It is based on an
Oxford Semiconductor OX16PCI954 but uses only two ports with a non-default
clock rate.

PR: kern/152034
Tested by: Hans Fiedler  hans of hermes louisville edu
MFC after: 1 week

13 years agoImplement WITH{,OUT}_{GCC,BINUTILS} to provide finer-grained control
imp [Thu, 19 May 2011 05:13:25 +0000 (05:13 +0000)]
Implement WITH{,OUT}_{GCC,BINUTILS} to provide finer-grained control
over building gcc and binutils.  They default to true, unless
MK_TOOLCHAIN is no.

Reviewed by: ru@

13 years ago- Add support for AF_INET6 sockets for %S format character.
pjd [Wed, 18 May 2011 22:43:56 +0000 (22:43 +0000)]
- Add support for AF_INET6 sockets for %S format character.
- Use inet_ntop(3) instead of reimplementing it.
- Use %hhu for unsigned char instead of casting it to unsigned int and
  using %u.

MFC after: 1 week

13 years agoThe CDP_ACTIVE flag is cleared at the beginning of destroy_devl(),
kib [Wed, 18 May 2011 22:36:58 +0000 (22:36 +0000)]
The CDP_ACTIVE flag is cleared at the beginning of destroy_devl(),
and destroy_devl() drops dev_mtx. The protection against the race
with dev_rel(), introduced in r163328, should be extended to cover
destroy_devl() calls for the children of the destroyed dev.

Reported and tested by: joerg
MFC after: 1 week

13 years ago- Enable per-channel congestion notification.
np [Wed, 18 May 2011 22:09:04 +0000 (22:09 +0000)]
- Enable per-channel congestion notification.
- Enable PCIe relaxed ordering for all egress queues and rx data buffers.

MFC after: 3 days

13 years agoFix clang warnings.
benl [Wed, 18 May 2011 21:06:20 +0000 (21:06 +0000)]
Fix clang warnings.

Approved by: philip (mentor)

13 years agoFix clang warnings.
benl [Wed, 18 May 2011 21:04:29 +0000 (21:04 +0000)]
Fix clang warnings.

Note: possible minor security issues fixed (untrusted string used as
printf format string).

Approved by: philip (mentor)

13 years agoFix clang warnings.
benl [Wed, 18 May 2011 21:00:27 +0000 (21:00 +0000)]
Fix clang warnings.

Approved by: philip (mentor)

13 years agoFix clang warning (why is there nowhere yyparse() is declared?).
benl [Wed, 18 May 2011 20:57:23 +0000 (20:57 +0000)]
Fix clang warning (why is there nowhere yyparse() is declared?).

Approved by: philip (mentor)

13 years agoFix clang warnings.
benl [Wed, 18 May 2011 20:52:52 +0000 (20:52 +0000)]
Fix clang warnings.

Note: these were actually bugs (printf with no format string).

Approved by: philip (mentor)

13 years agoWipeout the end of disks, home to things like gmirror metadata, backup GPT tables,
jpaetzel [Wed, 18 May 2011 20:38:28 +0000 (20:38 +0000)]
Wipeout the end of disks, home to things like gmirror metadata, backup GPT tables,
and other potential evil.

Submitted by: Kris Moore <kris@pcbsd.org>
Approved by: kib (mentor)
Sponsored by: iXsystems

13 years agoExtracting optional components requires mounting devfs
jpaetzel [Wed, 18 May 2011 20:29:07 +0000 (20:29 +0000)]
Extracting optional components requires mounting devfs

Submitted by: Kris Moore <kris@pcbsd.org>
Approved by: kib (mentor)
Sponsored by: iXsystems

13 years agoUnbreak INET-less build.
tuexen [Wed, 18 May 2011 19:49:39 +0000 (19:49 +0000)]
Unbreak INET-less build.
Reported by bz@
MFC after: 1 week

13 years agoAdd a sanity check for the existence of an "addr" option
rmacklem [Wed, 18 May 2011 18:36:40 +0000 (18:36 +0000)]
Add a sanity check for the existence of an "addr" option
to both NFS clients. This avoids the crash reported by
Sergey Kandaurov (pluknet@gmail.com) to the freebsd-fs@
list with subject "[old nfsclient] different nmount()
args passed from mount vs mount_nfs" dated May 17, 2011.

Tested by: pluknet at gmail.com (old nfs client)
MFC after: 2 weeks

13 years agoAs requested by many people, with final prodding from Jason Hall, fix this
nwhitehorn [Wed, 18 May 2011 17:39:28 +0000 (17:39 +0000)]
As requested by many people, with final prodding from Jason Hall, fix this
so that running make release causes make obj to be run before doing
anything. This fixes a bug wherein, when run for the first time, and
without -DNOSRC, make release would attempt to recursively tar up the src
directory including its own output and enter an infinite loop.

While here, make the cross-building stuff work a little more the way it
should if only one of TARGET/TARGET_ARCH is specified.

13 years agoClean up a loose end from the conversion from gnu ar/ranlib to the BSD
imp [Wed, 18 May 2011 17:06:11 +0000 (17:06 +0000)]
Clean up a loose end from the conversion from gnu ar/ranlib to the BSD
one.  Without this, we don't have ar or randlib in the tool path,
leading to much pain for some users.  This pain is exposed by the
external toolchain enhancements that I'm working on.

Submitted by: John Hein (ages ago, and dropped on the floor by me: sorry)

13 years agoRevert r222069,222068 as they were intended to be committed to the
attilio [Wed, 18 May 2011 16:50:13 +0000 (16:50 +0000)]
Revert r222069,222068 as they were intended to be committed to the
largeSMP branch.

Reported by: pluknet

13 years agoFix warning spit out.
attilio [Wed, 18 May 2011 16:42:01 +0000 (16:42 +0000)]
Fix warning spit out.

Reported by: sbruno

13 years agoFix newly introduced code.
attilio [Wed, 18 May 2011 16:41:38 +0000 (16:41 +0000)]
Fix newly introduced code.

Reported by: sbruno

13 years agoMerge part of r221322 from largeSMP project:
attilio [Wed, 18 May 2011 16:07:30 +0000 (16:07 +0000)]
Merge part of r221322 from largeSMP project:
Sync XEN support with i386 about the usage of ipi_send_cpu()

Tested by: pluknet
MFC after: 2 weeks

13 years agousb: fix a missed use of use_generic in r222051
avg [Wed, 18 May 2011 11:38:36 +0000 (11:38 +0000)]
usb: fix a missed use of use_generic in r222051

Submitted by: gcooper
Pointyhat to: avg
MFC after: 1 month
X-MFC with: r222051

13 years agoThis isn't needed any longer, it's defined in ah_internal.h.
adrian [Wed, 18 May 2011 11:28:23 +0000 (11:28 +0000)]
This isn't needed any longer, it's defined in ah_internal.h.

13 years agoRelease allocated memory in procstat_close().
pluknet [Wed, 18 May 2011 10:04:54 +0000 (10:04 +0000)]
Release allocated memory in procstat_close().

Reviewed by: stass

13 years agousb: change to one-pass probing of device drivers
avg [Wed, 18 May 2011 07:40:12 +0000 (07:40 +0000)]
usb: change to one-pass probing of device drivers

This brings USB bus more in line with how newbus is supposed to be used.
Also, because of the two-pass probing the following message was produced
by devd in default configuration when almost any USB device was
connected:
Unknown USB device: vendor <> product <> bus <>
This should be fixed now.

Note that many USB device drivers pass some information from probe
method to attach method via ivars.  For this to continue working we rely
on the fact that the subr_bus code calls probe method of a winning driver
again before calling its attach method in the case where multiple
drivers claim to support a device.  This is done because device
description is set in successful probe methods and we want to get a correct
device description from a winning driver.  So now this logic is re-used
for setting ivars too.

Reviewed by: hselasky
MFC after: 1 month