]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
12 years agoMFC r228048:
kevlo [Fri, 6 Jan 2012 05:48:52 +0000 (05:48 +0000)]
MFC r228048:
Plug memory leaks and fix open(2) error check.

Reviewed by: nwhitehorn

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

12 years agoMFC r229379:
kevlo [Fri, 6 Jan 2012 05:45:23 +0000 (05:45 +0000)]
MFC r229379:
Add support for Intel EG20T serial ports

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

12 years ago- Update copyright year.
hrs [Fri, 6 Jan 2012 05:17:43 +0000 (05:17 +0000)]
- Update copyright year.
- Remove a paragraph which describes sysinstall(8).

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

12 years ago- Update copyright year.
hrs [Fri, 6 Jan 2012 05:12:57 +0000 (05:12 +0000)]
- Update copyright year.
- Add SA-11:0[12456789] and -11:10.

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

12 years agoUpdate entities and variables for 9.0R.
hrs [Fri, 6 Jan 2012 05:08:51 +0000 (05:08 +0000)]
Update entities and variables for 9.0R.

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

12 years ago- Update copyright year.
hrs [Fri, 6 Jan 2012 05:03:22 +0000 (05:03 +0000)]
- Update copyright year.
- Add SA-11:0[12456789] and -11:10.
- Update the upgrade section.

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

12 years agoMFC r227488:
eadler [Fri, 6 Jan 2012 02:24:29 +0000 (02:24 +0000)]
MFC r227488:

- add "check" option to MD5 and friends to compare files against known hash.

Approved by: cperciva

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

12 years agoMFC: r227796
rmacklem [Fri, 6 Jan 2012 01:57:41 +0000 (01:57 +0000)]
MFC: r227796
Clean up some cruft in the NFSv4 client left over from the
OpenBSD port, so that it is more readable. No logic change
is made by this commit.

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

12 years agoMFC: r227760
rmacklem [Fri, 6 Jan 2012 00:42:32 +0000 (00:42 +0000)]
MFC: r227760
Add two arguments to the nfsrpc_rellockown() function in the NFSv4
client. This does not change the client's behaviour, but prepares
the code so that nfsrpc_rellockown() can be called elsewhere in a
future commit.

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

12 years agoMFC 227577: The sys/sysctl.h header is needed when MFI_DEBUG is defined.
jhb [Thu, 5 Jan 2012 22:14:18 +0000 (22:14 +0000)]
MFC 227577: The sys/sysctl.h header is needed when MFI_DEBUG is defined.

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

12 years agoMFC r228286:
yongari [Thu, 5 Jan 2012 20:49:48 +0000 (20:49 +0000)]
MFC r228286:
  Fix off by one error in mbuf access.  Previously it caused panic.
  While I'm here use NULL to compare mbuf pointer and add additional
  check for zero length mbuf before accessing the mbuf.

  PR: kern/162932

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

12 years agoMFC r228205:
yongari [Thu, 5 Jan 2012 20:37:13 +0000 (20:37 +0000)]
MFC r228205:
  Add more controllers that support jumbo frame.

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

12 years agoMFC r228086:
yongari [Thu, 5 Jan 2012 20:30:16 +0000 (20:30 +0000)]
MFC r228086:
  Announce flow control capability to PHY drivers and enable flow
  control for all vr(4) controllers that support it.  It's known that
  old vr(4) controllers(Rhine II) does not support TX pause but Rhine
  III supports both TX and RX pause.
  Make TX pause really work on Rhine III by letting controller know
  available RX buffers.
  While here, adjust XON/XOFF parameters to get better performance
  with flow control.

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

12 years agoMFC 228866:
jhb [Thu, 5 Jan 2012 19:56:30 +0000 (19:56 +0000)]
MFC 228866:
Fix a bug where TAILQ_FIRST(&V_ifnet) was accessed without holding the
proper lock.

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

12 years agoMFC 228593:
jhb [Thu, 5 Jan 2012 19:53:01 +0000 (19:53 +0000)]
MFC 228593:
Fire a kevent if necessary after seeking on a regular file.  This fixes a
case where a kevent would not fire on a regular file if an application read
to EOF and then seeked backwards into the file.

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

12 years agoMFC 228089:
jhb [Thu, 5 Jan 2012 19:50:12 +0000 (19:50 +0000)]
MFC 228089:
Change the if_vlan driver to use if_transmit for forwarding packets to the
parent interface.  This avoids the overhead of queueing a packet to an IFQ
only to immediately dequeue it again.

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

12 years agoMFC 228361:
jhb [Thu, 5 Jan 2012 19:36:23 +0000 (19:36 +0000)]
MFC 228361:
Explicitly use curthread while manipulating td_fpop during last close
of a devfs file descriptor in devfs_close_f().  The passed in td argument
may be NULL if the close was invoked by garbage collection of open
file descriptors in pending control messages in the socket buffer of a
UNIX domain socket after it was closed.

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

12 years agoMFC 228496:
jhb [Thu, 5 Jan 2012 19:18:20 +0000 (19:18 +0000)]
MFC 228496:
Implement BUS_ADD_CHILD() for the isab(4) driver.  It already calls
bus_generic_probe() and bus_generic_attach() to handle drivers that add
new children via identify methods.

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

12 years agoMFC 228278:
jhb [Thu, 5 Jan 2012 19:14:02 +0000 (19:14 +0000)]
MFC 228278:
Use the correct volume identifier field when parsing MR_EVT_ARG_LD_STRIP
arguments.

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

12 years agoMFC 228207:
jhb [Thu, 5 Jan 2012 18:55:59 +0000 (18:55 +0000)]
MFC 228207:
When changing the user priority of a thread, change the real priority
in addition to the user priority for threads whose current real priority
is equal to the previous user priority or if the new priority is a
real-time priority.  This allows priority changes of other threads to
have an immediate effect.

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

12 years agoMFC 228185:
jhb [Thu, 5 Jan 2012 18:50:12 +0000 (18:50 +0000)]
MFC 228185:
Enhance the sequential access heuristic used to perform readahead in the
NFS server and reuse it for writes as well to allow writes to the backing
store to be clustered.

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

12 years agoMFC 228181:
jhb [Thu, 5 Jan 2012 18:38:13 +0000 (18:38 +0000)]
MFC 228181:
If the -d flag is specified, ignore any new values specified and only
display the descriptions of specified nodes.

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

12 years agoMFC 227562:
jhb [Thu, 5 Jan 2012 18:30:48 +0000 (18:30 +0000)]
MFC 227562:
Add single-message MSI support to mfi(4).  It is disabled by default but
can be enabled via the hw.mfi.msi tunable.  Many mfi(4) controllers also
support MSI-X, but in testing it seems that many adapters do not work with
MSI-X but do work with MSI.

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

12 years agoMFC r228084:
yongari [Thu, 5 Jan 2012 18:21:17 +0000 (18:21 +0000)]
MFC r228084:
  Reuse flag variable to represent driver internal states rather than
  using member variables in softc.
  While I'm here change media after setting IFF_DRV_RUNNING. This
  will remove unnecessary link state handling in vr_tick() if
  controller established a link immediately.

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

12 years agoMFC 227507: Finish making 'wcommitsize' an NFS client mount option.
jhb [Thu, 5 Jan 2012 17:22:32 +0000 (17:22 +0000)]
MFC 227507: Finish making 'wcommitsize' an NFS client mount option.

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

12 years agoMFC r228971:
dim [Thu, 5 Jan 2012 17:14:13 +0000 (17:14 +0000)]
MFC r228971:

For sys/dev/ce/tau32-ddk.c, disable the following warning when building
with clang:

sys/dev/ce/tau32-ddk.c:1228:37: warning: implicit truncation from 'int' to bitfield changes value from 65532 to 8188 [-Wconstant-conversion]

Since this file is obfuscated C, we can never determine (in a sane way,
at least :) if this points to a real problem or not.  The driver has
been in the tree for more than five years, so it most likely isn't.

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

12 years agoMFC r228963:
dim [Thu, 5 Jan 2012 17:12:20 +0000 (17:12 +0000)]
MFC r228963:

Fix clang warnings in sys/dev/ce/if_ce.c and sys/dev/cp/if_cp.c,
using jkim's last patch (reviewed by bde) from here:

http://docs.freebsd.org/cgi/mid.cgi?201010141558.03154.jkim

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

12 years agoMFC: r227744
rmacklem [Thu, 5 Jan 2012 16:43:54 +0000 (16:43 +0000)]
MFC: r227744
Since the nfscl_cleanup() function isn't used by the FreeBSD NFSv4 client,
delete the code and fix up the related comments. This should not have
any functional effect on the client.

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

12 years agoMFC r228970:
pluknet [Thu, 5 Jan 2012 14:51:43 +0000 (14:51 +0000)]
MFC r228970:

 Fix manual section for acl_get(3) and mac_get(3) family functions.

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

12 years agoMFC r228797:
mm [Thu, 5 Jan 2012 12:52:05 +0000 (12:52 +0000)]
MFC r228797:
Use contrib sources for building libarchive, tar and cpio.
Make "make test" fully operational.

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

12 years agoMFC contrib/libarchive:
mm [Thu, 5 Jan 2012 12:06:54 +0000 (12:06 +0000)]
MFC contrib/libarchive:
r228761-r228764, r228770-r228777, r228835, r228911:

MFC r228761:
Copy libarchive from vendor branch to contrib

MFC r228762:
Add FREEBSD-Xlist and FREEBSD-upgrade to contrib/libarchive

MFC r228763:
Set svn:keywords to FreeBSD=%H for contrib/libarchive

MFC r228764:
Strip unnecessary files and directories from contrib/libarchive
according to FREEBSD-Xlist

MFC r228770:
Remove libarchive/archive_entry_copy_bhfi.c and libarchive/mtree.5
Add these files to FREEBSD-Xlist

MFC r228771:
Partial merge of r224691 from lib/libarchive:

Add compatibility for ISO images created with unfixed makefs that
violated ECMA-119 (ISO9660): allow reserved4 to be 0x20 in PVD.
This allows tar to read FreeBSD distribution ISO images created
with makefs prior to NetBSD bin/45217 bugfix (up to 9.0-BETA1).

MFC r228772:
Add missing integer casts to comparsions in libarchive read.

MFC r228773:
Merge FreeBSD changes from lib/libarchive to contrib/libarchive:

r204111 (uqs):
Fix common misspelling of hierarchy

r208027 (uqs):
mdoc: move CAVEATS, BUGS and SECURITY CONSIDERATIONS sections to the
bottom of the manpages and order them consistently.

GNU groff doesn't care about the ordering, and doesn't even mention
CAVEATS and SECURITY CONSIDERATIONS as common sections and where to put
them.

r208291 (uqs):
mdoc: consistently spell our email addresses <foo@FreeBSD.org>

r209031 (uqs):
mdoc nitpicking: the title argument shall be uppercase

r214822 (kientzle):
Clarify the naming:  Methods that free an object should
be called "free".  Retain the old "finish" names to preserve
source compatibility for now.

r214905 (kientzle):
If the Zip reader doesn't see a PK signature block
because there's inter-entry garbage, just scan forward
to find the next one.  This allows us to handle a lot
of Zip archives that have been modified in-place.

Thanks to: Gleb Kurtsou for sending me a sample archive

r216258 (kientzle):
Don't write data into an empty "file."

In particular, this check avoids a warning when
extracting directory entries from certain GNU tar
archives that store directory contents.

r225525 (kientzle):
Fix cpio on ARM.

MFC r228774:
Add $FreeBSD$ to libarchive_fe headers where missing.

MFC r228775:
Merge FreeBSD changes from usr.bin/tar to contrib/libarchive/libarchive_fe:

r213469:
Recognize both ! and ^ as markers for negated character classes.

MFC r228776:
Merge FreeBSD changes from usr.bin/tar to contrib/libarchive/tar:

r204111 (uqs):
Fix common misspelling of hierarchy

r207786 (kientzle):
Various manpage updates, including many long-option synonyms that were
previously undocumented.

r208028 (uqs):
mdoc: move remaining sections into consistent order

This pertains mostly to FILES, HISTORY, EXIT STATUS and AUTHORS sections.

r209152 (kientzle):
If the compressed data is larger than the uncompressed,
report the compression ratio as 0% instead of displaying
nonsense triggered by numeric overflow.  This is common
when dealing with uncompressed files when the I/O blocking
causes there to be small transient differences in the
accounting.

r210720 (joel):
Fix typos.

r223541 (kientzle):
If there is a read error reading Y/N confirmation from the keyboard,
exit immediately with an error.

If there is an error opening or reading a file to put into the archive,
set the return value for a deferred error exit.

r223573 (kientzle):
The --newer-than test should descend into old
directories to look for new files.

r226636 (kientzle):
Typo from previous commit. Urgh.

r224153 (mm, partial):
Update bsdtar.1 manpage

MFC r228777:
Merge FreeBSD changes from usr.bin/cpio to contrib/libarchive/cpio:

r204111 (uqs):
Fix common misspelling of hierarchy

r211054 (kientzle);
Fix -R when used with -p.  Previously, the
uname and gname weren't overwritten, so the
disk restore would use those to lookup the
original uid/gid again.  Clearing the uname
and gname prevents this.

r212263 (gjb):
Fix typo in bsdcpio manual:
s/libarchive_formats/libarchive-formats

MFC r228835:
Fix typo s/xz/libarchive/

Reported by: Emil Mikulic (private e-mail)

MFC r228911:
Update to vendor revision 4016.

Vendor has integrated most of our local changes in revisions 3976-3979 so
future updates are going to be easier.
Thanks to Tim Kientzle <kientzle@FreeBSD.org>.

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

12 years agoMFC r228744, r228745, r228748:
mm [Thu, 5 Jan 2012 11:44:55 +0000 (11:44 +0000)]
MFC r228744, r228745, r228748:

MFC r228744 [1]:
Merge vendor revision 3723:
Fixes extraction of Zip entries that use length-at-end without specifying
either the compressed or uncompressed length.  In particular, fixes bsdtar
extraction of such files.

Reported by: Patrick Lamaiziere <patfbsd@davenulle.org> (freebsd-stable@)

MFC r228745:
Update libarchive, tar and cpio to version 2.8.5

The following additional vendor revisions are applied:

Revision 3740:
Use archive_clear_error() to clear the error markers.

Obtained from: http://code.google.com/p/libarchive

MFC r228748:
Sync libarchive with vendor branch release/2.8:

3730:
Fix issue 174 (Windows path names, not relevant for FreeBSD)

3734:
Merge r1989: archive_clear_error should set errno to 0.

3735:
Merge r3247 from trunk: Clear errors before returning
from archive_read_support_format_all()

3799:
Check the position before dereferencing the pointer.
This avoids dereferencing one byte past the end of a string

3824:
Merge r3823 from trunk for issue 199 (hang in iso9660 reading)

Obtained from: http://code.google.com/p/libarchive

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

12 years agoMerge r228463, that explicily uses 255.0.0.0 mask for the temporary prefix.
glebius [Thu, 5 Jan 2012 11:14:28 +0000 (11:14 +0000)]
Merge r228463, that explicily uses 255.0.0.0 mask for the temporary prefix.
This change isn't actually needed in the stable/9, but let it be here, in
case if anyone tries to run stable/9 world on a head/ kernel.

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

12 years agoMFC r228206, r228353:
mm [Thu, 5 Jan 2012 11:11:46 +0000 (11:11 +0000)]
MFC r228206, r228353:

MFC r228206:
Remove unnecesary "Ns" macros and add missing command example to zpool(8).

MFC r228353:
Some mdoc(7) style and typo fixes to zfs(8).

Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>

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

12 years agoMerge r229003:
glebius [Thu, 5 Jan 2012 11:11:33 +0000 (11:11 +0000)]
Merge r229003:
  style(9), whitespace and spelling nits.

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

12 years agoMFC r228103, r228104:
mm [Thu, 5 Jan 2012 11:06:05 +0000 (11:06 +0000)]
MFC r228103, r228104:

MFC r228103:
Merge new ZFS features from illumos:

1644 add ZFS "clones" property
https://www.illumos.org/issues/1644

1645 add ZFS "written" and "written@..." properties
https://www.illumos.org/issues/1645

1646 "zfs send" should estimate size of stream
https://www.illumos.org/issues/1646

1647 "zfs destroy" should determine space reclaimed by destroying multiple
snapshots
https://www.illumos.org/issues/1647

1693 persistent 'comment' field for a zpool
https://www.illumos.org/issues/1693

1708 adjust size of zpool history data
https://www.illumos.org/issues/1708

1748 desire support for reguid in zfs
https://www.illumos.org/issues/1748

MFC r228104:
Fix typo in copyright notice.

Obtained from: illumos (changesets 13514, 13524, 13525)

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

12 years agoMFC zfs manpage update
mm [Thu, 5 Jan 2012 10:55:17 +0000 (10:55 +0000)]
MFC zfs manpage update
(r227646, r227648, r227649, r227752, r228019, r228045, r228054, r228055)

MFC r227646 (partial):
Update and desolarization of zfs(8) and zpool(8) manual pages:
- synchronized to match new vendor code (Illumos rev. 13513) [1]
- removed references to sun commands (replaced with FreeBSD commands)
- removed ATTRIBUTES sections
- updated SEE ALSO sections
- properly updated copyright information (required by CDDL)

zfs(8) only:
- replaced "Zones" section with new "Jails" section
- removed misleading "ZFS Volumes as Swap or Dump Devices" section
- updated shareiscsi and sharesmb option information (not supported on FreeBSD)
- replace zoned property with jailed property

zpool(8) only:
- updated device names in examples

MFC r227648:
Fix reference to fsync(2).
Add more references to SEE ALSO section.

MFC r227649:
More zfs(8) manpage fixes:
- remove shareiscsi property
- mark casesensitivity property as unsupported
- remove reference to Solaris Administration Guide

MFC r227752 (partial):
Update and desolarization of zdb(8) and zstreamdump(1) manual pages:
- synchronized to match new vendor code [1]
- removed ATTRIBUTES sections
- updated SEE ALSO sections
- properly updated copyright information (required by CDDL)

MFC r228019:
Update ZFS manual pages to a mdoc(7) reimplementation.

The zfs(8) and zpool(8) manual pages now match the state of the ZFS module
and have been customized for FreeBSD.

The new texts of the "Deduplication" subsection in zfs(8), the zpool "split"
command, the zfs "dedup" property and several other missing parts have been
added from illumos or OpenSolaris snv_134 (CDDL-licensed).

The mdoc(7) reimplementation of whole manual pages, the descriptions of the
zpool "readonly" property, "zfs diff" command and descriptions of several
other missing command flags and/or options were authored by myself.

MFC r228045:
Add missing -n flag to "zpool import" description.

MFC r228054:
Add missing warning to zfs(8) for using "zfs destroy" with -r and -R flags.

MFC r228055:
Use singular form for zfs destroy snapshot in zfs(8).

Obtained from: Illumos (as of rev. 13513:f84d4672fdbd) [1]

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

12 years agoMFC r228947:
kib [Thu, 5 Jan 2012 10:42:19 +0000 (10:42 +0000)]
MFC r228947:
Add PCI Id for the Intel AMT serial interface as found on my DQ67OW.

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

12 years agoMFC r228363, r228392:
mm [Thu, 5 Jan 2012 10:03:14 +0000 (10:03 +0000)]
MFC r228363, r228392:

MFC r228363 (pjd):
The vfs.zfs.txg.timeout sysctl can be safely modified at run time.

MFC r228392 (pjd) [1]:
Move ru_inblock increment into arc_read_nolock() so we don't account for
cached reads.

Discussed with: gibbs
No objections from: avg
Tested by: Marcus Reid <marcus@blazingdot.com> [1]
Approved by: pjd

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

12 years agoMFC r226676, r226678, r226700, r226705, r226706, r226707:
mm [Thu, 5 Jan 2012 09:37:31 +0000 (09:37 +0000)]
MFC r226676, r226678, r226700, r226705, r226706, r226707:

MFC r226676 (pjd):
Allow to rename file systems without remounting if it is possible.
It is possible for file systems with 'mountpoint' preperty set to 'legacy'
or 'none' - we don't have to change mount directory for them.
Currently such file systems are unmounted on rename and not even mounted back.

This introduces layering violation, as we need to update 'f_mntfromname'
field in statfs structure related to mountpoint (for the dataset we are
renaming and all its children).

In my opinion it is worth it, as it allow to update FreeBSD in even cleaner
way - in ZFS-only configuration root file system is ZFS file system with
'mountpoint' property set to 'legacy'. If root dataset is named system/rootfs,
we can snapshot it (system/rootfs@upgrade), clone it (system/oldrootfs),
update FreeBSD and if it doesn't boot we can boot back from system/oldrootfs
and rename it back to system/rootfs while it is mounted as /. Before it was
not possible, because unmounting / was not possible.

MFC r227768 (pjd):
Include <sys/zfs_vfsops.h> only when compiling kernel module.

MFC r226700 (pjd):
Don't forget to rename mounted snapshots of the file system being renamed.

MFC r226705 (pjd):
Extend r226676 to allow rename without unmount even for file systems with
non-legacy mountpoints. It is better to be able to rename such file systems and
let them be mounted in old places until next reboot than using live CD, etc. to
rename with remount.

This is implemented by adding -u option to 'zfs rename'. If file system's
mountpoint property is set to 'legacy' or 'none', there is no need to specify -u.

Update zfs(8) manual page to reflect this addition.

MFC r226706 (pjd):
Update copyright to include myself.

MFC r226707 (pjd):
- Use better naming now that we allow to rename any mounted file system (not
  only legacy).
- Update copyright to include myself.

Approved by: pjd

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

12 years agoMFC r227497, r228020:
mm [Thu, 5 Jan 2012 08:53:54 +0000 (08:53 +0000)]
MFC r227497, r228020:

MFC r227497 [1]:
Import upstream changesets for the output of the "zpool" command:

952 separate intent logs should be obvious in 'zpool iostat' output
1337 `zpool status -D' should tell if there are no DDT entries

References:
https://www.illumos.org/issues/952
https://www.illumos.org/issues/1337

MFC r228020:
Fix zfs(8) and zpool(8) context help to repport supported flags.

Obtained from: Illumos (issues 952, 1337; changesets 13384, 13432) [1]

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

12 years agoReparent mergeinfo introduced in r229461 on lib/msun/man and lib/libc/gen to more...
eadler [Thu, 5 Jan 2012 04:36:57 +0000 (04:36 +0000)]
Reparent mergeinfo introduced in r229461 on lib/msun/man and lib/libc/gen to more appropriate directories.

This is an intentional direct commit to the stable/9 branch.

Approved by: lstewart

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

12 years agoMFC: r228756
pfg [Thu, 5 Jan 2012 02:36:37 +0000 (02:36 +0000)]
MFC: r228756

Clean an inconsistency with -ffinite-math-only.
Backported from the gcc-4_3-branch, revision (118001)
under the GPLv2.
This issue was also fixed in Apple's gcc.

PR: 157025
Reviewed by: mm
Approved by: jhb (mentor)

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

12 years agoMFC: r228780
pfg [Thu, 5 Jan 2012 01:48:25 +0000 (01:48 +0000)]
MFC: r228780

Update libstdc++ with small changes up to the latest rev. (135556)
from the gcc 4.2 branch.
The libraries in the gcc-4_2-branch remained under the LGPLv2.

Reviewed by: mm
Approved by: jhb (mentor)

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

12 years agoMFC: r228740
pfg [Thu, 5 Jan 2012 01:40:42 +0000 (01:40 +0000)]
MFC: r228740

Many style fixes.
Remove C99 initializers: they don't help in this case.
Set errno to 0 before strtoll() (from NetBSD).

PR: 151850
Suggested by: bde
Approved by: jhb (Mentor)

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

12 years agoMFC: r228507, r228539, r228583
pfg [Thu, 5 Jan 2012 01:35:01 +0000 (01:35 +0000)]
MFC: r228507, r228539, r228583

Merge ext2_readwrite.c into ext2_vnops.c as done in UFS.
Bring in reallocblk to ext2fs: new feature implemented by Zheng Liu as
GSoC 2010.
Many style fixes by jh@.

PR: 159232, 159233 and 162564
Approved by: jhb (mentor)

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

12 years agoMFC: r227743
rmacklem [Thu, 5 Jan 2012 01:25:47 +0000 (01:25 +0000)]
MFC: r227743
Post r223774 the NFSv4 client never uses the linked list with the
head nfsc_defunctlockowner. This patch simply removes the code that
loops through this always empty list, since the code no longer does
anything useful. It should not have any effect on the client's
behaviour.

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

12 years agoMFC r227842:
yongari [Thu, 5 Jan 2012 00:08:16 +0000 (00:08 +0000)]
MFC r227842:
  For IP1001 PHY, do not set multi-port device(MASTER).  Ideally this
  bit should not affect link establishment process of auto-negotiation
  if manual configuration is not used, which is true in auto-negotiation.
  However it seems setting this bit interfere with IP1001 PHY's
  down-shifting feature such that establishing a 10/100Mbps link failed
  when 1000baseT link is not available during auto-negotiation process.

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

12 years agoMFC r227828,227835,227837:
yongari [Wed, 4 Jan 2012 23:58:54 +0000 (23:58 +0000)]
MFC r227828,227835,227837:
r227828:
  Always start MII auto polling before accessing any MII registers.

r227835:
  Rework link establishment and link state detection logic.
   - Remove MIIBUS statchg callback and program VGE_DIAGCTL before
     initiating link establishment.  Previously driver used to
     program VGE_DIAGCTL after getting a link in statchg callback.
     It seems the VGE_DIAGCTL register works like a kind of MII
     register such that it requires setting a 'to be' mode in advance
     rather than relying on resolved speed/duplex of established link.
     This means the statchg callback is not needed in driver.  In
     addition, if there was no link at the time of media change, this
     was not called at all.
   - Introduce vge_ifmedia_upd_locked() to change current media to
     configured one.  Actual media change is performed only after PHY
     reset and VGE_DIAGCTL setup.
   - In WOL configuration, make sure to clear forced mode such that
     controller can rely on auto-negotiation.
   - Unlike most other drivers that use miibus(4), vge(4) used
     controller's auto-polling feature for link state tracking via
     interrupt.  This came from controller's inefficient mechanism to
     access MII registers.  On link state change interrupt, vge(4)
     used to get current link state with series of MII register
     accesses.  Because vge(4) already enabled auto polling, read PHY
     status register to resolved speed/duplex/flow control parameters.

  vge(4) still does not drive MII_TICK to reduce number of MII
  register accesses which in turn means the driver does not know the
  status of auto-negotiation.  This was a one of long standing
  issue of vge(4).  Probably driver may be able to implement a timer
  that keeps track of auto-negotiation state and restart
  auto-negotiation when driver couldn't establish a link within a
  specified period.  However the controller does not provide a
  reliable way to detect auto-negotiation failure so I'm not sure
  whether it's worth to implement it in driver.

  Alternatively driver can completely disable MII auto-polling and
  let miibus(4) poll link state by driving MII_TICK.  This may reduce
  unnecessary overhead of stopping/restarting MII auto-polling of
  controller.  Unfortunately it was known that some variants of
  controller does not work correctly if MII auto-polling is disabled.

r227837:
  Announce flow control capability to underlying PHY driver.
  Pause timer value is initialized to 0xFFFF. Controller allows just
  4 different TX pause thresholds. The lowest possible threshold
  value looks too aggressive so use next available threshold value.

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

12 years agoMFC r227850-227851,227854,227914,227916:
yongari [Wed, 4 Jan 2012 23:29:57 +0000 (23:29 +0000)]
MFC r227850-227851,227854,227914,227916:
r227850:
  Writing access to RL_CFG5 register also requires EEPROM write
  access.
  While I'm here, enable WOL through magic packet but disable waking
  up system via unicast, multicast and broadcast frames.  Otherwise,
  multicast or unicast frame(e.g. ICMP echo request) can wake up
  system which is not probably wanted behavior on most environments.
  This was not known as problem because RL_CFG5 register access had
  not effect until this change.
  The capability to wake up system with unicast/multicast frames
  are still set in driver, default off, so users who need that
  feature can still activate it with ifconfig(8).

r227851:
  Perform media change after setting IFF_DRV_RUNNING flag. Without it,
  driver would ignore the first link state update if controller
  already established a link such that it would have to take
  additional link state handling in re_tick().

r227854:
  Disable accepting frames in re_stop() to put RX MAC into idle state.
  Because there is no reliable way to know whether RX MAC is in
  stopped state, rejecting all frames would be the only way to
  minimize possible races.
  Otherwise it's possible to receive frames while stop command
  execution is in progress and controller can DMA the frame to freed
  RX buffer during that period.
  This was observed on recent PCIe controllers(i.e. RTL8111F).

  While this change may not be required on old controllers it
  wouldn't make negative effects on old controllers.  One side effect
  of this change is disabling receive so driver reprograms RL_RXCFG
  to receive WOL frames when it is put into suspend or shutdown.

  This should address occasional 'memory modified free' errors seen
  on recent RealTek controllers.

r227914:
  Make sure to stop TX MAC before freeing queued TX frames.
  For RTL8111DP, check if the TX MAC is active by reading RL_GTXSTART
  register.  For RTL8402/8168E-VL/8168F/8411, wait until TX queue is
  empty.

r227916:
  To save more power, switch to 10/100Mbps link when controller is
  put into suspend/shutdown.  Old PCI controllers performed that
  operation in firmware but for RTL8111C or newer controllers, it's
  responsibility of driver.  It's not clear whether the firmware of
  RTL8111B still downgrades its speed to 10/100Mbps so leave it as it
  was.

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

12 years agoMFC r227587,227590-227591,227593,227638-227639:
yongari [Wed, 4 Jan 2012 22:53:18 +0000 (22:53 +0000)]
MFC r227587,227590-227591,227593,227638-227639:
r227587:
  Add preliminary support for RTL8402 PCIe FastEthernet with
  integrated card reader.

r227590:
  Add preliminary support for RTL8411 PCIe Gigabit ethernet with
  integrated card reader.

r227591:
  Add missing driver lock in SIOCSIFCAP handler.

r227593:
  Disable PCIe ASPM (Active State Power Management) for all
  controllers.
  More and more RealTek controllers started to implement EEE feature.
  Vendor driver seems to load a kind of firmware for EEE with
  additional PHY fixups.  It is known that the EEE feature may need
  ASPM support.  Unfortunately there is no documentation for EEE of
  the controller so enabling ASPM may cause more problems.

r227638:
  Add preliminary support for second generation RTL8105E PCIe
  FastEthernet.

r227639:
  Add preliminary support for RTL8168/8111F PCIe Gigabit ethernet.

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

12 years agoMFC: r228898
brueffer [Wed, 4 Jan 2012 21:56:47 +0000 (21:56 +0000)]
MFC: r228898

Add missing -l flag to usage().

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

12 years agoMFC r227582:
yongari [Wed, 4 Jan 2012 21:50:59 +0000 (21:50 +0000)]
MFC r227582:
  Enable 64bit DMA addressing support for all msk(4) controllers.
  Unnecessarily complex LE format used on Marvell controller was
  main reason not to enable 64bit DMA addressing in driver.  If high
  32bit address of DMA address of TX/RX buffer is changed, driver has
  to generate a new LE.  In TX path, driver will keep track of lastly
  used high 32bit address of DMA address and generate a new LE
  whenever it sees high address change in the DMA address. In RX path,
  driver will always use two LEs to specify 64bit DMA address of RX
  buffer.  If the high 32bit address of DMA address of RX buffer is
  the same as previous DMA address of RX buffer, driver does not have
  to use two LEs but driver will use two LEs for simplicity in RX
  ring management.

  One of draw back for switching to 64bit DMA addressing is that the
  large amount of LEs are used to specify 64bit DMA address such that
  number of available LEs for TX/RX buffers are considerably reduced.
  To mitigate the issue, increase number of available LEs from 256 to
  384 for TX and from 256 to 512 for RX. For 32bit architectures,
  msk(4) does not use 64bit DMA addressing to save resources.

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

12 years agoMFC r227452:
yongari [Wed, 4 Jan 2012 21:25:11 +0000 (21:25 +0000)]
MFC r227452:
  To send a frame, controller requires a prepended TX header and
  the length of frame should be treated as multiple of 4. Actual
  frame length is set in the TX header. The TX header position
  should be aligned on 4 byte boundary and actual frame start
  position should be aligned on 4 byte boundary as well. This means
  we need 4(TX header length) + 3(frame length fixup) additional free
  space in TX buffer in addition to actual frame length.
  Make sure TX handler check these additional bytes.
  ae_tx_avail_size() returns actual free space in TX buffer to ease
  the calculation of available TX buffer space in caller. While I'm
  here, replace magic number to appropriate sizeof operator to
  enhance readability.

  This change should fix controller lockup issue happened under
  certain conditions but it still does not fix watchdog timeout. It
  seems the watchdog timeout is side-effect of TxS and TxD
  mismatches. The root cause of TxD/TxD mismatch is not known yet but
  it looks like silicon bug. I guess driver may have to reinitialize
  controller whenever it sees TxS and TxD mismatches but leave it as
  it was at this moment.

  PR: kern/145918

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

12 years agoMFC r229183:
dim [Wed, 4 Jan 2012 20:14:07 +0000 (20:14 +0000)]
MFC r229183:

In several llvm library Makefiles, remove extraneous slashes at the end
of SRCDIR definitions.

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

12 years agoRegen.
jhb [Wed, 4 Jan 2012 19:43:53 +0000 (19:43 +0000)]
Regen.

Reminded by: kib

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

12 years agoThe list of packages we will put on the 9.0-RELEASE DVD images was
kensmith [Wed, 4 Jan 2012 19:38:35 +0000 (19:38 +0000)]
The list of packages we will put on the 9.0-RELEASE DVD images was
worked out a bit late so this won't make it into releng/9.0 or
release/9.0.0 but it's worth committing to stable/9 for reference
when 9.1-RELEASE rolls around.

The new installer doesn't handle installing packages itself like sysinstall
had done so in that respect packages are no longer as closely tied to
doing an install.  We'll provide a "disc1" image that has no packages on
it at all.  For the "dvd1" image there will be a /packages directory with
the set of pre-built packages generated by this script (and all the
dependencies of these packages...).  The idea is to provide enough
packages on the DVD for a user to get a minimal graphical workstation
installed without needing to do a network based install if their network
link is so-so...

Discussed with: portmgr, re

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

12 years agoMFC r225773, r225781, r225782, r225783, r225784, 225785, r225786, r225787,
trociny [Wed, 4 Jan 2012 17:22:10 +0000 (17:22 +0000)]
MFC r225773, r225781, r225782, r225783, r225784, 225785, r225786, r225787,
  r225830, r225831, r225832, r225835, r226461, r226462, r226463, r226842,
  r226851, r226852, r226854, r226855, r226856, r226857, r226859, r226861,
  r228542, r228542, r228543, r228544, r228695, r228696:

r225773 (pjd):

Ensure that pjdlog functions don't modify errno.

r225781 (pjd):

No need to use KEEP_ERRNO() macro around pjdlog functions, as they don't
modify errno.

r225782 (pjd):

Prefer PJDLOG_ASSERT() and PJDLOG_ABORT() over assert() and abort().
pjdlog versions will log problem to syslog when application is running in
background.

r225783 (pjd):

Correct two mistakes when converting asserts to PJDLOG_ASSERT()/PJDLOG_ABORT().

r225784 (pjd):

- Convert some impossible conditions into assertions.
- Add missing 'if' in comment.

r225785 (pjd):

Prefer PJDLOG_ASSERT()/PJDLOG_ABORT() over assert().

r225786 (pjd):

No need to wrap pjdlog functions around with KEEP_ERRNO() macro.

r225787 (pjd):

Use PJDLOG_ASSERT() and PJDLOG_ABORT() everywhere instead of assert().

r225830 (pjd):

After every activemap change flush disk's write cache, so that write
reordering won't make the actual write to be committed before marking
the coresponding extent as dirty.

It can be disabled in configuration file.

If BIO_FLUSH is not supported by the underlying file system we log a warning
and never send BIO_FLUSH again to that GEOM provider.

r225831 (pjd):

Break a bit earlier.

r225832 (pjd):

If the underlying provider doesn't support BIO_FLUSH, log it only once
and don't bother trying in the future.

r225835 (pjd):

Correct typo.

r226461 (pjd):

When path to the configuration file is relative, obtain full path,
so we can always find the file, even after daemonizing and changing
working directory to /.

r226462 (pjd):

Remove redundant space.

r226463 (pjd):

Allow to specify pidfile in HAST configuration file.

r226842 (pjd):

Correct comments.

r226851 (pjd):

Delay resuid generation until first connection to secondary, not until first
write. This way on first connection we will synchronize only the extents that
were modified during the lifetime of primary node, not entire GEOM provider.

r226852 (pjd):

Minor cleanups.

r226854 (pjd):

- Eliminate the need for hio_nv.
- Introduce hio_clear() function for clearing hio before returning it
  onto free queue.

r226855 (pjd):

Improve comment so it doesn't suggest race is possible, but that we handle
the race.

r226856 (pjd):

Reduce indentation.

r226857 (pjd):

Minor cleanups.

r226859 (pjd):

Implement 'async' mode for HAST.

r226861 (pjd):

Remove redundant space.

r228542 (pjd):

Remove redundant setting of the error variable.

Found by:       Clang Static Analyzer

r228543 (pjd):

Simplify code by changing functions types from int to avoid, as the functions
always return 0.

Found by:       Clang Static Analyzer

r228544 (pjd):

Remove redundant assignment.

Found by:       Clang Static Analyzer

r228695 (pjd):

Don't use function name as format string.

Detected by:    clang

r228696 (pjd):

Use lex's standard way of not generating unused function.

Inspired by:    r228555

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

12 years agoMFC 227069:
jhb [Wed, 4 Jan 2012 16:50:12 +0000 (16:50 +0000)]
MFC 227069:
Move the cleanup of f_cdevpriv when the reference count of a devfs
file descriptor drops to zero out of _fdrop() and into devfs_close_f()
as it is only relevant for devfs file descriptors.

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

12 years agoMFC r228435:
kib [Wed, 4 Jan 2012 16:43:29 +0000 (16:43 +0000)]
MFC r228435:
Add support for STT_GNU_IFUNC and R_MACHINE_IRELATIVE GNU extensions to
rtld on 386 and amd64.

MFC r228503:
Postpone the resolution for irelative/ifunc right before initializers
are called, and drop bind lock around calls to dispatcher.  Use
initlist to iterate over the objects instead of the ->next, due to
drop of the bind lock in iteration.

For i386/reloc.c:reloc_iresolve(), fix calculation of the dispatch
function address for dso, by taking into account possible non-zero
relocbase.

MFC r228635 (by nwhitehorn):
Fix RTLD on PowerPC after r228435. Changing the order of init_pltgot()
caused the icache to be invalidated at the wrong time, resulting in
an icache full of nonsense in the PLT section.

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

12 years agoMFC 226746:
jhb [Wed, 4 Jan 2012 16:39:39 +0000 (16:39 +0000)]
MFC 226746:
Consolidate duplicate definitions of V86_CY() and V86_ZR() which check for
the carry and zero flags being set, respectively, in <btxv86.h> and use
them throughout the x86 boot code.

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

12 years agoMFC 226364:
jhb [Wed, 4 Jan 2012 16:29:45 +0000 (16:29 +0000)]
MFC 226364:
Use PAIR32TO64() for the offset and length parameters to
freebsd32_posix_fallocate() to properly handle big-endian platforms.

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

12 years agoMFC 226039:
jhb [Wed, 4 Jan 2012 16:26:45 +0000 (16:26 +0000)]
MFC 226039:
Ignore SRAT memory entries if the memory range does not overlap with an
existing phys_avail[] entry.  If a hw.physmem setting causes a memory
domain to not be present in phys_avail[], the SRAT table will now be
ignored rather than triggering a panic when a CPU in the missing domain
tries to allocate a page.

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

12 years agoMFC r228916:
pluknet [Wed, 4 Jan 2012 15:58:35 +0000 (15:58 +0000)]
MFC r228916:
 Clean up from the 4.x era.

 In an example of boot command:
 - rename wd(4) IDE disk drives name to ad(4) for the time being.
 - update the used kernel path "/kernel" to the current default.

 Bump .Dd for this and previous changes.

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

12 years agoMFC r227792:
pluknet [Wed, 4 Jan 2012 14:47:32 +0000 (14:47 +0000)]
MFC r227792:

 Add history for setsockopt(2).

PR: docs/162719
Submitted by: Niclas Zeising <niclas at zeising gmail>

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

12 years agoMFC r227447:
pluknet [Wed, 4 Jan 2012 14:33:54 +0000 (14:33 +0000)]
MFC r227447:

 struct timespec32: change types of tv_sec and tv_nsec fields to signed
 to match native struct timespec ABI on __LP32__.

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

12 years agoMFC r226882:
pluknet [Wed, 4 Jan 2012 14:18:47 +0000 (14:18 +0000)]
MFC r226882:
 Fix arguments list for proc:::signal-discard DTrace probe.

Reported by: Anton Yuzhaninov <citrin citrin ru>

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

12 years agoMFC r227055:
pluknet [Wed, 4 Jan 2012 14:02:00 +0000 (14:02 +0000)]
MFC r227055:
 Remove a couple of write-only variables.

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

12 years agoRevert MFC r226833,227056.
pluknet [Wed, 4 Jan 2012 13:49:46 +0000 (13:49 +0000)]
Revert MFC r226833,227056.
/stand exists in the MFS root used during a sysinstall-based install.

Reported by: jhb
Pointy hat to: pluknet

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

12 years agoMFC: r227527
pho [Wed, 4 Jan 2012 12:54:35 +0000 (12:54 +0000)]
MFC: r227527

Removed extra PRELE() call.

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

12 years agoMFC r226833,r227056:
pluknet [Wed, 4 Jan 2012 12:39:52 +0000 (12:39 +0000)]
MFC r226833,r227056:

Remove the long reprecated ``/stand/sysinstall'' from the init_path.

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

12 years agoMFC r228436:
fabient [Wed, 4 Jan 2012 08:14:05 +0000 (08:14 +0000)]
MFC r228436:
Add VIA microde update support to cpuctl(4) and cpucontrol(8).

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

12 years agoMFC r227458, r226436:
eadler [Wed, 4 Jan 2012 03:37:41 +0000 (03:37 +0000)]
MFC r227458, r226436:

- change "is is" to "is" or "it is"
- change "the the" to "the"
- other typo fixes

Approved by: lstewart

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

12 years agoMFC r226482
eadler [Wed, 4 Jan 2012 02:02:58 +0000 (02:02 +0000)]
MFC r226482
- remove device keyword from makefs manpage

Approved by: gjb

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

12 years agoMFC r227675:
yongari [Wed, 4 Jan 2012 01:38:52 +0000 (01:38 +0000)]
MFC r227675:
  Partially revert r218788. r218788 removed calling dc_setcfg() for
  !DC_IS_ADMTEK in dc_miibus_statchg(). This change broke link
  establishment of Intel 21143 with dcphy(4) where it stuck in
  "ability detect" state without completing auto-negotiation.
  Also nuke dc_if_media as it's not actually used.

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

12 years agoMFC r227349,227513-227514:
yongari [Wed, 4 Jan 2012 00:03:33 +0000 (00:03 +0000)]
MFC r227349,227513-227514:
r227349:
  Document TI_SF_BUF_JUMBO and Xr altq.

r227513:
  Document newly introduced a loader tunable and sysctl variables.

r227514:
  Clarify hw.ti.%d.dac tunable.

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

12 years agoMFC r227348:
yongari [Tue, 3 Jan 2012 23:57:27 +0000 (23:57 +0000)]
MFC r227348:
  ti(4) supports altq(4).

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

12 years agoMFC r227512:
yongari [Tue, 3 Jan 2012 23:44:05 +0000 (23:44 +0000)]
MFC r227512:
  Overhaul bus_dma(9) usage in driver:
   - Don't use a single big DMA block for all rings. Create separate
     DMA area for each ring instead.  Currently the following DMA
     areas are created:
        Event ring, standard RX ring, jumbo RX ring, RX return ring,
        hardware MAC statistics and producer/consumer status area.
     For Tigon II, mini RX ring and TX ring are additionally created.
   - Added missing bus_dmamap_sync(9) in various TX/RX paths.
   - TX ring is no longer created for Tigon 1 such that it saves more
     resources on Tigon 1.
   - Data sheet is not clear about alignment requirement of each ring
     so use 32 bytes alignment for normal DMA area but use 64 bytes
     alignment for jumbo RX ring where the extended RX descriptor
     size is 64 bytes.
   - For each TX/RX buffers use separate DMA tag(e.g. the size of a
     DMA segment, total size of DMA segments etc).
   - Tigon allows separate DMA area for event producer, RX return
     producer and TX consumer which is really cool feature.  This
     means TX and RX path could be independently run in parallel.
     However ti(4) uses a single driver lock so it's meaningless
     to have separate DMA area for these producer/consumer such that
     this change creates a single status DMA area.
   - It seems Tigon has no limits on DMA address space and I also
     don't see any problem with that but old comments in driver
     indicates there could be issues on descriptors being located in
     64bit region.  Introduce a tunable, dev.ti.%d.dac, to disable
     using 64bit DMA in driver. The default is 0 which means it would
     use full 64bit DMA.  If there are DMA issues, users can disable
     it by setting the tunable to 0.
   - Do not increase watchdog timer in ti_txeof(). Previously driver
     increased the watchdog timer whenever there are queued TX frames.
   - When stat ticks is set to 0, skip processing ti_stats_update(),
     avoiding bus_dmamap_sync(9) and updating if_collisions counter.
   - MTU does not include FCS bytes, replace it with
     ETHER_VLAN_ENCAP_LEN.

  With these changes, ti(4) should work on PAE environments.
  Many thanks to Jay Borkenhagen for remote hardware access.

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

12 years agoMFC r227431-227432,227505,227509:
yongari [Tue, 3 Jan 2012 23:36:29 +0000 (23:36 +0000)]
MFC r227431-227432,227505,227509:
r227431:
  style.
  No functional changes.

r227432:
  Remove dead ifdef.  Driver should always check raised interrupt is
  for the device.

r227505:
  It's bad idea to allocate large memory, 4KB, from stack.
  Pre-allocate the memory in device attach time. While I'm here
  remove unnecessary reassignment of error variable as it was already
  initialized. Also added a missing driver lock in TIIOCSETTRACE
  handler.

r227509:
  Export sysctl node for various interrupt moderation parameters and
  have administrators control them.  ti(4) provides a character
  device to control various other features of driver via ioctls but
  users had to write their own code to manipulate these parameters.
  It seems some default values for these parameters are not optimal
  on today's system but leave it as it was and let administrators
  change them.  The following parameters could be changed:

  dev.ti.%d.rx_coal_ticks
  dev.ti.%d.rx_max_coal_bds
  dev.ti.%d.tx_coal_ticks
  dev.ti.%d.tx_max_coal_bds
  dev.ti.%d.tx_buf_ratio
  dev.ti.%d.stat_ticks

  The interface has to be brought down and up again before a change
  takes effect.

  ti(4) controller supports hardware MAC counters with additional
  DMA statistics.  So it's doable to export these counters via
  sysctl interface.  Unfortunately, these counters are cumulative
  such that driver have to either send an explicit clear command to
  controller after extracting them or have to maintain internal
  counters to get actual changes.  Neither look good to me so
  counters were not exported via sysctl.

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

12 years agoMFC r227347,227367:
yongari [Tue, 3 Jan 2012 21:16:00 +0000 (21:16 +0000)]
MFC r227347,227367:
r227347:
  Retire 'options TI_PRIVATE_JUMBOS' and replace local jumbo
  allocator with UMA backed jumbo allocator by default. Previously
  ti(4) used sf_buf(9) interface for jumbo buffers but it was broken
  at this moment such that enabling jumbo frame caused instant panic.
  Due to the nature of sf_buf(9) it heavily relies on VM changes but
  it seems ti(4) was not received much blessing from VM gurus.  I
  don't understand VM magic and implications used in driver either.
  Switching to UMA backed jumbo allocator like other network drivers
  will make jumbo frame work on ti(4).
  While I'm here, fully allocate all RX buffers. This means ti(4) now
  uses 512 RX buffer and 1024 mini RX buffers.

  To use sf_buf(9) interface for jumbo buffers, introduce a new
  'options TI_SF_BUF_JUMBO'. If it is proven that sf_buf(9) is better
  for jumbo buffers, interesting developers can fix the issue in
  future.

  ti(4) still needs more bus_dma(9) cleanups and should use separate
  DMA tag/map for each ring(standard, jumbo, mini, command, event
  etc) but it should work on all platforms except PAE.

  Special thanks to Jay[1] who provided complete remote debugging
  access.

r227367:
  Comment out TI_JUMBO_HDRSPLIT. TI_JUMBO_HDRSPLIT requires TI_SF_BUF_JUMBO.

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

12 years agoMFC r228411:
trociny [Tue, 3 Jan 2012 20:53:16 +0000 (20:53 +0000)]
MFC r228411:

Include sys/queue.h: snmpmod.h uses TAILQ.

PR: bin/153153

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

12 years agoMFC r227311-227312,227318-227319,227322-227324:
yongari [Tue, 3 Jan 2012 20:48:28 +0000 (20:48 +0000)]
MFC r227311-227312,227318-227319,227322-227324:
r227311:
  Remove ti_unit member variable in softc.
  While I'm here use PCIR_BAR macro.

r227312:
   o Remove unnecessary controller reinitialization.
   o Do not blindly UP controller when MTU is changed. Reinitialize
     controller only if driver is running.
   o Remove useless ti_stop() in ti_watchdog() since ti_init_locked()
     always invokes ti_stop().

r227318:
  Track which ring was updated in RX handler and update only modified
  ring. This should reduce unnecessary register accesses.

r227319:
  Mini ring is not available on Tigon 1 so do not create DMA maps for
  mini ring on Tigon 1 to save resources.

r227322:
  Show RX buffer allocation failure and do not blindly send alive
  message to firmware. Probably the correct way for this error is to
  send a TI_CMD_CODE_STACK_DOWN message to firmware and let firmware
  handle the rest.

r227323:
  If ti_chipinit() fails in ti_stop(), ignore the error and release
  all allocated TX/RX buffer resources. If the interface is brought
  to up again after the error, we will leak allocated TX/RX buffers.

r227324:
  Do not allow changing MTU to be less than the minimum.

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

12 years agoMFC r227091-227095,227098-227099:
yongari [Tue, 3 Jan 2012 20:24:56 +0000 (20:24 +0000)]
MFC r227091-227095,227098-227099:
r227091:
  Make sure to unload loaded DMA area(descriptor, command, event ring).

r227092:
  Announce IFCAP_LINKSTATE capability and let network stack know link
  state changes.  Hide superfluous link up/down message under
  bootverbose since if_link_state_change(9) shows that information.
  While I'm here, change baudrate with the resolved speed of the
  established link instead of blindly setting it 1G. Unfortunately,
  it seems there is no way to differentiate 10/100Mbps from
  non-gigabit link so just assume we established a 100Mbps link if
  current link is not a gigabit link.

r227093:
  Introduce ti_ifmedia_upd_locked() to use in driver initialization
  and add missing driver lock for both ti_ifmedia_upd() and
  ti_ifmedia_sts().

r227094:
  Don't clear upper 4bits from VLAN tag information.  It's
  responsibility of vlan(4) to extract VLAN id from the tag
  information and vlan(4) correctly handles it.

r227095:
  Don't abuse if_hwassist and make sure enabling corresponding TX/RX
  checksum offloading and VLAN hardware tag insertion/stripping from
  the currently enabled hardware offloading capabilities.
  Previously if_hwassist, which was initialized to TX/RX checksum
  offloading, was blindly used to enable both TX and RX checksum
  offloading such that disabling either TX or RX checksum offloading
  was not possible.

  ti(4) controllers support TX/RX checksum offloading with VLAN
  tagging so announce TX/RX checksum offloading capability over VLAN
  to vlan(4).

  Make VLAN hardware tag insertion/stripping honors currently enabled
  interface capability instead of blindly enabling VLAN hardware
  tagging. This change allows disabling hardware support of VLAN tag.

  Because ti(4) supports VLAN oversized frames, make network stack
  know the capability by setting if_hdrlen.

  While I'm here, rewrite SIOCSIFCAP handler and make sure to
  reinitialize controller whenever TX/RX checksum offloading and VLAN
  hardware tagging option is changed.  The requirement of controller
  reinitialization comes from the limitation of Tigon I/II firmware.
  Tigon I/II firmware requires all related RCBs should be
  reinitialized whenever any of its hardware offloading capabilities
  change.

  vlan(4) is also notified whenever the parent interface's capability
  changes such that it can correctly handle TX/RX checksum offloading
  based on parent interface's enabled offloading capabilities.

  RX checksum offloading handler was changed to make upper stack use
  controller computed partial checksum value.  Previously, ti(4) just
  set the computed value for any frames(IPv4, IPv6) and the value was
  not used in upper stack because driver didn't set CSUM_DATA_VALID
  such that upper network stack had to recompute checksum of TCP/UDP
  packets. I have no idea how this was not noticed for a long time.
  With this change, upper network stack does not have to fully
  recompute the checksum such that calculating pseudo checksum based
  on partial checksum is sufficient to know whether received packet's
  checksum is correct or not. However, I don't know why ti(4) does
  not have controller compute pseudo checksum as controller has
  ability to do it. I'm just guessing enabling that feature could
  trigger a firmware bug or could be slower than computing it on host
  side so just leave it as it was.

  In order not to produce false positives, ti(4) now checks whether
  controller actually computed IP or TCP/UDP checksum by checking
  ti_flags field.

r227098:
  Because ti(4) drops a driver lock in RX handler, check whether
  driver is still running before re-enabling interrupts.

r227099:
  Implement altq(4) support.
  While I'm here fix a logic error in r227098 where it didn't
  re-enable interrupts when TX queue is empty.

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

12 years agoMFC r227086-227089:
yongari [Tue, 3 Jan 2012 18:58:20 +0000 (18:58 +0000)]
MFC r227086-227089:
r227086:
  Use ANSI function definations.

r227087:
  No functional changes.

r227088:
  Make ti(4) build with 'options TI_PRIVATE_JUMBOS'.
  This was broken in r175872.

  We have a UMA backed jumbo allocator and that is much better
  implementation than having a local jumbo buffer allocator in
  driver. This local allocator would be removed in near future but
  fixing build before removal wouldn't be a bad idea.

r227089:
  s/u_intXX_t/uintXX_t/g

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

12 years agoMFC r228438:
fabient [Tue, 3 Jan 2012 17:15:27 +0000 (17:15 +0000)]
MFC r228438:
There's a small set of events on Nehalem, that are not supported in
processors with CPUID signature 06_1AH, 06_1EH, and 06_1FH.

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

12 years agoMFC r228198:
fabient [Tue, 3 Jan 2012 16:41:38 +0000 (16:41 +0000)]
MFC r228198:
Update Westmere uncore event exception list.

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

12 years agoMFC r226514,r226526,r226986:
fabient [Tue, 3 Jan 2012 16:35:00 +0000 (16:35 +0000)]
MFC r226514,r226526,r226986:
Add a flush of the current PMC log buffer before displaying the next top.

As the underlying block is 4KB if the PMC throughput is low the measurement
will be reported on the next tick. pmcstat(8) use the modified flush API to
reclaim current buffer before displaying next top.

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

12 years agoMFC: r227690
rmacklem [Tue, 3 Jan 2012 16:32:33 +0000 (16:32 +0000)]
MFC: r227690
The old NFS client will crash due to the reply being m_freem()'d
twice if the server bogusly returns an error with the NFSERR_RETERR
bit (bit 31) set. No actual NFS error has this bit set, but it seems
that amd will sometimes do this. This patch makes sure the NFSERR_RETERR
bit is cleared to avoid a crash.

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

12 years agoMFC r225839:
mav [Tue, 3 Jan 2012 12:47:55 +0000 (12:47 +0000)]
MFC r225839:
Import the rest of HID improvements from the branch:
 - improve report descriptor parser in libusbhid to handle several kinds of
reports same time;
 - add to the libusbhid API two functions wrapping respective kernel IOCTLs
for reading and writing reports;
 - tune uhid IOCTL interface to allow reading and writing arbitrary report,
when multiple supported by the device;
 - teach usbhidctl to set output and feature reports;
 - make usbhidaction support all the same item names as bhidctl.

Sponsored by: iXsystems, inc.

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

12 years agoMFC r227530:
kib [Tue, 3 Jan 2012 10:36:38 +0000 (10:36 +0000)]
MFC r227530:
Update the device pager interface.

Sponsored by: The FreeBSD Foundation

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

12 years agoMFC r227102:
kib [Tue, 3 Jan 2012 10:30:27 +0000 (10:30 +0000)]
MFC r227102:
Provide typedefs for the type of bit mask for the page bits.
Use the defined types instead of int when manipulating masks.
Supposedly, it could fix support for 32KB page size in the
machine-independend VM layer.

MFC r227103:
Remove redundand definitions. The chunk was missed from r227102.

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

12 years agoMFC r226471 (se):
delphij [Tue, 3 Jan 2012 10:22:09 +0000 (10:22 +0000)]
MFC r226471 (se):

Add missing default values for daily/800.scrub-zfs for documentation
purposes. No functional change, since all parameters are set to their
default values.

MFC r226865 (delphij):

Increase default scrub threshold from 30 days to 5 weeks.  Using
whole weeks makes it easier to predicate when the scrub would
happen.

Requested by: gjb

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

12 years agoMFC r228307:
kib [Tue, 3 Jan 2012 10:02:44 +0000 (10:02 +0000)]
MFC r228307:
Force linker error when created shared library contains a relocation
against text. Provide the override switch to turn off the strict
behaviour. Apparently, openssl libcrypto needs it due to assembler
code not being PIC.

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

12 years agoMFC r228261:
kib [Tue, 3 Jan 2012 09:51:34 +0000 (09:51 +0000)]
MFC r228261:
Use explicit information from the kernel to detect the traps due to
syscall entry and leave.

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

12 years agoMFC r225974:
kib [Tue, 3 Jan 2012 09:46:51 +0000 (09:46 +0000)]
MFC r225974:
Remove no longer valid statement about ARM.

MFC r226066:
Remove no longer needed BUGS section.

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

12 years agoMFC r226112:
kib [Tue, 3 Jan 2012 09:43:26 +0000 (09:43 +0000)]
MFC r226112:
Remove unused define.

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

12 years agoMFC r226065:
kib [Tue, 3 Jan 2012 09:42:08 +0000 (09:42 +0000)]
MFC r226065:
Convert MIPS to the syscallenter/syscallret system call sequence handlers.

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

12 years agoMFC rr225973:
kib [Tue, 3 Jan 2012 09:40:31 +0000 (09:40 +0000)]
MFC rr225973:
Convert ARM to the syscallenter/syscallret system call sequence handlers.

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

12 years agoMFC r229104:
kib [Tue, 3 Jan 2012 09:27:23 +0000 (09:27 +0000)]
MFC r229104:
Make the comment in i386/include/ucontext.h identical to the one in
amd64/include/ucontext.h. The later is better worded.

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

12 years agoMFC r229317:
hselasky [Tue, 3 Jan 2012 08:31:47 +0000 (08:31 +0000)]
MFC r229317:
Fix for USB suspend and resume.

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