]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
10 years agoMFC: r265097
brooks [Tue, 6 May 2014 15:38:44 +0000 (15:38 +0000)]
MFC: r265097

Merge from CheriBSD:

commit 1d1b908107255ffdff4d17f015d8f057d73cc6cb
Author: Brooks Davis <brooks@one-eyed-alien.net>
Date:   Fri Mar 28 16:24:45 2014 +0000

    Add a long needed seatbelt.

    Exit with an error when make is called without a target at the top level
    rather than poluting the source tree and causing use confusion in future
    builds.

commit a9d9aa341b2f4308a227ab460ba85f1f287ad028
Author: Brooks Davis <brooks@one-eyed-alien.net>
Date:   Tue Apr 29 16:06:12 2014 +0000

    Simplify seatbelt added in 1d1b908 based in feedback.

    Discussed with:     imp@FreeBSD.org

Reviewed by: imp
Sponsored by: DARPA, AFRL

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

10 years agoMFC r265102:
kib [Tue, 6 May 2014 12:39:23 +0000 (12:39 +0000)]
MFC r265102:
Fix one cases of recursive acquisitions of the vm object lock, only
possible in rare failure situations.  The second part of r265102 is
not applicable to stable/9 since vm_page_insert() cannot fail there.

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

10 years agoMFC r265100:
kib [Tue, 6 May 2014 12:35:19 +0000 (12:35 +0000)]
MFC r265100:
Fix the comparision for the end of range in vm_phys_fictitious_reg_range().

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

10 years agoMFC r264610:
mav [Tue, 6 May 2014 09:55:49 +0000 (09:55 +0000)]
MFC r264610:
Correct AMD chipsets identification.

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

10 years agoMFC r260830:
mav [Tue, 6 May 2014 09:52:37 +0000 (09:52 +0000)]
MFC r260830:
Add ID for one more ASMedia AHCI-compatible controller.

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

10 years agoMFC: r264738
rmacklem [Mon, 5 May 2014 20:55:37 +0000 (20:55 +0000)]
MFC: r264738
For an NFSv4 mount with the "nocto" option, don't get the
up to date file attributes upon close. This reduces the
Getattr RPC count by about 65% for software builds.

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

10 years agoMFC: r264705, r264749
rmacklem [Mon, 5 May 2014 20:48:36 +0000 (20:48 +0000)]
MFC: r264705, r264749
Modify the NFSv4 client create/mkdir RPC so that it acquires
post-create/mkdir directory attributes. This allows the RPC to
name cache the newly created directory and reduces the lookup RPC
count for applications creating a lot of directories.

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

10 years agoMFC r250916: coexist with /etc/localtime being a symlink
peter [Mon, 5 May 2014 19:35:02 +0000 (19:35 +0000)]
MFC r250916: coexist with /etc/localtime being a symlink

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

10 years agoMFC: r264739
rmacklem [Mon, 5 May 2014 11:30:45 +0000 (11:30 +0000)]
MFC: r264739
Add {} braces so that the code conforms to the indentation.
Fortunately, I don't think doing the assignment of cap->tsomax
unconditionally causes any problem.

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

10 years agoMRC r265230:
gjb [Mon, 5 May 2014 01:29:33 +0000 (01:29 +0000)]
MRC r265230:
  Clarify that MAKEOBJDIRPREFIX and MAKEOBJDIR are not
  honored as make(1) arguments.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r262661:
markj [Mon, 5 May 2014 01:26:28 +0000 (01:26 +0000)]
MFC r262661:
Fix emulation of call and jmp instructions on i386 and for 32-bit processes
on amd64.

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

10 years agoMFC: r264681
rmacklem [Mon, 5 May 2014 01:07:56 +0000 (01:07 +0000)]
MFC: r264681
Modify the NFSv4 client open/create RPC so that it acquires
post-open/create directory attributes. This allows the RPC to
name cache the newly created file and reduces the lookup RPC
count by about 10% for software builds.

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

10 years agoMFC: r264672
rmacklem [Mon, 5 May 2014 01:01:30 +0000 (01:01 +0000)]
MFC: r264672
Modify the Lookup RPC for NFSv4 so that it acquires directory
attributes. This allows the client to cache directory names
when they are looked up, reducing the Lookup RPC count by
about 40% for software builds.

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

10 years agoMFC r265002:
kib [Sun, 4 May 2014 08:00:07 +0000 (08:00 +0000)]
MFC r265002:
Fix vm_fault_copy_entry() operation on upgrade; allow it to find the
pages in the shadowed objects.

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

10 years agoMFC r265003:
kib [Sun, 4 May 2014 07:57:20 +0000 (07:57 +0000)]
MFC r265003:
Fix order of libthr and libc in the global dso list for sshd.

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

10 years agoMFC r261147, r261149:
bryanv [Sun, 4 May 2014 01:03:54 +0000 (01:03 +0000)]
MFC r261147, r261149:

 - Remove spaces before tabs in the function prototype list
 - Read each field of the configuration individually

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

10 years agoMFC r260582, r260583:
bryanv [Sun, 4 May 2014 00:57:38 +0000 (00:57 +0000)]
MFC r260582, r260583:

 - Add unmapped IO support to virtio_blk(4)
 - Add unmapped IO support to virtio_scsi(4)

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

10 years agoMFC r260581:
bryanv [Sun, 4 May 2014 00:45:00 +0000 (00:45 +0000)]
MFC r260581:

 - Add sglist_append_bio(9) to append a struct bio's data to a sglist

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

10 years agoMFC r260581:
bryanv [Sun, 4 May 2014 00:43:00 +0000 (00:43 +0000)]
MFC r260581:

 - Add sglist_append_bio(9) to append a struct bio's data to a sglist

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

10 years agoMFC r255110
bryanv [Sun, 4 May 2014 00:14:49 +0000 (00:14 +0000)]
MFC r255110

 - Add optional VirtIO device method for post-attach notifications

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

10 years agoMFC r264933:
gjb [Sun, 4 May 2014 00:13:26 +0000 (00:13 +0000)]
MFC r264933:
  Fix indentation in make-memstick.sh.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r255166, r255109:
bryanv [Sun, 4 May 2014 00:10:25 +0000 (00:10 +0000)]
MFC r255166, r255109:

 - Fix unintended compiler constant folding
 - Add support for postponing VirtIO virtqueue interrupts

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

10 years agoMFC r264907, r264908, r264922:
gjb [Sun, 4 May 2014 00:09:17 +0000 (00:09 +0000)]
MFC r264907, r264908, r264922:
  Record mergeinfo for r264907 and r264908, reverted
  in r264922.

This commit is for merge tracking purposes only.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC: r264630
rmacklem [Sat, 3 May 2014 23:48:26 +0000 (23:48 +0000)]
MFC: r264630
For NFS mounts using rsize,wsize=65536 over TSO enabled
network interfaces limited to 32 transmit segments, there
are two known issues.
The more serious one is that for an I/O of slightly less than 64K,
the net device driver prepends an ethernet header, resulting in a
TSO segment slightly larger than 64K. Since m_defrag() copies this
into 33 mbuf clusters, the transmit fails with EFBIG.
A tester indicated observing a similar failure using iSCSI.

The second less critical problem is that the network
device driver must copy the mbuf chain via m_defrag()
(m_collapse() is not sufficient), resulting in measurable overhead.

This patch reduces the default size of if_hw_tsomax
slightly, so that the first issue is avoided.
Fixing the second issue will require a way for the
network device driver to inform tcp_output() that it
is limited to 32 transmit segments.

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

10 years agoMFC: r264517
rmacklem [Sat, 3 May 2014 23:42:00 +0000 (23:42 +0000)]
MFC: r264517
Vlan did not set the value of if_hw_tsomax, so when vlan
was stacked on top of a network interface that set if_hw_tsomax,
tcp_output() would see the default value instead of the value
set by the network interface. This patch modifies vlan so that
it sets if_hw_tsomax to the value of the parent interface.

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

10 years agoMFC: r264469, r264498
rmacklem [Sat, 3 May 2014 22:27:24 +0000 (22:27 +0000)]
MFC: r264469, r264498
Lagg did not set the value of if_hw_tsomax, so when lagg
was stacked on top of network interfaces that set if_hw_tsomax,
tcp_output() would see the default value instead of the value
set by the network interface(s). This patch modifies lagg so that
it sets if_hw_tsomax to the minimum of the value(s) for the
underlying network interfaces.

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

10 years agoMFC r262543:
markj [Sat, 3 May 2014 16:24:41 +0000 (16:24 +0000)]
MFC r262543:
Fix the struct reg mappings for i386 and amd64, which differ between illumos
and FreeBSD.

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

10 years agoMFC r262542:
markj [Sat, 3 May 2014 16:09:08 +0000 (16:09 +0000)]
MFC r262542:
Move some files that are identical on i386 and amd64 to an x86 subdirectory
rather than keeping duplicate copies.

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

10 years agodate(1): Add "-R" flag to use RFC 2822 date and time output format [MFC]
dumbbell [Sat, 3 May 2014 14:04:04 +0000 (14:04 +0000)]
date(1): Add "-R" flag to use RFC 2822 date and time output format [MFC]

As stated in the man page, this is equivalent to use "%a, %d %b %Y %T %z"
as the output format while LC_TIME is set to the "C" locale.

This is compatible with date(1) from the GNU core utilities.

This is an MFC of r264968 and r264970.

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

10 years agoMFC r264494:
ae [Fri, 2 May 2014 21:54:36 +0000 (21:54 +0000)]
MFC r264494:
  Use SMB_QUERY_FS_SIZE_INFO request to populate statfs structure.
  When server doesn't support this request, try to use SMB_INFO_ALLOCATION.
  And use SMB_COM_QUERY_INFORMATION_DISK request as fallback.

MFC r264600:
  Remove redundant unlock.

  This code was removed from the opensolaris and darwin's
  netsmb implementations, in DfBSD it also has been disabled.

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

10 years agoMFC r264040:
pfg [Fri, 2 May 2014 20:13:52 +0000 (20:13 +0000)]
MFC r264040:

4248 dtrace(1M) should never create DOF with empty probes section
4249 Only probes from the first DTrace object file will be included

Illumos Revision: 4a20ab41aadcb81c53e72fc65886e964e9add59

Reference:
https://www.illumos.org/issues/4248
https://www.illumos.org/issues/4249

Obtained from: Illumos

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

10 years agoMFC: r265090
marius [Fri, 2 May 2014 10:31:12 +0000 (10:31 +0000)]
MFC: r265090

Merge r133175 from upstream:

2008-03-13  Dennis Czeremin  <dennis.czeremin@smiths-heimann.com>

PR libstdc++/35566
* include/bits/stl_multimap.h (multimap<>::multimap(_InputIterator,
_InputIterator)): Forward to _M_insert_equal, not _M_insert_unique.

This patch was GPL2 at the time and fixes a regression introduced with
the merge of GCC r129013 in FreeBSD r236829 (merged to stable/9 in r237507).

Sponsored by: Bally Wulff Games & Entertainment GmbH

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

10 years agoMFC r262733:
markj [Thu, 1 May 2014 03:16:40 +0000 (03:16 +0000)]
MFC r262733:
Use a full path to the target for make rules which create symlinks @,
machine and ${MACHINE_CPUARCH}. Otherwise the presence of a file named
"x86" or "x86.c" in the make path can cause problems.

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

10 years agoMFC r264581, r264744 (partial):
pfg [Wed, 30 Apr 2014 20:46:52 +0000 (20:46 +0000)]
MFC r264581, r264744 (partial):

Various style(9) fixes and typos in printf and grep.

#define should be followed by a tab.

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

10 years agoMFC r265046
smh [Wed, 30 Apr 2014 11:06:02 +0000 (11:06 +0000)]
MFC r265046

Fix ZIO reordering issue which could cause data loss / corruption.

Sponsored by: Multiplay

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

10 years agoPick up the 2014032601 update which adds an IPv6 address for C.
erwin [Wed, 30 Apr 2014 09:55:45 +0000 (09:55 +0000)]
Pick up the 2014032601 update which adds an IPv6 address for C.

Note that this is a direct commit to stable/9 as this file
is no longer in HEAD.

Sponsored by: DK Hostmaster A/S

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

10 years agoFix TCP reassembly vulnerability.
delphij [Wed, 30 Apr 2014 04:04:20 +0000 (04:04 +0000)]
Fix TCP reassembly vulnerability.

Patch done by: glebius
Security: FreeBSD-SA-14:08.tcp
Security: CVE-2014-3000

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

10 years agoMFC r265015:
hselasky [Tue, 29 Apr 2014 05:47:13 +0000 (05:47 +0000)]
MFC r265015:
Setting the IMOD value below 0x3F8 can cause IRQ lockups in the Intel
LynxPoint USB 3.0 controllers found in MacBookPro 2013's.

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

10 years agoRevert r265076; r262775 should not be MFC'd to stable/9.
markj [Tue, 29 Apr 2014 03:58:17 +0000 (03:58 +0000)]
Revert r265076; r262775 should not be MFC'd to stable/9.

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

10 years agoMFC r262775:
markj [Tue, 29 Apr 2014 03:50:23 +0000 (03:50 +0000)]
MFC r262775:
Log the name of the file that we failed to open rather than an
uninitialized buffer.

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

10 years agoMFC r264436:
markj [Tue, 29 Apr 2014 03:37:30 +0000 (03:37 +0000)]
MFC r264436:
Fix some off-by-one errors. The kve_end and rdl_eaddr fields contain the
first address after the end of the map entry and should therefore be
excluded.

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

10 years agoMFC uftdi(4) driver changes...
ian [Mon, 28 Apr 2014 13:28:10 +0000 (13:28 +0000)]
MFC uftdi(4) driver changes...
  r264010: Support speeds up to 12mbaud on newer chips.
  r264018: Update list of supported FTDI chips.
  r264031: Use 2K IO buffers for improved throughput.
  r264149: Add ioctl(2) calls to access bitbang, MPSSE, CPU_FIFO,
           and other modes.
  r264800: Various fixes to r264149 pointed out by Coverity scan.

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

10 years agoMFC r264467:
delphij [Mon, 28 Apr 2014 06:11:44 +0000 (06:11 +0000)]
MFC r264467:

Take into account when zpool history block grows exceeding 128KB in zpool(8)
and zdb(8) by growing the buffer on demand with a cap of 1GB (specified in
spa_history_create_obj()).

PR: bin/186574
Submitted by: Andrew Childs <lorne cons org nz> (with changes)

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

10 years agoMFC: r264832 (partial)
marius [Sat, 26 Apr 2014 01:00:37 +0000 (01:00 +0000)]
MFC: r264832 (partial)

- Sprinkle const and static as appropriate.
- Convert the remainder of snd_hda(4) to take advantage of nitems().
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

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

10 years agoMFC r264794:
gjb [Sat, 26 Apr 2014 00:55:36 +0000 (00:55 +0000)]
MFC r264794:
  Move xdev knobs from release/arm/release.sh and into an
  XDEV_FLAGS variable in ${KERNCONF}.conf file.

Local changes:
  Fix XDEV_FLAGS for stable/9 branch, in particular, remove
  all *_CLANG* knobs, and move WITH_GCC=1 to XDEV_FLAGS.
  This is effectively a no-op on stable/9, and merged for
  tracking purpose only.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC: r264831
marius [Sat, 26 Apr 2014 00:40:02 +0000 (00:40 +0000)]
MFC: r264831

Add quirk to configure headphones redirection on Intel DH87RL boards.

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

10 years agoMFC: r260064
marius [Fri, 25 Apr 2014 22:23:26 +0000 (22:23 +0000)]
MFC: r260064

- Probe with BUS_PROBE_DEFAULT instead of 0.
- Nuke code setting PCI_POWERSTATE_D0; pci(4) already does that for type 0
  devices.
- There's no need to keep track of resource IDs.
- Quiesce the interrupt before actually detaching.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

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

10 years agoMFC: r260063
marius [Fri, 25 Apr 2014 22:19:06 +0000 (22:19 +0000)]
MFC: r260063

- Probe with BUS_PROBE_DEFAULT instead of 0.
- Nuke code setting PCI_POWERSTATE_D0; pci(4) already does that for type 0
  devices.
- Use PCIR_BAR instead of a homegrown macro.
- There's no need to keep track of resource IDs.
- Quiesce the interrupt before actually detaching.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

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

10 years agoMFC: r260061
marius [Fri, 25 Apr 2014 22:04:33 +0000 (22:04 +0000)]
MFC: r260061

- Add support for using MSI instead of INTx, controllable via the tunable
  hw.ral.msi_disable (defaulting to using MSI).
- Probe with BUS_PROBE_DEFAULT instead of 0.
- Nuke code setting PCI_POWERSTATE_D0; pci(4) already does that for type 0
  devices.
- Use PCIR_BAR instead of a homegrown macro.
- There's no need to keep track of resource IDs.
- Release resources again in case attaching fails.
- Quiesce the interrupt before detaching.
- Sprinkle const.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.
- Trim headers.
- Nuke dupe $FreeBSD$.

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

10 years agoMFC: r260058
marius [Fri, 25 Apr 2014 22:01:05 +0000 (22:01 +0000)]
MFC: r260058

- Remove a redundant variable in mpt_pci_attach().
- #if 0 the currently unused paired port linking and unlinking of dual
  adapters.
- Simplify MSI/MSI-X allocation and release. For a single one, we don't need
  to fiddle with the MSI/MSI-X count and pci_release_msi(9) is smart enough
  to just do nothing in case of INTx.
- Canonicalize actions taken on attach failure and detach.
- Remove the remainder of incomplete support for older FreeBSD versions.

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

10 years agoMFC: r260086
marius [Fri, 25 Apr 2014 21:58:16 +0000 (21:58 +0000)]
MFC: r260086

- Probe with BUS_PROBE_DEFAULT instead of 0.
- Remove clearing PCIM_CMD_INTxDIS; pci(4) will do that as appropriate since
  r189367.

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

10 years agoMFC: r260053
marius [Fri, 25 Apr 2014 21:42:46 +0000 (21:42 +0000)]
MFC: r260053

- There's no need to keep track of resource IDs.
- Simplify MSI allocation and release. For a single one, we don't need to
  fiddle with the MSI count and pci_release_msi(9) is smart enough to just
  do nothing in case of INTx.
- Don't allocate MSI as RF_SHAREABLE.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

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

10 years agoMFC: r260050, r261528
marius [Fri, 25 Apr 2014 21:32:38 +0000 (21:32 +0000)]
MFC: r260050, r261528

- Switch to using the common MII bitbang'ing code instead of duplicating it.
- Based on lessons learnt with dc(4) (see r185750), add bus space barriers to
  the MII bitbang read and write functions as well as to instances of page
  switching.
- Add missing locking to ed_ifmedia_{upd,sts}().
- Canonicalize some messages.
- Based on actual functionality, ED_TC5299J_MII_DIROUT should be rather named
  ED_TC5299J_MII_DIRIN.
- Remove unused headers.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

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

10 years agoMFC: r260045
marius [Fri, 25 Apr 2014 21:28:41 +0000 (21:28 +0000)]
MFC: r260045

- Simplify MSI allocation and release. For a single one, we don't need to
  fiddle with the MSI count and pci_release_msi(9) is smart enough to just
  do nothing in case of INTx.
- Don't allocate MSI as RF_SHAREABLE.

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

10 years agoMFC: r260044
marius [Fri, 25 Apr 2014 21:24:53 +0000 (21:24 +0000)]
MFC: r260044

Free the MSI again on detach if allocated. Arguably, this code would be
better off living in aac_pci.c, but it doesn't seem worth creating a
aac_pci_detach() and it's also not the first PCI-specific bit in aac.c

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

10 years agoMFC: r260041
marius [Fri, 25 Apr 2014 21:20:28 +0000 (21:20 +0000)]
MFC: r260041

Record the IEEE P1282 Rock Ridge version 1.12 POSIX File Serial Number,
i. e. the POSIX:5.6.1 st_ino field, which can be used to detect hard links
in the file system. This is also the default in mkisofs(8) and according to
its man page, no system only being able to cope with Rock Ridge version 1.10
is known to exist.

PR: 185138
Submitted by: Kurt Lidl

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

10 years agoMFC r264653:
hselasky [Fri, 25 Apr 2014 09:54:42 +0000 (09:54 +0000)]
MFC r264653:
Add new USB quirk.

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

10 years agoMFC r264582:
ae [Thu, 24 Apr 2014 11:13:38 +0000 (11:13 +0000)]
MFC r264582:
  Remove unused variable.

PR: 173521

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

10 years agoMFC: r264585
brueffer [Thu, 24 Apr 2014 10:25:32 +0000 (10:25 +0000)]
MFC: r264585

Add a missing break in the TCP case.

Reviewed by: bms

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

10 years agoMFC r264318:
mav [Thu, 24 Apr 2014 10:23:11 +0000 (10:23 +0000)]
MFC r264318:
Fix wrong sizes used to access PD_Type and PD_State DDF metadata fields.

This caused incorrect behavior of arrays with big-endian DDF metadata.
Little-endian (like used by Adaptec controllers) should not be harmed.
Add workaround should be enough to manage compatibility.

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

10 years agoMFC r264731:
gjb [Thu, 24 Apr 2014 00:29:18 +0000 (00:29 +0000)]
MFC r264731:
  urndis(4) will first appear in 9.3-RELEASE.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC: r264422, r264471
brueffer [Wed, 23 Apr 2014 12:16:36 +0000 (12:16 +0000)]
MFC: r264422, r264471

Set buf to NULL only when we don't allocate memory,
and free buf unconditionally.

Found with: Coverity Prevent(tm)
Requested by: kib (r264471)

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

10 years agoMFC: r264482
brueffer [Wed, 23 Apr 2014 12:09:15 +0000 (12:09 +0000)]
MFC: r264482

Re-indent break statement.

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

10 years agoMFC r264124:
ae [Wed, 23 Apr 2014 12:05:53 +0000 (12:05 +0000)]
MFC r264124:
  Remove dead code.

MFC r264125:
  Remove unused variable.

MFC r264126:
  The check for local address spoofing lacks ifaddr locking.
  Remove these loops and use in_localip() and in6_localip()
  functions instead.

MFC r264520:
  Remove _IP_VHL* macros and related ifdefs.

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

10 years agoMFC: r264460
brueffer [Wed, 23 Apr 2014 09:32:33 +0000 (09:32 +0000)]
MFC: r264460

Document the xdev* targets.

PR: 188519
Submitted by: Idwer Vollering <vidwer at gmail.com>
Reviewed by: bapt

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

10 years agoMFC: r264489
brueffer [Wed, 23 Apr 2014 09:23:27 +0000 (09:23 +0000)]
MFC: r264489

Add a missing break in option parsing.

CID: 1011452
Found with: Coverity Prevent(tm)

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

10 years agoMFC: r264479
brueffer [Wed, 23 Apr 2014 07:35:08 +0000 (07:35 +0000)]
MFC: r264479

Fix double fclose() in an error case.

CID: 1006120
Found with: Coverity Prevent(tm)

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

10 years agoMFC: r264421
brueffer [Wed, 23 Apr 2014 07:24:01 +0000 (07:24 +0000)]
MFC: r264421

Free resources in error cases; re-indent a curly brace while here.

CID: 1199366
Found with: Coverity Prevent(tm)

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

10 years agoMFC r262596:
markj [Wed, 23 Apr 2014 03:30:00 +0000 (03:30 +0000)]
MFC r262596:
4478 dtrace_dof_maxsize is far too small

illumos/illumos-gate@d339a29bb4765c4b6883a935cf69b669cd05bca0

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

10 years agoMFC: r264419
brueffer [Tue, 22 Apr 2014 21:26:23 +0000 (21:26 +0000)]
MFC: r264419

Avoid double close() of a file descriptor.

CID: 1006089
Found with: Coverity Prevent(tm)

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

10 years agoMFC: r264418
brueffer [Tue, 22 Apr 2014 21:14:50 +0000 (21:14 +0000)]
MFC: r264418

Avoid double free in f_acl().

CID: 1018508
Found with: Coverity Prevent(tm)

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

10 years agoMFC: r264416
brueffer [Tue, 22 Apr 2014 21:05:11 +0000 (21:05 +0000)]
MFC: r264416

Add a missing comma between error message definitions.

CID: 1199266
Found with: Coverity Prevent(tm)

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

10 years agoMFC: r264386
brueffer [Tue, 22 Apr 2014 20:57:23 +0000 (20:57 +0000)]
MFC: r264386

Improve markup and remove contractions.

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

10 years agoMFC: r264384, r264415
brueffer [Tue, 22 Apr 2014 20:53:05 +0000 (20:53 +0000)]
MFC: r264384, r264415

mdoc and language improvements.

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

10 years agoMFC: r264257, r264327, r264514
marius [Tue, 22 Apr 2014 13:02:06 +0000 (13:02 +0000)]
MFC: r264257, r264327, r264514

Distinguish between the different variants and configurations of Sunix
{MIO,SER}5xxxx chips instead of treating all of them as PUC_PORT_2S.
Among others, this fixes the hang seen when trying to probe the none-
existent second UART on an actually 1-port chip.

Obtained from: NetBSD (BAR layouts)
Sponsored by: Bally Wulff Games & Entertainment GmbH

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

10 years agoMFC r264293:
yongari [Tue, 22 Apr 2014 04:36:53 +0000 (04:36 +0000)]
MFC r264293:
  Add workaround for MCP61 Ethernet controller found on MSI K9
  motherboard.  PHY hardware used for the controller responded at
  all possible addresses which in turn resulted in having 32 PHYs
  for the controller.  If driver detects "MSI K9N6PGM2-V2 (MS-7309)"
  motherboard, tell miibus(4) PHY is located at 0.

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

10 years agoMFC r264062:
yongari [Tue, 22 Apr 2014 04:31:07 +0000 (04:31 +0000)]
MFC r264062:
  Correct endianness handling in getting station address from EEPROM.
  While I'm here, remove aue_eeprom_getword() as its only usage is to
  read station address and make it more readable.  This change is
  inspired by NetBSD.
  With this change, aue(4) should work on big endian architectures.

  PR: 188177

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

10 years agoMFC r264127
sbruno [Mon, 21 Apr 2014 16:55:02 +0000 (16:55 +0000)]
MFC r264127

Add PCI-IDs for TBD Gen9 RAID controller HBAs from HP to ciss(4)

Submitted by:   Benesh, Scott <scott.benesh@hp.com>
Sponsored by:   Yahoo! Inc.

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

10 years agoMFC r264341:
mav [Mon, 21 Apr 2014 16:35:14 +0000 (16:35 +0000)]
MFC r264341:
Create zvol devices on zfs clone.

While big and shiny patch is not ready, it is better to have something.

PR:             kern/178999

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

10 years agoMFC r264191:
mav [Mon, 21 Apr 2014 16:29:54 +0000 (16:29 +0000)]
MFC r264191:
Report stripe size and offset of the backing device in READ CAPACITY (16)
as physical sector size and offset.

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

10 years agoMFC r264364:
ae [Mon, 21 Apr 2014 11:24:01 +0000 (11:24 +0000)]
MFC r264364:
  Properly release the in6_multi lock.

Sponsored by: Yandex LLC

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

10 years agoMFC r264481:
kib [Mon, 21 Apr 2014 02:55:46 +0000 (02:55 +0000)]
MFC r264481:
Add dwarf annotations to the amd64 _rtld_bind_start to allow debuggers
to unwind around the calls from PLT to binder.

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

10 years agoMFC r264142:
bdrewery [Mon, 21 Apr 2014 02:52:08 +0000 (02:52 +0000)]
MFC r264142:

  Show error code when failing to destroy a mirror on delay

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

10 years agoMFC r264320:
bdrewery [Mon, 21 Apr 2014 02:50:42 +0000 (02:50 +0000)]
MFC r264320:

  Fix spelling error in g_trace() call.

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

10 years agoRemove 'of course' from upgrading comment.
gjb [Sun, 20 Apr 2014 23:01:56 +0000 (23:01 +0000)]
Remove 'of course' from upgrading comment.

This is a direct commit to stable/9, since these documents have
changed drastically, and merge conflicts are too irrelevant to
deal with for a 14-character removal.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r238780,r238948: find: Implement real -ignore_readdir_race.
jilles [Sun, 20 Apr 2014 16:41:30 +0000 (16:41 +0000)]
MFC r238780,r238948: find: Implement real -ignore_readdir_race.

If -ignore_readdir_race is present, [ENOENT] errors caused by deleting a
file after find has read its name from a directory are ignored.

Formerly, -ignore_readdir_race did nothing.

PR: bin/169723
Submitted by: Valery Khromov and Andrey Ignatov (original version)
Relnotes: yes

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

10 years agoMFH (r264691): merge upstream patch for EC calculation bug
des [Sun, 20 Apr 2014 13:12:32 +0000 (13:12 +0000)]
MFH (r264691): merge upstream patch for EC calculation bug

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

10 years agoMFC r264620:
kib [Sun, 20 Apr 2014 01:45:23 +0000 (01:45 +0000)]
MFC r264620:
Fix typo.

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

10 years agoMFC r263244: find: When performing -quit, finish pending -exec ... + command
jilles [Fri, 18 Apr 2014 14:59:39 +0000 (14:59 +0000)]
MFC r263244: find: When performing -quit, finish pending -exec ... + command
lines.

This avoids unexpected partial processing when a find command uses both
-quit and -exec ... +.

GNU find does the same.

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

10 years agoMFC r260246: sh(1): Discourage use of -e.
jilles [Fri, 18 Apr 2014 12:51:30 +0000 (12:51 +0000)]
MFC r260246: sh(1): Discourage use of -e.

Also, do not say that ! before a pipeline is an operator, because it is
syntactically a keyword.

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

10 years agoMFC r263847: sh: Fix memory leak with an assignment before a regular builtin
jilles [Fri, 18 Apr 2014 12:42:50 +0000 (12:42 +0000)]
MFC r263847: sh: Fix memory leak with an assignment before a regular builtin

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

10 years agoMFC r263846: sh: Fix memory leak when trying to set a read only variable.
jilles [Fri, 18 Apr 2014 12:34:10 +0000 (12:34 +0000)]
MFC r263846: sh: Fix memory leak when trying to set a read only variable.

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

10 years agoMFC r264344:
hselasky [Fri, 18 Apr 2014 07:42:47 +0000 (07:42 +0000)]
MFC r264344:
Tune buffer sizes for SuperSpeed USB when using LibUSB v0.1 and v1.0
APIs to increase the maximum bandwidth limit.

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

10 years agoMFC r264340:
hselasky [Fri, 18 Apr 2014 07:40:23 +0000 (07:40 +0000)]
MFC r264340:
Correct IMOD default value according to comment.

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

10 years agoMFC r264488:
dteske [Fri, 18 Apr 2014 00:53:35 +0000 (00:53 +0000)]
MFC r264488:

When merging docsinstall and zfsboot updates to stable/9 it was discovered
that the slightly older dialog(1) requires --separate-output when using the
--checklist widget to force response to produce unquoted values (whereas in
stable/10 --checklist widget without --separate-output will only quote the
checklist labels in the response if the label is multi-word (contains any
whitespace).

Since these enhancements (see revisions 263956 and 264437) were developed
originally on 10, the --separate-output option was omitted. When merged to
stable/9, we (Allan Jude) and I found during testing that the "always-
quoting" of the response was causing things like struct interpolation to
fail (`f_struct device_$dev' would produce `f_struct device_\"da0\"' for
example -- literal quotes inherited from dialog(1) --checklist response).

To see the behavior, execute the following on stable/9 versus stable/10:

        dialog --checklist disks: 0 0 0 da0 "" off da1 "" off

Check both items and hit enter. On stable/10, the response is:

        da0 da1

On stable/9 the response is:

        "da0" "da1"

If you use the --separate-output option, the response is the same for both:

        da0
        da1

So applying --separate-output on every platform until either one of two
things occurs 1) dialog(1,3) gets synchronized between stable/9, higher or
2) we drop support for stable/9.

Reviewed by:    Allan Jude

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

10 years agoMFC r263777: sh: Fix possible memory leaks and double frees with unexpected
jilles [Thu, 17 Apr 2014 21:43:34 +0000 (21:43 +0000)]
MFC r263777: sh: Fix possible memory leaks and double frees with unexpected
SIGINT.

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

10 years agoCherry-pick OpenSSL changeset 5be1ae2:
delphij [Thu, 17 Apr 2014 20:09:41 +0000 (20:09 +0000)]
Cherry-pick OpenSSL changeset 5be1ae2:

====
Author: Dr. Stephen Henson <steve@openssl.org>

Treat a zero length passed to ssleay_rand_add a no op: the existing logic
zeroes the md value which is very bad. OpenSSL itself never does this
internally and the actual call doesn't make sense as it would be passing
zero bytes of entropy.

Thanks to Marcus Meissner <meissner@suse.de> for reporting this bug.
====

This is a direct commit to stable/8 and stable/9.  -HEAD and stable/10
already have this fix as part of OpenSSL 1.0.1g.

Noticed by: koobs
Reviewed by: benl (maintainer)

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

10 years agoMFC r264258
ray [Thu, 17 Apr 2014 14:19:32 +0000 (14:19 +0000)]
MFC r264258

Fix cursor color in reverse video mode.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFH (r262555): install the sntp(1) man page
des [Thu, 17 Apr 2014 12:16:51 +0000 (12:16 +0000)]
MFH (r262555): install the sntp(1) man page

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

10 years agoMFH (r261511, r261542): add an example to the man page
des [Thu, 17 Apr 2014 12:11:00 +0000 (12:11 +0000)]
MFH (r261511, r261542): add an example to the man page

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