]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
11 years agoMFC 238457:
pfg [Tue, 21 Aug 2012 21:11:59 +0000 (21:11 +0000)]
MFC 238457:

1458 D compiler fails to generate error on sizeof() an undefined struct

Reference:
https://www.illumos.org/issues/1458

Obtained from: Illumos

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

11 years agoMFC r238558:
pfg [Tue, 21 Aug 2012 21:06:17 +0000 (21:06 +0000)]
MFC r238558:

Dtrace: improve handling of library paths.

Merge changes from illumos

906 dtrace depends_on pragma should search all library paths, not just the
current one

949 dtrace should only include the first instance of a library found on
its library path

Obtained from: Illumos

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

11 years agoMFC r238509:
pfg [Tue, 21 Aug 2012 21:01:24 +0000 (21:01 +0000)]
MFC     r238509:

Use libc's strndup() instead of Dtrace's reimplementation.

Corresponds partially to OpenSolaris change:
PSARC 2010/299 GNU/Linux/BSD compatibility functions
6901783 strndup would be nice.

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

11 years agoMFC r238673:
mav [Tue, 21 Aug 2012 11:43:01 +0000 (11:43 +0000)]
MFC r238673:
Use 16bit PIO instead of 32bit in case of misaligned buffer.
It fixes kernel panic during CD write with cdrecord on sparc64.

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

11 years agoMFC: r239089
marius [Tue, 21 Aug 2012 10:30:57 +0000 (10:30 +0000)]
MFC: r239089

- Merge from NetBSD:
  When issuing a non-DMA command, make sure to set the "remaining length of
  command to be transferred via DMA" (sc_cmdlen) to zero up-front, otherwise
  we might get confused on command competition interrupt (no DMA active but
  still data left to transfer).
- Implement handling of MSG_IGN_WIDE_RESIDUE which some targets produce, as
  just rejecting these leads to a resend and disconnect loop.
  Reported and tested by: mjacob

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

11 years agoMFC r239346:
lstewart [Tue, 21 Aug 2012 02:52:25 +0000 (02:52 +0000)]
MFC r239346:

The TCP PAWS fix for kernels with fast tick rates (r231767) changed the TCP
timestamp related stack variables to reference ms directly instead of ticks.
The h_ertt(4) Khelp module relies on TCP timestamp information in order to
calculate its enhanced RTT estimates, but was not updated as part of r231767.

Consequently, h_ertt has not been calculating correct RTT estimates since
r231767 was comitted, which in turn broke all delay-based congestion control
algorithms because they rely on the h_ertt RTT estimates.

Fix the breakage by switching h_ertt to use tcp_ts_getticks() in place of all
previous uses of the ticks variable. This ensures all timestamp related
variables in h_ertt use the same units as the TCP stack and therefore results in
meaningful comparisons and RTT estimate calculations.

Reported & tested by: Naeem Khademi (naeemk at ifi uio no)
Discussed with: bz

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

11 years agoMFC r227652, r228301, r234270, r234349
emaste [Tue, 21 Aug 2012 00:05:44 +0000 (00:05 +0000)]
MFC r227652, r228301, r234270, r234349

  Sync Bryan Venteicher's virtio base, PCI front-end, and net/block/balloon
  drivers from HEAD.

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

11 years agoMFC r232844: Remove extraneous log message
emaste [Mon, 20 Aug 2012 19:26:43 +0000 (19:26 +0000)]
MFC r232844: Remove extraneous log message

When ntp switched between PLL and FLL mode it produced a log message
"kernel time sync status change %04x".  This issue is reported in ntp
bug 452[1] which claims that this behaviour is normal and the log
message isn't necessary.  I'm not sure exactly when it was removed, but
it's gone in the latest ntp release (4.2.6p5).

[1] http://bugs.ntp.org/show_bug.cgi?id=452

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

11 years agoMFC r238631:
delphij [Mon, 20 Aug 2012 18:33:23 +0000 (18:33 +0000)]
MFC r238631:

Import an updated version of moduli(5) manual page from OpenBSD.

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

11 years agoMFC r239169:
delphij [Mon, 20 Aug 2012 18:26:16 +0000 (18:26 +0000)]
MFC r239169:

RFC 2289 requires all hashes be stored in little endian format before
folding to 64 bits, while SHA1 code is big endian.  Therefore, a bswap32
is required before using the value.

Without this change, the implementation does not conform to test vector
found in RFC 2289.

PR: bin/170519
Submitted by: Arthur Mesh <arthurmesh gmail com> (with changes)

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

11 years agoMFC r239084:
delphij [Mon, 20 Aug 2012 18:16:39 +0000 (18:16 +0000)]
MFC r239084:

Add PCI IDs for various new High Point RocketRAID 43xx and 3xxx devices.

Obtained from: FreeNAS

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

11 years agoMFC r239233:
wblock [Mon, 20 Aug 2012 16:38:58 +0000 (16:38 +0000)]
MFC r239233:

Correct description of minfree to kilobytes rather than blocks.

PR: 125921
Submitted by: Andre Albsmeier <Andre.Albsmeier@siemens.com>

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

11 years agoMRC r239021:
jimharris [Mon, 20 Aug 2012 16:13:16 +0000 (16:13 +0000)]
MRC r239021:

In virstor_ctl_stop(), check for a valid softc before trying to update
metadata.

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

11 years agoMFC r238718: Quirk MS keyboard so that function keys work
emaste [Mon, 20 Aug 2012 14:14:19 +0000 (14:14 +0000)]
MFC r238718: Quirk MS keyboard so that function keys work

The function keys on a Microsoft Natural Egronomic Keyboard 4000 have been
repurposed as "Help", "Undo", "Redo" etc., and a special "F Lock" key is
required to return them to their normal purpose.

This change enables the UQ_KBD_BOOTPROTO quirk for the MS Natural 4000
keyboard to get the keys working again.  More extensive changes to the USB
keyboard infrastructure would be needed to fully support the "F Lock" mode
and the extended keys on this keyboard.

PR:             usb/116947

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

11 years agoMFC r238853: Correct BUGS description of static buffer use
emaste [Mon, 20 Aug 2012 14:10:00 +0000 (14:10 +0000)]
MFC r238853: Correct BUGS description of static buffer use

  Since r142667 strerror has unconditionally returned a pointer to a
  static buffer.

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

11 years agoMFC r239216, r239217:
gjb [Mon, 20 Aug 2012 13:08:37 +0000 (13:08 +0000)]
MFC r239216, r239217:

r239216:
 - Remove a leading space that breaks rendering

r239217:
 - Fix source dataset snapshot name in Example 15.
 - Bump date.

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

11 years agoMFC r238969:
mav [Mon, 20 Aug 2012 12:11:09 +0000 (12:11 +0000)]
MFC r238969:
Fix kernel panic on `camcontrol reset` for specific target, caused by
uninitialized cm_targ in mpssas_action_resetdev().

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

11 years agoRegen for correct file headers after committing r239342.
obrien [Thu, 16 Aug 2012 23:59:29 +0000 (23:59 +0000)]
Regen for correct file headers after committing r239342.

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

11 years agoMF9: r237134
obrien [Thu, 16 Aug 2012 23:52:08 +0000 (23:52 +0000)]
MF9: r237134
   MFC r226342, r226343, r226347, r226348, r226349, r226353, r226388
   When building for amd64 or ia64, add the "kern.elf32.read_exec" sysctl
   to enable PROT_EXECUTE for elf32 binaries when reading is allowed.
   The JDK 1.4.x requires the ability to execute in the heap.

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

11 years agoMFC r239084:
delphij [Thu, 9 Aug 2012 20:27:11 +0000 (20:27 +0000)]
MFC r239084:

Add PCI IDs for various new High Point RocketRAID 43xx and 3xxx devices.

Obtained from: FreeNAS
MFC after: 3 days

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

11 years agoMFC r238997:
delphij [Thu, 9 Aug 2012 20:22:24 +0000 (20:22 +0000)]
MFC r238997:

Correct a typo.

Reported by: Sascha Wildner <swildner dragonflybsd org>
Reviewed by: scottl

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

11 years agoMFC r239052:
tuexen [Wed, 8 Aug 2012 20:08:45 +0000 (20:08 +0000)]
MFC r239052:
Fix a refcount issue. The called only decrements is stcb is NULL.

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

11 years agoMFC r239041:
tuexen [Wed, 8 Aug 2012 20:05:25 +0000 (20:05 +0000)]
MFC r239041:

Fix a bug reported by Simon L. B. Nielsen:
If an SCTP endpoint receives an ASCONF with a wildcard
lookup address and incorrect verification tag, the system
crashes.
This bug was found by Shaun Colley.

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

11 years agoMFC: r238933
fjoe [Fri, 3 Aug 2012 11:22:09 +0000 (11:22 +0000)]
MFC: r238933

- Change back "d_ofs" to int8_t to not pessimize padding and size of "struct puc_cfg"
- Use "puc_config_moxa" for Moxa boards that need d_ofs greater than 0x7f

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

11 years agoPull the tier-2 card and change the sparc64 ZFS loader to no longer probe
marius [Mon, 30 Jul 2012 11:29:05 +0000 (11:29 +0000)]
Pull the tier-2 card and change the sparc64 ZFS loader to no longer probe
all diskN aliases for providers (which more or less corresponds to how the
x86 version behaves) but instead probe only those listed in the boot-device
OFW environment variable. This has the following advantages:
- avoids otherwise unavoidable OFW warnings about failures to open disks
  for which aliases exist but no actual hardware is connected
- avoids issues due to different diskN naming schemes
- aligns us with Solaris

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

11 years agoMFC r238707:
gjb [Sun, 29 Jul 2012 18:52:18 +0000 (18:52 +0000)]
MFC r238707:
Document the following in rc.conf.5:
 - rtsold_enable
 - rtsold_flags
 - rtsol_flags

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

11 years agoMFC: r238393
brueffer [Thu, 26 Jul 2012 09:27:00 +0000 (09:27 +0000)]
MFC: r238393

Add and utilize defines for the ATA device register.

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

11 years agoMFC: r227457, r237350, r237357
fjoe [Wed, 25 Jul 2012 17:42:57 +0000 (17:42 +0000)]
MFC: r227457, r237350, r237357

Add support for the following Moxa PCIe multiport serial boards:
- CP102E
- CP102EL
- CP104EL-A
- CP104JU
- CP114EL
- CP118EL-A
- CP168EL-A

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

11 years agoMFC r238705:
wblock [Wed, 25 Jul 2012 13:11:36 +0000 (13:11 +0000)]
MFC r238705:

Correct ugen.4 to show that it has been integrated into usb(4).  Also
fix some punctuation errors.

Approved by: hps

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

11 years agoMFC: r238574
brueffer [Wed, 25 Jul 2012 12:06:52 +0000 (12:06 +0000)]
MFC: r238574

Fix a small memory leak in mpssas_get_sata_identify().  The change has
been submitted upstream as well.

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

11 years agoUse target thread's scheduling policy not current's.
davidxu [Wed, 25 Jul 2012 02:09:06 +0000 (02:09 +0000)]
Use target thread's scheduling policy not current's.

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

11 years agoRelease a reference count in case priority needn't
davidxu [Wed, 25 Jul 2012 02:05:59 +0000 (02:05 +0000)]
Release a reference count in case priority needn't
to be changed.

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

11 years agoRevert r238715, the revision breaks firefox.
davidxu [Wed, 25 Jul 2012 01:57:53 +0000 (01:57 +0000)]
Revert r238715, the revision breaks firefox.

Reported by: dougb

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

11 years agoMFC r227317, r227355:
trociny [Tue, 24 Jul 2012 19:11:50 +0000 (19:11 +0000)]
MFC r227317, r227355:

When displaying process virtual memory mappings print superpage
mapping flag.

Submitted by: Mel Flynn <mel.flynn+fbsd.hackers@mailing.thruhere.net>
Reviewed by: alc, rwatson

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

11 years agoMFC r227316:
trociny [Tue, 24 Jul 2012 19:10:43 +0000 (19:10 +0000)]
MFC r227316:

Add KVME_FLAG_SUPER and use it in sysctl_kern_proc_vmmap for marking
entries with superpages.

Submitted by: Mel Flynn <mel.flynn+fbsd.hackers@mailing.thruhere.net>
Reviewed by: alc, rwatson

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

11 years agoHeavy DNSSEC Validation Load Can Cause a "Bad Cache" Assertion Failure
dougb [Tue, 24 Jul 2012 19:04:35 +0000 (19:04 +0000)]
Heavy DNSSEC Validation Load Can Cause a "Bad Cache" Assertion Failure
in BIND9

High numbers of queries with DNSSEC validation enabled can cause an
assertion failure in named, caused by using a "bad cache" data structure
before it has been initialized.

CVE: CVE-2012-3817
Posting date: 24 July, 2012

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

11 years agoMFC r230454:
eadler [Tue, 24 Jul 2012 03:47:49 +0000 (03:47 +0000)]
MFC r230454:

Use provided name when allocating ksid domain. It isn't really used on FreeBSD, but should fix a panic when pool is imported from another OS that is using this.

Requested by: nox
No objections: pjd
Approved by: cperciva (implicit)

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

11 years agoMFC r238666:
mav [Mon, 23 Jul 2012 15:20:52 +0000 (15:20 +0000)]
MFC r238666:
Fix typo in bzero() length argument during sense fetching.
For me it at least fixed CD burning in PIO mode.

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

11 years agoMerge r238637,r238640,r238641,r238642:
davidxu [Mon, 23 Jul 2012 09:34:19 +0000 (09:34 +0000)]
Merge r238637,r238640,r238641,r238642:

------------------------------------------------------------------------
r238637 | davidxu | 2012-07-20 09:56:14 +0800 (Fri, 20 Jul 2012) | 6 lines

Don't forget to release a thread reference count,
replace _thr_ref_add() with _thr_find_thread(),
so reference count is no longer needed.

------------------------------------------------------------------------
r238640 | davidxu | 2012-07-20 11:00:41 +0800 (Fri, 20 Jul 2012) | 2 lines

Eliminate duplicated code.

------------------------------------------------------------------------
r238641 | davidxu | 2012-07-20 11:16:52 +0800 (Fri, 20 Jul 2012) | 2 lines

Eliminate duplicated code.

------------------------------------------------------------------------
r238642 | davidxu | 2012-07-20 11:22:17 +0800 (Fri, 20 Jul 2012) | 2 lines

Don't assign same value.

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

11 years agoMerge r234032 from head to stable/8:
rwatson [Sun, 22 Jul 2012 16:56:59 +0000 (16:56 +0000)]
Merge r234032 from head to stable/8:

  When allocation of labels on files is implicitly disabled due to MAC
  policy configuration, avoid leaking resources following failed calls
  to get and set MAC labels by file descriptor.

  Reported by:    Mateusz Guzik <mjguzik at gmail.com> + clang scan-build

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

11 years agoMFC: r238621
marius [Sun, 22 Jul 2012 14:33:04 +0000 (14:33 +0000)]
MFC: r238621

Revert the use of BUS_DMA_ALLOCNOW when creating the DMA tag for user
data introduced in r236061 (MFC'ed to stable/8 in r237187). Using that
flag doesn't make that much sense on this case as the DMA maps using
it are also created during sym_pci_attach(). Moreover, due to the
maxsegsz parameter used, doing so may exhaust the bounce pages pool
on architectures requiring bounce pages. [1]
While at it, use a slightly more appropriate maxsegsz parameter.

PR: 169526
Submitted by: Mike Watters [1]

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

11 years agoMerge r234034 from head to stable/8:
rwatson [Sun, 22 Jul 2012 12:09:42 +0000 (12:09 +0000)]
Merge r234034 from head to stable/8:

  Merge a local fix to OpenBSM's libauditd to avoid a directory descriptor
  leak when iterating over possible audit trail directories.  This fix will
  be merged upstream in an identical form, but hasn't yet appeared in an
  OpenBSM release.

  Submitted by:   guido
  Obtained from:  TrustedBSD Project

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

11 years agoMFC r238063:
issyl0 [Sun, 22 Jul 2012 11:22:04 +0000 (11:22 +0000)]
MFC r238063:
 - Make ipfw's sched rules case insensitive, for user-friendliness.
 - Add a note to the ipfw(8) man page about the rules no longer being
 case sensitive.
 - Fix some typos in the man page.

PR: docs/164772
Reviewed by: bz
Approved by: gavin

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

11 years agoMFC r238617:
kib [Sun, 22 Jul 2012 10:21:42 +0000 (10:21 +0000)]
MFC r238617:
Fix several reads beyond the mapped first page of the binary in the
ELF parser. Specifically, do not allow note reader and interpreter
path comparision in the brandelf code to read past end of the page.
This may happen if specially crafter ELF image is activated.

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

11 years agoMFC 233362:
pfg [Sat, 21 Jul 2012 19:46:14 +0000 (19:46 +0000)]
MFC 233362:

Don't cast a bus address to a uint8_t pointer just to add an offset to
it.  Instead, add the offset directly to the bus address.

This permits linking emu10k to an i386 PAE kernel.

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

11 years agoMFC r231257, r238606:
gjb [Sat, 21 Jul 2012 01:13:45 +0000 (01:13 +0000)]
MFC r231257, r238606:

r231257 (kevlo):
Mention run(4)

r238606:
Xref mwl(4) and rum(4) in hostapd(8).

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

11 years agoFix XEN build after r238658.
mav [Fri, 20 Jul 2012 21:09:36 +0000 (21:09 +0000)]
Fix XEN build after r238658.

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

11 years agoPartially MFC r212541:
mav [Fri, 20 Jul 2012 19:35:20 +0000 (19:35 +0000)]
Partially MFC r212541:
Refactor cpu_idle() on x86.
Use MONITOR/MWAIT instrunctions (if supported) under high sleep/wakeup rate,
as fast alternative to other methods.  It allows SMP scheduler to wake up
sleeping CPUs much faster without using IPI, significantly increasing
performance on some highly task-switching loads.  Also on such loads it
hides two ACPI timer reads, otherwise done by acpi_cpu_idle(), that are
reported to be slow on some systems.

MFC r225936 (by attilio):
Add some improvements in the idle table callbacks:
- Replace instances of manual assembly instruction "hlt" call
  with halt() function calling.
- In cpu_idle_mwait() avoid races in check to sched_runnable() using
  the same pattern used in cpu_idle_hlt() with the 'hlt' instruction.
- Add comments explaining the logic behind the pattern used in
  cpu_idle_hlt() and other idle callbacks.

PR: kern/170021

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

11 years agoMFC r223788, r223790, r223824 236808
melifaro [Thu, 19 Jul 2012 13:00:31 +0000 (13:00 +0000)]
MFC r223788, r223790, r223824 236808

Merge netflow v9 support (user side)

r223788 -  Rewrite the flowctl utility to add it support for displaying both IPv4 and IPv4 flows.
r223790 -  Update manual page. Mention IPv6 support, ..
r223824 - Conditionally compile in the IPv4/IPv6 address family support.
r236808 - Add "human" option to print IPv4/IPv6 flows in human-readable format.

Additionally, implement compatibility code for syntax changes introduced in r223788.
Flowctl supports specifying node both as absolute path (new style) and as node
name without colon (old style).

No objection from:  glebius
Approved by:        ae(mentor)

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

11 years agoMFC r219182, r219229, r220769, r223706, r223787, r223822, r232921, r237162, r237163...
melifaro [Thu, 19 Jul 2012 11:43:31 +0000 (11:43 +0000)]
MFC r219182, r219229, r220769, r223706, r223787, r223822, r232921, r237162, r237163, r237164, r237226, r237227

Merge netflow v9 support (kernel side)

r219182 - Add support for NetFlow version 9 into ng_netflow(4) node.
r219229 - Unbreak the build for no options INET6.
r220769 - ng_netflow_cache_init() can be void.
r223706 - Fix double free.
r223787 - Eliminate flow6_hash_entry in favor of flow_hash_entry
r223822 - Add missing unlocks.
r232921 - Use rt_numfibs variable instead of compile-time RT_NUMFIBS.
r237162 - Fix improper L4 header handling for IPv6 packets passed via DLT_RAW.
r237163 - Set netflow v9 observation domain value to fib number instead of node id
r237164 - Use time_uptime instead of getnanotime for accouting integer number of seconds.
r237226 - Simplify IP pointer recovery in case of mbuf reallocation.
r237227 - Make radix lookup on src and dst flow addresses optional

No objection from:  glebius
Approved by:        ae(mentor)

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

11 years agoMFC r213705:
hselasky [Thu, 19 Jul 2012 10:28:29 +0000 (10:28 +0000)]
MFC r213705:
Add the XHCI USB controller to NOTES.

Suggested by: dougb @

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

11 years agoMFC: r238363
brueffer [Wed, 18 Jul 2012 11:36:59 +0000 (11:36 +0000)]
MFC: r238363

- fix description of SECURITY_FREEZE_LOCK
- add missing underscores to SECURITY_DISABLE_PASSWORD

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

11 years agoMFC: r238486
brueffer [Wed, 18 Jul 2012 10:45:38 +0000 (10:45 +0000)]
MFC: r238486

Fix typo in a message.

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

11 years agoMFC r237203,r237223 (by phk):
kib [Tue, 17 Jul 2012 19:14:12 +0000 (19:14 +0000)]
MFC r237203,r237223 (by phk):
Fix writes to the video memory of the VGA to always use half-word sized
writes.

Approved by:    phk

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

11 years agoMFC the following revisions per request from gleb@:
delphij [Tue, 17 Jul 2012 17:34:48 +0000 (17:34 +0000)]
MFC the following revisions per request from gleb@:

r197953: Add locking around access to parent node, and bail out when
the parent node is already freed rather than panicking the system.

r227822: Avoid panics from recursive rename operations. Not a perfect
patch but good enough for now.

r232959: Don't enforce LK_RETRY to get existing vnode in
tmpfs_alloc_vp().

Doomed vnode is hardly of any use here, besides all callers handle error
case. vfs_hash_get() does the same.

Don't mess with vnode holdcount, vget() takes care of it already.

r232960: Prevent tmpfs_rename() deadlock in a way similar to UFS

Unlock vnodes and try to lock them one by one. Relookup fvp and tvp.

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

11 years agoMFC r238328:
davidxu [Tue, 17 Jul 2012 02:02:40 +0000 (02:02 +0000)]
MFC r238328:

Executing CPUID with EAX set to 1 to actually get feature flags.
PR: 169730

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

11 years agoMFC r238281:
ae [Mon, 16 Jul 2012 08:17:30 +0000 (08:17 +0000)]
MFC r238281:
  We don't need to check the result of sending signal when R flag is
  specified.

  Submitted by: Ilya A. Arkhipov

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

11 years agoMFC r237479, r238265
melifaro [Mon, 16 Jul 2012 06:56:46 +0000 (06:56 +0000)]
MFC r237479, r238265

Finally fix lookup (account remaining '\0') and deletion
(provide valid key length for radix lookup).

Submitted by:    Ihor Kaharlichenko<madkinder at gmail.com>  (prev version)
Approved by:     kib(mentor)
Sponsored by:    Shtorm ISP

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

11 years agoMFC r238168,238169: further dtrace disassembler fixes for long nop decoding
avg [Sun, 15 Jul 2012 20:40:10 +0000 (20:40 +0000)]
MFC r238168,238169: further dtrace disassembler fixes for long nop decoding

- segment-override prefixes are not invalid in long mode
- fix nopw (0f 1f) behavior with respect to modifiers

Reported by: emaste
Tested by: emaste
Obtained from: Illumos commit 13442:4adbe6de60c8

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

11 years agoMFC r238248:
bz [Sun, 15 Jul 2012 18:20:09 +0000 (18:20 +0000)]
MFC r238248:

 Implement handling of "atomic fragements" as outlined in
 draft-gont-6man-ipv6-atomic-fragments to mitigate one class of
 possible fragmentation-based attacks.

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

11 years agoMFC r238222:
bz [Sun, 15 Jul 2012 18:14:04 +0000 (18:14 +0000)]
MFC r238222:

 As mentioned in the commit message of r237571 (copied from a prototype
 patch of mine) also check if the 2nd in6_setscope() failed and return
 the error in that case.

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

11 years agoMFC: r234577
brueffer [Sun, 15 Jul 2012 11:28:03 +0000 (11:28 +0000)]
MFC: r234577

Remove duplicate -l description.

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

11 years agoMFC: r237921
brueffer [Sun, 15 Jul 2012 11:04:35 +0000 (11:04 +0000)]
MFC: r237921

Similar to all.log, mention that /var/log/console.log has to be created
and chmod'ed to make logging work.

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

11 years agoMFC r238173:
pfg [Mon, 9 Jul 2012 15:31:05 +0000 (15:31 +0000)]
MFC r238173:

Fix issue resizing bin/sh

This partially reverts some changes from r237448 that are causing
breakage when resizing under bin/sh .

Reverted changes from NetBSD are:

Mar 10 20:46:15 2009 - editline.3 read.c
make el_gets set the count to -1 on error to distinguish between EOF and
error.

Feb 19 15:20:22 2009 - read.c sig.c sig.h
reset and redraw on sigcont. From Anon Ymous.

Feb 15 21:24:13 2009
don't restart on EINTR, instead return NULL immediately. From Anon Ymous

Approved by: re

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

11 years agoMFC r237988:
kib [Mon, 9 Jul 2012 10:36:43 +0000 (10:36 +0000)]
MFC r237988:
Issue proper diagnostic on the short writes, also consider the
case of write reporting 0 bytes as short write.

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

11 years agoMFC r238083:
trociny [Sun, 8 Jul 2012 19:31:37 +0000 (19:31 +0000)]
MFC r238083:

Fix RTTVAR scale in net.inet.tcp.hostcache.list sysctl.

Reviewed by: andre

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

11 years agoMFC r237581:
bjk [Fri, 6 Jul 2012 03:44:40 +0000 (03:44 +0000)]
MFC r237581:
  Explicitly mention that setting the change and expiry times to zero is
  equivalent to leaving the time unset. [1]

  Wordsmith in the compat support section.

  Use a full path to nologin(8) in the context of setting it as a user's shell,
  keeping a separate cross-reference.

PR: docs/169354 [1]
Approved by: hrs (mentor)

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

11 years agoMFC r238022:
mav [Thu, 5 Jul 2012 15:40:41 +0000 (15:40 +0000)]
MFC r238022:
Remove 14 not very useful characters " HDA CODEC PCM" from HDA pcm
device names to shorten them. PulseAudio reported to have problems with
names longer then 63 chars and at least in XMMS long names are inconvinient.

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

11 years agoMFC r238015:
mav [Thu, 5 Jul 2012 15:37:17 +0000 (15:37 +0000)]
MFC r238015:
Add IDs for some USB controllers I have around. Just a cosmetics.

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

11 years agoMFC r238011:
mav [Thu, 5 Jul 2012 15:34:04 +0000 (15:34 +0000)]
MFC r238011:
Restore GPIO config quirks handling, lost during last big refactoring.
This fixes sound from speakers on some laptops, including MacBook Pro.

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

11 years agoMFC r238008:
wblock [Tue, 3 Jul 2012 15:53:47 +0000 (15:53 +0000)]
MFC r238008:

Add reference to portsnap(8).

Submitted by: Tim Kientzle

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

11 years agoMFC 237878:
ken [Tue, 3 Jul 2012 15:39:00 +0000 (15:39 +0000)]
MFC 237878:

  r237878 | ken | 2012-06-30 23:32:26 -0600 (Sat, 30 Jun 2012) | 6 lines

  Now that the mps(4) driver is endian-safe, add it to the powerpc 32-bit
  GENERIC config file.

Requested by: nwhitehorn

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

11 years agoMFC r237848:
kib [Tue, 3 Jul 2012 09:11:47 +0000 (09:11 +0000)]
MFC r237848:
Remove stray blank line.

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

11 years agoMFC 237847:
kib [Tue, 3 Jul 2012 08:47:06 +0000 (08:47 +0000)]
MFC 237847:
Do not test ki_stat as mask.

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

11 years agoMFC r237844, r237845, r237846:
kib [Tue, 3 Jul 2012 08:46:26 +0000 (08:46 +0000)]
MFC r237844, r237845, r237846:
Minor tweaks.

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

11 years agoMFC r237852
thompsa [Tue, 3 Jul 2012 01:45:38 +0000 (01:45 +0000)]
MFC r237852

 Add the same check as vlan(4) where we ignore the ifnet departure event if the
 interface is just being renamed.

PR: kern/169557

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

11 years agoMFC r238038:
dougb [Mon, 2 Jul 2012 22:18:49 +0000 (22:18 +0000)]
MFC r238038:

Unfortunately the change in r237958 resulted in s/install/instclean/ due to
the aggressive pattern matching of the :C modifier. I tested build and
install in 2 phases, however with different solutions, resulting in the
breakage. Mea culpa.

The solution is to break out the all: target. This causes a few lines of
code duplication, but now the all: target works as it should, and the
other targets continue to work as they did before.

While I'm here, add a ===> header line to the start of each port build
to make it easier to find/more clear in the logs.

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

11 years agoMFC r237245, r237250, r237251, r237273, r237330
sbruno [Mon, 2 Jul 2012 22:01:29 +0000 (22:01 +0000)]
MFC r237245, r237250, r237251, r237273, r237330

Document support for Intel Enhanced Speedstep Tech interface
of cpufreq(4) via a new man page est(4)

Document the two exposed tuneables of est(4).

Numerous cleanups and mdoc updates from reviewers. Thanks to mav, joel,
wblock, hrs, gjb

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

11 years agoMFC r217322. Original commit log:
mdf [Mon, 2 Jul 2012 20:36:54 +0000 (20:36 +0000)]
MFC r217322.  Original commit log:

sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly.
Commit the net* piece.

The commit to HEAD was a superset of the proposed patch for PR
kern/167357.

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

11 years agoMFC: r237547
marius [Mon, 2 Jul 2012 20:07:09 +0000 (20:07 +0000)]
MFC: r237547

Fix size of the bcopy when extracting ethernet address

Obtained from: DragonFly

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

11 years agoMFC: r237546
marius [Mon, 2 Jul 2012 19:19:21 +0000 (19:19 +0000)]
MFC: r237546

Correct sizeof usage

Obtained from: DragonFly

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

11 years agoMFC: r237657, r237658, r237666
jkim [Mon, 2 Jul 2012 16:14:35 +0000 (16:14 +0000)]
MFC: r237657, r237658, r237666

Merge OpenSSL 0.9.8x and regen manual pages.

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

11 years agoMFC r237748: dtrace instruction decoder: add 0x0f 0x1f NOP opcode support
avg [Mon, 2 Jul 2012 08:09:07 +0000 (08:09 +0000)]
MFC r237748: dtrace instruction decoder: add 0x0f 0x1f NOP opcode support

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

11 years agoMFC: r233648 (by eadler), r237836
brueffer [Mon, 2 Jul 2012 06:58:10 +0000 (06:58 +0000)]
MFC: r233648 (by eadler), r237836

Remove trailing whitespace per mdoc lint warning

mps(4) is endian safe as of r237877.

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

11 years agoMFC r237958:
dougb [Mon, 2 Jul 2012 06:52:07 +0000 (06:52 +0000)]
MFC r237958:

For the ports modules building code, clean WRKDIR before building. This is
important for those that use -DNO_CLEAN routinely, since it will prevent
installing stale stuff, and even more important when the port is upgraded
to a newer version. When the user doesn't use -DNO_CLEAN, this will create
an infinitesimal amount of extra work, but won't hurt anything.

This is necessary because the ports tree has flags that prevent the ususal
'update the build if newer source files exist' logic from doing what it
would do in the base.

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

11 years agoMFC r236247 (pjd):
mm [Mon, 2 Jul 2012 06:39:21 +0000 (06:39 +0000)]
MFC r236247 (pjd):
Remove unused sysctl.

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

11 years agoMFC 237800:
ken [Mon, 2 Jul 2012 02:57:52 +0000 (02:57 +0000)]
MFC 237800:
  r237800 | ken | 2012-06-29 11:00:52 -0600 (Fri, 29 Jun 2012) | 7 lines

  Change the mps(4) driver to only scan a target if that is what is
  needed instead of scanning the full bus every time.

Submitted by: mav
Discussed with: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>

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

11 years agoMFC r237571:
delphij [Mon, 2 Jul 2012 02:54:22 +0000 (02:54 +0000)]
MFC r237571:

Fix a LOR acquiring the if_afdata lock while holding an rtentry lock.
Possibly do some entra work in case we would not get into the
ifa0 != NULL paths later as we already do for the mltaddr before.

XXX We should possibly error in case in6_setscope fails.

Reference: http://lists.freebsd.org/pipermail/freebsd-net/2011-September/029829.html

Submitted by: bz

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

11 years agoMFC 237730:
ken [Mon, 2 Jul 2012 02:45:33 +0000 (02:45 +0000)]
MFC 237730:

This only includes the sparc64 GENERIC, since the powerpc GENERIC64 config
file isn't in stable/8.

  r237730 | ken | 2012-06-28 14:48:24 -0600 (Thu, 28 Jun 2012) | 5 lines

  Now that the mps(4) driver is endian-safe, add it to the powerpc and
  sparc64 GENERIC config files.

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

11 years agoMFC 237682:
ken [Sun, 1 Jul 2012 05:40:33 +0000 (05:40 +0000)]
MFC 237682:

  r237682 | ken | 2012-06-27 21:36:13 -0600 (Wed, 27 Jun 2012) | 6 lines

  Fix a typo in a panic() call.

PR: kern/169497
Submitted by: Steven Hartland <steven.hartland@multiplay.co.uk>

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

11 years agoMFC 237683:
ken [Sun, 1 Jul 2012 05:23:59 +0000 (05:23 +0000)]
MFC 237683:

  r237683 | ken | 2012-06-27 21:48:54 -0600 (Wed, 27 Jun 2012) | 129 lines

  Bring in LSI's latest mps(4) 6Gb SAS and WarpDrive driver, version
  14.00.00.01-fbsd.

  Their description of the changes is as follows:

  1. Copyright contents has been changed in all respective .c
   and .h files

  2. Support for WRITE12 and READ12 for direct-io (warpdrive only)
   has been added.

  3.      Driver has added checks to see if Drive has READ_CAP_16
   support before sending it down to the device.
   If SPC3_SID_PROTECT flag is set in the inquiry data, the
   device supports protection information, and must support
   the 16 byte read capacity command, otherwise continue without
   sending read cap 16. This will optimize driver performance,
   since it will not send READ_CAP_16 to the drive which does
   not have support of READ_CAP_16.

  4.      With new approach, "MPTIOCTL_RESET_ADAPTER" IOCTL will not
   use DELAY() which is busy loop implementation.
   It will use <msleep> (Better way to sleep without busy
   loop). Also from the HBA reset code path and some other
   places, DELAY() is replaced with msleep() or "pause()",
   which is based on sleep/wakeup style calls.  Driver use
   msleep()/pause() instead of DELAY based on CAN_SLEEP/NO_SLEEP
   flags to avoid busy loop which is not required all the
   time.e.a

   a. While driver is getting loaded, driver calls most of the
      commands with NO_SLEEP.
   b. When Driver is functional and it needs Reinit of HBA,
      CAN_SLEEP flag is used.

  5. <mpslsi> driver is not Endian safe. It will not work on Big
   Endian machines like Sparc and PowerPC platforms because it
   assumes it is running on a Little Endian machine.

   Driver code is modified such way that it does not assume CPU
   arch is Little Endian.
   a. All places where Driver interacts from HBA to Host, it
      converts Little Endian format to CPU format.
   b. All places where Driver interacts from Host to HBA, it
      converts CPU format to Little Endian.

  6. Findout memory leaks in FreeBSD Driver and resolve those,
   such as memory leak in targ's luns creation/deletion.
   Also added additional checks to see memory allocation
   success/fail.

  7. Add loginfo prints as debug message, i.e. When FW sends any
   loginfo, Driver should print those as debug message.
   This will help for debugging purpose.

  8. There is possibility to get config request timeout. Current
   driver is able to detect config request timetout, but it does
   not do anything on config_request timeout.  Driver should
   call mps_reinit() if any request_poll (which is called as
   part of config_request) is time out.

  9. cdb length check is required for 32 byte CDB. Add correct mpi
   control value for 32 bit CDB as below while submitting SCSI IO
   Request to controller.
   mpi_control |= 4 << MPI2_SCSIIO_CONTROL_ADDCDBLEN_SHIFT;

  10. Check the actual status of Message unit reset
   (mps_message_unit_reset).Previously FreeBSD Driver just writes
   MPI2_FUNCTION_IOC_MESSAGE_UNIT_RESET and never check the ack
   (it just wait for 50 millisecond).  So, Driver now check the
   status of "MPI2_FUNCTION_IOC_MESSAGE_UNIT_RESET" after writing
   it to the FW.

   Now it also checking for whether doorbell ack uses msleep with
   proper sleep flags, instead of <DELAY>.

  11. Previously CAM does not detect Multi-Lun Devices. In order to
   detect Multi-Lun Devices by CAM the driver needs following change
   set:
   a. There is "max_lun" field which Driver need to set based on
      hw/fw support. Currently LSI released driver does not set
      this field.
   b. Default of "max_lun" should not be 0 in OS, but it is
      currently set to 0 in CAM layer.
   c. Export max_lun capacity to 255

  12. Driver will not reset target info after port enable complete and
   also do Device removal when Device remove from FW.  The detail
   description is as follows
   a. When Driver receive WD PD add events, it will add all
      information in driver local data structure.
   b. Only for WD, we have below checks after port enable
      completes, where driver clear off all information retrieved
      at #1.
   if ((sc->WD_available &&
               (sc->WD_hide_expose == MPS_WD_HIDE_ALWAYS)) ||
               (sc->WD_valid_config && (sc->WD_hide_expose ==
                              MPS_WD_HIDE_IF_VOLUME)) {
     // clear off target data structure.
   }
   It is mainly not to attach PDs to OS.

   FreeBSD does bus rescan as older Parallel scsi style. So Driver
   needs to handle which Drive is visible to OS.  That is a reason
   we have to clear off targ information for PDs.

   Again, above logic was implemented long time ago. Similar concept
   we have for non-wd also. For that, LSI have introduced different
   logic to hide PDs.

   Eventually, because of above gap, when Phy goes offline, we
   observe below failure. That is what Driver is not doing complete
   removal of device with FW. (which was pointed by Scott)
   Apr  5 02:39:24 Freebsd7 kernel: mpslsi0: mpssas_prepare_remove
   Apr  5 02:39:24 Freebsd7 kernel: mpssas_prepare_remove 497 : invalid handle 0xe

   Now Driver will not reset target info after port enable complete
   and also will do Device removal when Device remove from FW.

  13. Returning "CAM_SEL_TIMEOUT" instead of "CAM_TID_INVALID"
   error code on request to the Target IDs that have no devices
   conected at that moment.  As if "CAM_TID_INVALID" error code
   is returned to the CAM Layaer then it results in a huge chain
   of errors in verbose kernel messages on boot and every
   hot-plug event.

Submitted by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>

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

11 years agoMFC r237624, r237714, r237716, r237860:
pfg [Sun, 1 Jul 2012 04:26:51 +0000 (04:26 +0000)]
MFC r237624, r237714, r237716, r237860:

Bring llquantize support into Dtrace.

Bryan Cantrill implemented the equivalent of semi-log graph
paper for Dtrace so llquantize will use one logarithmic and
one linear scale.

Illumos Revision: 13355:15b74a2a9a9d

Reference:
https://www.illumos/issues/905

Obtained from: Illumos

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

11 years agoMFC r237178:
eadler [Sun, 1 Jul 2012 00:40:37 +0000 (00:40 +0000)]
MFC r237178:
attach_generic causes missing devices in /dev when the driver interacts with some non-highpoint controollers. Change attach_generic to be off by default.

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

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

11 years agoMerge r237645 from head:
gavin [Sat, 30 Jun 2012 20:25:50 +0000 (20:25 +0000)]
Merge r237645 from head:

  The -S option, to specify the sector size, has been usable on all types
  of memory disks since r135340.  Update the man page to reflect this.

Noticed by: avg

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

11 years agoMFC r237674
thompsa [Sat, 30 Jun 2012 18:58:21 +0000 (18:58 +0000)]
MFC r237674

 Update the usage with the new jail option.

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

11 years agoMFC r236503: free wdog_kern_pat calls in post-panic paths from under
avg [Sat, 30 Jun 2012 14:18:04 +0000 (14:18 +0000)]
MFC r236503: free wdog_kern_pat calls in post-panic paths from under
SW_WATCHDOG

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

11 years agoMFC r236504: cpucontrol: use CPUCTL_UPDATE ioctl on correct file
avg [Sat, 30 Jun 2012 14:06:17 +0000 (14:06 +0000)]
MFC r236504: cpucontrol: use CPUCTL_UPDATE ioctl on correct file
descriptor (in amd case)

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

11 years agoMFC 235024,235029,235556,235834,235845:
jhb [Fri, 29 Jun 2012 21:25:24 +0000 (21:25 +0000)]
MFC 235024,235029,235556,235834,235845:
Use MADT to match ACPI Processor objects to CPUs.  MADT and DSDT/SSDTs may
list CPUs in different orders, especially for disabled logical cores.  Now
we match ACPI IDs from the MADT with Processor objects, strictly order CPUs
accordingly, and ignore disabled cores.  This prevents us from executing
methods for other CPUs, e. g., _PSS for disabled logical core, which may not
exist.  Unfortunately, it is known that there are a few systems with buggy
BIOSes that do not have unique ACPI IDs for MADT and Processor objects.  To
work around these problems, 'debug.acpi.cpu_unordered' tunable is added.
Set this to a non-zero value to restore the old behavior.

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

11 years agoMFC: r236581
marius [Fri, 29 Jun 2012 18:39:31 +0000 (18:39 +0000)]
MFC: r236581

The loaddev environment variable is not modifiable once set, so it is not
update for ZFS. It seems that this does not really affect anything except
the help command. Nevertheless, rearrange things so loaddev is set only
once in all cases in order to get it right.
Pointed out by: avg

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

11 years agoMFC 237337:
jhb [Fri, 29 Jun 2012 17:28:58 +0000 (17:28 +0000)]
MFC 237337:
Only output a list of file systems that need to be dumped if the system
has a non-empty dumpdates file.

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