]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
13 years agoFix mismerge. The missing _cxgb=cxgb assignment was causing cxgb to
imp [Tue, 18 Jan 2011 20:26:40 +0000 (20:26 +0000)]
Fix mismerge.  The missing _cxgb=cxgb assignment was causing cxgb to
not be built at all, rather than causing it to not be built on just
arm and mips.

# The merge info looks correct, so this looks like a direct commit.

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

13 years agoMFC unifdef-2.5
fanf [Tue, 18 Jan 2011 19:31:38 +0000 (19:31 +0000)]
MFC unifdef-2.5

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

13 years agoMFC r205682:
jh [Tue, 18 Jan 2011 16:49:51 +0000 (16:49 +0000)]
MFC r205682:

Support only LOOKUP operation for "/" in relookup() because lookup()
can't succeed for CREATE, DELETE and RENAME.

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

13 years agoMFC: r217464, r217468, r217475
marius [Tue, 18 Jan 2011 11:51:48 +0000 (11:51 +0000)]
MFC: r217464, r217468, r217475

Add a manual page for rgephy(4) and reference it as appropriate. The
motivation for having rgephy.4 is to document the special media option
added in r217415 (MFC'ed to stable/8 in r217502).

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

13 years agoMFC r216952:
kib [Tue, 18 Jan 2011 10:42:13 +0000 (10:42 +0000)]
MFC r216952:
Mark some devices as eternal.

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

13 years agoMFC r217262:
ae [Tue, 18 Jan 2011 06:24:52 +0000 (06:24 +0000)]
MFC r217262:
  Round GNOP provider's mediasize to its sectorsize. This prevents KASSERT
  in g_io_request when geom classes doing tasting.

  PR: kern/147852

MFC r217263:
  Remove redundant check.

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

13 years agoMFC: r217242
rmacklem [Tue, 18 Jan 2011 01:20:15 +0000 (01:20 +0000)]
MFC: r217242
Fix a bug in the client side krpc where it was, sometimes
erroneously, assumed that 4 bytes of data were in the first
mbuf of a list by replacing the bcopy() with m_copydata().
Also, replace the uses of m_pullup(), which can fail for
reasons other than not enough data, with m_copydata().
For the cases where it isn't known that there is enough
data in the mbuf list, check first via m_len and m_length().
This is believed to fix a problem reported by dpd at dpdtech.com
and george+freebsd at m5p.com.

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

13 years agoMFC: r217066
rmacklem [Tue, 18 Jan 2011 01:07:09 +0000 (01:07 +0000)]
MFC: r217066
Delete the NFS_STARTWRITE() and NFS_ENDWRITE() macros that
obscured vn_start_write() and vn_finished_write() for the
old OpenBSD port, since most uses have been replaced by the
correct calls.

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

13 years agoMFC: r217063
rmacklem [Tue, 18 Jan 2011 00:53:55 +0000 (00:53 +0000)]
MFC: r217063
Since the VFS_LOCK_GIANT() code in the experimental NFS
server is broken and the major file systems are now all
mpsafe, modify the server so that it will only export
mpsafe file systems. This was discussed on freebsd-fs@
and removes a fair bit of crufty code.

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

13 years agoMFC r216835:
bschmidt [Mon, 17 Jan 2011 20:22:03 +0000 (20:22 +0000)]
MFC r216835:
The mwl's HAL manages an array of MWL_MBSS_MAX VAPs where the first 8 are
supposed to be APs and the later 24 are pre-configured as STAs. A wrong
condition during initialization is responsible for not configuring the last
8 array members. This is results in being able to create more than 8,
possible uninitialized, AP-VAPs.

Submitted by: Erik Fonnesbeck <efonnes at gmail.com>

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

13 years agoMFC r217118:
bschmidt [Mon, 17 Jan 2011 20:19:35 +0000 (20:19 +0000)]
MFC r217118:
Don't try to free an unassigned pointer.

Submitted by: Paul B Mahol <onemda at gmail.com>

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

13 years agoMFC r217245:
mav [Mon, 17 Jan 2011 17:23:59 +0000 (17:23 +0000)]
MFC r217245:
Add IDs for HighPoint RocketRAID 64x controllers.

These controllers consist of two Marvell 88SE9128 6Gbps SATA chips and
PLX PCIe bridge. As result, they seem to be agree to work with ahci(4)
as usual HBAs. The only noticed issue is that RAID BIOS disables all
drive caches during boot, though `camcontrol cmd ...` is able to fix that.

Those who wants RAID functionality can still use closed proprietary driver
from HighPoint site.

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

13 years agoMFC: r217415
marius [Mon, 17 Jan 2011 15:12:29 +0000 (15:12 +0000)]
MFC: r217415

- Allow IFM_FLAG0 to be set indicating that auto-negotiation with manual
  configuration, which is used to work around issues with certain setups
  (see r161237) by default, should not be triggered as it may in turn
  cause harm in some edge cases.
- Even after masking the media with IFM_GMASK the result may have bits
  besides the duplex ones set so just comparing it with IFM_FDX may lead
  to false negatives.
- Announce PAUSE support also for manually selected 1000BASE-T, but for
  all manually selected media types only in full-duplex mode. Announce
  asymmetric PAUSE support only for manually selected 1000BASE-T.
- Simplify setting the manual configuration bits to only once after we
  have figured them all out. This also means we no longer unnecessarily
  update the hardware along the road.
- Remove a stale comment.

Reviewed by: yongari (plus additional testing)

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

13 years agoMFC r209059 (originally committed by jhb):
lstewart [Mon, 17 Jan 2011 05:45:55 +0000 (05:45 +0000)]
MFC r209059 (originally committed by jhb):

Update several places that iterate over CPUs to use CPU_FOREACH().

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

13 years agoMFC: r217023
rmacklem [Mon, 17 Jan 2011 01:49:47 +0000 (01:49 +0000)]
MFC: r217023
Modify the experimental NFS server so that it calls
vn_start_write() with a non-NULL vp. That way it will
find the correct mount point mp and use that mp for the
subsequent vn_finished_write() call. Also, it should fail
without crashing if the mount point is being forced dismounted
because vn_start_write() will set the mp NULL via VOP_GETWRITEMOUNT().

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

13 years agoMFC: r217017
rmacklem [Mon, 17 Jan 2011 01:37:39 +0000 (01:37 +0000)]
MFC: r217017
Fix the experimental NFS server to use vfs_busyfs() instead
of vfs_getvfs() so that the mount point is busied for the
VFS_FHTOVP() call. This is analagous to r185432 for the
regular NFS server.

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

13 years agoMFC: r216931
rmacklem [Mon, 17 Jan 2011 01:26:13 +0000 (01:26 +0000)]
MFC: r216931
Fix the nlm so that it no longer depends on the regular
nfs client and, as such, can be loaded for the experimental
nfs client without the regular client.

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

13 years agoMFC: r216898
rmacklem [Mon, 17 Jan 2011 01:11:06 +0000 (01:11 +0000)]
MFC: r216898
Fix the experimental NFS server so that it doesn't leak
a reference count on the directory when creating device
special files.

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

13 years agoMFC: r216897
rmacklem [Mon, 17 Jan 2011 00:59:04 +0000 (00:59 +0000)]
MFC: r216897
Modify the experimental NFSv4 server so that the lookup
ops return a locked vnode. This ensures that the associated mount
point will always be valid for the code that follows the operation.
Also add a couple of additional checks
for non-error to the other functions that create file objects.

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

13 years agoMFC r215547,r216763,r216819,r216871,r217172: sh testcases.
jilles [Sun, 16 Jan 2011 23:41:40 +0000 (23:41 +0000)]
MFC r215547,r216763,r216819,r216871,r217172: sh testcases.

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

13 years agoMFC r216806: sh: Properly restore exception handler in fc.
jilles [Sun, 16 Jan 2011 22:10:18 +0000 (22:10 +0000)]
MFC r216806: sh: Properly restore exception handler in fc.

If SIGINT arrived at exactly the right moment (unlikely), an exception
handler in a no longer active stack frame would be called.

Because the old handler was not used in the normal path, clang thought it
was a dead value and if an exception happened it would longjmp() to garbage.
This caused builtins/fc1.0 to fail if histedit.c was compiled with clang.
(Note: not tested on stable/8 with clang.)

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

13 years agoMFC: r216894
rmacklem [Sun, 16 Jan 2011 14:37:48 +0000 (14:37 +0000)]
MFC: r216894
Delete some cruft from the experimental NFS server that was
only used by the OpenBSD port for its pseudo-fs.

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

13 years agoMFC: r216893
rmacklem [Sun, 16 Jan 2011 14:15:46 +0000 (14:15 +0000)]
MFC: r216893
Add checks for VI_DOOMED and vn_lock() failures to the
experimental NFS server, to handle the case where an
exported file system is forced dismounted while an RPC
is in progress. Further commits will fix the cases where
a mount point is used when the associated vnode isn't locked.

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

13 years agoMFC r217383:
kib [Sun, 16 Jan 2011 10:41:47 +0000 (10:41 +0000)]
MFC r217383:
The (%esp & 0xf) == 0 should be true before the call instruction is
executed, for the properly aligned stack.

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

13 years agoMerge r204499, r204515 from head to stable/8:
rwatson [Sat, 15 Jan 2011 19:49:08 +0000 (19:49 +0000)]
Merge r204499, r204515 from head to stable/8:

  Teach netstat -Q to work with -N and -M by adding libkvm versions of data
  query routines.  This code is necessarily more fragile in the presence of
  kernel changes than querying the kernel via sysctl (the default), but
  useful when investigating crashes or live kernel state via firewire.

  Sponsored by:   Juniper Networks

  Prefer vocabulary of 'Current' and 'Limit' to 'Value' and 'Maximum' in
  netstat -Q.

  Sponsored by:   Juniper Networks

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

13 years agoMerge r204497, r204499 from head to stable/8:
rwatson [Sat, 15 Jan 2011 19:46:36 +0000 (19:46 +0000)]
Merge r204497, r204499 from head to stable/8:

  Changes to support crashdump analysis of netisr:

  - Rename the netisr protocol registration array, 'np' to 'netisr_proto',
    in order to reduce the chances of symbol name collisions.  It remains
    statically defined, but it will be looked up by netstat(1).

  - Move certain internal structure definitions from netisr.c to
    netisr_internal.h so that netstat(1) can find them.  They remain
    private, and should not be used for any other purpose (for example,
    they should not be used by kernel modules, which must instead use the
    public interfaces in netisr.h).

  - Store a kernel-compiled version of NETISR_MAXPROT in the global variable
    netisr_maxprot, and export via a sysctl, so that it is available for use
    by netstat(1).  This is especially important for crashdump
    interpretation, where the size of the workstream structure is determined
    by the maximum number of protocols compiled into the kernel.

  Sponsored by:   Juniper Networks

  Whitespace tweak.

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

13 years agoMerge from head to stable/8:
rwatson [Sat, 15 Jan 2011 19:36:47 +0000 (19:36 +0000)]
Merge from head to stable/8:

  Refine netisr.c comments a bit.

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

13 years agoMerge r203913 from head to stable/8 (original change by pjd):
rwatson [Sat, 15 Jan 2011 19:27:22 +0000 (19:27 +0000)]
Merge r203913 from head to stable/8 (original change by pjd):

  Mark various sysctls also as tunables.

  Reviewed by:    rwatson

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

13 years agoMerge r204494, r204511 from head to stable/8:
rwatson [Sat, 15 Jan 2011 19:23:14 +0000 (19:23 +0000)]
Merge r204494, r204511 from head to stable/8:

  A first cut at teaching libkvm how to deal with dynamic per-CPU storage
  (DPCPU):

  A new API, kvm_dpcpu_setcpu(3), selects the active CPU for the purposes
  of DPCPU.  Calls to kvm_nlist(3) will automatically translate DPCPU
  symbols and return a pointer to the current CPU's version of the data.
  Consumers needing to read the same symbol on several CPUs will invoke a
  series of setcpu/nlist calls, one per CPU of interest.

  This addition makes it possible for tools like netstat(1) to query the
  values of DPCPU variables during crashdump analysis, and is based on
  similar code handling virtualized global variables.

  Sponsored by:   Juniper Networks, Inc.

  Not all programs including kvm.h include the necessary headers to use
  u_int, so prefer unsigned int.

  Pointed out by: bz, kib, Mr Tinderbox

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

13 years agoMerge r204303 from head to stable/8:
rwatson [Sat, 15 Jan 2011 19:05:06 +0000 (19:05 +0000)]
Merge r204303 from head to stable/8:

  Fix edge cases in several KASSERTs: use <= rather than < when testing that
  counters have not gone about MAXCPU or NETISR_MAXPROT.  These problems
  caused panics on UP kernels with INVARIANTS when using sysctl -a, but
  would also have caused problems for 32-core boxes or if the netisr
  protocol vector was fully populated.

  Reported by:    nwhitehorn, Neel Natu <neelnatu@gmail.com>

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

13 years agoMerge r204208 from head to stable/8:
rwatson [Sat, 15 Jan 2011 19:02:08 +0000 (19:02 +0000)]
Merge r204208 from head to stable/8:

  Fix constant assignment for netisr protocol information sysctl.

  Spotted by:     bz

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

13 years agoMerge mergeinfo only for r204207 from head to stable/8; the edit itself
rwatson [Sat, 15 Jan 2011 19:00:22 +0000 (19:00 +0000)]
Merge mergeinfo only for r204207 from head to stable/8; the edit itself
was apparently merged as part of a separate change:

  Update date on netstat(1) for -Q.

  Suggested by:   bz

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

13 years agoMerge r204206 from head to stable/8:
rwatson [Sat, 15 Jan 2011 18:56:51 +0000 (18:56 +0000)]
Merge r204206 from head to stable/8:

  Cross-reference netstat(1) from netisr(9) since you can now use it to
  monitor netisr status.

  Sponsored by:   Juniper Networks

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

13 years agoMerge r204202 from head to stable/8:
rwatson [Sat, 15 Jan 2011 18:51:45 +0000 (18:51 +0000)]
Merge r204202 from head to stable/8:

  Teach netstat(1) to print out netisr statistics when given the -Q argument.
  Currently supports only reporting on live systems via sysctl, kmem support
  needs to be edded.

  Sponsored by:   Juniper Networks

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

13 years agoMerge r204199 from head to stable/8:
rwatson [Sat, 15 Jan 2011 18:41:42 +0000 (18:41 +0000)]
Merge r204199 from head to stable/8:

  Export netisr configuration and statistics to userspace via sysctl(9).

  Sponsored by:   Juniper Networks

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

13 years agoMFC r217150:
kib [Sat, 15 Jan 2011 09:25:19 +0000 (09:25 +0000)]
MFC r217150:
Collect code to translate between vm_prot_t and p_flags into helper
functions.

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

13 years agoMFC r217144:
kib [Sat, 15 Jan 2011 08:37:33 +0000 (08:37 +0000)]
MFC r217144:
Fix some style(9) issues.
Do not use strlcpy() where simple assignment is enough.

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

13 years agoMFC r217143:
kib [Sat, 15 Jan 2011 08:35:41 +0000 (08:35 +0000)]
MFC r217143:
Fix struct FILE * leak on error (in disabled by default hesiod support code).

PR:   153756

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

13 years agoMFC r217307,r217308,r217312:
pjd [Sat, 15 Jan 2011 08:18:58 +0000 (08:18 +0000)]
MFC r217307,r217308,r217312:

r217307:

Install default signal handlers before masking signals we want to handle.
It is possible that the parent process ignores some of them and sigtimedwait()
will never see them, eventhough they are masked.

The most common situation for this to happen is boot process where init(8)
ignores SIGHUP before starting to execute /etc/rc. This in turn caused
hastd(8) to ignore SIGHUP.

Reported by: trasz
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r217308:

Add a note that when custom signal handler is installed for a signal,
signal action is restored to default in child after fork(2).
In this case there is no need to do anything with dummy SIGCHLD handler,
because after fork(2) it will be automatically reverted to SIG_IGN.

Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r217312:

execve(2), not fork(2) resets signal handler to the default value (if it isn't
ignored). Correct comment talking about that.

Pointed out by: kib

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

13 years agoMFC: r216875
rmacklem [Sat, 15 Jan 2011 01:03:26 +0000 (01:03 +0000)]
MFC: r216875
Add support for shared vnode locks for the Read operation
in the experimental NFSv4 server.

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

13 years agoMFC r217296:
yongari [Sat, 15 Jan 2011 00:32:15 +0000 (00:32 +0000)]
MFC r217296:
  For re(4) controllers that uses new jumbo frame scheme(RTL8168C/D/E),
  limit maximum RX buffer size to RE_RX_DESC_BUFLEN instead of
  blindly configuring it to 16KB. Due to lack of documentation, re(4)
  didn't allow jumbo frame on these controllers. However it seems
  controller is confused with jumbo frame such that it can DMA the
  received frame to wrong address instead of splitting it into
  multiple RX buffers. Of course, this caused panic.

  Since re(4) does not support jumbo frames on these controllers,
  make controller drop frame that is longer than RE_RX_DESC_BUFLEN
  sized frame. Fortunately RTL810x controllers, which do not support
  jumbo frame, have no such issues but this change also limited
  maximum RX buffer size allowed to RTL810x controllers. Allowing
  16KB RX buffer for controllers that have no such capability is
  meaningless.

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

13 years agoMFC r216131:
yongari [Fri, 14 Jan 2011 22:58:08 +0000 (22:58 +0000)]
MFC r216131:
  Document loader tunable hw.re.prefer_iomap.

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

13 years agoMFC r216284:
yongari [Fri, 14 Jan 2011 22:36:33 +0000 (22:36 +0000)]
MFC r216284:
  r184610 changed the way how TX frames are handled on AX88178 and
  AX88772 controllers. ASIX added a new feature for AX88178/AX88772
  controllers which allows combining multiple TX frames into a single
  big frame. This was to overcome one of USB limitation where it
  can't generate more than 8k interrupts/sec which in turn means USB
  ethernet controllers can not send more than 8k packets per second.
  Using ASIX's feature greatly enhanced TX performance(more than 3~4
  times) compared to 7.x driver. However it seems r184610 removed
  boundary checking for buffered frames which in turn caused
  instability issues under certain conditions. In addition, using
  ASIX's feature triggered another issue which made USB controller
  hang under certain conditions. Restarting ethernet controller
  didn't help under this hang condition and unplugging and replugging
  the controller was the only solution. I believe there is a silicon
  bug in TX frame combining feature on AX88178/AX88772 controllers.

  To address these issues, reintroduce the boundary checking for both
  AX88178 and AX88772 after copying a frame to USB buffer and do not
  use ASIX's multiple frame combining feature. Instead, use USB
  controller's multi-frame transmit capability to enhance TX
  performance as suggested by Hans[1].
  This should fix a long standing axe(4) instability issues reported
  on AX88772 and AX88178 controllers. While I'm here remove
  unnecessary TX frame length check since upper stack always
  guarantee the size of a frame to be less than MCLBYTES.

  Special thanks to Derrick Brashear who tried numerous patches
  during last 4 months and waited real fix with patience. Without
  this enthusiastic support, patience and H/W donation I couldn't fix
  it since I was not able to trigger the issue on my box.

  Suggested by: hselasky [1]
  Tested by: Derrick Brashear (shadow <> gmail dot com>
  H/W donated by: Derrick Brashear (shadow <> gmail dot com>
  PR: usb/140883

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

13 years agoMFC r215969:
yongari [Fri, 14 Jan 2011 22:33:12 +0000 (22:33 +0000)]
MFC r215969:
  Add initial AX88772A support.

  H/W donated by: Derrick Brashear (shadow <> gmail dot com)

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

13 years agoMFC r215968:
yongari [Fri, 14 Jan 2011 22:31:26 +0000 (22:31 +0000)]
MFC r215968:
  Introduce new macro AXE_IS_178_FAMILY and AXE_IS_772. Include
  AX88772A and AX88772B for future extension. While here add TX
  buffer size for 178 family controllers.

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

13 years agoMFC r215960,215962-215964,215966:
yongari [Fri, 14 Jan 2011 22:29:45 +0000 (22:29 +0000)]
MFC r215960,215962-215964,215966:
r215960:
  Apply GPIO configuration for all CICADA PHYs.
  While I'm here show selected phymode to ease of debugging.

r215962:
  Move axe_reset() to axe_init().

r215963:
  Do not reinitialize controller if it's already running.

r215964:
  Make sure to change to currently selected media.

r215966:
  Do full controller initialization in axe_reset() for controllers
  that require special configuration from EEPROM. This will put
  controllers into known sane state.

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

13 years agoMFC: r217013
marius [Fri, 14 Jan 2011 20:43:21 +0000 (20:43 +0000)]
MFC: r217013

Teach ifconfig(8) the handy shared option shortcut aliases the NetBSD
counterpart also takes, i.e. "fdx" for "full-duplex", "flow" for
"flowcontrol", "hdx" for "half-duplex" as well as "loop" and "loopback"
for "hw-loopback".

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

13 years agoMFC: r217010
marius [Fri, 14 Jan 2011 20:30:17 +0000 (20:30 +0000)]
MFC: r217010

Fix whitespace.

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

13 years agoMFC: r217009
marius [Fri, 14 Jan 2011 20:28:11 +0000 (20:28 +0000)]
MFC: r217009

Remove a redundant variable assignment found with the clang static analyzer.

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

13 years agoDon't use amdc1e on XEN && !XEN_PRIVILEGED. The Xen hypervisor
cperciva [Fri, 14 Jan 2011 16:30:22 +0000 (16:30 +0000)]
Don't use amdc1e on XEN && !XEN_PRIVILEGED.  The Xen hypervisor
gets justifiably annoyed when a guest OS tries to halt the CPU.
This fixes a panic when booting FreeBSD/XEN on recent AMD CPUs.

This is not an MFC; the problem was (accidentally?) fixed in HEAD
four months ago via SVN r212541.

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

13 years agoMFC r217203:
bz [Fri, 14 Jan 2011 14:20:54 +0000 (14:20 +0000)]
MFC r217203:

  MfP4 CH=185246 [1]:

    Add FEATURE() to announce optional VIMAGE.

  [1] for the moment put it in vnet.c.

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

13 years agoMFC r217135:
bz [Fri, 14 Jan 2011 13:34:56 +0000 (13:34 +0000)]
MFC r217135:

  Clarify when we switch from keepidle to keepinvtl intervals if sending
  TCP keepalive probes is enabled.

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

13 years agoMFC r214748:
jh [Fri, 14 Jan 2011 11:12:56 +0000 (11:12 +0000)]
MFC r214748:

Extend the g_eventlock mutex coverage in one_event() to include setting
of the EV_DONE flag and use the mutex to protect against losing wakeups
in g_waitfor_event().

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

13 years agoMFC r216995,217043:
lstewart [Fri, 14 Jan 2011 00:57:13 +0000 (00:57 +0000)]
MFC r216995,217043:

Add a man page for the Object Specific Data (OSD) KPI.

Although not directly related the FreeBSD Foundation funded "Five New TCP
Congestion Control Algorithms for FreeBSD" project, the understanding and
inspiration required to write this documentation was significantly bolstered by
the Foundation's support.

Reviewed by: pjd

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

13 years agoMFC r217208 - regression/date: unset all LC_xxx vars and set LANG/LC_ALL
keramida [Thu, 13 Jan 2011 11:23:42 +0000 (11:23 +0000)]
MFC r217208 - regression/date: unset all LC_xxx vars and set LANG/LC_ALL

When running with a custom locale setup, it's easy to confuse the
date regression tests and cause them to fail, e.g. when LANG='C'
but LC_ALL='el_GR.UTF-8'.  Set LC_ALL to 'C', which overrides all
other LC_xxx options, to avoid this sort of problem.

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

13 years agoMFC r215238 (originally by kib):
bz [Thu, 13 Jan 2011 08:19:09 +0000 (08:19 +0000)]
MFC r215238 (originally by kib):

  Use 'z' modifier for size_t printing.

Should have been merged with r215207 by gnn.

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

13 years agoMFC: 215207
gnn [Wed, 12 Jan 2011 20:44:11 +0000 (20:44 +0000)]
MFC: 215207

Add a queue to hold packets while we await an ARP reply.

When a fast machine first brings up some non TCP networking program
it is quite possible that we will drop packets due to the fact that
only one packet can be held per ARP entry.  This leads to packets
being missed when a program starts or restarts if the ARP data is
not currently in the ARP cache.

This code adds a new sysctl, net.link.ether.inet.maxhold, which defines
a system wide maximum number of packets to be held in each ARP entry.
Up to maxhold packets are queued until an ARP reply is received or
the ARP times out.  The default setting is the old value of 1
which has been part of the BSD networking code since time
immemorial.

Expose the time we hold an incomplete ARP entry by adding
the sysctl net.link.ether.inet.wait, which defaults to 20
seconds, the value used when the new ARP code was added..

Reviewed by: bz, rpaulo

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

13 years agosvn merge -c215331,215332,215676 svn+ssh://svn.freebsd.org/base/head/sbin/hastd sbin...
pjd [Wed, 12 Jan 2011 14:13:50 +0000 (14:13 +0000)]
svn merge -c215331,215332,215676 svn+ssh://svn.freebsd.org/base/head/sbin/hastd sbin/hastd

MFC r215331,r215332,r215676:

r215676 (by brucec):

Don't generate input() since it's not used.

r215332:

Move timeout.tv_sec initialization outside the loop - sigtimedwait(2) won't
modify it.

Submitted by: Mikolaj Golub <to.my.trociny@gmail.com>

r215331:

1. Exit when we cannot create incoming connection.
2. Improve logging to inform which connection can't be created.

Submitted by: [1] Mikolaj Golub <to.my.trociny@gmail.com>

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

13 years agoMFC r216340,217195:
bz [Wed, 12 Jan 2011 10:12:32 +0000 (10:12 +0000)]
MFC r216340,217195:

  Don't tie ct_debug to bootverbose.  Provide a sysctl to turn it on or off.
  Switch the default to always off.

  Improve style and wording of comments and sysctl descriptions [1].

  Move machdep.ct_debug to debug.clocktime as there was no reason to
  actually put it under machdep in r216340.

  Submitted by: bde [1]

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

13 years agoFor stat.c
dougb [Tue, 11 Jan 2011 20:08:34 +0000 (20:08 +0000)]
For stat.c
==========

MFC r216196:

Bring in the change from NetBSD 1.18:

"If using stat (the -L flag) and it fails, fall back to lstat().  It
may be the case that we're examining a broken symlink, and anything is
better than nothing."

The changes in 1.14 through 1.17 were not relevant to us.

Obtained from: atatat@NetBSD.org

MFC r216202:

Bring in the change from NetBSD 1.22:

"Fix a trivial truncation case, and eliminate a corner case that might
print a nul character."

I am purposely bypassing the following versions:
1.19 A build infrastructure change that does not apply to us
1.20 A feature I am not interested in, but don't object if someone else
wants to pick it up
1.21 A build infrastructure change that does not apply to us

Obtained from: atatat@NetBSD.org

MFC r216203:

Bring in a new feature, adding a -f option to readlink to print the path
of the target, similar to realpath(1). See the discussion at:
http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=34662

This brings in the following changes:
1.24
"PR/34662: martijnb at atlas dot ipv6 dot stack dot nl: readlink doesn't
grok -f, and there's no alternative (+fix)

Patch applied with minor tweak (%y -> %R, as it was already taken) plus
some nits from myself. Thanks!"

Obtained from: elad@NetBSD.org

1.25
"Fix a segfault when doing 'stat -f %R' on the stdin file handle, instead
fake the filename '(stdin)' like the %N format."

Obtained from: mlelstv@NetBSD.org

1.27
"The ofmt variable is actually a bit mask (not the character that was
in the format string) so that we can "or" it with the bits in the
formats variable.  This fixes the missing " -> " in front of the real
path (when you use %SR).

Also, the ?: needs another space."

Obtained from: atatat@NetBSD.org

I am purposely omitting the following changes:
1.23 A humanize_number(3) clone that should better be implemented by
actually using humanize_number(3)
1.26 This is the removal of license clause 3 and 4, already handled
by imp in r203971

MFC 216205:

Bring in the update from NetBSD 1.28:

"Fix WARNS=4 issues (-Wcast-qual -Wsign-compare)"

Because of code differences I had to hand-apply parts of the patch,
so responsibility for errors goes to me.

Obtained from: lukem@NetBSD.org

MFC 216206: [ Also applies to Makefile ]

Fix an "unused variable" error that gets us all the way to WARNS=6

MFC 216207:

Bring in the following changes from NetBSD. See the discussion at:
http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=44128

1.29
"Don't printf time_t with %d; fixes PR 44128 from yamt. With this change it
successfully prints mtimes after 2038."

1.30
"Improve previous with comments."

Obtained from: dholland@NetBSD.org (both)

MFC 216343:

Bring in the change from OpenBSD's 1.14:

"synchronize synopsis and usage; "-l", "-r", "-s" and "-x" are mutually
exclusive; while here, slightly improve spacing in the source code
so it fits on a 80-column display again.

diff greatly improved by martynas@"

Obtained from: sobrado@OpenBSD.org

MFC 216512:

Bring in the relevant changes from NetBSD's 1.31:

"Use strlcpy, not strncpy, when the desired semantics are strlcpy's
rather than strncpy's."

Note: NetBSD's 1.32 is their adoption of our r216206

Obtained from: dholland@NetBSD.org

For stat.1
==========

MFC 216197:

Add my own documentation for the change in our r216196, aka NetBSD's 1.18
For -L if stat(2) fails, fall back to lstat(2).

.Dd purposely not bumped because more changes are coming.

MFC 216204:

Bring in the update from NetBSD 1.19, the documentation of readlink -f

"PR/34662: martijnb at atlas dot ipv6 dot stack dot nl: readlink doesn't
grok -f, and there's no alternative (+fix)

Patch applied with minor tweak (%y -> %R, as it was already taken) plus
some nits from myself. Thanks!"

Obtained from: elad@NetBSD.org

MFC 216209:

Bring in the change from NetBSD 1.12:

"document default format."

Obtained from: yamt@NetBSD.org

MFC 216213:

Bring in the changes from NetBSD 1.13 that we did not already have, with
some differences.

"Sort options. Use more mdoc macros. Some nit fixes. Bump date."

Obtained from: wiz@NetBSD.org

MFC 216215:

Bring in the changes from NetBSD 1.16 that we did not already have.

"Some fixes from jmc@openbsd."

Obtained from: wiz@NetBSD.org

MFC 216216:

Bring in the change from NetBSD 1.20:

"Make sentence easier to parse. From jsing@openbsd via jmc@openbsd."

Obtained from: wiz@NetBSD.org

MFC 216218:

Bring in the following changes from NetBSD:

1.21
"Document the flags displayed by the default format, and mention their short
names. From espie@openbsd via jmc@openbsd."

1.24
"Fix three variable names.
From Todd T. Fries via Jason McIntyre."

Obtained from: wiz@NetBSD.org (previous 2)

1.25
"Be consistent: document the birthtime field of struct stat for
the "B" field specifier."

Obtained from: reed@NetBSD.org

1.26
"Drop trailing space."

Obtained from: wiz@NetBSD.org

1.27
"Since we have st_birthtime in struct stat, it is in default display."

Obtained from: enami@NetBSD.org

Purposely skipping the following revisions:
1.22 NetBSD-specific change
1.23 Removal of license clauses 3 and 4, already handled by imp
in our r203971

MFC 216219:

Bring in the change from NetBSD 1.28:

"\\ -> \e"

Obtained from: joerg@NetBSD.org

Bump .Dd because we're now up to date with the latest NetBSD version

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

13 years agoMFC r203971:
dougb [Tue, 11 Jan 2011 20:04:37 +0000 (20:04 +0000)]
MFC r203971:

The NetBSD Foundation has granted permission to remove clause 3 and 4
from their software.

Obtained from:  NetBSD

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

13 years agoMFC r215801:
dim [Tue, 11 Jan 2011 19:17:13 +0000 (19:17 +0000)]
MFC r215801:

Change ambiguous (or invalid, depending on how strict you want to be :)
assembly instruction "movw %rcx,2(%rax)" to "movw %cx,2(%rax)", since
the intent was to move 16 bits of data, in this case.

Found by: clang
Reviewed by: kib

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

13 years agoMFC r215212:
dim [Tue, 11 Jan 2011 19:13:29 +0000 (19:13 +0000)]
MFC r215212:

Similar to r212647, remove the workaround in sys/net/vnet.h for an ld
bug (incorrect placement of __start_SECNAME in some cases) that was
fixed in r210245.

There is already an UPDATING entry about needing a recent ld.

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

13 years agoMFC r216463:
mdf [Tue, 11 Jan 2011 17:33:29 +0000 (17:33 +0000)]
MFC r216463:

One of the compat32 functions was copying in a raw timespec, instead of
a 32-bit one.  This can cause weird timeout issues, as the copying reads
garbage from the user.

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

13 years agoMFC r216058 and r216059:
mdf [Tue, 11 Jan 2011 17:31:59 +0000 (17:31 +0000)]
MFC r216058 and r216059:

r216058:

Use the SYSCTL_CHILDREN macro in kern_sysctl.c to help de-obfuscate the
code.

r216059:

Slightly modify the logic in sysctl_find_oid to reduce the indentation.
There should be no functional change.

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

13 years ago(Note the previous commit was a MFC of r216616).
mdf [Tue, 11 Jan 2011 17:29:34 +0000 (17:29 +0000)]
(Note the previous commit was a MFC of r216616).

MFC r216620:

Initialize fp_location for explicitly managed fail points, and push
the parentheses around the location for simple fail points into the
location string.  This makes the print on fail point set more
consistent between the two versions.

Also fix up fail.h a little for style(9): only use one of sys/param.h
and sys/types.h, and use the existing __XSTRING() macro instead of
rolling our own.  Also fix up a few tabs on changed and nearby lines.

Lastly, since KFAIL_POINT_{BEGIN,END} are not meant for use outside
this file, just eliminate the macros entirely.

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

13 years agoMove the fail_point_entry definition from fail.h to kern_fail.c, which
mdf [Tue, 11 Jan 2011 17:26:36 +0000 (17:26 +0000)]
Move the fail_point_entry definition from fail.h to kern_fail.c, which
allows putting the enumeration constants of fail point types with the
text string that matches them.

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

13 years agoMFC r217109:
mdf [Tue, 11 Jan 2011 17:16:50 +0000 (17:16 +0000)]
MFC r217109:

Fix a memory overflow where the input length to g_gpt_utf8_to_utf16()
was specified incorrectly, causing the bzero to run past the end of a
malloc(9)'d object.

Submitted by: Eric Youngblut < eyoungblut AT isilon DOT com >

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

13 years agoMFC: r216784
rmacklem [Tue, 11 Jan 2011 01:12:50 +0000 (01:12 +0000)]
MFC: r216784
Delete the nfsvno_localconflict() function in the experimental
NFS server since it is no longer used and is broken.

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

13 years agoMFC 216943, 216945:
emaste [Tue, 11 Jan 2011 00:58:49 +0000 (00:58 +0000)]
MFC 216943, 216945:

  Handle failure from ftpd_popen in statfilecmd().

  Make format string a string literal.  (Discovered by clang.)

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

13 years agoMFC r217226:
yongari [Mon, 10 Jan 2011 19:43:16 +0000 (19:43 +0000)]
MFC r217226:
  Apply DMA address space restriction to controllers that have 4GB
  DMA boundary bug and runs with PCI-X mode.  watchdog timeout was
  observed on BCM5704 which lives behind certain PCI-X bridge(e.g.
  AMD 8131 PCI-X bridge).  It's still not clear whether the root
  cause came from that PCI-X bridge or not. The watchdog timeout
  indicates the issue is in TX path. If the bridge reorders TX
  mailbox write accesses it would generate all kinds of problems but
  I'm not sure.  This should be revisited.

  Early MFC requested by re@ for inclusion in 8.2-RC2/7.4-RC2.

  Tested by: Michael L. Squires (mikes <> siralan dot org)

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

13 years agoMFC: 217169
deischen [Mon, 10 Jan 2011 04:48:18 +0000 (04:48 +0000)]
MFC: 217169
  Make sure to always do source address selection on
  an unbound socket, regardless of any multicast options.
  If an address is specified via a multicast option, then
  let it override normal the source address selection.

  This fixes a bug where source address selection was
  not being performed when multicast options were present
  but without an interface being specified.

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

13 years agoMFC r216855:
bz [Sat, 8 Jan 2011 22:08:23 +0000 (22:08 +0000)]
MFC r216855:

  Move the increment operation under the lock and split the condition
  variable into two so that we can see on which one we are waiting.
  This might also more properly propagate the update of the
  flowclean_cycles flag and avoid "hangs" people were seeing.

  Suggested by: rwatson [1]
  Sponsored by: ISPsystem [1]
  Reviewed by:  julian [1]
  Updated by:   Mikolaj Golub (to.my.trociny gmail.com)
  Tested by:    Mikolaj Golub (to.my.trociny gmail.com)

  [1] Early 2010, initial version.

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

13 years agoMFC r216859:
bz [Sat, 8 Jan 2011 21:37:43 +0000 (21:37 +0000)]
MFC r216859:
  Use NULL rather than 0 to invalidate a pointer.

  Rather than duplicating the LLE_FREE_LOCKED() macro code in LLE_FREE(),
  call it directly (like we do for the RT_* macros).

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

13 years agoMFC r216856:
bz [Sat, 8 Jan 2011 21:02:27 +0000 (21:02 +0000)]
MFC r216856:

  Print the vnet pointer under DDB when iterating over flowtables of each
  virtual network stack instance.

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

13 years agoMFC r216861:
bz [Sat, 8 Jan 2011 19:49:27 +0000 (19:49 +0000)]
MFC r216861:

  Mfp4 CH177924:

  Add and export constants of array sizes of jail parameters as compiled into
  the kernel.
  This is the least intrusive way to allow kvm to read the (sparse) arrays
  independent of the options the kernel was compiled with.

  Reviewed by:  jhb (originally)
  MFC after:    1 week
  Sponsored by: The FreeBSD Foundation
  Sponsored by: CK Software GmbH

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

13 years agoMove the uint64_t to were the padding was before, rather than before all
bz [Sat, 8 Jan 2011 02:23:59 +0000 (02:23 +0000)]
Move the uint64_t to were the padding was before, rather than before all
pad.  Keep them to the end so that the two pad[]s are kept together.
This should restore ABI as well on platforms, where
   sizeof(void *) != sizeof(uint64_t)
after r216968, r217018.

Reviewed by: gnn, jhb, lstewart

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

13 years agoMFC: r216700
rmacklem [Sat, 8 Jan 2011 01:11:14 +0000 (01:11 +0000)]
MFC: r216700
Modify the experimental NFS server so that it uses LK_SHARED
for RPC operations when it can. Since VFS_FHTOVP() currently
always gets an exclusively locked vnode and is usually called
at the beginning of each RPC, the RPCs for a given vnode will
still be serialized. As such, passing a lock type argument to
VFS_FHTOVP() would be preferable to doing the vn_lock() with
LK_DOWNGRADE after the VFS_FHTOVP() call.

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

13 years agoMFC: r216693
rmacklem [Fri, 7 Jan 2011 20:31:47 +0000 (20:31 +0000)]
MFC: r216693
Add an argument to nfsvno_getattr() in the experimental
NFS server, so that it can avoid calling VOP_ISLOCKED()
when the vnode is known to be locked. This will allow
LK_SHARED to be used for these cases, which happen to
be all the cases that can use LK_SHARED. This does not
fix any bug, but it reduces the number of calls to
VOP_ISLOCKED() and prepares the code so that it can be
switched to using LK_SHARED in a future patch.

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

13 years agoMFC: r216692
rmacklem [Fri, 7 Jan 2011 20:07:30 +0000 (20:07 +0000)]
MFC: r216692
Simplify vnode locking in the expeimental NFS server's
readdir functions. In particular, get rid of two bogus
VOP_ISLOCKED() calls. Removing the VOP_ISLOCKED() calls
is the only actual bug fixed by this patch.

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

13 years agoMFC r216983:
jpaetzel [Fri, 7 Jan 2011 18:32:03 +0000 (18:32 +0000)]
MFC r216983:
Fix typo in comment.

Approved by: Warner Losh <imp@FreeBSd.org>

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

13 years agoMFC r216944,r216963,r216960: Improve the stability of the i386/XEN pmap
cperciva [Fri, 7 Jan 2011 14:03:28 +0000 (14:03 +0000)]
MFC r216944,r216963,r216960: Improve the stability of the i386/XEN pmap
code by correctly protecting page mapping queue variables within a
critical section and by adding ham-fisted locking to pmap.c.

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

13 years agoMFC r216832: Make -S functional
brian [Fri, 7 Jan 2011 08:42:58 +0000 (08:42 +0000)]
MFC r216832: Make -S functional

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

13 years agoMFC: r216940
jkim [Thu, 6 Jan 2011 16:25:08 +0000 (16:25 +0000)]
MFC: r216940

Fix parameters for wakeup(9) and tsleep(9).

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

13 years agoMFC r216843-216847: Fix i386_set_ldt on i386/XEN.
cperciva [Thu, 6 Jan 2011 15:26:06 +0000 (15:26 +0000)]
MFC r216843-216847: Fix i386_set_ldt on i386/XEN.

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

13 years agoMFC r216812: Implement xenpic_dynirq_disable_intr and thereby avoid a
cperciva [Thu, 6 Jan 2011 14:19:29 +0000 (14:19 +0000)]
MFC r216812: Implement xenpic_dynirq_disable_intr and thereby avoid a
kernel panic when a disk is detached from a XEN system.

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

13 years agoMFC r216790: Fix Xen console spew: "no input to read" != an infinite
cperciva [Thu, 6 Jan 2011 13:21:38 +0000 (13:21 +0000)]
MFC r216790: Fix Xen console spew: "no input to read" != an infinite
supply of \0 bytes.

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

13 years agoMFC r216762: Don't panic when exiting gstat or 'mdconfig -l'
cperciva [Thu, 6 Jan 2011 13:09:02 +0000 (13:09 +0000)]
MFC r216762: Don't panic when exiting gstat or 'mdconfig -l'

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

13 years agoMFC r216703: Make i386/XEN not panic when mlock(2) is used.
cperciva [Thu, 6 Jan 2011 13:02:29 +0000 (13:02 +0000)]
MFC r216703: Make i386/XEN not panic when mlock(2) is used.

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

13 years agoMFC r200288, r200346, r200352: Make minidump work on i386/XEN.
cperciva [Thu, 6 Jan 2011 12:34:18 +0000 (12:34 +0000)]
MFC r200288, r200346, r200352:  Make minidump work on i386/XEN.

Note that r200288 and r200346 touched i386/i386/dump_machdep.c,
but in that file r200346 was a back-out of r200288; so the fact
that dump_machdep.c has moved to the x86 tree is not a problem.

In the !XEN case the files under i386/i386 are unchanged after
preprocessing.

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

13 years agoMFC r216919:
mm [Thu, 6 Jan 2011 09:34:22 +0000 (09:34 +0000)]
MFC r216919:

MFp4 186485, 186859:
Fix a race by defining two tasks in the zio structure
as we can still be returning from issue task when interrupt task is used.

Reviewed by: pav
Approved by: pav

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

13 years agoMFC: 215409
gnn [Wed, 5 Jan 2011 19:33:16 +0000 (19:33 +0000)]
MFC: 215409

Fix an error in our results printing.

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

13 years agoMFC: 213327
gnn [Wed, 5 Jan 2011 19:31:52 +0000 (19:31 +0000)]
MFC: 213327

Change the output of mctest to give a summary of the results instead
of printing a long list.

Add a default base port, and default mulitcast address to the
runner script.

Add support for specifying a different local and remote interface
in the runner script.

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

13 years agoMFC r216892 from head (Which is an MFi386 of r216012 by kib)
gavin [Wed, 5 Jan 2011 19:26:30 +0000 (19:26 +0000)]
MFC r216892 from head (Which is an MFi386 of r216012 by kib)

Calling fill_fpregs() for curthread is legitimate, and ELF coredump
does this.

Discussed with: kib

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

13 years agoUpdate netstat to handle uint64_t based stats for -T.
gnn [Wed, 5 Jan 2011 19:25:31 +0000 (19:25 +0000)]
Update netstat to handle uint64_t based stats for -T.

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

13 years agoFix binary compatability for netstats across the -x/-T changes
gnn [Wed, 5 Jan 2011 18:52:30 +0000 (18:52 +0000)]
Fix binary compatability for netstats across the -x/-T changes
that have been previously MFC'd.

Reviewed by: rwatson, bz

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

13 years agoMFC r216799:
kib [Wed, 5 Jan 2011 13:50:37 +0000 (13:50 +0000)]
MFC r216799:
Move the increment of vm object generation count into
vm_object_set_writeable_dirty(). Merge two loops in
vm_object_page_clean(), doing the removal of write permission and
cleaning in the same loop. Clear the OBJ_MIGHTBEDIRTY flag after the
cleaning loop, not before.

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

13 years agoMFC: r216820
marius [Wed, 5 Jan 2011 13:26:26 +0000 (13:26 +0000)]
MFC: r216820

- Add CPUTYPE support for sparc64. The net result is that it's now possible
  to let the compiler optimize for the famility of UltraSPARC-III CPUs as the
  default already was to optimize for UltraSPARC-I/II and generating generic
  64-bit V9 is mainly for reference purposes. At least for SPARC64-V CPUs
  code optimized for UltraSPARC-I/II still is the most performant one.
  Thanks go to Michael Moll for testing SPARC64-V.
- Move a booke MACHINE_CPU bit into the right section.

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

13 years agoMFC r216794:
kib [Wed, 5 Jan 2011 12:47:42 +0000 (12:47 +0000)]
MFC r216794:
Add reporting of GEOM::candelete BIO_GETATTR for md(4) and geom_disk(4).
Non-zero value of attribute means that device supports BIO_DELETE.

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

13 years agoMFC r216793:
kib [Wed, 5 Jan 2011 12:45:11 +0000 (12:45 +0000)]
MFC r216793:
Add sysctl vm.md_malloc_wait, non-zero value of which switches malloc-backed
md(4) to using M_WAITOK malloc calls.

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