freebsd.git
10 years agoMerge head
sjg [Sun, 27 Apr 2014 08:13:43 +0000 (08:13 +0000)]
Merge head

10 years agoAdd a UEFI kernel configuration to include the VT kernel, and
gjb [Fri, 25 Apr 2014 21:47:24 +0000 (21:47 +0000)]
Add a UEFI kernel configuration to include the VT kernel, and
replace the vt_vga driver with vt_efifb.

This is intended to help with snapshot builds only.

There is no intention to MFC this commit.

Sponsored by: The FreeBSD Foundation

10 years agoAdd a separate script to build the memstick.img and the
gjb [Fri, 25 Apr 2014 21:11:00 +0000 (21:11 +0000)]
Add a separate script to build the memstick.img and the
mini-memstick.img with UEFI support.

As the comments in the file suggest, 1) there must
be existing ${.OBJDIR}/usr/src/release/{release,bootonly};
2) TARGET/TARGET_ARCH must be amd64; and 3) it must be
a vt(4)-enabled kernel with vt_efifb (*not* vt_vga).

This script is not hooked into release/Makefile in any way
until further testing is complete.

Sponsored by: The FreeBSD Foundation

10 years agoThe FTDI product ID we've been calling BEAGLEBONE is actually TI XDS100V2,
ian [Fri, 25 Apr 2014 19:47:27 +0000 (19:47 +0000)]
The FTDI product ID we've been calling BEAGLEBONE is actually TI XDS100V2,
a jtag debugging product, which was used on early Beaglebone boards (later
boards used a standard FTDI 2232C product ID).  Change the name accordingly,
and also add an entry for XDS100V3, the latest version of that product
which has its own new product ID number.

10 years agoFix indentation for diff reduction with commits to follow.
gjb [Fri, 25 Apr 2014 19:43:18 +0000 (19:43 +0000)]
Fix indentation for diff reduction with commits to follow.

Sponsored by: The FreeBSD Foundation

10 years agoGeneralize FOO.clang to FOO.${COMPILER_TYPE}. There's no reason these
imp [Fri, 25 Apr 2014 19:25:57 +0000 (19:25 +0000)]
Generalize FOO.clang to FOO.${COMPILER_TYPE}. There's no reason these
need to be clang specific. Also generalize things a bit.

10 years agoSplit up the options into those used only by bsd.mk.* or sys.mk and
imp [Fri, 25 Apr 2014 19:25:53 +0000 (19:25 +0000)]
Split up the options into those used only by bsd.mk.* or sys.mk and
the rest. Add note of caution for the surprises that popped up. MK_SSP
is the only one used by sys.mk, and it likely needs even extra
attention.

10 years agoEliminate NO_INCS. It is used one place, and MK_TOOLCHAIN=no will
imp [Fri, 25 Apr 2014 19:25:45 +0000 (19:25 +0000)]
Eliminate NO_INCS. It is used one place, and MK_TOOLCHAIN=no will
handle the job just as well. Opt for simplicity rather than one more
option.

10 years agoNow that all the NO_foo expressed in this loop have been removed from
imp [Fri, 25 Apr 2014 19:25:37 +0000 (19:25 +0000)]
Now that all the NO_foo expressed in this loop have been removed from
the tree, start warning that NO_foo is deprecated. It was supposed to
be gone from the tree as a user-setting a long time ago...

10 years agoSpell NO_PROFILE= as MK_PROFILE=no.
imp [Fri, 25 Apr 2014 19:25:26 +0000 (19:25 +0000)]
Spell NO_PROFILE= as MK_PROFILE=no.

10 years agoNO_DEBUG_FILES -> MK_DEBUG_FILES=no in last remaining place.
imp [Fri, 25 Apr 2014 19:25:18 +0000 (19:25 +0000)]
NO_DEBUG_FILES -> MK_DEBUG_FILES=no in last remaining place.

10 years agoKill last remaining NO_INSTALLLIB in tree by converting it over to
imp [Fri, 25 Apr 2014 19:25:13 +0000 (19:25 +0000)]
Kill last remaining NO_INSTALLLIB in tree by converting it over to
MK_INSTALLIB=no.

10 years agoEliminate last vestigies of NO_MAN= in the tree. Also, remove
imp [Fri, 25 Apr 2014 19:25:05 +0000 (19:25 +0000)]
Eliminate last vestigies of NO_MAN= in the tree. Also, remove
ineffectual NOMAN= lines. These don't change the build at all.

10 years agoRemove NO_CTF, exccept as an undocumented compatibility
imp [Fri, 25 Apr 2014 19:25:00 +0000 (19:25 +0000)]
Remove NO_CTF, exccept as an undocumented compatibility
option. Convert all other uses to MK_CTF=no. Set MK_CTF=no rather than
the indirect WITHOUT_CDDL in filemon regression. It is expected that
NO_CTF will be removed in FreeBSD 12 entirely.

10 years agoRemove device type from the uftdi_devs table, enhance the jtag-skip feature.
ian [Fri, 25 Apr 2014 19:13:57 +0000 (19:13 +0000)]
Remove device type from the uftdi_devs table, enhance the jtag-skip feature.

Device type and revision is now determined from the bcdDevice field and
doesn't need to be in the table at all.  The feature that skips creation
of /dev/ttyU* entries for jtag and gpio interfaces is enhanced:

 - The feature is now optional, but enabled by default.  A tunable and
   sysctl are available to control it: hw.usb.uftdi.skip_jtag_interfaces.
 - We no longer assume interface #0 is the only jtag interface.  Up to
   eight interfaces per chip can be flagged as jtag.  (Current ftdi chips
   support a max of 4 interfaces; this leaves room for growth.)
 - Some manufacturers don't change the product ID or use the same ID for
   different devices intended for both serial-comms and jtag/gpio use.
   Often while the product ID is the same, the product name string is
   different, so it's now possible to search for the product name in a
   table of strings and get the set of non-tty interfaces from that table.

10 years agoRevert r264907 and r264908:
gjb [Fri, 25 Apr 2014 18:46:54 +0000 (18:46 +0000)]
Revert r264907 and r264908:

Restore make-memstick.sh back to its original state to
unbreak booting for machines that do not support GPT.

I have in-progress work to keep the MBR layout and add
the EFI partition, but it is not yet ready, and does
need at least one full release build to be certain it
does not break.

Sponsored by: The FreeBSD Foundation

10 years agoRespect and track the enable bit in the PCI configuration address word.
grehan [Fri, 25 Apr 2014 17:35:34 +0000 (17:35 +0000)]
Respect and track the enable bit in the PCI configuration address word.
Ignore writes, and return 0xff's, on config accesses when not set.
Behaviour now matches that seen on h/w.

Found with a NetBSD/amd64 guest.

Reviewed by: tychon
MFC after: 3 weeks

10 years agoFix spelling error.
bdrewery [Fri, 25 Apr 2014 15:27:19 +0000 (15:27 +0000)]
Fix spelling error.

MFC after: 3 days

10 years agoStyle fixes, mostly trailing whitespace elimination. No functional change.
asomers [Fri, 25 Apr 2014 14:35:30 +0000 (14:35 +0000)]
Style fixes, mostly trailing whitespace elimination.  No functional change.

Reported by: pho
MFC after: 3 weeks

10 years agoProvide a very basic stub for the 8042 PS/2 keyboard controller.
tychon [Fri, 25 Apr 2014 13:38:18 +0000 (13:38 +0000)]
Provide a very basic stub for the 8042 PS/2 keyboard controller.

Reviewed by: jhb
Approved by: neel (co-mentor)

10 years agoThe current API for adding rules with pool addresses is the following:
glebius [Fri, 25 Apr 2014 11:36:11 +0000 (11:36 +0000)]
The current API for adding rules with pool addresses is the following:

- DIOCADDADDR adds addresses and puts them into V_pf_pabuf
- DIOCADDRULE takes all addresses from V_pf_pabuf and links
  them into rule.

The ugly part is that if address is a table, then it is initialized
in DIOCADDRULE, because we need ruleset, and DIOCADDADDR doesn't
supply ruleset. But if address is a dynaddr, we need address family,
and address family could be different for different addresses in one
rule, so dynaddr is initialized in DIOCADDADDR.

This leads to the entangled state of addresses on V_pf_pabuf. Some are
initialized, and some not. That's why running pf_empty_pool(&V_pf_pabuf)
can lead to a panic on a NULL table address.

Since proper fix requires API/ABI change, for now simply plug the panic
in pf_empty_pool().

Reported by: danger

10 years agoAdd preliminary support for the Realtek RTL8188EUS and RTL8188ETV chipsets.
kevlo [Fri, 25 Apr 2014 08:01:22 +0000 (08:01 +0000)]
Add preliminary support for the Realtek RTL8188EUS and RTL8188ETV chipsets.

Committed over the TP-LINK TL-WN725N v2 (RTL8188EUS) on amd64 with WPA.

10 years agoConstify.
delphij [Fri, 25 Apr 2014 04:01:25 +0000 (04:01 +0000)]
Constify.

10 years agoPut my inner hobgoblin on a leash: These routines, at least, needed to
imp [Fri, 25 Apr 2014 02:29:29 +0000 (02:29 +0000)]
Put my inner hobgoblin on a leash: These routines, at least, needed to
be {} so they don't run in a subshell.

10 years agoStyle cleanup
gjb [Fri, 25 Apr 2014 01:55:14 +0000 (01:55 +0000)]
Style cleanup
 - Indent 1 full tab where needed
 - Use $() for shell exec
 - Insert a space between '$(( ))' parens

MFC After: 1 week
X-MFC-With: r264907
Sponsored by: The FreeBSD Foundation

10 years agoRefactor make-memstick.sh to avoid creating the 'dangerously
gjb [Fri, 25 Apr 2014 01:38:57 +0000 (01:38 +0000)]
Refactor make-memstick.sh to avoid creating the 'dangerously
dedicated' partition scheme, reported to cause the memstick.img
to fail to boot.

Similar to how make-memstick.sh worked on stable/8, use makefs(8)
to create the actual filesystem.  Then calculate the size of the
resulting image file, create the GPT partition scheme, then dd(1)
the filesystem created with makefs(8) to the freebsd-ufs GPT
partition.

This was tested on a known-working machine[1] for regression, and
a known-not-working machine[2] to ensure the boot issue has been
resolved.

Testers: myself [1], db [2]
MFC After: 1 week
Sponsored by: The FreeBSD Foundation

10 years agoAdd a SLEEP->SCAN transition. Without this a disassociate or scan
adrian [Fri, 25 Apr 2014 01:20:10 +0000 (01:20 +0000)]
Add a SLEEP->SCAN transition.  Without this a disassociate or scan
request during SLEEP results in a hang.

Whilst I'm here, add in some disabled code that will transition to RUN
if there's multicast traffic.  It's not needed for Atheros hardware but
it may be for other hardware.

Tested:

* AR5416, STA mode (powersave)
* AR5212, STA mode (powersave)

10 years agoFix subnet and default routes on different FIBs on the same subnet.
asomers [Thu, 24 Apr 2014 23:56:56 +0000 (23:56 +0000)]
Fix subnet and default routes on different FIBs on the same subnet.

These two bugs are closely related.  The root cause is that ifa_ifwithnet
does not consider FIBs when searching for an interface address.

sys/net/if_var.h
sys/net/if.c
Add a fib argument to ifa_ifwithnet and ifa_ifwithdstadddr.  Those
functions will only return an address whose interface fib equals the
argument.

sys/net/route.c
Update calls to ifa_ifwithnet and ifa_ifwithdstaddr with fib
arguments.

sys/netinet/in.c
Update in_addprefix to consider the interface fib when adding
prefixes.  This will prevent it from not adding a subnet route when
one already exists on a different fib.

sys/net/rtsock.c
sys/netinet/in_pcb.c
sys/netinet/ip_output.c
sys/netinet/ip_options.c
sys/netinet6/nd6.c
Add RT_DEFAULT_FIB arguments to ifa_ifwithdstaddr and ifa_ifwithnet.
In some cases it there wasn't a clear specific fib number to use.
In others, I was unable to test those functions so I chose
RT_DEFAULT_FIB to minimize divergence from current behavior.  I will
fix some of the latter changes along with PR kern/187553.

tests/sys/netinet/fibs_test.sh
tests/sys/netinet/udp_dontroute.c
tests/sys/netinet/Makefile
Revert r263738.  The udp_dontroute test was right all along.
However, bugs kern/187550 and kern/187553 cancelled each other out
when it came to this test.  Because of kern/187553, ifa_ifwithnet
searched the default fib instead of the requested one, but because
of kern/187550, there was an applicable subnet route on the default
fib.  The new test added in r263738 doesn't work right, however.  I
can verify with dtrace that ifa_ifwithnet returned the wrong address
before I applied this commit, but route(8) miraculously found the
correct interface to use anyway.  I don't know how.

Clear expected failure messages for kern/187550 and kern/187552.

PR: kern/187550
PR: kern/187552
Reviewed by: melifaro
MFC after: 3 weeks
Sponsored by: Spectra Logic

10 years agoFix beri_simplebus probing. It's not allowed to have two modules on the
brooks [Thu, 24 Apr 2014 23:28:09 +0000 (23:28 +0000)]
Fix beri_simplebus probing.  It's not allowed to have two modules on the
same bus with the same name.

Tweak the description so it's clear the BERI version attached.

Sponsored by: DARPA, AFRL

10 years agoAdd option WITHOUT_VI to not build/install vi. vi was the largest
imp [Thu, 24 Apr 2014 23:17:40 +0000 (23:17 +0000)]
Add option WITHOUT_VI to not build/install vi. vi was the largest
binary without a knob to turn it off.

10 years agoUse MK_OPENLDAP in preference to WITH_OPENLDAP and make it a default
imp [Thu, 24 Apr 2014 23:17:31 +0000 (23:17 +0000)]
Use MK_OPENLDAP in preference to WITH_OPENLDAP and make it a default
NO option to match the opt-in nature of the historical nature of this
option.

10 years agoModify the ioctl path to support querying things if the vap state is
adrian [Thu, 24 Apr 2014 23:12:40 +0000 (23:12 +0000)]
Modify the ioctl path to support querying things if the vap state is
SLEEP rather than RUN.

Without this things like 'ifconfig wlan0 list sta' don't work when the
NIC is power save.

Tested:

* AR5212, STA mode (with powersave)
* AR5416, STA mode (with powersave)

10 years agoFix the AR5211 power mode tracking stuff.
adrian [Thu, 24 Apr 2014 23:11:36 +0000 (23:11 +0000)]
Fix the AR5211 power mode tracking stuff.

Tested:

* AR5211, STA mode

10 years agoFix the AR5210 HAL code to store the association ID and restore it
adrian [Thu, 24 Apr 2014 23:11:18 +0000 (23:11 +0000)]
Fix the AR5210 HAL code to store the association ID and restore it
upon reset.

Tested:

* AR5210, STA mode

10 years agoFix ah_powerMode to be set at the correct place for the AR5210.
adrian [Thu, 24 Apr 2014 23:10:24 +0000 (23:10 +0000)]
Fix ah_powerMode to be set at the correct place for the AR5210.

Tested:

* AR5210, STA mode

10 years agoMerge from CheriBSD:
brooks [Thu, 24 Apr 2014 22:28:53 +0000 (22:28 +0000)]
Merge from CheriBSD:

commit 003649d9622ce252a2794ae5891ee7e7c209caca
Author: Robert N. M. Watson <robert.watson@cl.cam.ac.uk>
Date:   Wed Feb 5 18:32:09 2014 +0000

    Teach the FreeBSD/beri boot to "auto-detect" whether argument 4 (a3) is a
    memory size of pointer to a struct bootinfo * by looking at its value and
    seeing whether it is pointer-like.  If a pointer, assume it's a bootinfo
    and extract memsize from it instead; otherwise, use it as memsize directly.
    This allows kernels to support bootinfo being passed by loader (and boot2)
    while still supporting older Miniboot setups.

commit f7045af9a1e92b6bd92541fe5d25abf66d824e8f
Author: Robert N. M. Watson <robert.watson@cl.cam.ac.uk>
Date:   Thu Feb 6 13:45:34 2014 +0000

    When the module metadata pointer is available from loader, use it in the
    kernel.

commit 52e0e1ff2cba9dfcfab9e1d0a31fb7fdf7317450
Author: Robert N. M. Watson <robert.watson@cl.cam.ac.uk>
Date:   Thu Feb 6 19:57:48 2014 +0000

    In the BERI kernel boot code, extract 'boothowto' (which includes boot flags
    such as '-s') and 'envp' from passed module data.  Booting to single-user
    mode using boot flags now works.

Sponsored by: DARPA, AFRL

10 years agoLIBUNBOUND can be unconditionally set.
imp [Thu, 24 Apr 2014 21:18:29 +0000 (21:18 +0000)]
LIBUNBOUND can be unconditionally set.

10 years agoDon't need to make these conditional on MK_LIBCPLUSPLUS. They can be
imp [Thu, 24 Apr 2014 21:18:22 +0000 (21:18 +0000)]
Don't need to make these conditional on MK_LIBCPLUSPLUS. They can be
defined all the time without ill effect.

10 years agoLIBMILTER can be defined always. No need to restrict to only when
imp [Thu, 24 Apr 2014 21:18:14 +0000 (21:18 +0000)]
LIBMILTER can be defined always. No need to restrict to only when
we're building sendmail.

10 years agoAlways define LIBLDNS. We don't need to only define it when it is
imp [Thu, 24 Apr 2014 21:18:06 +0000 (21:18 +0000)]
Always define LIBLDNS. We don't need to only define it when it is
enabled.

10 years agoTurns out that bash whines line a spoiled three year old when it
imp [Thu, 24 Apr 2014 21:18:01 +0000 (21:18 +0000)]
Turns out that bash whines line a spoiled three year old when it
encounters empty function. Put the 'true' passifier back. This
effectively backs out r264857.

Submitted by: Garrett Cooper

10 years agoChannel my inner hobgoblin and make all functions enclosed in ()
imp [Thu, 24 Apr 2014 21:17:53 +0000 (21:17 +0000)]
Channel my inner hobgoblin and make all functions enclosed in ()
instead of some in () and some in {}

10 years agoMore like gone in 11...
imp [Thu, 24 Apr 2014 21:17:48 +0000 (21:17 +0000)]
More like gone in 11...

10 years agoCorrect min/max cluster counts for FAT12/16/32
emaste [Thu, 24 Apr 2014 20:53:09 +0000 (20:53 +0000)]
Correct min/max cluster counts for FAT12/16/32

FAT12      1..4084
FAT16   4085..65524
FAT32  65525..

This is required for interoperability with other FAT implementations,
and in particular UEFI.

Obtained from:      NetBSD
Sponsored by:       The FreeBSD Foundation

10 years agoThe PR reported that the old NFS server did not set uio_td == NULL
rmacklem [Thu, 24 Apr 2014 20:47:58 +0000 (20:47 +0000)]
The PR reported that the old NFS server did not set uio_td == NULL
for the VOP_READ() call. This patch fixes both the old and new
server for this case.

PR: 185232
Submitted by: PR had patch for old server
Reviewed by: kib
MFC after: 2 weeks

10 years agoFix host and network routes for new interfaces when net.add_addr_allfibs=0
asomers [Thu, 24 Apr 2014 17:23:16 +0000 (17:23 +0000)]
Fix host and network routes for new interfaces when net.add_addr_allfibs=0

sys/net/route.c
In rtinit1, use the interface fib instead of the process fib.  The
latter wasn't very useful because ifconfig(8) is usually invoked
with the default process fib.  Changing ifconfig(8) to use setfib(2)
would be redundant, because it already sets the interface fib.

tests/sys/netinet/fibs_test.sh
Clear the expected ATF failure

sys/net/if.c
Pass the interface fib in calls to rtrequest1_fib and rtalloc1_fib

sys/netinet/in.c
sys/net/if_var.h
Add a fibnum argument to ifa_switch_loopback_route, a subroutine of
in_scrubprefix.  Pass it the interface fib.

PR: kern/187549
Reviewed by: melifaro
MFC after: 3 weeks
Sponsored by: Spectra Logic Corporation

10 years agoRemove limits on size of READ/WRITE operations.
mav [Thu, 24 Apr 2014 16:19:49 +0000 (16:19 +0000)]
Remove limits on size of READ/WRITE operations.

Instead of allocating up to 16MB or RAM at once to handle whole I/O,
allocate up to 1MB at a time, but do multiple ctl_datamove() and storage
I/Os if needed.

10 years agoEliminate duplicate checks in vdev_geom_io_intr error handling
smh [Thu, 24 Apr 2014 15:36:00 +0000 (15:36 +0000)]
Eliminate duplicate checks in vdev_geom_io_intr error handling

MFC after: 1 month

10 years agoMake CAM target CTL frontend respect SIM I/O size limitations.
mav [Thu, 24 Apr 2014 15:16:26 +0000 (15:16 +0000)]
Make CAM target CTL frontend respect SIM I/O size limitations.

If datamove size is bigger then SIM can handle, or it has more segments
then this code can handle -- split it into several CTIO requests.

10 years agoRemove duplicate SYSCTL_DECL(_debug_acpi) which was breaking tinderbox
smh [Thu, 24 Apr 2014 14:58:12 +0000 (14:58 +0000)]
Remove duplicate SYSCTL_DECL(_debug_acpi) which was breaking tinderbox

MFC after: 2 weeks
X-MFC-With: r264849

10 years agoxen: fix copyright header
royger [Thu, 24 Apr 2014 14:44:42 +0000 (14:44 +0000)]
xen: fix copyright header

Some of the code in xen-locore.S was picked from Cherry G. Mathew
amd64 Xen PV branch, but I've failed to set the proper copyright, so
do it now.

Approved by: gibbs

10 years agoAdd Linux socket call decoding to truss
smh [Thu, 24 Apr 2014 14:12:35 +0000 (14:12 +0000)]
Add Linux socket call decoding to truss

MFC after: 1 month

10 years agoModify CTL iSCSI frontend to properly handle situations where datamove
trasz [Thu, 24 Apr 2014 12:54:35 +0000 (12:54 +0000)]
Modify CTL iSCSI frontend to properly handle situations where datamove
routine is called multiple times per SCSI task.

Sponsored by: The FreeBSD Foundation

10 years agoFix jailed raw sockets not setting the correct source address by
smh [Thu, 24 Apr 2014 12:52:31 +0000 (12:52 +0000)]
Fix jailed raw sockets not setting the correct source address by
calling in_pcbladdr instead of prison_get_ip4

MFC after: 1 month

10 years agoIncrease ACPI_MAX_TASKS to be 4 x the number of CPU's as 2 x was still
smh [Thu, 24 Apr 2014 12:38:07 +0000 (12:38 +0000)]
Increase ACPI_MAX_TASKS to be 4 x the number of CPU's as 2 x was still
insufficient on some machines

MFC after: 2 weeks

10 years agoStyle fixes.
trasz [Thu, 24 Apr 2014 11:28:23 +0000 (11:28 +0000)]
Style fixes.

10 years agoGrammar fix.
trasz [Thu, 24 Apr 2014 11:27:03 +0000 (11:27 +0000)]
Grammar fix.

10 years agoWait for the callout to finish before unloading the module
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

10 years 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

10 years 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>

10 years 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

10 years 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.

10 years 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.

10 years 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.

10 years 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.

10 years 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

10 years 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

10 years 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.

10 years 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)

10 years 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.

10 years 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

10 years 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

10 years 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

10 years 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.

10 years 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.

10 years 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

10 years 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

10 years 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.

10 years 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.

10 years 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

10 years 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

10 years 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

10 years 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.

10 years 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

10 years 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

10 years 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

10 years 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

10 years 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

10 years 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

10 years 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

10 years 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

10 years 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

10 years 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@

10 years agoMake usage printing more consistent with other tools.
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.

10 years 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@

10 years 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

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

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

10 years 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

10 years 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