]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
11 years agoMFC r242130:
jh [Fri, 14 Dec 2012 11:38:15 +0000 (11:38 +0000)]
MFC r242130:

Improve libgeom XML parsing error handling.

- Abort parsing and return an error if we run out of memory.
- Return EILSEQ from geom_xml2tree() for XML syntax errors.

git-svn-id: svn://svn.freebsd.org/base/stable/9@244208 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoAdd pci id for the xeon hd4000 (IvyBridge server GT2)
bapt [Fri, 14 Dec 2012 09:00:18 +0000 (09:00 +0000)]
Add pci id for the xeon hd4000 (IvyBridge server GT2)

Submitted by: François Tigeot <ftigeot@wolfpond.org>
Obtained from: dragonfly

git-svn-id: svn://svn.freebsd.org/base/stable/9@244207 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243021:
bapt [Fri, 14 Dec 2012 08:52:08 +0000 (08:52 +0000)]
MFC r243021:
return ERANGE if the buffer is too small to contain the login as documented in
the manpage

Reviewed by: cognet, kib

git-svn-id: svn://svn.freebsd.org/base/stable/9@244204 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r242961:
kib [Thu, 13 Dec 2012 06:27:58 +0000 (06:27 +0000)]
MFC r242961:
Document wait6() and waitid().

PR: standards/170346

git-svn-id: svn://svn.freebsd.org/base/stable/9@244176 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r242960:
kib [Thu, 13 Dec 2012 06:24:54 +0000 (06:24 +0000)]
MFC r242960:
Implement the waitid() SUSv4 function using wait6() system call.

PR: standards/170346

git-svn-id: svn://svn.freebsd.org/base/stable/9@244175 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoRegenerate.
kib [Thu, 13 Dec 2012 06:20:01 +0000 (06:20 +0000)]
Regenerate.

git-svn-id: svn://svn.freebsd.org/base/stable/9@244174 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r242958:
kib [Thu, 13 Dec 2012 06:17:05 +0000 (06:17 +0000)]
MFC r242958:
Add the wait6(2) system call. It takes POSIX waitid()-like process
designator to select a process which is waited for. The system call
optionally returns siginfo_t which would be otherwise provided to
SIGCHLD handler, as well as extended structure accounting for child
and cumulative grandchild resource usage.

Allow to get the current rusage information for non-exited processes
as well, similar to Solaris.

The explicit WEXITED flag is required to wait for exited processes,
allowing for more fine-grained control of the events the waiter is
interested in.

Fix the handling of siginfo for WNOWAIT option for all wait*(2)
family, by not removing the queued signal state.

PR: standards/170346

MFC r243133:
Style fixes for r242958.

MFC r243134:
Alphabetically reorder the forward-declarations of the structures.
Add the declaration for enum idtype, to be used later.

MFC r243135:
Move the definition of the idtype_t from sys/types.h to sys/wait.h.
Fix the bug, use #if __BSD_VISIBLE instead of #if defined(__BSD_VISIBLE),
since __BSD_VISIBLE is always defined.
Reformat the comments from the Solaris style to KNF.

MFC r243136:
Restore the proper handling of the pid 0 for waitpid(2).
Fix the style around.

git-svn-id: svn://svn.freebsd.org/base/stable/9@244172 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMerge r232639
remko [Wed, 12 Dec 2012 07:19:14 +0000 (07:19 +0000)]
Merge r232639

Original commit:

Add support for the MosChip MCS9904 four serial ports
controller.

PR:  165804
Submitted by: Eugene Grosbein
MFC after: 1 week

Modified:
head/sys/dev/uart/uart_bus_pci.c

Modified: head/sys/dev/uart/uart_bus_pci.c
==============================================================================
--- head/sys/dev/uart/uart_bus_pci.c Wed Mar 7 06:25:17 2012 (r232638)
+++ head/sys/dev/uart/uart_bus_pci.c Wed Mar 7 06:42:21 2012 (r232639)
@@ -126,6 +126,8 @@ static struct pci_id pci_ns8250_ids[] =
"MosChip MCS9900 PCIe to Peripheral Controller", 0x10 },
{ 0x9710, 0x9901, 0xa000, 0x1000,
"MosChip MCS9901 PCIe to Peripheral Controller", 0x10 },
+{ 0x9710, 0x9904, 0xa000, 0x1000,
+ "MosChip MCS9904 PCIe to Peripheral Controller", 0x10 },
{ 0xdeaf, 0x9051, 0xffff, 0, "Middle Digital PC Weasel Serial Port", 0x10 },
{ 0xffff, 0, 0xffff, 0, NULL, 0, 0}
};

git-svn-id: svn://svn.freebsd.org/base/stable/9@244139 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r244054:
kib [Wed, 12 Dec 2012 05:02:56 +0000 (05:02 +0000)]
MFC r244054:
Remove useless comment.

git-svn-id: svn://svn.freebsd.org/base/stable/9@244137 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r244053:
kib [Wed, 12 Dec 2012 05:00:26 +0000 (05:00 +0000)]
MFC r244053:
Fix typo.

git-svn-id: svn://svn.freebsd.org/base/stable/9@244135 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r244057, r244059:
gjb [Wed, 12 Dec 2012 01:05:19 +0000 (01:05 +0000)]
MFC r244057, r244059:

r244057:
 Get 'uname -r' earlier, so it can be used to determine what branch is
 being run to set BSDINSTALL_DISTSITE accordingly.  This change allows
 non-RELEASE branches to use the FTP snapshots directory for bootonly.iso
 installations.

r244059:
 Add missed BETA* to list.

git-svn-id: svn://svn.freebsd.org/base/stable/9@244131 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243904:
jimharris [Wed, 12 Dec 2012 00:39:04 +0000 (00:39 +0000)]
MFC r243904:

Don't call bus_dmamap_load in CAM_DIR_NONE case, since there is nothing
to map, and technically this isn't allowed.

Functionally, it works OK (at least on x86) to call bus_dmamap_load with
a NULL data pointer and zero length, so this is primarily for correctness
and consistency with other drivers.

While here, remove check in isci_io_request_construct for nseg==0.
Previously, bus_dmamap_load would pass nseg==1, even for case where
buffer is NULL and length = 0, which allowed CAM_DIR_NONE CCBs
to get processed.  This check is not correct though, and needed to be
removed both for the changes elsewhere in this patch, as well as jeff's
preliminary bus_dmamap_load_ccb patch (which uncovered all of this in
the first place).

git-svn-id: svn://svn.freebsd.org/base/stable/9@244128 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoRevert r244108. yyparse() declaration isn't redundant in stable/9.
glebius [Tue, 11 Dec 2012 12:40:54 +0000 (12:40 +0000)]
Revert r244108. yyparse() declaration isn't redundant in stable/9.

Reported by: tinderbox :)

git-svn-id: svn://svn.freebsd.org/base/stable/9@244117 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r242943: Do not unwind past a zero PC frame.
emaste [Tue, 11 Dec 2012 12:34:46 +0000 (12:34 +0000)]
MFC r242943: Do not unwind past a zero PC frame.

  This improves GDB usability when debugging code compiled with
  optimization.

  Upstream GDB revision f0031b6d3ae9b164b3747986ab898190bd4dcf8c (prior
  to GDB's switch to GPLv3), with frame_debug_got_null_frame expanded
  inline.

  | 2004-12-12  Andrew Cagney  <cagney@gnu.org>
  |
  | * frame.c (get_prev_frame): When unwinding normal frames, check
  | that the PC isn't zero.

Sponsored by: ADARA Networks

git-svn-id: svn://svn.freebsd.org/base/stable/9@244116 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r242936: Set optimized_out instead of reporting an error.
emaste [Tue, 11 Dec 2012 12:32:11 +0000 (12:32 +0000)]
MFC r242936:   Set optimized_out instead of reporting an error.

  This provides a better display when debugging code compiled with
  optimization on.

  GDB git revision e8395b4efd184f745070afb953f451f99e922be7 (prior to
  GDB's switch to GPLv3), modified for the interfaces provided by
  GDB 6.1.1.

  2005-02-28  Daniel Jacobowitz  <d...@codesourcery.com>

   * dwarf2loc.c (loclist_read_variable): Set optimized_out
   instead of reporting an error.
   * valprint.c (value_check_printable): New function.
   (common_val_print): New function.  Use value_check_printable.
   (value_print): Use value_check_printable.
   * value.h (common_val_print): Add prototype.
   * c-valprint.c (c_val_print): Use common_val_print.
   * cp-valprint.c (cp_print_value_fields): Likewise.
   (cp_print_hpacc_virtual_table_entries): Likewise.
   * f-valprint.c (f_val_print): Likewise.
   * jv-valprint.c (java_value_print, java_print_value_fields):
   Likewise.
   * scm-valprint.c (scm_value_print): Likewise.
   * stack.c (print_frame_args): Likewise.
   * varobj.c (c_value_of_variable): Likewise.
   * p-valprint.c (pascal_val_print, pascal_value_print): Likewise.
   (pascal_object_print_value_fields): Likewise.  Update call to
   pascal_object_print_static_field.
   (pascal_object_print_static_field): Remove TYPE argument.  Use
   common_val_print.

Sponsored by:        ADARA Networks

git-svn-id: svn://svn.freebsd.org/base/stable/9@244115 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243868:
kib [Tue, 11 Dec 2012 05:11:28 +0000 (05:11 +0000)]
MFC r243868:
Do not allocate buffer of the 255 bytes length on the stack.

git-svn-id: svn://svn.freebsd.org/base/stable/9@244110 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235771:
kevlo [Tue, 11 Dec 2012 02:40:01 +0000 (02:40 +0000)]
MFC r235771:

Remove redundant declaration of yyparse.

Reported by: tinderbox

git-svn-id: svn://svn.freebsd.org/base/stable/9@244108 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235767:
kevlo [Tue, 11 Dec 2012 01:49:57 +0000 (01:49 +0000)]
MFC r235767:

Add missing header needed by free().

Reported by: tinderbox

git-svn-id: svn://svn.freebsd.org/base/stable/9@244107 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: 238979
gnn [Mon, 10 Dec 2012 21:18:02 +0000 (21:18 +0000)]
MFC: 238979

When we return with an error we cannot unlock the mutex, because
it's been freed.  Protect against that, hopefully unlikely, case.

Reviewed by: rpaulo

git-svn-id: svn://svn.freebsd.org/base/stable/9@244097 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: 238537,238552
gnn [Mon, 10 Dec 2012 19:33:39 +0000 (19:33 +0000)]
MFC: 238537,238552
Add support for walltimestamp in DTrace.

Submitted by: Fabian Keil
Includes correction by: avg

git-svn-id: svn://svn.freebsd.org/base/stable/9@244093 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC recent ZFS changes from illumos:
mm [Mon, 10 Dec 2012 14:36:48 +0000 (14:36 +0000)]
MFC recent ZFS changes from illumos:
243503, 243524, 243525, 243560, 243561

MFC r243503:
Illumos 13879:4eac7a87eff2
3329 spa_sync() spends 10-20% of its time in spa_free_sync_cb()
3330 space_seg_t should have its own kmem_cache
3331 deferred frees should happen after sync_pass 1
3335 make SYNC_PASS_* constants tunable

New loader-only tunables:
vfs.zfs.sync_pass_deferred_free
vfs.zfs.sync_pass_dont_compress
vfs.zfs.sync_pass_rewrite

References:
https://www.illumos.org/issues/3329
https://www.illumos.org/issues/3330
https://www.illumos.org/issues/3331
https://www.illumos.org/issues/3335

MFC r243524:
Import the zio nop-write improvement from Illumos. To reduce I/O,
nop-write omits overwriting data if the checksum (cryptographically
secure) of new data matches the checksum of existing data.
It also saves space if snapshots are in use.

It currently works only on datasets with enabled compression, disabled
deduplication and sha256 checksums.

IllumOS 13887:196932ec9e6a and 13888:7204b3392a58
3236 zio nop-write

References:
https://www.illumos.org/issues/3236

MFC r243525:
Add loader(8) tunable to enable/disable nopwrite functionality:
vfs.zfs.nopwrite_enabled

MFC r243560:
Introduce a new dataset aclmode setting "restricted" to protect ACL's
being destroyed or corrupted by a drive-by chmod.

illumos-gate 13889:a67716f16746
3254 add support in zfs for aclmode=restricted

MFC r243561:
Update manpage dates in zfs.8 and zpool.8

git-svn-id: svn://svn.freebsd.org/base/stable/9@244087 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMerge r242474:
glebius [Mon, 10 Dec 2012 12:47:33 +0000 (12:47 +0000)]
Merge r242474:
   Remove separate paragraph on ASCII messages and instead
  provide this information along with messages documentation,
  like this done in manual pages for other netgraph nodes.

  Submitted by:   Mamontov Roman <mr.xanto gmail.com>

git-svn-id: svn://svn.freebsd.org/base/stable/9@244081 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC rr243398-243399:
pluknet [Mon, 10 Dec 2012 11:26:18 +0000 (11:26 +0000)]
MFC rr243398-243399:
- core(5) references sysctl debug.num_cores, but it is really debug.ncores.
- [mdoc] remove hard sentence breaks.

PR: docs/173831

git-svn-id: svn://svn.freebsd.org/base/stable/9@244079 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC to r242840:
grog [Mon, 10 Dec 2012 03:11:19 +0000 (03:11 +0000)]
MFC to r242840:

  Add y flag and environment variable LS_SAMESORT to specify the same
  sorting order for time and name with the -t option.  IEEE Std 1003.2
  (POSIX.2) mandates that the -t option sort in descending order, and
  that if two files have the same timestamp, they should be sorted in
  ascending order of their names.  The -r flag reverses both of these
  sort orders, so they're never the same.  This creates significant
  problems for sequentially named files stored on FAT file systems,
  where it can be impossible to list them in the order in which they
  were created.

  Add , (comma) option to print file sizes grouped and separated by
  thousands using the non-monetary separator returned by localeconv(3),
  typically a comma or period.

git-svn-id: svn://svn.freebsd.org/base/stable/9@244075 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243238:
eadler [Mon, 10 Dec 2012 02:44:47 +0000 (02:44 +0000)]
MFC r243238:
Standardize EXIT STATUS instructions in man pages when possible.

Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@244074 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243101:
eadler [Mon, 10 Dec 2012 02:40:08 +0000 (02:40 +0000)]
MFC r243101:
Using set -x produces output on stderr instead of stdout.
It also doesn't work with make -s.
Prefer the use of builtin make features.

PR: misc/126312
Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@244071 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243077:
eadler [Mon, 10 Dec 2012 02:35:19 +0000 (02:35 +0000)]
MFC r243077:
Fix error code if file isn't readable.

Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@244067 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243084:
eadler [Mon, 10 Dec 2012 02:33:17 +0000 (02:33 +0000)]
MFC r243084:
Add support for a -q flag.  While here make the custom argument parsing
use getopt instead of hacking on it more.  This change also fixes the
method of silencing the compiler warning about gfn being used
uninitialized.

Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@244066 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243753:
eadler [Sun, 9 Dec 2012 04:15:51 +0000 (04:15 +0000)]
MFC r243753:
The getline function returns the number of characters read, not
written. Use clearer text for this.

PR: docs/174023
Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@244045 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243571:
mav [Sat, 8 Dec 2012 07:37:12 +0000 (07:37 +0000)]
MFC r243571:
Fix problem with the Samsung 840 PRO series SSD detection.
The device reports support for SATA Asynchronous Notification in its
IDENTIFY data, but returns error on attempt to enable that feature.
Make SATA XPT of CAM only report these errors, but not fail the device.

git-svn-id: svn://svn.freebsd.org/base/stable/9@244020 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r240885:
mav [Sat, 8 Dec 2012 07:34:20 +0000 (07:34 +0000)]
MFC r240885:
Document ipv6 hook, present there for ages.

git-svn-id: svn://svn.freebsd.org/base/stable/9@244018 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243893:
eadler [Sat, 8 Dec 2012 00:28:16 +0000 (00:28 +0000)]
MFC r243893:
Remove hack to emulate effective uid and just use the EUID's name in the
first place.  I was unaware of this option when originally committing
this change.

I accidently merged this to only one directory last time :(

Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@244007 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243893:
eadler [Sat, 8 Dec 2012 00:25:51 +0000 (00:25 +0000)]
MFC r243893:
Remove hack to emulate effective uid and just use the EUID's name in the
first place.  I was unaware of this option when originally committing
this change.

Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@244005 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243663:
eadler [Sat, 8 Dec 2012 00:21:55 +0000 (00:21 +0000)]
MFC r243663:
Add support for AT&T Sierra Wireless USB 3G adapter

PR: kern/173982
Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@244003 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238372:
kib [Sat, 8 Dec 2012 00:08:30 +0000 (00:08 +0000)]
MFC r238372:
Fix build for kernels with dtrace hooks.

git-svn-id: svn://svn.freebsd.org/base/stable/9@244002 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMerge r241882.
melifaro [Fri, 7 Dec 2012 20:55:24 +0000 (20:55 +0000)]
Merge r241882.

Provide example for newly-added NG_NETFLOW_V9INFO_TYPE

Submitted by: Dmitry Luhtionov <dmitryluhtionov at gmail.com>

git-svn-id: svn://svn.freebsd.org/base/stable/9@243991 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: 238366, 240924
gnn [Fri, 7 Dec 2012 19:06:40 +0000 (19:06 +0000)]
MFC: 238366, 240924

Initial commit of an I/O provider for DTrace on FreeBSD.

 These probes are most useful when looking into the structures
 they provide, which are listed in io.d.  For example:

 dtrace -n 'io:kernel::start { printf("%d\n", args[0]->bio_bcount); }'

 Note that the I/O systems in FreeBSD and Solaris/Illumos are sufficiently
 different that there is not a 1:1 mapping from scripts that work
 with one to the other.

This commit includes the fix so that our probes use "kernel"
instead of the Solaris specific "genunix"

git-svn-id: svn://svn.freebsd.org/base/stable/9@243989 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r241446,r241501
melifaro [Fri, 7 Dec 2012 13:03:23 +0000 (13:03 +0000)]
MFC r241446,r241501

Add NG_NETFLOW_V9INFO_TYPE command to be able to request netflowv9-specific
data.

Submitted by: Dmitry Luhtionov <dmitryluhtionov at gmail.com>

git-svn-id: svn://svn.freebsd.org/base/stable/9@243983 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243845:
kib [Fri, 7 Dec 2012 01:14:52 +0000 (01:14 +0000)]
MFC r243845:
Document the interpretation of the negative value of ticks for
taskqueue_enqueue_timeout(9).

MFC r243863:
Fix typo.

git-svn-id: svn://svn.freebsd.org/base/stable/9@243963 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243142:
kib [Fri, 7 Dec 2012 01:13:07 +0000 (01:13 +0000)]
MFC r243142:
In pget(9), if PGET_NOTWEXIT flag is not specified, also search the
zombie list for the pid. This allows several kern.proc sysctls to
report useful information for zombies.

Hold the allproc_lock around all searches instead of relocking it.
Remove private pfind_locked() from the new nfs client code.

MFC r243528 (by pjd):
Look for zombie process only if we were given process id.

git-svn-id: svn://svn.freebsd.org/base/stable/9@243962 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r239007:
mav [Thu, 6 Dec 2012 18:35:00 +0000 (18:35 +0000)]
MFC r239007:
Remove duplicate check.

git-svn-id: svn://svn.freebsd.org/base/stable/9@243953 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243680, r243681.
np [Thu, 6 Dec 2012 18:23:23 +0000 (18:23 +0000)]
MFC r243680, r243681.

r243680:
cxgbe/tom: Add a flag to indicate that the L2 table entry for an
embryonic connection has been setup and never attempt to abort a tid
before this is done.  This fixes a bad race where a listening socket is
closed when the driver is in the middle of step (b) here.  The symptom
of this were "ARP miss" errors from the driver followed by tid leaks.

A hardware-offloaded passive open works this way:

a) A SYN "hits" the TCAM entry for a server tid and the chip delivers it
to the queue associated with the server tid (say, queue A).  It waits
for a response from the driver telling it what to do.

b) The driver decides it is ok to proceed.  It adds the new tid to the
list of embryonic connections associated with the server tid and then
hands off the SYN to the kernel's syncache to make sure that the kernel
okays it too.  If it does then the driver provides an L2 table entry,
queue id (say, queue B), etc. and instructs the chip to send the SYN/ACK
response.

c) The chip delivers a status to queue B depending on how the third step
of the 3-way handshake goes.  The driver removes the tid from its list
of embryonic connections and either expands the syncache entry or
destroys the tid.  In any case all subsequent messages for the new tid
will be delivered to queue B, not queue A.  Anything running in queue B
knows that the L2 entry has long been setup and the new flag is of no
interest from here on.  If the listener is closed it will deal with
so_comp as normal.

r243681:
cxgbe/tom: Handle the case where the chip falls out of DDP mode by
itself.  The hole in the receive sequence space corresponds to the
number of bytes placed directly up to that point.

Submittey by:

git-svn-id: svn://svn.freebsd.org/base/stable/9@243952 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoEarly MFC of portions of r243752 adding an auditdistd user to stable/8
rwatson [Thu, 6 Dec 2012 11:52:31 +0000 (11:52 +0000)]
Early MFC of portions of r243752 adding an auditdistd user to stable/8
in order to ease future upgrades; the remainder of r243752 is left for
a future MFC of the OpenBSM upgrade:

  Merge a number of changes required to hook up OpenBSM 1.2-alpha2's
  auditdistd (distributed audit daemon) to the build:

  - Manual cross references
  - Makefile for auditdistd
  - rc.d script, rc.conf entrie
  - New group and user for auditdistd; associated aliases, etc.

  The audit trail distribution daemon provides reliable,
  cryptographically protected (and sandboxed) delivery of audit tails
  from live clients to audit server hosts in order to both allow
  centralised analysis, and improve resilience in the event of client
  compromises: clients are not permitted to change trail contents
  after submission.

  Submitted by:   pjd
  Sponsored by:   The FreeBSD Foundation (auditdistd)

git-svn-id: svn://svn.freebsd.org/base/stable/9@243947 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r242511: Print a newline after the error message.
jh [Thu, 6 Dec 2012 08:35:46 +0000 (08:35 +0000)]
MFC r242511: Print a newline after the error message.

PR: bin/168447

git-svn-id: svn://svn.freebsd.org/base/stable/9@243942 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r242897:
gjb [Thu, 6 Dec 2012 00:25:42 +0000 (00:25 +0000)]
MFC r242897:
 Prevent including .zfs snapshot directories in the src.txz
 distribution.  This can happen if the src/ tree checkout is
 within its own ZFS dataset, and the 'snapdir' ZFS property
 is set to 'visible.'

git-svn-id: svn://svn.freebsd.org/base/stable/9@243923 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243641:
pfg [Wed, 5 Dec 2012 22:47:45 +0000 (22:47 +0000)]
MFC r243641:
Partially bring r242520 to ext2fs.

When a file is first being written, the dynamic block reallocation
(implemented by ext2_reallocblks) relocates the file's blocks
so as to cluster them together into a contiguous set of blocks on
the disk.

When the cluster crosses the boundary into the first indirect block,
the first indirect block is initially allocated in a position
immediately following the last direct block.  Block reallocation
would usually destroy locality by moving the indirect block out of
the way to keep the data blocks contiguous.

The issue was diagnosed long ago by Bruce Evans on ffs and surfaced
on ext2fs when block reallocaton was ported. This is only a partial
solution based on the similarities with FFS. We still require more
review of the allocation details that vary in ext2fs.

Reported by:    bde

git-svn-id: svn://svn.freebsd.org/base/stable/9@243913 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243342:
kib [Tue, 4 Dec 2012 00:57:11 +0000 (00:57 +0000)]
MFC r243342:
Schedule garbage collection run for the in-flight rights passed over
the unix domain sockets to the next tick, coalescing the serial calls
until the collection fires.

git-svn-id: svn://svn.freebsd.org/base/stable/9@243851 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243341:
kib [Tue, 4 Dec 2012 00:54:49 +0000 (00:54 +0000)]
MFC r243341:
Add a special meaning to the negative ticks argument for
taskqueue_enqueue_timeout().  Do not rearm the callout if it is
already armed and the ticks is negative.  Otherwise rearm it to fire
in abs(ticks) ticks in the future.

git-svn-id: svn://svn.freebsd.org/base/stable/9@243850 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r242433:
kib [Tue, 4 Dec 2012 00:51:29 +0000 (00:51 +0000)]
MFC r242433:
Enable the new instructions for reading and writing bases for %fs,
%gs, when supported. Enable SMEP when supported.

MFC r242828:
Do not try to enable new features in the %cr4 if running under hypervisor.

git-svn-id: svn://svn.freebsd.org/base/stable/9@243848 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r242681 (ambrisko):
delphij [Mon, 3 Dec 2012 18:37:02 +0000 (18:37 +0000)]
MFC r242681 (ambrisko):

- Extend the prior commit to use the generic SCSI command building
  function use that for JBOD and Thunderbolt disk write command.  Now
  we only have one implementation in mfi.
- Fix dumping on Thunderbolt cards.  Polled IO commands do not seem to
  be normally acknowledged by changing cmd_status to MFI_STAT_OK.
  In order to get acknowledgement of the IO is complete, the Thunderbolt
  command queue needs to be run through.  I added a flag MFI_CMD_SCSI
  to indicate this command is being polled and to complete the
  Thunderbolt wrapper and indicate the result.  This flag needs to be
  set in the JBOD case in case if that us using Thunderbolt card.
  When in the polling loop check for completed commands.
- Remove mfi_tbolt_is_ldio and just do the check when needed.
- Fix an issue when attaching of disk device happens when a device is
  already scheduled to be attached but hasn't attached.
- add a tunable to allow raw disk attachment to CAM via:
        hw.mfi.allow_cam_disk_passthrough=1
- fixup aborting of commands (AEN and LD state change).  Use a generic
  abort function and only wait the command being aborted not both.
  Thunderbolt cards don't seem to abort commands so the abort times
  out.

git-svn-id: svn://svn.freebsd.org/base/stable/9@243824 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r242497:
delphij [Mon, 3 Dec 2012 18:34:54 +0000 (18:34 +0000)]
MFC r242497:

Copy code from scsi_read_write() as mfi_build_syspd_cdb() to build SCSI
command properly.  Without this change, mfi(4) always sends 10 byte READ
and WRITE commands, which will cause data corruption when device is
larger than 2^32 sectors.

PR: kern/173291
Submitted by: Steven Hartland <steven.hartland multiplay.co.uk>
Reviewed by: mav

git-svn-id: svn://svn.freebsd.org/base/stable/9@243823 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r242519:
delphij [Mon, 3 Dec 2012 18:30:12 +0000 (18:30 +0000)]
MFC r242519:

Replace log(3) with flsll(3) for watchdogd(8) and drop libm dependency.

git-svn-id: svn://svn.freebsd.org/base/stable/9@243820 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235038,241906:
delphij [Mon, 3 Dec 2012 18:26:23 +0000 (18:26 +0000)]
MFC r235038,241906:

netcat from OpenBSD 5.2.

git-svn-id: svn://svn.freebsd.org/base/stable/9@243818 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r242728:
delphij [Mon, 3 Dec 2012 18:19:58 +0000 (18:19 +0000)]
MFC r242728:

ICMPV6_FILTER should read ICMP6_FILTER.

Submitted by: Frédéric Perrin <frederic.perrin resel.fr>

git-svn-id: svn://svn.freebsd.org/base/stable/9@243815 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r242841:
delphij [Mon, 3 Dec 2012 18:16:36 +0000 (18:16 +0000)]
MFC r242841:

Use %s when calling make_dev with a string pointer.  This makes
clang happy.

git-svn-id: svn://svn.freebsd.org/base/stable/9@243814 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r242332:
delphij [Mon, 3 Dec 2012 18:12:54 +0000 (18:12 +0000)]
MFC r242332:

s/dettach/detach/g

Approved by: pjd

git-svn-id: svn://svn.freebsd.org/base/stable/9@243813 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r242507:
delphij [Mon, 3 Dec 2012 18:08:44 +0000 (18:08 +0000)]
MFC r242507:

Sync strlcpy with userland version.

git-svn-id: svn://svn.freebsd.org/base/stable/9@243811 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r242506:
delphij [Mon, 3 Dec 2012 18:01:53 +0000 (18:01 +0000)]
MFC r242506:

Sync strlen with userland implementation.

git-svn-id: svn://svn.freebsd.org/base/stable/9@243809 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243155:
eadler [Mon, 3 Dec 2012 01:02:20 +0000 (01:02 +0000)]
MFC r243155:
Correct spelling of "lily" [0]
Correct spelling of Camellia

PR: misc/173655 [0]
Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@243803 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r242696 from HEAD:
issyl0 [Sun, 2 Dec 2012 12:26:17 +0000 (12:26 +0000)]
MFC r242696 from HEAD:
Document all of the options that wpa_supplicant accepts.

PR: docs/171755
Approved by: gabor (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/9@243788 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoPull in r158245 from upstream clang:
dim [Sun, 2 Dec 2012 00:31:23 +0000 (00:31 +0000)]
Pull in r158245 from upstream clang:

  [C++11 Compat] Fix breaking change in C++11 pair copyctor.

  While this code is valid C++98, it is not valid C++11. The problem
  can be reduced to:

  class MDNode;

  class DIType {
    operator MDNode*() const {return 0;}
  };

  class WeakVH {
    WeakVH(MDNode*) {}
  };

  int main() {
    DIType di;
    std::pair<void*, WeakVH> p(std::make_pair((void*)0, di)));
  }

  This was not detected by any of the bots we have because they either
  compile C++98 with libstdc++ (which allows it), or C++11 with libc++
  (which incorrectly allows it). I ran into the problem when compiling
  with VS 2012 RC.

  Thanks to Richard for explaining the issue.

This fixes building clang 3.1 on stable/9 with libc++ in C++11 mode.

This is a direct commit to stable/9, since there is no separate commit
in head which has just this particular change, and I do not want to do a
full import at this time.

Reported by: Marco Bröder <marco.broeder@gmx.eu>

git-svn-id: svn://svn.freebsd.org/base/stable/9@243781 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243270: zfs_remove: assert that delete_now case is never true on FreeBSD
avg [Sat, 1 Dec 2012 19:24:09 +0000 (19:24 +0000)]
MFC r243270: zfs_remove: assert that delete_now case is never true on FreeBSD

git-svn-id: svn://svn.freebsd.org/base/stable/9@243777 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243268: zfs_remove: set VV_NOSYNC flag if a node is unlinked
avg [Sat, 1 Dec 2012 19:22:01 +0000 (19:22 +0000)]
MFC r243268: zfs_remove: set VV_NOSYNC flag if a node is unlinked

git-svn-id: svn://svn.freebsd.org/base/stable/9@243775 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243501: spa_import_rootpool: initialize ub_version before calling
avg [Sat, 1 Dec 2012 19:20:04 +0000 (19:20 +0000)]
MFC r243501: spa_import_rootpool: initialize ub_version before calling
spa_config_parse

git-svn-id: svn://svn.freebsd.org/base/stable/9@243773 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243500: spa_import_rootpool: do not call spa_history_log_version
avg [Sat, 1 Dec 2012 19:16:44 +0000 (19:16 +0000)]
MFC r243500: spa_import_rootpool: do not call spa_history_log_version

git-svn-id: svn://svn.freebsd.org/base/stable/9@243771 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243498: opensolaris compat: terminate cmn_err mesages with a new line
avg [Sat, 1 Dec 2012 19:14:35 +0000 (19:14 +0000)]
MFC r243498: opensolaris compat: terminate cmn_err mesages with a new line

git-svn-id: svn://svn.freebsd.org/base/stable/9@243769 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r242575: zfs_dirlook: bailout early if directory is unlinked
avg [Sat, 1 Dec 2012 19:12:43 +0000 (19:12 +0000)]
MFC r242575: zfs_dirlook: bailout early if directory is unlinked

git-svn-id: svn://svn.freebsd.org/base/stable/9@243767 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243271,243400: vnode_if: fix locking protocol description for
avg [Sat, 1 Dec 2012 19:05:30 +0000 (19:05 +0000)]
MFC r243271,243400: vnode_if: fix locking protocol description for
lookup and cachedlookup

git-svn-id: svn://svn.freebsd.org/base/stable/9@243765 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243080:
eadler [Sat, 1 Dec 2012 16:44:33 +0000 (16:44 +0000)]
MFC r243080:
Only pass ip[46].addr when _addrl contains a value

Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@243757 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r242183:
crees [Sat, 1 Dec 2012 15:46:27 +0000 (15:46 +0000)]
MFC r242183:

Allow spaces in _chroot

Approved by: hrs

git-svn-id: svn://svn.freebsd.org/base/stable/9@243754 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243649: cyrus-sasl 2.1.26 was released. In this version, the type
ume [Sat, 1 Dec 2012 11:03:19 +0000 (11:03 +0000)]
MFC r243649: cyrus-sasl 2.1.26 was released.  In this version, the type
of callback functions was changed from "unsigned long" to "size_t".

git-svn-id: svn://svn.freebsd.org/base/stable/9@243747 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243562:
pfg [Sat, 1 Dec 2012 02:02:19 +0000 (02:02 +0000)]
MFC r243562:
Update some definitions or make them match NetBSD's headers.

Bring several definitions required for newer ext4 features.

Rename EXT2F_COMPAT_HTREE to EXT2F_COMPAT_DIRHASHINDEX since it
is not being used yet and the new name is more compatible with
NetBSD and Linux.

This change is purely cosmetic.

Obtained from: NetBSD

git-svn-id: svn://svn.freebsd.org/base/stable/9@243742 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r241569
rmacklem [Sat, 1 Dec 2012 01:16:40 +0000 (01:16 +0000)]
MFC: r241569
Document the -S option added by r241568.

git-svn-id: svn://svn.freebsd.org/base/stable/9@243740 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r241568
rmacklem [Sat, 1 Dec 2012 01:11:59 +0000 (01:11 +0000)]
MFC: r241568
Add a new '-S' option to mountd, which tells it to suspend
execution of the nfsd threads while it is reloading the exports.
This avoids clients from getting intermittent access errors
when the exports are being reloaded non-atomically.
It is not an ideal solution, since requests will back up while
the nfsd threads are suspended. Also, when this option is used,
if mountd crashes while reloading exports, mountd will have to
be restarted to get the nfsd threads to resume execution.
This has been tested by Vincent Hoffman (vince at unsane.co.uk)
and John Hickey (jh at deterlab.net).
The nfse patch offers a more comprehensive solution for this issue.

git-svn-id: svn://svn.freebsd.org/base/stable/9@243739 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r241561
rmacklem [Sat, 1 Dec 2012 01:07:51 +0000 (01:07 +0000)]
MFC: r241561
Add two new options to the nfssvc(2) syscall that allow
processes running as root to suspend/resume execution
of the kernel nfsd threads. An earlier version of this
patch was tested by Vincent Hoffman (vince at unsane.co.uk)
and John Hickey (jh at deterlab.net).

git-svn-id: svn://svn.freebsd.org/base/stable/9@243738 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoGuess when we'll be ready to announce 9.1-RELEASE.
kensmith [Fri, 30 Nov 2012 19:27:31 +0000 (19:27 +0000)]
Guess when we'll be ready to announce 9.1-RELEASE.

git-svn-id: svn://svn.freebsd.org/base/stable/9@243708 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243599:
davidxu [Fri, 30 Nov 2012 05:30:31 +0000 (05:30 +0000)]
MFC r243599:
Take first active vnode correctly.

git-svn-id: svn://svn.freebsd.org/base/stable/9@243702 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243082:
eadler [Fri, 30 Nov 2012 03:48:45 +0000 (03:48 +0000)]
MFC r243082:
Fix memory leak in umount.c

PR: bin/172553
Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@243698 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243078:
eadler [Fri, 30 Nov 2012 03:38:02 +0000 (03:38 +0000)]
MFC r243078:
Add deviceid to the disk output on boot to help debugging.

PR: kern/173290
Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@243697 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r242945 (by theraven):
dim [Thu, 29 Nov 2012 21:26:57 +0000 (21:26 +0000)]
MFC r242945 (by theraven):

  Import new version of libc++ into base.

git-svn-id: svn://svn.freebsd.org/base/stable/9@243683 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r242323, r242328:
mav [Thu, 29 Nov 2012 18:08:36 +0000 (18:08 +0000)]
MFC r242323, r242328:
Add basic BIO_DELETE support to GEOM RAID class for all RAID levels.

If at least one subdisk in the volume supports it, BIO_DELETE requests
will be propagated down.  Unfortunatelly, for RAID levels with redundancy
unmapped blocks will be mapped back during first rebuild/resync process.

git-svn-id: svn://svn.freebsd.org/base/stable/9@243678 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243336:
ae [Thu, 29 Nov 2012 17:35:57 +0000 (17:35 +0000)]
MFC r243336:
  Remove opt_inet.h, it isn't required here.

MFC r243337:
  Connect ip6_mroute kernel module to the build.

git-svn-id: svn://svn.freebsd.org/base/stable/9@243676 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMerge ZFS feature flags support and related bugfixes:
mm [Thu, 29 Nov 2012 14:05:04 +0000 (14:05 +0000)]
Merge ZFS feature flags support and related bugfixes:
236884, 237001, 237119, 237458, 237972, 238113, 238391, 238422, 238926,
238950, 238951, 239389, 239394, 239620, 239774, 239953, 239958, 239967,
239968, 240063, 240133, 240153, 240303, 240345, 240415, 240955, 241655,
243014, 243505, 243506

MFC r236884:
Introduce "feature flags" for ZFS pools (bump SPA version to 5000).
Add first feature "com.delphix:async_destroy" (asynchronous destroy
of ZFS datasets).
Implement features support in ZFS boot code.

Illumos revisions merged:
13700:2889e2596bd6
13701:1949b688d5fb
2619 asynchronous destruction of ZFS file systems
2747 SPA versioning with zfs feature flags

References:
  https://www.illumos.org/issues/2619
  https://www.illumos.org/issues/2747

MFC r237001:
Fix ZFS boot with pre-features pools (version <= 28) broken in r236884

MFC r237119 [1]:
Do not remount ZFS dataset if changing canmount property to "on" and
dataset is already mounted.

MFC r237458:
Import Illumos revision 13736:9f1d48e1681f
2901 ZFS receive fails for exabyte sparse files

References:
  https://www.illumos.org/issues/2901

MFC r237972:
Expose scrub and resilver tunables.
This allows the user to tune the priority trade-off between scrub/resilver
and other ZFS I/O.

MFC r238113 (pjd):
vdev_io_done stage is not used for ioctls.

MFC r238391:
Change behavior introduced in r237119 to vendor solution

References:
  https://www.illumos.org/issues/2883

MFC r238422:
Merge illumos commit 13749:df4cd82e2b60

1796 "ZFS HOLD" should not be used when doing "ZFS SEND" froma read-only pool
2871 support for __ZFS_POOL_RESTRICT used by ZFS test suite
2903 zfs destroy -d does not work
2957 zfs destroy -R/r sometimes fails when removing defer-destroyed snapshot

References:
  https://www.illumos.org/issues/1796
  https://www.illumos.org/issues/2871
  https://www.illumos.org/issues/2903
  https://www.illumos.org/issues/2957

MFC r238926:
Partial MFV (illumos-gate 13753:2aba784c276b)
2762 zpool command should have better support for feature flags

References:
  https://www.illumos.org/issues/2762

MFC r238950:
Fix reporting of root pool upgrade notice.

MFC r238951:
Fix wrong indent according to style(9)

MFC r239389:
Backport fix for vendor issue #3085
3085 zfs diff panics, then panics in a loop on booting

References:
  https://www.illumos.org/issues/3085

MFC r239394:
Update zfs(8) manpage with illumos version of "zfs diff"

Illumos issue:
  2399 zfs manual page does not document use of "zfs diff"

References:
  https://www.illumos.org/issues/2399

MFC r239620 [2]:
Merge recent vendor changes:
3086 unnecessarily setting DS_FLAG_INCONSISTENT on async destroyed datasets
3090 vdev_reopen() during reguid causes vdev to be treated as corrupt
3102 vdev_uberblock_load() and vdev_validate() may read the wrong label

Referenes:
  https://www.illumos.org/issues/3086
  https://www.illumos.org/issues/3090
  https://www.illumos.org/issues/3102

MFC r239774:
Merge recent vendor changes:
3100 zvol rename fails with EBUSY when dirty
3104 eliminate empty bpobjs
3120 zinject hangs in zfsdev_ioctl() due to uninitialized zc

References:
  https://www.illumos.org/issues/3100
  https://www.illumos.org/issues/3104
  https://www.illumos.org/issues/3120

MFC r239953 (joel):
Mdoc fixes.

MFC r239958 (joel):
Minor mdoc fixes.

MFC r239967 (joel):
Mdoc fixes.

MFC r239968 (joel):
Remove trailing whitespace.

MFC r240063 (gjb):
Add myself to copyright sections, per CDDL license.

MFC r240133:
Merge recent vendor changes and sync code:
1862 incremental zfs receive fails for sparse file > 8PB
3112 ztest does not honor ZFS_DEBUG
3122 zfs destroy filesystem should prefetch blocks
3129 'zpool reopen' restarts resilvers
3130 ztest failure: Assertion failed:
       0 == dmu_objset_destroy(name, B_FALSE) (0x0 == 0x10)

References:
  https://www.illumos.org/issues/1862
  https://www.illumos.org/issues/3112
  https://www.illumos.org/issues/3122
  https://www.illumos.org/issues/3129
  https://www.illumos.org/issues/3130

MFC r240153 (gjb) [3]:
Typo fix and minor word swap.

MFC r240303:
Add assfail() and assfail3() to the opensolaris module.
Remove obsoleted intermediate cddl/compat/opensolaris/sys/debug.h.

MFC r240345 (avg):
zfs: fix sa_modify_attrs handling of variable-sized attributes

- skip length_idx index for a replaced variable-sized attribute
- skip length_idx index for a removed variable-sized attribute
- also re-arranged code to make sure that length_idx is always
  incremented for variable-sized attributes
- additionally add an assertion that the number of actually produced
  attributes is the same as the expected number of resulting
  attributes

MFC r240415:
Merge recent zfs vendor changes, sync code and adjust userland DEBUG.

Illumos issued covered:
1884 Empty "used" field for zfs *space commands
3006 VERIFY[S,U,P] and ASSERT[S,U,P] frequently check if first argument
     is zero
3028 zfs {group,user}space -n prints (null) instead of numeric GID/UID
3048 zfs {user,group}space [-s|-S] is broken
3049 zfs {user,group}space -t doesn't really filter the results
3060 zfs {user,group}space -H output isn't tab-delimited
3061 zfs {user,group}space -o doesn't use specified fields order
3064 usr/src/cmd/zpool/zpool_main.c misspells "successful"
3093 zfs {user,group}space's -i is noop
3098 zfs userspace/groupspace fail without saying why when run as non-root

References:
  https://www.illumos.org/issues/ + [issue_id]

MFC r240955 (partial):
Merge recent vendor changes in ZFS.

Illumos issued covered:
3139 zdb dies when it tries to determine path of unlinked file
3189 kernel panic in ZFS test suite during hotspare_onoffline_004_neg
3208 moving zpool cross-endian results in incorrect user/group accounting

References:
  https://www.illumos.org/issues/ + [issue_id]

MFC r241655:
Add missing initialization for do_prefix.
Corrects porting error in r238391

Vendor issue and changeset reference:
2883 changing "canmount" property to "on" should not always remount dataset
https://www.illumos.org/issues/2883
Changeset 13743:95aba6e49b9f

MFC r243014:
Move zpool-features manual page from section 5 to section 7
and fix references

Reported by: pluknet

MFC r243505:
Illumos 13886:e3261d03efbf

3349 zpool upgrade -V bumps the on disk version number, but leaves
     the in core version

References:
  https://www.illumos.org/issues/3349

MFC r243506:
zfs sha256 checksum is missing in zfs.8 manpage

PR: kern/167905 [1], kern/170912 [2], kern/170914 [2], doc/171356 [3]

git-svn-id: svn://svn.freebsd.org/base/stable/9@243674 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243380:
hselasky [Wed, 28 Nov 2012 18:13:35 +0000 (18:13 +0000)]
MFC r243380:
Fix uplcom clear stall logic for PL2303HX.

Submitted by: Mark Johnston

git-svn-id: svn://svn.freebsd.org/base/stable/9@243657 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r242619, r242695, r242702 and r242703:
hselasky [Wed, 28 Nov 2012 18:10:05 +0000 (18:10 +0000)]
MFC r242619, r242695, r242702 and r242703:
Implement support for RTS (flow control).
Improve USB serial console support.
Implement a USB serial jitter buffer in receive direction.

git-svn-id: svn://svn.freebsd.org/base/stable/9@243656 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoAdd new USB IDs.
hselasky [Wed, 28 Nov 2012 17:43:41 +0000 (17:43 +0000)]
Add new USB IDs.

PR: usb/173503

git-svn-id: svn://svn.freebsd.org/base/stable/9@243654 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r241708: Explicitly specify 'np' so that getty(8) does not
peterj [Tue, 27 Nov 2012 19:23:54 +0000 (19:23 +0000)]
MFC r241708:  Explicitly specify 'np' so that getty(8) does not
simulate even parity on local.9600.

PR: 76226
Approved by: jhb (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/9@243623 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243387: Use %u for unsigned serial number
emaste [Tue, 27 Nov 2012 16:20:44 +0000 (16:20 +0000)]
MFC r243387: Use %u for unsigned serial number

git-svn-id: svn://svn.freebsd.org/base/stable/9@243616 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243110:
np [Tue, 27 Nov 2012 08:32:12 +0000 (08:32 +0000)]
MFC r243110:

cxgbe/tom: Plug mbuf leak.

git-svn-id: svn://svn.freebsd.org/base/stable/9@243605 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r242079:
ae [Tue, 27 Nov 2012 01:59:51 +0000 (01:59 +0000)]
MFC r242079:
  Remove the IPFIREWALL_FORWARD kernel option and make possible to turn
  on the related functionality in the runtime via the sysctl variable
  net.pfil.forward. It is turned off by default.

MFC r242082:
  Note the removal of the IPFIREWALL_FORWARD kernel option.

MFC r242463:
  Remove the recently added sysctl variable net.pfil.forward.
  Instead, add protocol specific mbuf flags M_IP_NEXTHOP and
  M_IP6_NEXTHOP. Use them to indicate that the mbuf's chain
  contains the PACKET_TAG_IPFORWARD tag. And do a tag lookup
  only when this flag is set.

git-svn-id: svn://svn.freebsd.org/base/stable/9@243586 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243234:
mjg [Tue, 27 Nov 2012 01:33:23 +0000 (01:33 +0000)]
MFC r243234:

Fix possible fp reference leak in posix_openpt

git-svn-id: svn://svn.freebsd.org/base/stable/9@243584 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243007:
mjg [Tue, 27 Nov 2012 01:28:35 +0000 (01:28 +0000)]
MFC r243007:
enterpgrp: get rid of pgrp2 variable and use KASSERT directly on pgfind result.

pgrp2 was used only for debugging, but pgrp2 = pgfind(..) was present in compiled code

git-svn-id: svn://svn.freebsd.org/base/stable/9@243582 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r242546:
wblock [Mon, 26 Nov 2012 18:10:15 +0000 (18:10 +0000)]
MFC r242546:

Add an example showing the use of gnop(8) to skip over header data.

PR: kern/145999
Reviewed by: mjg

git-svn-id: svn://svn.freebsd.org/base/stable/9@243566 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238943:
mav [Mon, 26 Nov 2012 15:34:28 +0000 (15:34 +0000)]
MFC r238943:
Add several performance optimizations to acpi_cpu_idle().

For C1 and C2 states use cpu_ticks() to measure sleep time instead of much
slower ACPI timer. We can't do it for C3, as TSC may stop there. But it is
less important there as wake up latency is high any way.

For C1 and C2 states do not check/clear bus mastering activity status, as
it is important only for C3. As side effect it can make CPU enter C2 instead
of C3 if last BM activity was two sleeps back (unlike one before), but
that may be even good because of collecting more statistics. Premature BM
wakeup from C3, entered because of overestimation, can easily be worse then
entering C2 from both performance and power consumption points of view.

Together on dual Xeon E5645 system on sequential 512 bytes read test this
change makes cpu_idle_acpi() as fast as simplest cpu_idle_hlt() and only
few percents slower then cpu_idle_mwait(), while deeper states are still
actively used during idle periods.

To help with diagnostics, add C-state type into dev.cpu.X.cx_supported.

PR: kern/170021

git-svn-id: svn://svn.freebsd.org/base/stable/9@243562 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243072:
eadler [Mon, 26 Nov 2012 05:13:57 +0000 (05:13 +0000)]
MFC r243072:
Follow the behavior as specified in POSIX:

if (exists AND (NOT f_option) AND
((not_writable AND input_is_terminal) OR i_option))
prompt

in particular, add the test for input_is_terminal

PR: bin/173039
Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@243557 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r242426:
yongari [Mon, 26 Nov 2012 04:39:41 +0000 (04:39 +0000)]
MFC r242426:
  TCP/UDP checksum offloading feature for IP fragmented datagram was
  removed in r99417.  bge(4) controllers can do TCP checksum offload
  for IP fragmented datagrams but unlike ti(4), it lacks UDP checksum
  offloading for IP fragmented datagrams. The problem was bge(4)
  blindly requested TCP/UDP checksum for IP fragmented datagrams such
  that it resulted in corrupted UDP datagrams before r99417.
  Remove remaining code for TCP checksum offloading for IP fragmented
  datagrams which should have been removed in r99417.

git-svn-id: svn://svn.freebsd.org/base/stable/9@243551 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r241983-241985:
yongari [Mon, 26 Nov 2012 04:34:05 +0000 (04:34 +0000)]
MFC r241983-241985:
r241983:
  Do not hardcode phy address. Multi-port controllers use different phy
  address.

r241984:
  Ethernet@WireSpeed is defined for 1000baseT adapter to establish a
  link at a lower speed so enabling it for fiber adapters is wrong.
  Fix the issue by setting BGE_PHY_NO_WIRESPEED such that brgphy(4)
  wouldn't enable the feature.
  While I'm here move PHY specific feature/bug configuration to new
  location(just before mii attach) for readability.

r241985:
  For fast ethernet controllers, Ethernet@WireSpeed is not defined so
  explicitly set BGE_PHY_NO_WIRESPEED flag.

git-svn-id: svn://svn.freebsd.org/base/stable/9@243549 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r241438:
yongari [Mon, 26 Nov 2012 04:25:41 +0000 (04:25 +0000)]
MFC r241438:
  Add APE firmware support and improve firmware handshake procedure.
  This change will enable IPMI access on 5717/5718/5719/5720 and 5761
  controllers. Because ASF is not available when APE firmware is
  present, bge_allow_asf tunable is ignored when driver detects APE
  firmware.  Also bge(4) no longer performs two resets(one blind
  reset and the other reset with firmware in mind) in device attach.
  Now bge(4) performs a reset with enough information in bge_reset().
  The APE firmware also needs special handling to make suspend/resume
  work but it was not implemented yet.

  With this change, bge(4) should work on any 5717/5718/5719/5720
  controllers. Special thanks to Mike Hibler at Emulab who setup
  remote debugging on Dell R820. Without his help I couldn't be able
  to address several issues happened on Dell Rx20 systems. And many
  thanks to Broadcom for continuing to support FreeBSD!

  Submitted by: davidch (initial version)
  H/W donated by: Broadcom
  Tested by: many
  Tested on: Del R820/R720/R620/R420/R320 and HP Proliant DL 360 G8

git-svn-id: svn://svn.freebsd.org/base/stable/9@243546 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r241437:
yongari [Mon, 26 Nov 2012 04:20:11 +0000 (04:20 +0000)]
MFC r241437:
  For 5717C/5719C/5720C and 57765 PHYs, do not perform any special
  handling(jumbo, wire speed etc) in brgphy_reset().  Touching
  BRGPHY_MII_AUXCTL register seems to confuse APE firmware such that
  it couldn't establish a link.

git-svn-id: svn://svn.freebsd.org/base/stable/9@243544 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r241436:
yongari [Mon, 26 Nov 2012 04:10:27 +0000 (04:10 +0000)]
MFC r241436:
  Rework controller reset procedure. Previously driver saved
  BGE_PCI_PCISTATE register before issuing global reset. After
  issuing reset, it reads BGE_PCI_PCISTATE register again and
  compares the saved register value and current value. It was used to
  know whether the global reset operation was completed or not.
  Unfortunately, this logic caused several issues on recent BCM5717/
  5718/5719 and BCM5720 controllers. It seems APE firmware accesses
  some registers while global reset is in progress such that reading
  BGE_PCI_PCISTATE register after reset does not yield old pre-reset
  state value. This resulted in consuming too much time in global
  reset and sometimes it couldn't successfully complete reset.

  The BGE_MISCCFG_RESET_CORE_CLOCKS of BGE_MISC_CFG register is
  self-clearing bit so driver is able to know the reset completion.
  But the core-lock reset will disable indirect/flat/standard access
  modes such that driver cannot poll BGE_MISCCFG_RESET_CORE_CLOCKS
  bit of BGE_MISC_CFG register. So just wait enough time for
  core-clock reset to complete.
  Data sheet says driver should wait 100us for PCI/PCI-X devices and
  100ms for PCIe devices. I chose 1ms for PCI/PCI-X since this value
  was used for many years in bge(4). For PCIe devices, use 100ms as
  recommended by data sheet.

  bge_chipinit() also cleared BGE_MAC_MODE register which shall clear
  firmware configured mode information. I think this will result in
  losing ASF/IPMI link in device attachment. Let bge_reset() honor
  firmware configured BGE_MAC_MODE register and don't announce driver
  is UP in bge_reset(). Firmware should have control over driver until
  it's fully initialized by driver.

  While I'm here, enable workaround for PCI-X BCM5704 A0 in
  bge_reset(). This will prevent internal arbitration logic from
  switching to the other DMA engine after a retry cycle.

git-svn-id: svn://svn.freebsd.org/base/stable/9@243541 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f