freebsd.git
28 hours agoWait for the callout to finish before unloading the module master github/master
bryanv [Thu, 24 Apr 2014 05:04:54 +0000 (05:04 +0000)]
Wait for the callout to finish before unloading the module

MFC after: 3 days

29 hours agoUpdate the date that was missed in r263259
bryanv [Thu, 24 Apr 2014 03:31:07 +0000 (03:31 +0000)]
Update the date that was missed in r263259

30 hours agoFix panic by adding mtx_assert() to urtwn_init_locked() and
kevlo [Thu, 24 Apr 2014 03:16:47 +0000 (03:16 +0000)]
Fix panic by adding mtx_assert() to urtwn_init_locked() and
urtwn_stop_locked().

Tested by: Anthony Jenkins <scoobi_doo at yahoo dot com>

31 hours agoAdd information about supported NCQ functionality to camcontrol identify.
smh [Thu, 24 Apr 2014 02:16:23 +0000 (02:16 +0000)]
Add information about supported NCQ functionality to camcontrol identify.

MFC after: 2 weeks

31 hours agoInclude bsd.opts.mk before Makefile.inc so Makefile.inc can do things
imp [Thu, 24 Apr 2014 02:02:51 +0000 (02:02 +0000)]
Include bsd.opts.mk before Makefile.inc so Makefile.inc can do things
based on MK_xxx symbols. Continue to include bsd.own.mk after
Makefile.inc to preserve current behavior.

31 hours agoHoist CR convenience function up from dhcpd config and use
imp [Thu, 24 Apr 2014 02:02:46 +0000 (02:02 +0000)]
Hoist CR convenience function up from dhcpd config and use
appropriately in nanobsd.sh. Also create CR0 for a errors allowed
version.

31 hours agoSwitch to using pkgng for all package management. Add necessary
imp [Thu, 24 Apr 2014 02:02:37 +0000 (02:02 +0000)]
Switch to using pkgng for all package management. Add necessary
bootstrap step for pkg. Fix a bunch of annoying little nits. We can
now build fat or thin images successfully for the dhcpd config.

31 hours agoAdd a routine for easy workaround any umount issues w/o hacking
imp [Thu, 24 Apr 2014 02:02:28 +0000 (02:02 +0000)]
Add a routine for easy workaround any umount issues w/o hacking
nanobsd.sh.

31 hours agoIntroduce NANO_PKG_META_BASE to allow moving where metadata for
imp [Thu, 24 Apr 2014 02:02:20 +0000 (02:02 +0000)]
Introduce NANO_PKG_META_BASE to allow moving where metadata for
packages is stored.

Sponsored by: Netflix

31 hours agoNo need for true here, remove it.
imp [Thu, 24 Apr 2014 02:02:11 +0000 (02:02 +0000)]
No need for true here, remove it.

Sponsored by: Netflix

31 hours agoOverride the parallel make target to use all CPUs.
imp [Thu, 24 Apr 2014 02:02:06 +0000 (02:02 +0000)]
Override the parallel make target to use all CPUs.

31 hours agoBegin fleshing out support for net80211 provided (legacy) sleep management.
adrian [Thu, 24 Apr 2014 01:39:53 +0000 (01:39 +0000)]
Begin fleshing out support for net80211 provided (legacy) sleep management.

This transitions the VAP in and out of SLEEP state based on:

* whether there's been an active transmission in the last (hardcoded) 500ms;
* whether the TIM from the AP indicates there is data available.

It uses the beacon reception to trigger the active traffic check.
This way there's no further timer running to wake up the CPU
from its own sleep states.

Right now the VAP isn't woken up for multicast traffic - mostly because
the only NIC I plan on doing this for right will auto wakeup and stay
awake for multicast traffic indicated in the TIM.  So I don't have
to manually keep the hardware awake.

This doesn't do anything if the NIC doesn't advertise it implements
the new SWSLEEP capability AND if the VAP doesn't have powersave
enabled.

It also doesn't do much with ath(4) as it doesn't currently implement
the SLEEP state.

Tested:

* AR5416, STA mode (with local ath(4) changes)

31 hours agoAdd a capability to indicate that the net80211 stack should be doing
adrian [Thu, 24 Apr 2014 01:28:39 +0000 (01:28 +0000)]
Add a capability to indicate that the net80211 stack should be doing
RUN->SLEEP->RUN transitions for station mode sleep management.

31 hours agoAdd some new ATA defines for SATA 3.1 spec
smh [Thu, 24 Apr 2014 01:28:14 +0000 (01:28 +0000)]
Add some new ATA defines for SATA 3.1 spec

31 hours agoSilence compiler warning due to missing return in idmap_id_to_numeric_domain_rid
smh [Thu, 24 Apr 2014 01:20:43 +0000 (01:20 +0000)]
Silence compiler warning due to missing return in idmap_id_to_numeric_domain_rid

32 hours agoEliminated optarg global being used outside of the function which called getopt
smh [Thu, 24 Apr 2014 01:12:52 +0000 (01:12 +0000)]
Eliminated optarg global being used outside of the function which called getopt

MFC after: 2 weeks

32 hours agoAdd the ability to set a minimum ashift size for ZFS pool creation or root level
smh [Thu, 24 Apr 2014 01:06:03 +0000 (01:06 +0000)]
Add the ability to set a minimum ashift size for ZFS pool creation or root level
vdev addition.

Change max_auto_ashift sysctl to error when an invalid value is requested instead
of silently limiting it.

32 hours agoExposed debug.acpi.max_tasks and debug.acpi.max_threads via sysctls so their
smh [Thu, 24 Apr 2014 00:41:02 +0000 (00:41 +0000)]
Exposed debug.acpi.max_tasks and debug.acpi.max_threads via sysctls so their
values can be viewed.

32 hours agoAllow the guest to read the TSC via MSR 0x10.
grehan [Thu, 24 Apr 2014 00:27:34 +0000 (00:27 +0000)]
Allow the guest to read the TSC via MSR 0x10.
NetBSD/amd64 does this, as does Linux on AMD CPUs.

Reviewed by: neel
MFC after: 3 weeks

34 hours agoRemove an unnecessary level of indirection for an argument.
rmacklem [Wed, 23 Apr 2014 23:13:46 +0000 (23:13 +0000)]
Remove an unnecessary level of indirection for an argument.
This simplifies the code and should avoid the clang sparc
port from generating an abort() call.

Requested by: rdivacky
Submitted by: jhb
MFC after: 2 weeks

34 hours agoAllow frames to be transmitted in either RUN or SLEEP state
adrian [Wed, 23 Apr 2014 22:44:49 +0000 (22:44 +0000)]
Allow frames to be transmitted in either RUN or SLEEP state

Frames transmitted during SLEEP state should be queued in the
power save queue before waking the unit up.  Otherwise DHCP
requests and such will be dropped if the NIC is asleep - the
NIC will wake up but not transmit the frame.

34 hours agoAllow the state of the interface to be "up" if the VAP is in SLEEP state.
adrian [Wed, 23 Apr 2014 22:43:39 +0000 (22:43 +0000)]
Allow the state of the interface to be "up" if the VAP is in SLEEP state.

Without this, the carrier will drop when the NIC transitions to SLEEP
and nothing will ever transmit.

35 hours agoModify the NFSv4 client's Pathconf RPC (actually a Getattr Op.)
rmacklem [Wed, 23 Apr 2014 22:13:10 +0000 (22:13 +0000)]
Modify the NFSv4 client's Pathconf RPC (actually a Getattr Op.)
so that it only does the RPC for names that are answered by the RPC.
Doing the RPC for other names is harmless, but unnecessary.

MFC after: 2 weeks

35 hours agoUpdate zfsboot to coincide with r264840 to bsdconfig(8) adding
dteske [Wed, 23 Apr 2014 22:06:43 +0000 (22:06 +0000)]
Update zfsboot to coincide with r264840 to bsdconfig(8) adding
GEOM support (thereby adding GEOM support to the disk selection
menu of bsdinstall(8)'s `zfsboot' module updated herein).

MFC after: 1 week
X-MFC-with: 264840

35 hours agoImplement GEOM based media device classification. You'll notice a few
dteske [Wed, 23 Apr 2014 22:04:04 +0000 (22:04 +0000)]
Implement GEOM based media device classification. You'll notice a few
different things from this commit:
+ More devices. Devices that were previously ignored are now present.
+ Faster device scanning. "There is no try, only Do" -- f_device_try()
  is no longer the basis of device scanning as GEOM provides [nearly]
  all devices (doesn't provide network devices).
+ More information available as non-root. Usually you have to be root
  to do things like taste filesystems, and that limits the amount of
  information available to non-root users; with GEOM, we see all even
  running unprivileged as the brunt of information (except for so-
  called ``dangerously dedicated'' file systems) is represented by the
  `kern.geom.confxml' sysctl(8) MIB.
NB: Only really useful for external scripts that use the API and run as
    non-root; where this code is used in bsdconfig(8) and bsdinstall(8)
    you are running as root so can detect even ``dangerously dedicated''
    file systems that are not present in GEOM; e.g., no PART class for
    a DOS filesystem written directly to disk without partition table).
+ No more use of legacy tools such as diskinfo(8) to get disk capacity
  or fdisk(8) to see partitions.

MFC after: 1 week

35 hours agoDon't free an mbuf twice. This only happens in very rare error
tuexen [Wed, 23 Apr 2014 21:20:55 +0000 (21:20 +0000)]
Don't free an mbuf twice. This only happens in very rare error
cases where the peer sends illegal sequencing information in
DATA chunks for an existing association.

MFC after: 3 days.

36 hours ago- Format the usage so that it fits in 80 cols and follows the standard
jhb [Wed, 23 Apr 2014 20:55:07 +0000 (20:55 +0000)]
- Format the usage so that it fits in 80 cols and follows the standard
  convention for long usage lines in manpages.
- Sort the option string passed to getopts and the case statements for
  the option returned by getopts.
- Add a -C option to specify the device to be used for the console
  (defaults to 'stdio')  (This could be let vmrun be run in the background
  by using /dev/nmdm0B or the like)
- Add a -H option to specify a host path to pass to bhyveload(8) via
  -h to back the host0: filesystem in bhyveload(8) (useful for loading
  kernels from the host into the guest without having to copy them into
  the guest's disk image first)

Reviewed by: neel
MFC after: 2 weeks

36 hours agoMFV r264830:
delphij [Wed, 23 Apr 2014 20:32:39 +0000 (20:32 +0000)]
MFV r264830:

4745 fix AVL code misspellings

MFC after: 2 weeks

36 hours agoMFV r264829:
delphij [Wed, 23 Apr 2014 20:29:46 +0000 (20:29 +0000)]
MFV r264829:

3897 zfs filesystem and snapshot limits

MFC after: 2 weeks

37 hours agoDisable UNMAP support for STEC 842 SSDs.
mav [Wed, 23 Apr 2014 19:50:35 +0000 (19:50 +0000)]
Disable UNMAP support for STEC 842 SSDs.

In some unknown cases UNMAP commands make device firmware stuck.

MFC after: 2 weeks

37 hours ago- Sprinkle const and static as appropriate.
marius [Wed, 23 Apr 2014 19:32:50 +0000 (19:32 +0000)]
- 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.

MFC after: 3 days

37 hours agoAdd quirk to configure headphones redirection on Intel DH87RL boards.
marius [Wed, 23 Apr 2014 19:25:59 +0000 (19:25 +0000)]
Add quirk to configure headphones redirection on Intel DH87RL boards.

MFC after: 3 days

38 hours agoAdd patches corresponding to r264826 and r264827
emaste [Wed, 23 Apr 2014 18:36:32 +0000 (18:36 +0000)]
Add patches corresponding to r264826 and r264827

38 hours agoMerge Clang r202185:
emaste [Wed, 23 Apr 2014 18:26:12 +0000 (18:26 +0000)]
Merge Clang r202185:

  Debug info: Generate debug info for variadic functions.
  Paired commit with LLVM.

  rdar://problem/13690847

This merege includes changes to use the Clang 3.4 API (revisions
199686 and 200082) in lib/CodeGen/CGDebugInfo.cpp:

getParamType  -> getArgType
getNumParams  -> getNumArgs
getReturnType -> getResultType

Sponsored by: DARPA, AFRL

38 hours agoMerge LLVM r202188:
emaste [Wed, 23 Apr 2014 18:25:11 +0000 (18:25 +0000)]
Merge LLVM r202188:

  Debug info: Support variadic functions.
  Variadic functions have an unspecified parameter tag after the last
  argument. In IR this is represented as an unspecified parameter in the
  subroutine type.

  Paired commit with CFE r202185.

  rdar://problem/13690847

  This re-applies r202184 + a bugfix in DwarfDebug's argument handling.

This merge includes a change to use the LLVM 3.4 API in
lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:

DwarfUnit -> CompileUnit

Sponsored by:       DARPA, AFRL

40 hours agoChange the vlapic timer frequency to be in the ballpark of contemporary
neel [Wed, 23 Apr 2014 16:50:40 +0000 (16:50 +0000)]
Change the vlapic timer frequency to be in the ballpark of contemporary
hardware. This also decouples the vlapic emulation from the host's TSC
frequency.

Requested by: grehan@

43 hours agoMake usage printing more consistent with other tools. github/projects/vxlan
ed [Wed, 23 Apr 2014 14:05:28 +0000 (14:05 +0000)]
Make usage printing more consistent with other tools.

- Introduce a separate usage() function.
- Don't use argv[0]. Directly name the application, as we do elsewhere.
- Don't prepend the application name.
- Don't print two newlines.

44 hours agoAllow .WAIT to appear in SUBDIR= lists, to provide some control over
ian [Wed, 23 Apr 2014 12:52:11 +0000 (12:52 +0000)]
Allow .WAIT to appear in SUBDIR= lists, to provide some control over
parallel build order.  All subdirs before a .WAIT will be built before
any subdirs after it.

Reviewed by: imp@

2 days agoUpdate to byacc 20140409
bapt [Wed, 23 Apr 2014 05:57:45 +0000 (05:57 +0000)]
Update to byacc 20140409
Among all the modifications, this new byacc also solves a 14 year old bug [1]

PR: bin/23254 [1]
Submitted by: marka@nominum.com [1]
MFC after: 3 weeks

2 days agoOops, revert r264801.
kevlo [Wed, 23 Apr 2014 05:54:55 +0000 (05:54 +0000)]
Oops, revert r264801.

2 days agoAdd a missing break.
kevlo [Wed, 23 Apr 2014 05:53:03 +0000 (05:53 +0000)]
Add a missing break.

2 days ago- Get transmit loop more in line with the other serial drivers.
hselasky [Wed, 23 Apr 2014 05:50:55 +0000 (05:50 +0000)]
- Get transmit loop more in line with the other serial drivers.
- Add a comment about FTDI and ZLPs.
- Correctly check odditiy of baud rate divisor.
- Correct IOCTL handling for "error" and "event" char.

MFC after: 1 weeks

2 days agoWrap the rate control re-init code in a lock, to serialise it with
adrian [Wed, 23 Apr 2014 05:19:45 +0000 (05:19 +0000)]
Wrap the rate control re-init code in a lock, to serialise it with
concurrent updates from any completing transmits in other threads.

This was exposed when doing power save work - net80211 is constantly
doing reassociations and it's causing the rate control state to get
blanked out.  This could cause the rate control code to assert.

This should be MFCed to stable/10 as it's a stability fix.

Tested:

* AR5416, STA

MFC after: 7 days

2 days agoFix grammar error and trailing newline.
bdrewery [Wed, 23 Apr 2014 02:21:17 +0000 (02:21 +0000)]
Fix grammar error and trailing newline.

Submitted by: danfe
MFC after: 3 days

2 days agoMove xdev knobs from release/arm/release.sh and into an
gjb [Wed, 23 Apr 2014 02:01:22 +0000 (02:01 +0000)]
Move xdev knobs from release/arm/release.sh and into an
XDEV_FLAGS variable in ${KERNCONF}.conf file.

MFC after: 3 days
X-MFC-Note: fix stable/10 XDEV_FLAGS local for branch
Sponsored by: The FreeBSD Foundation

2 days agoPlay musical-KNOBS a bit more with release/arm/release.sh.
gjb [Wed, 23 Apr 2014 01:47:07 +0000 (01:47 +0000)]
Play musical-KNOBS a bit more with release/arm/release.sh.

For stable/10, r264703 sets the correct WITH/WITHOUT
knobs to get xdev built with the arm-freebsd-gcc binary
installed.  Unfortunately, the same fix does not work on
head/.

Also, quite to my amazement, WITH_GCC=1 and WITH_GNUCXX=1
causes xdev to fail spectactularly at least on r264791.

The situation as it stands is:

 - gcc(1) is needed for the u-boot build.
 - cc(1) *cannot* be clang(1)

To shoe-horn the toolchain to make 'xdev' give what is
needed, remove WITH_GNUCXX=1 and add WITH_GCC_BOOTSTRAP=1.

MFC After: 1 week
X-MFC-To: stable/10 only
X-MFC-Note: after stable/10 is broken in this way...
Sponsored by: The FreeBSD Foundation

2 days agoImport byacc 20140409
bapt [Tue, 22 Apr 2014 22:11:22 +0000 (22:11 +0000)]
Import byacc 20140409

2 days agoImport libucl 0.4.0
bapt [Tue, 22 Apr 2014 22:02:06 +0000 (22:02 +0000)]
Import libucl 0.4.0
Adapt pkg(7) to the new libucl API

2 days agoSimplify reading pw.conf(5) by using getline(3)
bapt [Tue, 22 Apr 2014 21:07:56 +0000 (21:07 +0000)]
Simplify reading pw.conf(5) by using getline(3)

2 days agoFix installworld failure when kerberos source files have new timestamps
emaste [Tue, 22 Apr 2014 20:37:07 +0000 (20:37 +0000)]
Fix installworld failure when kerberos source files have new timestamps

If a kerberos .hx source file is newer than the .h copy, but the content
is the same, then during buildworld the "cmp -s || cp" command in the
.hx.h rule would do nothing, leaving the .h copy with the older
timestamp.  During installworld the rule would again be invoked, causing
a failure as neither cmp or cp would exist in the temporary path.

As the underlying issue should be resolved by r262209, unconditionally
copy the file.

No objection: peter@
Tested by: gjb@
Sponsored by: The FreeBSD Foundation

2 days agoCheck that port is started when MAC filter is set
gnn [Tue, 22 Apr 2014 20:19:09 +0000 (20:19 +0000)]
Check that port is started when MAC filter is set

The MAC filter set may be called without softc_lock held in the case of
SIOCADDMULTI and SIOCDELMULTI ioctls. The ioctl handler checks IFF_DRV_RUNNING
flag which implies port started, but it is not guaranteed to remain.
softc_lock shared lock can't be held in the case of these ioctls processing,
since it results in failure where kernel complains that non-sleepable
lock is held in sleeping thread.

Both problems are repeatable on LAG with LACP proto bring up.

Submitted by:   Andrew Rybchenko <Andrew.Rybchenko at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.

MFC after: 2 weeks

2 days agoUse calloc() in favor of malloc + memset.
delphij [Tue, 22 Apr 2014 18:55:21 +0000 (18:55 +0000)]
Use calloc() in favor of malloc + memset.

Reviewed by: neel

2 days agoKeep geom_uncompress(4) in line with geom_uzip(4), bring in the r264504 fix.
loos [Tue, 22 Apr 2014 18:08:34 +0000 (18:08 +0000)]
Keep geom_uncompress(4) in line with geom_uzip(4), bring in the r264504 fix.

Make sure not to start I/O bigger than MAXPHYS bytes.

Quoting r264504:

When we detect the condition, we'll reduce the block count and perform
a "short" read.  In g_uncompress_done() we need to consider the original
I/O length and stop early if we're about to deflate a block that we didn't
read.  By using bio_completed in the cloned BIO and not bio_length to
check for this, we automatically and gracefully handle short reads that
our providers may be doing on top of the short reads we may initiate
ourselves.

Reviewed by: marcel

2 days agoFactor out common ioport handler code for better hygiene -- pointed
tychon [Tue, 22 Apr 2014 16:13:56 +0000 (16:13 +0000)]
Factor out common ioport handler code for better hygiene -- pointed
out by neel@.

Approved by: neel (co-mentor)

2 days ago- Fix an off by one error when checking for the stop event. This resulted
jhb [Tue, 22 Apr 2014 15:17:32 +0000 (15:17 +0000)]
- Fix an off by one error when checking for the stop event.  This resulted
  in not showing the most recent event by default.
- When the stop even is hit, break out of the outer loop to stop fetching
  more events.

MFC after: 1 week

2 days agoDon't claim the adapter is idle if it is clearing a drive.
jhb [Tue, 22 Apr 2014 15:15:54 +0000 (15:15 +0000)]
Don't claim the adapter is idle if it is clearing a drive.

MFC after: 1 week

3 days agoFixes mkdir for the NFSv2 client that was broken by r264705.
rmacklem [Tue, 22 Apr 2014 04:42:46 +0000 (04:42 +0000)]
Fixes mkdir for the NFSv2 client that was broken by r264705.

Reported by: bdrewery
MFC after: 2 weeks

3 days agoVarious style(9) fixes and typos in grep, sort and patch.
pfg [Mon, 21 Apr 2014 22:52:18 +0000 (22:52 +0000)]
Various style(9) fixes and typos in grep, sort and patch.

MFC after: 3 days

3 days agoAdd parameterized position handling to printf(1).
pfg [Mon, 21 Apr 2014 22:47:18 +0000 (22:47 +0000)]
Add parameterized position handling to printf(1).

Add a new %n$ option to change the order of the parameters as
done in the ksh93 builtin printf (among others).

For example:
%printf '%2$1d %1$s\n' one 2 three 4
2 one
4 three

The feature was written by Garret D'Amore under a
BSD license for Nexenta/illumos.

Reference:
http://garrett.damore.org/2010/10/new-implementation-of-printf.html

PR: bin/152934
Obtained from: Illumos
MFC after: 2 weeks

3 days agoPrevent building tests when bootstrapping make.
jmmv [Mon, 21 Apr 2014 22:36:31 +0000 (22:36 +0000)]
Prevent building tests when bootstrapping make.

Should fix the breakage reported by tinderbox when WITHOUT_BMAKE is set,
which was probably introduced in r263346..

3 days agoAdd placeholder Kyuafiles for various top-level hierarchies.
jmmv [Mon, 21 Apr 2014 21:39:25 +0000 (21:39 +0000)]
Add placeholder Kyuafiles for various top-level hierarchies.

This change adds tests/ directories in the source tree to create various
subdirectories in /usr/tests/ and to install placeholder Kyuafiles for
them.

the relevant hierarchies are: cddl, etc, games, gnu and secure.

The reason for this is to simplify the addition of new test programs for
utilities or libraries under any of these directories.  Doing so on a
case by case basis is unnecessary and is quite an obscure process.

3 days agoUse case insensitive match in portsnap.
delphij [Mon, 21 Apr 2014 19:33:27 +0000 (19:33 +0000)]
Use case insensitive match in portsnap.

PR: bin/186510
Submitted by: olli
MFC after: 2 weeks

3 days agoAdd {} braces so that the code conforms to the indentation.
rmacklem [Mon, 21 Apr 2014 19:17:19 +0000 (19:17 +0000)]
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.

Reviewed by: glebius
MFC after: 2 weeks

3 days agoFor an NFSv4 mount with the "nocto" option, don't get the
rmacklem [Mon, 21 Apr 2014 19:10:23 +0000 (19:10 +0000)]
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.

MFC after: 2 weeks

3 days agolibc/stdio: Fail fdopen() on an execute-only fd.
jilles [Mon, 21 Apr 2014 17:40:23 +0000 (17:40 +0000)]
libc/stdio: Fail fdopen() on an execute-only fd.

An execute-only fd (opened with O_EXEC) allows neither read() nor write()
and is therefore incompatible with all stdio modes. Therefore, the [EINVAL]
error applies.

Also adjust the similar check in freopen() with a NULL path, even though
this checks an fd which is already from a FILE.

3 days agourndis(4) will first appear in 9.3-RELEASE.
gjb [Mon, 21 Apr 2014 16:35:19 +0000 (16:35 +0000)]
urndis(4) will first appear in 9.3-RELEASE.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

3 days agolibc: Add fopen() test to regression Makefile.
jilles [Mon, 21 Apr 2014 12:39:35 +0000 (12:39 +0000)]
libc: Add fopen() test to regression Makefile.

3 days agoRename the fp{get,set}* files so they no longer conflict with the softfloat
andrew [Mon, 21 Apr 2014 09:43:22 +0000 (09:43 +0000)]
Rename the fp{get,set}* files so they no longer conflict with the softfloat
version of these files. Keep them within this directory so they can be used
to implement the armv6 version of these functions.

4 days agoRewrite the cleanup code to, well, actually work right.
adrian [Mon, 21 Apr 2014 06:07:08 +0000 (06:07 +0000)]
Rewrite the cleanup code to, well, actually work right.

The existing cleanup code was based on the Atheros reference driver
from way back and stuff that was in Linux ath9k.  It turned out to be ..
rather silly.

Specifically:

* The whole method of determining whether there's hardware-queued frames
  was fragile and the BAW would never quite work right afterwards.

* The cleanup path wouldn't correctly pull apart aggregate frames in the
  queue, so frames would not be freed and the BAW wouldn't be correctly
  updated.

So to implement this:

* Pull the aggregate frames apart correctly and handle each separately;
* Make the atid->incomp counter just track the number of hardware queued
  frames rather than try to figure it out from the BAW;
* Modify the aggregate completion path to handle it as a single frame
  (atid->incomp tracks the one frame now, not the subframes) and
  remove the frames from the BAW before completing them as normal frames;
* Make sure bf->bf_next is NULled out correctly;
* Make both aggregate session and non-aggregate path frames now be
  handled via the incompletion path.

TODO:

* kill atid->incomp; the driver tracks the hardware queued frames
  for each TID and so we can just use that.

This is a stability fix that should be merged back to stable/10.

Tested:

* AR5416, STA

MFC after: 7 days

4 days ago* Modify the debugging output from pause/resume to note the TID and STA
adrian [Mon, 21 Apr 2014 02:09:14 +0000 (02:09 +0000)]
* Modify the debugging output from pause/resume to note the TID and STA
  MAC
* Now that the paused < 0 bugs have been identified, make the DPRINTF()
  a device_printf() again.  Anything else that shows up here needs to be
  fixed immediately.

Tested:

* AR5416, STA mode

MFC after: 7 days

4 days agoMake sure bf_next is NULL'ed out when we're completing up an aggregate
adrian [Mon, 21 Apr 2014 02:05:51 +0000 (02:05 +0000)]
Make sure bf_next is NULL'ed out when we're completing up an aggregate
frame through the cleanup path.

Whilst here, fix the indenting for something I messed up.

Tested:

* AR5416, STA mode

4 days agobsd-family-tree: Add missing releases
eadler [Mon, 21 Apr 2014 02:04:37 +0000 (02:04 +0000)]
bsd-family-tree: Add missing releases

- NetBSD 6.0.4
- DragonFly 3.6.2

4 days agoFix a cleanup hang if cleanup gets called _during_ an active cleanup.
adrian [Mon, 21 Apr 2014 01:02:49 +0000 (01:02 +0000)]
Fix a cleanup hang if cleanup gets called _during_ an active cleanup.

During power save testing I noticed that the cleanup code is being
called during a RUN->RUN state transition.  It's because the net80211
stack is treating that (for reasons I don't quitey know yet) as a
reassociation and this calls the node cleanup code.  The reason it's
seeing a RUN->RUN transition is because during active power save
stuff it's possible that the RUN->SLEEP and SLEEP->RUN transitions
happen so quickly that the deferred net80211 vap state code
"loses" a transition, namely the intermediary SLEEP transition.

So, this was causing the node reassociation code to sometimes be called
twice in quick succession and this would result in ath_tx_tid_cleanup()
to be called again.  The code calling it would always call pause, and
then only call resume if the TID didn't have "cleanup_inprogress" set.
Unfortunately it didn't check if it was already set on entry, so it
would pause but not call resume.  Thus, paused would be called more
than once (once before each entry into ath-tx_tid_cleanup()) but resume
would only be called once when the cleanup state was finished.

This doesn't entirely fix all of the issues seen in the cleanup path
but it's a necessary first step.

Since this is a stability fix, it should be merged to stable/10 at some
point.

Tested:

* AR5416, STA mode

MFC after: 7 days

4 days agoModify the NFSv4 client create/mkdir RPC so that it acquires
rmacklem [Sun, 20 Apr 2014 22:19:00 +0000 (22:19 +0000)]
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.

MFC after: 2 weeks

4 days agoAdd consistency checks to ensure that fragments of a user message
tuexen [Sun, 20 Apr 2014 21:11:39 +0000 (21:11 +0000)]
Add consistency checks to ensure that fragments of a user message
have the same U-bit.

MFC after: 3 days

4 days agoApply a slightly different color hammer to arm/release.sh:
gjb [Sun, 20 Apr 2014 20:46:06 +0000 (20:46 +0000)]
Apply a slightly different color hammer to arm/release.sh:

 - gcc(1) fails to build usr.bin/dtc
 - lack of WITH_GNUCXX=1 causes cc1plus(1) calls to fail
 - u-boot fails to build with clang (hard-coded gcc(1) calls)

Implement the proper incantation of WITH_/WITHOUT_ knobs
to get arm snapshot builds working again.

Since the cc(1) binary is no longer expected to be clang(1),
remove the chroot(8) post-install cc(1) overwrite.

MFC After: 3 days
X-MFC-With: r264518,r264697,r264698
Tested on: stable/10@r264677 RPI-B
Sponsored by: The FreeBSD Foundation

4 days agoRemove uncessary cache and TLB maintenance ops.
ian [Sun, 20 Apr 2014 18:21:05 +0000 (18:21 +0000)]
Remove uncessary cache and TLB maintenance ops.

 - These were needed on armv4/5 (VIVT cache), not needed on armv6.
 - The wbinv_all call can't be used on SMP systems; cache operations by
   set/way are not broadcast to other cores.
 - The TLB maintenance operations needed for pmap_growkernel() happen in
   pmap_grow_l2_bucket(), so there's no need to flush all TLB entries at
   the end.
 - There may not be any need for the TLB flush at the beginning of
   pmap_release(), but it's left in for now pending more investigation.

Pointed out by:    Svatopluk Kraus <onwahe@gmail.com>
Discussed with:    cognet@

4 days agoSend also a packet containing an ABORT chunk in response to an OOTB packet
tuexen [Sun, 20 Apr 2014 18:15:23 +0000 (18:15 +0000)]
Send also a packet containing an ABORT chunk in response to an OOTB packet
containing a COOKIE-ECHO chunk.

MFC after: 3 days

4 days agoFix EOL escape.
gjb [Sun, 20 Apr 2014 16:34:10 +0000 (16:34 +0000)]
Fix EOL escape.

MFC after: 3 days
X-MFC-With: r264697
Sponsored by: The FreeBSD Foundation

4 days agoWhen building the 'xdev' target when WITH_GCC=1 and
gjb [Sun, 20 Apr 2014 16:33:28 +0000 (16:33 +0000)]
When building the 'xdev' target when WITH_GCC=1 and
WITHOUT_CLANG_IS_CC=1, it appears WITHOUT_CLANG=1 must
also be set.

While here, reorder the lines to put the WITH_* and
WITHOUT_* entries on the same line.

MFC After: 3 days
X-MFC-With: r264518
Tested on: stable/10@r264677
Sponsored by: The FreeBSD Foundation

4 days agoAdd the deprecated fp{get,set}* functions, a few ports use them.
andrew [Sun, 20 Apr 2014 14:58:14 +0000 (14:58 +0000)]
Add the deprecated fp{get,set}* functions, a few ports use them.

4 days agoFix a comment typo; conversion tables are for leap years, not leap seconds.
ian [Sun, 20 Apr 2014 13:37:22 +0000 (13:37 +0000)]
Fix a comment typo; conversion tables are for leap years, not leap seconds.

4 days agoApply upstream patch for EC calculation bug and bump version addendum.
des [Sun, 20 Apr 2014 11:34:33 +0000 (11:34 +0000)]
Apply upstream patch for EC calculation bug and bump version addendum.

5 days agoBackport from projects/pf r263908:
mm [Sun, 20 Apr 2014 09:17:48 +0000 (09:17 +0000)]
Backport from projects/pf r263908:

De-virtualize UMA zone pf_mtag_z and move to global initialization part.

The m_tag struct does not know about vnet context and the pf_mtag_free()
callback is called unaware of current vnet. This causes a panic.

MFC after: 1 week

5 days agoMFi386: r257858 (by kib)
nyan [Sun, 20 Apr 2014 05:40:13 +0000 (05:40 +0000)]
MFi386: r257858 (by kib)

  Fix signal delivery for the iBCS2 binaries.

5 days agobsd-family-tree: Add NetBSD 6.1.4, 6.0.5
eadler [Sun, 20 Apr 2014 03:27:38 +0000 (03:27 +0000)]
bsd-family-tree: Add NetBSD 6.1.4, 6.0.5

Part of 6.0.4 is still missing: this really needs to be automated

5 days agosys/capsicum.h: Remove not very useful visibility guards.
jilles [Sat, 19 Apr 2014 22:18:57 +0000 (22:18 +0000)]
sys/capsicum.h: Remove not very useful visibility guards.

Since <sys/capsicum.h> does not comply to any standards, standards-compliant
applications do not include it and it is not useful to restrict what is
exposed depending on the requested standard.

In addition, the use of types like u_int makes the header fail in strict
standards compliance modes anyway.

5 days agoUse consistently debug output instead of an unconditional printf.
tuexen [Sat, 19 Apr 2014 20:55:51 +0000 (20:55 +0000)]
Use consistently debug output instead of an unconditional printf.

MFC after: 3 days

5 days agoModify the NFSv4 client open/create RPC so that it acquires
rmacklem [Sat, 19 Apr 2014 19:40:20 +0000 (19:40 +0000)]
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.

MFC after: 2 weeks

5 days agoadd a TON of missing event handlers with quite possibly bogus
jmg [Sat, 19 Apr 2014 19:32:54 +0000 (19:32 +0000)]
add a TON of missing event handlers with quite possibly bogus
descrptions... If you're one of the many people who forgot to document
their work and don't like my description, well, do your job and update
it...

5 days agoSend the correct error cause, when a DATA chunk with no user data
tuexen [Sat, 19 Apr 2014 19:21:06 +0000 (19:21 +0000)]
Send the correct error cause, when a DATA chunk with no user data
is received. This bug was reported by Irene Ruengeler.

MFC after: 3 days

5 days agogarbage collect something that hasn't been triggered in almost 5 years...
jmg [Sat, 19 Apr 2014 19:08:08 +0000 (19:08 +0000)]
garbage collect something that hasn't been triggered in almost 5 years...
the last consumer was removed a couple years ago...

5 days agologin: Remove broken dialup log message.
jilles [Sat, 19 Apr 2014 13:47:32 +0000 (13:47 +0000)]
login: Remove broken dialup log message.

For 10 years, the "DIALUP <tty>, <user>" message has required having a
hostname (-h) instead of not having a hostname; therefore, it is never
logged. Given that dialup is obsolete and this has not been fixed, remove
the log message.

Note that LOGALL, which is defined by default, logs a message for all
logins, including dialup logins.

5 days agolanginfo.h: Hide YESSTR and NOSTR in strict POSIX mode.
jilles [Sat, 19 Apr 2014 12:38:01 +0000 (12:38 +0000)]
langinfo.h: Hide YESSTR and NOSTR in strict POSIX mode.

YESSTR and NOSTR are obsolete and are only in old SUS.

6 days agoUpdate UMASS manual page to mention newer host controller drivers.
hselasky [Sat, 19 Apr 2014 06:32:51 +0000 (06:32 +0000)]
Update UMASS manual page to mention newer host controller drivers.

Submitted by: Aseem Jolly <aseem.jolly@gmail.com>

6 days agoInstall newly added bsd.mkopt.mk.
jkim [Sat, 19 Apr 2014 04:59:56 +0000 (04:59 +0000)]
Install newly added bsd.mkopt.mk.

6 days agoadd link to crypto(4)...
jmg [Sat, 19 Apr 2014 01:52:03 +0000 (01:52 +0000)]
add link to crypto(4)...

MFC after: 1 week

6 days agoModify the Lookup RPC for NFSv4 so that it acquires directory
rmacklem [Fri, 18 Apr 2014 22:05:34 +0000 (22:05 +0000)]
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.

MFC after: 2 weeks

6 days agoMFV r264668:
delphij [Fri, 18 Apr 2014 22:04:58 +0000 (22:04 +0000)]
MFV r264668:

4754 io issued to near-full luns even after setting noalloc threshold
4755 mg_alloc_failures is no longer needed

illumos/illumos@b6240e830b871f59c22a3918aebb3b36c872edba

MFC after: 2 weeks

6 days agoMFV r264667:
delphij [Fri, 18 Apr 2014 21:35:23 +0000 (21:35 +0000)]
MFV r264667:

4752 fan out read zio taskqs

illumos/illumos-gate@1b497ab83e8f1c58bba5da59c649207a442a4720