]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
11 years agoMFC 233760:
jhb [Wed, 6 Jun 2012 21:57:03 +0000 (21:57 +0000)]
MFC 233760:
Export some more useful info about shared memory objects to userland
via procstat(1) and fstat(1):
- Change shm file descriptors to track the pathname they are associated
  with and add a shm_path() method to copy the path out to a caller-supplied
  buffer.
- Use shm_path() to export the path of a shared memory object via
  struct kinfo_file.
- Change procstat to always print out the path for a given object if it
  is valid.
- Teach fstat about shared memory objects and to display their path,
  mode, and size.

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

11 years agoMFC: r232272, r232273
oleg [Wed, 6 Jun 2012 18:04:49 +0000 (18:04 +0000)]
MFC: r232272, r232273

- lookup_dyn_rule_locked(): style(9) cleanup
- Refresh dynamic tcp rule only if both sides answered keepalive packets.
- Remove some useless assignments.

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

11 years agoMFC r235854
emax [Wed, 6 Jun 2012 16:20:59 +0000 (16:20 +0000)]
MFC r235854

Seems applicable here as well.

Tweak condition for disabling allocation from per-CPU buckets in
low memory situation. I've observed a situation where per-CPU
allocations were disabled while there were enough free cached pages.
Basically, cnt.v_free_count was sitting stable at a value lower
than cnt.v_free_min and that caused massive performance drop.

Reviewed by: alc
Requested by: Andrew Boyer aboyer at averesystems dot com

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

11 years agoMFC 228509,228620,228533:
jhb [Wed, 6 Jun 2012 16:01:45 +0000 (16:01 +0000)]
MFC 228509,228620,228533:
Add a helper API to allow in-kernel code to map portions of shared memory
objects created by shm_open(2) into the kernel's address space.  This
provides a convenient way for creating shared memory buffers between
userland and the kernel without requiring custom character devices.

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

11 years agoMFC r223084 (by gibbs):
mav [Wed, 6 Jun 2012 12:36:40 +0000 (12:36 +0000)]
MFC r223084 (by gibbs):
sys/cam/scsi/scsi_da.c:
        - Only attempt the closing synchronize cache on a disk
          if it is still there.
        - When a device is lost, report the number of outstanding
          I/Os as they are drained.
        - When a device is lost, return any unprocessed bios with
          ENXIO instead of EIO.
        - Filter asynchronous events, but always allow cam_periph_async()
          to see them too.

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

11 years agoMFC r208911 (by mjacob):
mav [Wed, 6 Jun 2012 11:46:37 +0000 (11:46 +0000)]
MFC r208911 (by mjacob):
Implement the usage of Report Luns as part of SCSI probing for SCP3 or
better devices. This can be disabled on a per-device basis using quirks as
well.

This also handles the case where there is actually no connected LUN 0
(which can definitely be the case for storage arrays).

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

11 years agoMFC r208896, r208900 (by mjacob):
mav [Wed, 6 Jun 2012 11:40:16 +0000 (11:40 +0000)]
MFC r208896, r208900 (by mjacob):
Do a minor amount of stylifying. Also, get a Fibre Channel WWPN if one exists
for a da unit and create a sysctl OID for it.

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

11 years agoMFC: r233774
marius [Wed, 6 Jun 2012 07:46:14 +0000 (07:46 +0000)]
MFC: r233774

Fix compiler warnings, mostly signed issues,
when USB modules are compiled with WARNS=9.

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

11 years agoMFC r236289:
eadler [Wed, 6 Jun 2012 06:39:14 +0000 (06:39 +0000)]
MFC r236289:
Relax security permissions on '.seq' file creation - the strict,
but odd permissions resulted in a security alert from 110.neggrpperm

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

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

11 years agoMFC r236285:
eadler [Wed, 6 Jun 2012 06:35:29 +0000 (06:35 +0000)]
MFC r236285:
Add missing flag enable when certain arguments are parsed

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

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

11 years agoMFC r236379:
eadler [Wed, 6 Jun 2012 04:38:45 +0000 (04:38 +0000)]
MFC r236379:
   Adding missing dependancies for loading hptiop(4), hptmv(4) and isp(4) as modules.

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

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

11 years agoMFC r236283:
eadler [Wed, 6 Jun 2012 04:26:27 +0000 (04:26 +0000)]
MFC r236283:
 Add support for newer garmin devices

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

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

11 years agoMFC r236282:
eadler [Wed, 6 Jun 2012 04:18:04 +0000 (04:18 +0000)]
MFC r236282:
Add support for Sun 1040 PCI Quad Serial

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

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

11 years agoMFC: r236491
marius [Tue, 5 Jun 2012 20:53:53 +0000 (20:53 +0000)]
MFC: r236491

Add missing prototypes. While at it, sort them alphabetically.

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

11 years agoMFC: r236488
marius [Tue, 5 Jun 2012 20:34:56 +0000 (20:34 +0000)]
MFC: r236488

Take advantage of nitems().

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

11 years agoMFC: r236486
marius [Tue, 5 Jun 2012 19:59:02 +0000 (19:59 +0000)]
MFC: r236486

Add nitems(), a macro for determining the number of elements in a
statically-allocated array.

Obtained from: OpenBSD (in principle)

MFC: r236489

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

11 years agoMFC r236575 (by emax):
bz [Tue, 5 Jun 2012 11:29:00 +0000 (11:29 +0000)]
MFC r236575 (by emax):

 Plug more refcount leaks and possible NULL deref for interface
 address list.

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

11 years agoMFC r236501 (by emax):
bz [Tue, 5 Jun 2012 11:27:11 +0000 (11:27 +0000)]
MFC r236501 (by emax):

  Plug reference leak.

  Interface addresses are refcounted as packets move through the stack,
  and there's garbage collection tied to it so that address changes can
  safely propagate while traffic is flowing. In our setup, we weren't
  changing or deleting any addresses, but the refcounting logic in
  ip6_input() was wrong and caused a reference leak on every inbound
  V6 packet. This eventually caused a 32bit overflow, and the resulting
  0 value caused the garbage collection to run on the active address.
  That then snowballed into the panic.

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

11 years agoMFC r236327 (by emax):
bz [Tue, 5 Jun 2012 11:24:05 +0000 (11:24 +0000)]
MFC r236327 (by emax):

  When we return deprecated addresses, we need to reference them.

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

11 years agoUpgrade to 9.6-ESV-R7-P1, the latest from ISC. This version contains
dougb [Mon, 4 Jun 2012 22:21:55 +0000 (22:21 +0000)]
Upgrade to 9.6-ESV-R7-P1, the latest from ISC. This version contains
a critical bugfix:

  Processing of DNS resource records where the rdata field is zero length
  may cause various issues for the servers handling them.

  Processing of these records may lead to unexpected outcomes. Recursive
  servers may crash or disclose some portion of memory to the client.
  Secondary servers may crash on restart after transferring a zone
  containing these records. Master servers may corrupt zone data if the
  zone option "auto-dnssec" is set to "maintain". Other unexpected
  problems that are not listed here may also be encountered.

All BIND users are strongly encouraged to upgrade.

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

11 years agoMFC r236184:
mav [Mon, 4 Jun 2012 07:08:58 +0000 (07:08 +0000)]
MFC r236184:
Make legacy ATA to not call device_add_child() with unit number but
without driver name.

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

11 years agoMFC r235333:
mav [Mon, 4 Jun 2012 07:05:13 +0000 (07:05 +0000)]
MFC r235333:
Add two functions xpt_batch_start() and xpt_batch_done() to the CAM SIM KPI
to allow drivers to handle request completion directly without passing
them to the CAM SWI thread removing extra context switch.
Modify all ATA/SATA drivers to use them.

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

11 years agoOpenSSH: allow VersionAddendum to be used again
rea [Sun, 3 Jun 2012 18:05:19 +0000 (18:05 +0000)]
OpenSSH: allow VersionAddendum to be used again

Prior to this, setting VersionAddendum will be a no-op: one will
always have BASE_VERSION + " " + VERSION_HPN for VersionAddendum
set in the config and a bare BASE_VERSION + VERSION_HPN when there
is no VersionAddendum is set.

HPN patch requires both parties to have the "hpn" inside their
advertized versions, so we add VERSION_HPN to the VERSION_BASE
if HPN is enabled and omitting it if HPN is disabled.

VersionAddendum now uses the following logics:
 * unset (default value): append " " and VERSION_ADDENDUM;
 * VersionAddendum is set and isn't empty: append " "
   and VersionAddendum;
 * VersionAddendum is set and empty: don't append anything.

Approved by: des
Reviewed by: bz

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

11 years agoMFC r236193: libfetch: Avoid SIGPIPE on network connections.
jilles [Sun, 3 Jun 2012 11:31:45 +0000 (11:31 +0000)]
MFC r236193: libfetch: Avoid SIGPIPE on network connections.

To avoid unexpected process termination from SIGPIPE when writing to a
closed network connection, enable SO_NOSIGPIPE on all network connections.

The POSIX standard MSG_NOSIGNAL is not used since it requires modifying all
send calls to add this flag. This is particularly nasty for SSL connections.

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

11 years agoMFC r236145, r236146:
mm [Sun, 3 Jun 2012 09:37:47 +0000 (09:37 +0000)]
MFC r236145, r236146:

MFC r236145 [1]:
Import illumos changeset 13564:cf89c0c60496
1946 incorrect formatting when listing output of multiple pools with
zpool iostat -v

MFC r236146 [2]:
Import illumos changeset 13605:b5c2b5db80d6 (partial)
763 FMD msg URLs should refer to something visible
Replace sun.com URL's with illumos.org

References:
https://www.illumos.org/issues/1946 [1]
https://www.illumos.org/issues/763 [2]

Obtained from: illumos (issue #1946 [1], #763 [2])

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

11 years agoMFC r235829: vm_pager_object_lookup: small performance optimization
avg [Sat, 2 Jun 2012 19:21:34 +0000 (19:21 +0000)]
MFC r235829: vm_pager_object_lookup: small performance optimization

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

11 years agoMFC: r236328
marius [Sat, 2 Jun 2012 19:15:21 +0000 (19:15 +0000)]
MFC: r236328

Try to finally get the point in time at which bge_add_sysctls() is called
right; it needs to be called before bge_can_use_msi() but in turn requires
bge_flags to be properly set.

Submitted by: yongari

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

11 years agoMFC: r236156
marius [Sat, 2 Jun 2012 19:11:47 +0000 (19:11 +0000)]
MFC: r236156

- Fix some typos in mmc_acquire_bus() and mmc_send_csd().
- Fix some math errors in mmc_decode_csd_sd().
- Fix incorrect arguments to mmc_send_app_op_cond() in mmc_go_discovery().
- Add reporting of CSD for debug purposes.
- Add detection (and skipping) of password-locked cards.
- Add setting of block length on card if necessary.

Submitted by: Patrick Kelsey

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

11 years agoMFC: r236070
marius [Sat, 2 Jun 2012 19:10:02 +0000 (19:10 +0000)]
MFC: r236070

Consistently use USB_PAGE_SIZE. Currently, this is cosmetic.

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

11 years agoMFC: r236069, r236073
marius [Sat, 2 Jun 2012 19:08:48 +0000 (19:08 +0000)]
MFC: r236069, r236073

Make the VIA workaround actually do its intended job.

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

11 years agoMFC: r236063
marius [Sat, 2 Jun 2012 19:06:04 +0000 (19:06 +0000)]
MFC: r236063

Remove extraneous empty lines.

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

11 years agoMFC r235479: zpool_find_import_impl: another /dev//dsk -> /dev fix
avg [Sat, 2 Jun 2012 19:01:47 +0000 (19:01 +0000)]
MFC r235479: zpool_find_import_impl: another /dev//dsk -> /dev fix

PR: bin/155104

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

11 years agoMFC r235478: zpool_do_imp_import: use /dev instead of /dev/dsk as a
avg [Sat, 2 Jun 2012 18:59:18 +0000 (18:59 +0000)]
MFC r235478: zpool_do_imp_import: use /dev instead of /dev/dsk as a
default

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

11 years agoMFC: r236061
marius [Sat, 2 Jun 2012 18:57:16 +0000 (18:57 +0000)]
MFC: r236061

- When creating the DMA tag for user data, don't ask for more segments
  than required for handling MAXPHYS and report the resulting maximum
  I/O size to CAM instead of implicitly limiting it to DFLTPHYS.
- Move the variables of sym_action2() out of nested scope as required
  by style(9) and remove extraneous curly braces.
- Replace a magic value for PCIR_COMMAND with the appropriate macro.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

Tested with a HBA donated by wilko.

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

11 years agoMFC r235130: zfsboottest.sh: correctly check and suggest value of
avg [Sat, 2 Jun 2012 18:29:16 +0000 (18:29 +0000)]
MFC r235130: zfsboottest.sh: correctly check and suggest value of
vfs.root.mountfrom

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

11 years agoMFC r235129: zfsboottest.sh: gracefully handle default value of bootfs
avg [Sat, 2 Jun 2012 18:27:14 +0000 (18:27 +0000)]
MFC r235129: zfsboottest.sh: gracefully handle default value of bootfs
property

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

11 years agoRFC: 235276
bapt [Sat, 2 Jun 2012 16:16:45 +0000 (16:16 +0000)]
RFC: 235276

- Print package name in case an empty pkgdep line is found.

PR: bin/164378
Submitted by: Yuri <yuri AT tsoft.com> and many others
Approved by: des (mentor)

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

11 years agoMFC: 228545,229572
bapt [Sat, 2 Jun 2012 15:14:12 +0000 (15:14 +0000)]
MFC: 228545,229572

Modify pw_copy:
- if pw is NULL and oldpw is not NULL then the oldpw is deleted
- if pw->pw_name != oldpw->pw_name but pw->pw_uid == oldpw->pw_uid
then it renames the user

add new gr_* functions so now gr_util API is similar to pw_util API,
this allow to manipulate groups in a safe way.

Add new pw_make_v7 to make a passwd line (in v7 format) out of a struct passwd

Approved by: des (mentor)

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

11 years agoMFC r236313:
kib [Sat, 2 Jun 2012 12:26:14 +0000 (12:26 +0000)]
MFC r236313:
Capitalize start of sentence.

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

11 years agoMFC r236312:
kib [Sat, 2 Jun 2012 12:22:20 +0000 (12:22 +0000)]
MFC r236312:
Clarify that the v_lockf is advisory lock list.

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

11 years agoMFC r230642: Remove trailing whitespace.
jh [Sat, 2 Jun 2012 10:14:55 +0000 (10:14 +0000)]
MFC r230642: Remove trailing whitespace.

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

11 years agoMFC r236274, r236278, r236279:
gjb [Sat, 2 Jun 2012 02:26:49 +0000 (02:26 +0000)]
MFC r236274, r236278, r236279:

r236274:
 - Fix an mdoc(7) formatting nit.

r236278:
 - Fix mdoc(7) style nits.

r236279:
 - Add '-width Pa' to src.conf.5 for mdoc(7) style consistency.

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

11 years agoMFC 236212:
gallatin [Fri, 1 Jun 2012 18:57:57 +0000 (18:57 +0000)]
MFC 236212:

  Update mxge(4) firmware to the latest version available from
  Myricom (1.4.55).

  Sponored by: Myricom, Inc.

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

11 years agoMFC: r236251
jkim [Fri, 1 Jun 2012 17:22:20 +0000 (17:22 +0000)]
MFC: r236251

Fix 32-bit shim for BIOCSETF to drop all packets buffered on the descriptor
and reset statistics as it should.

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

11 years agoMFC r235692,235772,236220,236221:
iwasaki [Fri, 1 Jun 2012 13:21:32 +0000 (13:21 +0000)]
MFC r235692,235772,236220,236221:
- Don't start the sleep state transition procedure while sleep is
  disabled or the system is in shutdown procedure.
- Ignore the power button press event for resuming rather than starting
  shutdown.
- Fix the problem acpi_sleep_force() hang.
- Reorder resume procedures to avoid hang during AcpiLeaveSleepState()
  execution.

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

11 years agoMFC r235481:
eadler [Fri, 1 Jun 2012 06:40:29 +0000 (06:40 +0000)]
MFC r235481:
Rework sample code which sets SSH_AUTH_SOCK to the user's ssh-agent
socket path if running

PR: 167932
Approved by: cperciva (implicit)

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

11 years agoMFC r235842
wblock [Thu, 31 May 2012 02:52:59 +0000 (02:52 +0000)]
MFC r235842

Mention the upper hard limit for -n option.  Patch slightly modified
from PR version.

PR: 168255
Submitted by: Andy Kosela
Approved by: gjb (mentor)

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

11 years agoMFC r235459 and r235471
rstone [Wed, 30 May 2012 23:42:48 +0000 (23:42 +0000)]
MFC r235459 and r235471

 r235459:
  Implement the DTrace sched provider.  This implementation aims to be
  compatible with the sched provider implemented by Solaris and its open-
  source derivatives.  Full documentation of the sched provider can be found
  on Oracle's DTrace wiki pages.

  Note that for compatibility with scripts originally written for Solaris,
  serveral probes are defined that will never fire.  These probes are defined
  to fire when Solaris-specific features perform certain actions.  As these
  features are not present in FreeBSD, the probes can never fire.

  Also, I have added a two probes that are not defined in Solaris, lend-pri
  and load-change.  These probes have been added to make it possible to
  collect schedgraph data with DTrace.

  Finally, a few probes are defined in Solaris to take a cpuinfo_t *
  argument.  As it was not immediately clear to me how to translate that to
  FreeBSD, currently those probes are passed NULL in place of a cpuinfo_t *.

  Sponsored by: Sandvine Incorporated

 r235471:
  Fix typo in function name SDT_PROBE4 and unbreak 4BSD UP.

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

11 years agoMFC: r222090: add WITH{,OUT}_{GCC,BINUTILS} providing fine-grained control
obrien [Wed, 30 May 2012 22:31:45 +0000 (22:31 +0000)]
MFC: r222090: add WITH{,OUT}_{GCC,BINUTILS} providing fine-grained control

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

11 years agoMFC: r218525: add LIBEXECDIR to the bsd.own.mk
obrien [Wed, 30 May 2012 21:04:14 +0000 (21:04 +0000)]
MFC: r218525: add LIBEXECDIR to the bsd.own.mk

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

11 years agoMFC 234501:
jhb [Wed, 30 May 2012 16:13:34 +0000 (16:13 +0000)]
MFC 234501:
The amr(4) firmware contains a rather dubious "feature" where it
assumes for small buffers (< 64k) that the OS driver is actually using
a buffer rounded up to the next power of 2.  It also assumes that the
buffer is at least 4k in size.  Furthermore, there is at least one
known instance of megarc sending a request with a 12k buffer where the
firmware writes out a 24k-ish reply.

To workaround the data corruption triggered by this "feature", ensure
that buffers for user commands use a minimum size of 32k, and that
buffers between 32k and 64k use a 64k buffer.

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

11 years agoMFC r235851:
kib [Wed, 30 May 2012 13:00:43 +0000 (13:00 +0000)]
MFC r235851:
Add 'cow' keyword to show per-process cow count.

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

11 years agoMFC r235850:
kib [Wed, 30 May 2012 12:45:52 +0000 (12:45 +0000)]
MFC r235850:
Calculate the count of per-process cow faults.  Export the count to
userspace using the obscure spare int field in struct kinfo_proc.

MFC r236136:
Fix ki_cow for compat32 binaries.

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

11 years agoUpdate the previous openssl fix. [12:01]
bz [Wed, 30 May 2012 12:01:28 +0000 (12:01 +0000)]
Update the previous openssl fix. [12:01]

Fix a bug in crypt(3) ignoring characters of a passphrase. [12:02]

Security: FreeBSD-SA-12:01.openssl (revised)
Security: FreeBSD-SA-12:02.crypt
Approved by: so (bz, simon)

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

11 years agoMFC r236135:
davidxu [Wed, 30 May 2012 01:54:14 +0000 (01:54 +0000)]
MFC r236135:

Return EBUSY for PTHREAD_MUTEX_ADAPTIVE_NP too when the mutex could not
be acquired.

PR: 168317

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

11 years agoMFC r234106, r235751:
jimharris [Tue, 29 May 2012 23:15:23 +0000 (23:15 +0000)]
MFC r234106, r235751:

Queue CCBs internally instead of using CAM_REQUEUE_REQ status.  This fixes
problem where userspace apps such as smartctl fail due to CAM_REQUEUE_REQ
status getting returned when tagged commands are outstanding when smartctl
sends its I/O using the pass(4) interface.

Sponsored by: Intel

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

11 years agoMFC r235693:
gjb [Tue, 29 May 2012 14:36:07 +0000 (14:36 +0000)]
MFC r235693:

Typo and mdoc(7) style fixes.

PR: 168117

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

11 years agoMFC r236042:
kib [Tue, 29 May 2012 08:56:56 +0000 (08:56 +0000)]
MFC r236042:
Clarify the SEEK_HOLE description, it repositions the file pointer.

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

11 years agoMFC r235821:
yongari [Tue, 29 May 2012 04:53:46 +0000 (04:53 +0000)]
MFC r235821:
  Don't force max payload size to 128. Root complex and Endpoint will
  negotiate with each other on the TLP payload size so blindly
  forcing the size to 128 can cause a completion error which in turn
  will stop device.

  Reported by: Geans Pin < geanspin <> broadcom dot com >

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

11 years agoMFC r235816:
yongari [Tue, 29 May 2012 04:32:27 +0000 (04:32 +0000)]
MFC r235816:
  Make IPMI work in the bce driver even when the interface is
  configured down.  Formerly, IPMI communication was lost whenever the
  interface was not up.  The reason was that the BCE_EMAC_MODE
  register was not configured with the correct media settings.  There
  are two parts to the fix.

  First, resetting the chip in bce_reset() causes the BCE_EMAC_MODE
  register to be initialized to a default value that does not
  necessarily correspond to the actual media settings.  The fix
  implemented here is a bit of a hack.  Ideally, at the end of
  bce_reset() we would poll the PHY to determine the negotiated media,
  and then we would set the BCE_EMAC_MODE register accordingly.  That
  is difficult, since the PHY is abstracted behind the MII layer and is
  not supposed to be queried directly from the MAC driver.  Instead,
  we read the BCE_EMAC_MODE register at the beginning of bce_reset()
  and then restore its media bits to their original values before
  returning.  If IPMI is up and running, then the link is already
  established and the BCE_EMAC_MODE register is already set appropriately
  when bce_reset() is called.  If IPMI is not running, no harm is
  done by preserving the BCE_EMAC_MODE settings.  The driver will set
  the register properly once the interface is configured up and link
  is established.

  Second, bce_miibus_statchg() is sometimes called when the link is
  down.  In that case, the reported media settings are invalid.
  Formerly, the driver used them anyway to setup the BCE_EMAC_MODE
  register.  We now avoid changing any MAC registers unless link is
  active and the reported media settings are valid.

  Submitted by: jdp
  Tested by: jdp

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

11 years agoMFH r230622: use build tools, not host tools, to build aicasm.
des [Mon, 28 May 2012 22:07:32 +0000 (22:07 +0000)]
MFH r230622: use build tools, not host tools, to build aicasm.

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

11 years agoForgot to commit mergeinfo when I MFHed pam_unix last month.
des [Mon, 28 May 2012 21:59:05 +0000 (21:59 +0000)]
Forgot to commit mergeinfo when I MFHed pam_unix last month.

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

11 years agoMFH r200068: connect unzip to the build.
des [Mon, 28 May 2012 21:26:26 +0000 (21:26 +0000)]
MFH r200068: connect unzip to the build.

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

11 years agoMFH r208957: check return value from archive_read_new()
des [Mon, 28 May 2012 21:25:19 +0000 (21:25 +0000)]
MFH r208957: check return value from archive_read_new()
MFH r214137, r214140, r214174, r224584: support reading from stdin
MFH r230044, r233456: style and markup nits
MFH r234311: correct name in copyright statement

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

11 years agoUpgrade to BIND version 9.6-ESV-R7, the latest from ISC.
dougb [Mon, 28 May 2012 19:48:37 +0000 (19:48 +0000)]
Upgrade to BIND version 9.6-ESV-R7, the latest from ISC.

Feature Change

*  BIND now recognizes the TLSA resource record type, created to
   support IETF DANE (DNS-based Authentication of Named Entities)

Bug Fix

*  The locking strategy around the handling of iterative queries
   has been tuned to reduce unnecessary contention in a multi-
   threaded environment.

Other critical bug fixes are included.

All BIND users are encouraged to upgrade.

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

11 years agoMFC r225640
rstone [Sun, 27 May 2012 19:03:16 +0000 (19:03 +0000)]
MFC r225640

 Clear transmit checksum offload context state upon lem(4) interface
 initialization.  Prior to this change packets may be transmitted with an
 incorrect checksum.

 em(4) already has an equivalent change in r213234.

 Obtained From:  Sandvine

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

11 years agoMFC r234691
rstone [Sun, 27 May 2012 18:57:20 +0000 (18:57 +0000)]
MFC r234691

 Implement the D "cpu" variable, which returns curcpu.  I have chosen not
 to follow the example of OpenSolaris and its descendants, which implemented
 cpu as an inline that took a value out of curthread.  At certain points in
 the FreeBSD scheduler curthread->td_oncpu will no longer be valid (in
 particukar, just before the thread gets descheduled) so instead I have
 implemented this as its own built-in variable.

 Sponsored by: Sandvine Inc.

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

11 years agoMFC: r235255 (partial)
marius [Sun, 27 May 2012 15:48:25 +0000 (15:48 +0000)]
MFC: r235255 (partial)

Change the module order of this MAC driver to be last so its is
deterministically handled after the corresponding PHY drivers when
loaded as module. Otherwise, when this MAC/PHY driver combination
is compiled into a single module, probing the PHY drivers may fail.
This makes r151438 actually work.
Reported and tested by: yongari (for fxp(4))

Given that r226154 isn't part of stable/8, the other drivers fixed
as part of the original r235255 aren't affected here.

Submitted by: jhb

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

11 years agoMFC r233552
rstone [Sun, 27 May 2012 14:52:31 +0000 (14:52 +0000)]
MFC r233552

 Instead of only iterating over the set of known SDT probes when sdt.ko is
 loaded and unloaded, also have sdt.ko register callbacks with kern_sdt.c
 that will be called when a newly loaded KLD module adds more probes or
 a module with probes is unloaded.

 This fixes two issues: first, if a module with SDT probes was loaded after
 sdt.ko was loaded, those new probes would not be available in DTrace.
 Second, if a module with SDT probes was unloaded while sdt.ko was loaded,
 the kernel would panic the next time DTrace had cause to try and do
 anything with the no-longer-existent probes.

 This makes it possible to create SDT probes in KLD modules, although there
 are still two caveats: first, any SDT probes in a KLD module must be part
 of a DTrace provider that is defined in that module.  At present DTrace
 only destroys probes when the provider is destroyed, so you can still
 panic the system if a KLD module creates new probes in a provider from a
 different module(including the kernel) and then unload the the first module.

 Second, the system will panic if you unload a module containing SDT probes
 while there is an active D script that has enabled those probes.

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

11 years agoMFC r227441
rstone [Sun, 27 May 2012 14:25:16 +0000 (14:25 +0000)]
MFC r227441

 Correct the types of the arguments to return probes of the syscall
 provider.  Previously we were erroneously supplying the argument types of
 the corresponding entry probe.

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

11 years agoMFC: r235332
rmacklem [Sun, 27 May 2012 14:20:46 +0000 (14:20 +0000)]
MFC: r235332
PR# 165923 reported intermittent write failures for dirty
memory mapped pages being written back on an NFS mount.
Since any thread can call VOP_PUTPAGES() to write back a
dirty page, the credentials of that thread may not have
write access to the file on an NFS server. (Often the uid
is 0, which may be mapped to "nobody" in the NFS server.)
Although there is no completely correct fix for this
(NFS servers check access on every write RPC instead of at
open/mmap time), this patch avoids the common cases by
holding onto a credential that recently opened the file
for writing and uses that credential for the write RPCs
being done by VOP_PUTPAGES() for both NFS clients.

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

11 years agoMFC: r234740
rmacklem [Sun, 27 May 2012 12:47:35 +0000 (12:47 +0000)]
MFC: r234740
Fix a leak of namei lookup path buffers that occurs when a
ZFS volume is exported via the new NFS server. The leak occurred
because the new NFS server code didn't handle the case where
a file system sets the SAVENAME flag in its VOP_LOOKUP() and
ZFS does this for the DELETE case.

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

11 years agoMFC 227430
rstone [Sun, 27 May 2012 00:38:36 +0000 (00:38 +0000)]
MFC 227430

 On i386, fbt probes are implemented by writing an invalid opcode over
 certain instructions in a function prologue or epilogue.  DTrace has a
 hook into the invalid opcode fault handler that checks whether the fault
 was due to an probe and if so, runs the DTrace magic.

 Upon returning from an invalid opcode fault caused by a probe, DTrace must
 emulate the instruction that was replaced with the invalid opcode and then
 return control to the instruction following the invalid opcode.

 There were a pair of related bugs in the emulation for the leave
 instruction.  The leave instruction is used to pop off a stack frame prior
 to returning from a function.  The emulation for this instruction must
 move the trap frame for the invalid opcode fault down the stack to the
 bottom of the stack frame that is being removed, and then execute an iret.

 At two points in this process, the emulation code was storing values above
 the current value of the stack pointer.  This opened up a window in which
 if we were two take an interrupt, the trap frame for the interrupt would
 overwrite the values stored on the stack, causing the system to panic
 later.

 The first bug was that at one point the emulation code saves the new value
 for $esp above the current stack pointer value.  The fix is to save this
 value instead inside of the original trap frame.  At this point we do
 not need the original trap frame so this is safe.

 The second bug is that when the emulate code loads $esp from the stack, it
 points part-way through the new trap frame instead of at its beginning.
 The emulation code adjusts the stack pointer to the correct value
 immediately afterwards, but this still leaves a one instruction window in
 which an interrupt would corrupt this trap frame.  Fix this by adjusting
 the stack frame value before loading it into $esp.

 This fixes panics in invop_leave on i386 when using fbt return probes.

 Reviewed by:  rpaulo, attilio

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

11 years agoMFC 227429
rstone [Sun, 27 May 2012 00:34:56 +0000 (00:34 +0000)]
MFC 227429

 The generated Makefile for the kernel was not running ctfconvert on
 object files corresponding to source files that had the compile-with
 option set in conf/files.  This means that any fbt probes for functions
 in that object file would not have correct argument types.

 The fix is to run ctfconvert on any target file that does not have the
 no-obj option set in files.

PR:           bin/160275
Reported by:  Paul Ambrose (ambrosehua AT gmail DOT com)

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

11 years agoMake yacc a bootstrap tool if building on head, since the new yacc is
des [Sun, 27 May 2012 00:21:27 +0000 (00:21 +0000)]
Make yacc a bootstrap tool if building on head, since the new yacc is
not 100% backward compatible.

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

11 years agoMFC r228513
alc [Sat, 26 May 2012 23:10:36 +0000 (23:10 +0000)]
MFC r228513
  Create large page mappings in pmap_map().

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

11 years agoMFC r235474:
bz [Sat, 26 May 2012 10:24:35 +0000 (10:24 +0000)]
MFC r235474:

 Switch to a standard 2 clause BSD license (from bsd-style-copyright).

 Approved by: Myricom Inc. (gallatin)
 Approved by: Intel Corporation (jfv)

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

11 years agoMFC: r234524
marius [Sat, 26 May 2012 09:31:25 +0000 (09:31 +0000)]
MFC: r234524

o Fixes:
  - When switching to 4-bit operation, send a SET_CLR_CARD_DETECT command
    to disconnect the card-detect pull-up resistor from the DAT3 line before
    sending the SET_BUS_WIDTH command.
  - Add the missing "reserved" zero entry to the mantissa table used to
    decode various CSD fields. This was causing SD cards to report that they
    could run at 30 MHz instead of the maximum 25 MHz mandated in the spec.
o Enhancements:
  - At the MMC layer, format various info from the CID into a string that
    uniquely identifies the card instance (manufacturer number, serial
    number, product name and revision, etc). Export it as an instance
    variable.
  - At the MMCSD layer, display the formatted card ID string, and also
    report the clock speed of the hardware (not the card's max speed), and
    the number of bits and number of blocks per transfer. It comes out like
    this now:
    mmcsd0: 968MB <SD SD01G 8.0 SN 276886905 MFG 08/2008 by 3 SD> at mmc0
    22.5MHz/4bit/128-block
o Use DEVMETHOD_END.
o Use NULL instead of 0 for pointers.

PR: 156496
Submitted by: Ian Lepore

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

11 years agoMFC: r234561
marius [Sat, 26 May 2012 09:13:38 +0000 (09:13 +0000)]
MFC: r234561

Interrupts must be disabled while handling a partial cache line flush,
as otherwise the interrupt handling code may modify data in the non-DMA
part of the cache line while we have it stashed away in the temporary
stack buffer, then we end up restoring a stale value.

PR: 160431
Submitted by: Ian Lepore

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

11 years agoMFC: r234293
marius [Sat, 26 May 2012 09:08:33 +0000 (09:08 +0000)]
MFC: r234293

Generate an obviously missing STOP when having finished transmitting data.
This fixes communication with PCF8563.

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

11 years agoMFC: r234248
marius [Sat, 26 May 2012 08:58:29 +0000 (08:58 +0000)]
MFC: r234248

Add a driver for the NXP (Philips) PCF8563 RTC.

Obtained from: NetBSD (pcf8563reg.h)

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

11 years agoMFC: r234898, r235207
marius [Sat, 26 May 2012 08:54:44 +0000 (08:54 +0000)]
MFC: r234898, r235207

Add initial support for booting from ZFS on sparc64. At least on Sun Fire
V100, the firmware is known to be broken and not allowing to simultaneously
open disk devices, causing attempts to boot from a mirror or RAIDZ to cause
a crash. This will be worked around later. The firmwares of newer sun4u models
don't seem to exhibit this problem though.

PR:             165025
Submitted by:   Gavin Mu

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

11 years agoMFC r234936 (emaste)
thompsa [Sat, 26 May 2012 08:44:50 +0000 (08:44 +0000)]
MFC r234936 (emaste)

 Relax restriction on direct tx to child ports

 Lagg(4) restricts the type of packet that may be sent directly to a child
 port, to avoid undesired output from accidental misconfiguration.
 Previously only ETHERTYPE_PAE was permitted.

 BPF writes to a lagg(4) child port are presumably intentional, so just
 allow them, while still blocking other packets that should take the
 aggregation path.

PR: kern/138620

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

11 years agoMFC r231130 (pjd)
thompsa [Sat, 26 May 2012 08:41:48 +0000 (08:41 +0000)]
MFC r231130 (pjd)

 Allow to set if_bridge(4) sysctls from /boot/loader.conf.

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

11 years agoMFC r232321
thompsa [Sat, 26 May 2012 08:25:41 +0000 (08:25 +0000)]
MFC r232321

 Correct the description for CTLFLAG_TUN and CTLFLAG_RDTUN, the declaring of a
 system tunable has never been implemented. This flag is only used by sysctl(8)
 to provide a helpful error message.

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

11 years agoMFC r232638
thompsa [Sat, 26 May 2012 08:23:26 +0000 (08:23 +0000)]
MFC r232638

  Fix typo in lagg options.

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

11 years agoMFC r234488
thompsa [Sat, 26 May 2012 08:02:45 +0000 (08:02 +0000)]
MFC r234488

 Move the interface media check to a taskqueue, some interfaces (usb) sleep
 during SIOCGIFMEDIA and we were holding locks.

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

11 years agoMFC r234487
thompsa [Sat, 26 May 2012 08:02:13 +0000 (08:02 +0000)]
MFC r234487

 Add linkstate to bridge(4), set the link to up when at least one underlying
 interface is up, otherwise the link is down.

 This, among other things, allows carp to work on a bridge.

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

11 years agoMFC r234163
thompsa [Sat, 26 May 2012 08:00:34 +0000 (08:00 +0000)]
MFC r234163

 Set the proto to LAGG_PROTO_NONE before calling the detach routine so packets
 are discarded, this is an issue because lacp drops the lock which may allow
 network threads to access freed memory. Expand the lock coverage so the
 detach/attach happen atomically.

Submitted by: Andrew Boyer (earlier version)

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

11 years agoMFC r232629,r232640
thompsa [Sat, 26 May 2012 07:59:56 +0000 (07:59 +0000)]
MFC r232629,r232640

  Add the ability to set which packet layers are used for the load balance hash
  calculation.

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

11 years agoMFC r232118
thompsa [Sat, 26 May 2012 07:58:58 +0000 (07:58 +0000)]
MFC r232118

 Only look for a usable MAC address for the bridge ID from ports within our
 bridge, this allows us to have more than one independent bridge in the same
 STP domain.

PR: kern/164369
Submitted by: Nikos Vassiliadis (earlier version)

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

11 years agoMFC r232014,r232030,r232070
thompsa [Sat, 26 May 2012 07:58:12 +0000 (07:58 +0000)]
MFC r232014,r232030,r232070

- bstp_input() always consumes the packet so remove the mbuf handling dance
  around it.
- Now that network interfaces advertise if they support linkstate notifications
  we do not need to perform a media ioctl every 15 seconds.
- Indicate this function decrements the timer as well as testing for expiry.

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

11 years agoMFC r227342
rstone [Fri, 25 May 2012 23:24:16 +0000 (23:24 +0000)]
MFC r227342

 The in-kernel CTF parser caches the result of its first attempt to parse
 CTF data from a module.  On subsequent attempts to retrieve CTF data for
 a module, return an error if there no CTF data.

 This fixes a panic if you try to enable fbt probes on a module without CTF
 data twice.

Submitted by: Paul Ambrose (ambrosehua AT gmail DOT com)

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

11 years agoMFC: r212804
marius [Fri, 25 May 2012 22:42:21 +0000 (22:42 +0000)]
MFC: r212804

Remove magic value.

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

11 years agoMFC: r235681
marius [Fri, 25 May 2012 19:57:01 +0000 (19:57 +0000)]
MFC: r235681

Rewrite nd6_sysctl_{d,p}rlist() to avoid misaligned accesses to char arrays
casted to structs by getting rid of these buffers entirely. In r169832, it
was tried to paper over this issue by 32-bit aligning the buffers. Depending
on compiler optimizations that still was insufficient for 64-bit architectures
with strong alignment requirements though.
While at it, add comments regarding the total lack of locking in this area.

Tested by: bz
Reviewed by: bz (slightly earlier version), yongari (earlier version)

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

11 years agoMFC r220502:
bschmidt [Fri, 25 May 2012 16:52:00 +0000 (16:52 +0000)]
MFC r220502:
Don't hardcode assumptions about basic rates, similar to what the rt2661
support code does. While here remove an unnecessary loop.

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

11 years agoMFC r235235-235237:
bschmidt [Fri, 25 May 2012 16:40:31 +0000 (16:40 +0000)]
MFC r235235-235237:
Update man page due to import of RT2800/RT3000 support.

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

11 years agoMFC r232946,232958,235233:
bschmidt [Fri, 25 May 2012 16:39:56 +0000 (16:39 +0000)]
MFC r232946,232958,235233:

r232946:
Update the rt2860's firmware and add a Makefile for the module. While
here remove the ucode header file which was used to generate the fw files
but by now is outdated.

r232958:
Import the latest microcode.h which was used to generate the current
firmware files and adjust the Makefile.

r235233:
Add support for Ralink RT2800/RT3000 chipsets.

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

11 years agoMFC: r234897
marius [Fri, 25 May 2012 14:57:02 +0000 (14:57 +0000)]
MFC: r234897

Add a command for showing the heap usage.

PR: 165025
Submitted by: Gavin Mu

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

11 years agoMFC: r234789
marius [Fri, 25 May 2012 14:54:18 +0000 (14:54 +0000)]
MFC: r234789

Add multiple inclusion protection.

PR: 165025
Submitted by: Gavin Mu

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