]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agosnd_hda: add support for the Lenovo X1 20BS model.
Rui Paulo [Wed, 15 Apr 2015 05:24:39 +0000 (05:24 +0000)]
snd_hda: add support for the Lenovo X1 20BS model.

This requires a patch to redirect the output to a separate DAC when
the headphones are used.  While there, add device strings for Intel
Broadwell HDA controllers and Realtek ALC292 codecs.

MFC after: 1 week

9 years agoInitialize 'error' before use.
Neel Natu [Wed, 15 Apr 2015 05:04:42 +0000 (05:04 +0000)]
Initialize 'error' before use.

Reported by: Coverity Scan
CID: 1249748124974712497511249749
MFC after: 1 week

9 years agoFix RSS build - netisr input / NETISR_IP_DIRECT is used here.
Adrian Chadd [Wed, 15 Apr 2015 00:57:21 +0000 (00:57 +0000)]
Fix RSS build - netisr input / NETISR_IP_DIRECT is used here.

9 years agoWhen reading in the original file name from gzip header, we read
Xin LI [Wed, 15 Apr 2015 00:07:21 +0000 (00:07 +0000)]
When reading in the original file name from gzip header, we read
in PATH_MAX + 1 bytes from the file.  In r281500, strrchr() is
used to strip possible path portion of the file name to mitigate
a possible attack.  Unfortunately, strrchr() expects a buffer
that is NUL-terminated, and since we are processing potentially
untrusted data, we can not assert that be always true.

Solve this by reading in one less byte (now PATH_MAX) and
explicitly terminate the buffer after the read size with NUL.

Reported by: Coverity
CID: 1264915
X-MFC-with: 281500
MFC after: 13 days

9 years agoIncrease vt font limits to allow use of GNU Unifont
Ed Maste [Tue, 14 Apr 2015 19:18:34 +0000 (19:18 +0000)]
Increase vt font limits to allow use of GNU Unifont

PR: 199438
Submitted by: Ting-Wei Lan <lantw44@gmail.com>
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

9 years agopf: Fix forwarding detection
Kristof Provost [Tue, 14 Apr 2015 19:07:37 +0000 (19:07 +0000)]
pf: Fix forwarding detection

If the direction is not PF_OUT we can never be forwarding. Some input packets
have rcvif != ifp (looped back packets), which lead us to ip6_forward() inbound
packets, causing panics.

Equally, we need to ensure that packets were really received and not locally
generated before trying to ip6_forward() them.

Differential Revision: https://reviews.freebsd.org/D2286
Approved by: gnn(mentor)

9 years agoEliminate unused headers.
Xin LI [Tue, 14 Apr 2015 18:13:55 +0000 (18:13 +0000)]
Eliminate unused headers.

9 years agoInitialize async_arg_ptr in xpt_async when called with async_code
Alan Somers [Tue, 14 Apr 2015 16:33:33 +0000 (16:33 +0000)]
Initialize async_arg_ptr in xpt_async when called with async_code
AC_ADVINFO_CHANGED.

Without this change, newly inserted hard disks won't always have their
physical path device nodes created.  The problem reproduces most readily
when attaching a large number of disks at once.

Differential Revision: https://reviews.freebsd.org/D2290
Reviewed by: mav, imp
MFC after: 2 weeks
Sponsored by: Spectra Logic

9 years agoDocument internal interface types which are specific to FreeBSD.
George V. Neville-Neil [Tue, 14 Apr 2015 15:21:20 +0000 (15:21 +0000)]
Document internal interface types which are specific to FreeBSD.

9 years agoI can find no reason to allow packets with both SYN and FIN bits
George V. Neville-Neil [Tue, 14 Apr 2015 14:43:42 +0000 (14:43 +0000)]
I can find no reason to allow packets with both SYN and FIN bits
set past this point in the code. The packet should be dropped and
not massaged as it is here.

Differential Revision:  https://reviews.freebsd.org/D2266
Submitted by: eri
Sponsored by: Rubicon Communications (Netgate)

9 years agoWhen a kernel has DEVICE_POLLING turned on but no drivers have
George V. Neville-Neil [Tue, 14 Apr 2015 14:22:34 +0000 (14:22 +0000)]
When a kernel has DEVICE_POLLING turned on but no drivers have
the capability do not try to take the mutex at all.

Replaces misbegotten attempt from reverted commit 281276

Pointed out by: glebius
Sponsored by: Rubicon Communications (Netgate)
Differential Revision: https://reviews.freebsd.org/D2262

9 years ago* Remove the wfi when the efi loader returns, it's unneeded and is not
Andrew Turner [Tue, 14 Apr 2015 14:15:14 +0000 (14:15 +0000)]
* Remove the wfi when the efi loader returns, it's unneeded and is not
  available on older designs.
* Enable the efi loader on arm

9 years agoAdd support for arm64 to loader.efi and boot1.efi
Andrew Turner [Tue, 14 Apr 2015 13:55:01 +0000 (13:55 +0000)]
Add support for arm64 to loader.efi and boot1.efi

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation

9 years agoFix the arm64 MACHINE_CPUARCH value in the efi fdt glue code.
Andrew Turner [Tue, 14 Apr 2015 10:41:57 +0000 (10:41 +0000)]
Fix the arm64 MACHINE_CPUARCH value in the efi fdt glue code.

Sponsored by: The FreeBSD Foundation

9 years agoUse MACHINE in the efi loader when it is what we mean, it may not be the
Andrew Turner [Tue, 14 Apr 2015 10:40:37 +0000 (10:40 +0000)]
Use MACHINE in the efi loader when it is what we mean, it may not be the
same as MACHINE_CPUARCH, it just happened to be the case the architectures
this code currently supports.

Sponsored by: The FreeBSD Foundation

9 years agoDisable truss, gprof, and lint on arm64, they don't build.
Andrew Turner [Tue, 14 Apr 2015 10:15:58 +0000 (10:15 +0000)]
Disable truss, gprof, and lint on arm64, they don't build.

Sponsored by: The FreeBSD Foundation

9 years agoipcs: fix builds that use gcc
Eitan Adler [Tue, 14 Apr 2015 04:52:52 +0000 (04:52 +0000)]
ipcs: fix builds that use gcc
gcc gets annoyed by duplicate declarations

Reported by: sbruno
Reviewed by: sbruno

9 years agoFix my stupid restoral of old code.. must be c_iflags now.
Randall Stewart [Tue, 14 Apr 2015 00:02:39 +0000 (00:02 +0000)]
Fix my stupid restoral of old code.. must be  c_iflags now.

Thanks jhb for catching my stupidity...
MFC after: 3 days

9 years agoRestore the two lines accidentally deleted that allow CALLOUT_DIRECT to be
Randall Stewart [Mon, 13 Apr 2015 23:06:13 +0000 (23:06 +0000)]
Restore the two lines accidentally deleted that allow CALLOUT_DIRECT to be
specifed in the flags.

Thanks Mark Johnston for noticing this ;-o

MFC after: 3 days

9 years agoRevert r281055 as it breaks installing test scripts in the mixed PROGS/SCRIPT
Enji Cooper [Mon, 13 Apr 2015 21:29:40 +0000 (21:29 +0000)]
Revert r281055 as it breaks installing test scripts in the mixed PROGS/SCRIPT
case

Repro is as follows:

% sudo pkg install -y kyua
% sudo rm -Rf /usr/tests
% sudo make hier
% (cd lib/libthr/tests/; make obj; make depend; make all; sudo make install)
% (cd /usr/tests/lib/libthr; kyua list)

Failure seen in Jenkins build starting here:
https://jenkins.freebsd.org/job/FreeBSD_HEAD-tests2/927/

Pointyhat to: bapt

9 years agoSync with OpenBSD: Use volatile instead of __volatile__.
Xin LI [Mon, 13 Apr 2015 20:23:46 +0000 (20:23 +0000)]
Sync with OpenBSD: Use volatile instead of __volatile__.

MFC after: 2 weeks

9 years agoipcs: fix warnings (WARNS=1 -> WARNS=6)
Eitan Adler [Mon, 13 Apr 2015 19:58:11 +0000 (19:58 +0000)]
ipcs: fix warnings (WARNS=1 -> WARNS=6)
- fix shadow warnings
- change type from off_t to size_t which is more correct and avoids
  signed/unsigned compare
- use new initializer format to avoid "missing values" warning

Reviewed by: jhb

9 years agoSync with NetBSD:
Xin LI [Mon, 13 Apr 2015 19:46:30 +0000 (19:46 +0000)]
Sync with NetBSD:

 - Mention xz(1) in gzip(1).
 - Strip away path from header name when decompressing.

MFC after: 2 weeks

9 years agoModify the return value of the uhci/ehci/xhci PCI probe routines to
Neel Natu [Mon, 13 Apr 2015 19:13:51 +0000 (19:13 +0000)]
Modify the return value of the uhci/ehci/xhci PCI probe routines to
'BUS_PROBE_DEFAULT'. This allows bhyve's 'ppt' driver to claim ownership
of the device and pass it through to the guest.

In the common case where there are no competing drivers for USB controllers
this change is a no-op.

Reviewed by: hselasky
MFC after: 2 weeks

9 years agoAdd psci for arm64. This is currently used when rebooting and powering off
Andrew Turner [Mon, 13 Apr 2015 16:41:33 +0000 (16:41 +0000)]
Add psci for arm64. This is currently used when rebooting and powering off
in qemu.

Sponsored by: The FreeBSD Foundation

9 years agoCreate the correct symlinks for the machine directory, and only create the
Andrew Turner [Mon, 13 Apr 2015 16:00:09 +0000 (16:00 +0000)]
Create the correct symlinks for the machine directory, and only create the
x86 symlink on i386 and amd64. Before this incorrect symlinks were being
created on armi and i386.

Differential Revision: https://reviews.freebsd.org/D2283
Reviewed by: emaste, imp
Sponsored by: The FreeBSD Foundation

9 years agoAdd config option PAE_TABLES for the i386 kernel. It switches pmap to
Konstantin Belousov [Mon, 13 Apr 2015 15:22:45 +0000 (15:22 +0000)]
Add config option PAE_TABLES for the i386 kernel.  It switches pmap to
use PAE format for the page tables, but does not incur other
consequences of the full PAE config.  In particular, vm_paddr_t and
bus_addr_t are left 32bit, and max supported memory is still limited
by 4GB.

The option allows to have nx permissions for memory mappings on i386
kernel, while keeping the usual i386 KBI and avoiding the kernel data
sizing problems typical for the PAE config.

Intel documented that the PAE format for page tables is available
starting with the Pentium Pro, but it is possible that the plain
Pentium CPUs have the required support (Appendix H).  The goal is to
enable the option and non-exec mappings on i386 for the GENERIC
kernel.  Anybody wanting a useful system on 486, have to reconfigure
the modern i386 kernel anyway.

Discussed with: alc, jhb
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoBring in the start of the arm64 kernel.
Andrew Turner [Mon, 13 Apr 2015 14:43:10 +0000 (14:43 +0000)]
Bring in the start of the arm64 kernel.

This is only the minimum set of files needed to boot in qemu. As such it is
missing a few things.

The bus_dma code is currently only stub functions with a full implementation
from the development tree to follow.

The gic driver has been copied as the interrupt framework is different. It
is expected the two drivers will be merged by the arm intrng project,
however this will need to be imported into the tree and support for arm64
would need to be added.

This includes code developed by myself, SemiHalf, Ed Maste, and Robin
Randhawa from ARM. This has been funded by the FreeBSD Foundation, with
early development by myself in my spare time with assistance from Robin.

Differential Revision: https://reviews.freebsd.org/D2199
Reviewed by: emaste, imp
Relnotes: yes
Sponsored by: The FreeBSD Foundation

9 years agoUpdate the arm devmap code to also work with arm64.
Andrew Turner [Mon, 13 Apr 2015 13:21:27 +0000 (13:21 +0000)]
Update the arm devmap code to also work with arm64.

There are a few differences between the two. On arm we need to provide a
list of addresses we may be mapping before we have initialised the virtual
memory subsystem, however on arm64 we allocate a small (2MiB for a 4k
granule) range to be used for such purposes.

Differential Revision: https://reviews.freebsd.org/D2249
Sponsored by: The FreeBSD Foundation

9 years agoFix a possible refcount leak in regen_tmpaddr().
Mark Johnston [Mon, 13 Apr 2015 01:55:42 +0000 (01:55 +0000)]
Fix a possible refcount leak in regen_tmpaddr().

public_ifa6 may be set to NULL after taking a reference to a previous
address list element. Instead, only take the reference after leaving the
loop but before releasing the address list lock.

Differential Revision: https://reviews.freebsd.org/D2253
Reviewed by: ae
MFC after: 2 weeks

9 years agoREADME:
Eitan Adler [Sun, 12 Apr 2015 23:43:41 +0000 (23:43 +0000)]
README:
- the reference to 'ancient' LINT file was added in 2000 [r64047 | alex
  | 2000-07-31].   Remove the reference entirely now.
- add the tests directory

9 years agoFix build on i386.
Jung-uk Kim [Sun, 12 Apr 2015 22:40:27 +0000 (22:40 +0000)]
Fix build on i386.

Reported by: bz

9 years agoRemove obsolete bits about maximum number of file systems.
Sergey Kandaurov [Sun, 12 Apr 2015 21:14:58 +0000 (21:14 +0000)]
Remove obsolete bits about maximum number of file systems.
NMOUNT has gone together with static mount table in 4.3BSD-Reno.

MFC after: 1 week

9 years agoAdd definition for the gcc gnu_inline attribute.
Pedro F. Giffuni [Sun, 12 Apr 2015 16:43:55 +0000 (16:43 +0000)]
Add definition for the gcc gnu_inline attribute.

This uses a non-standard (who would guess that) inlining method
that is useful for legacy GNU software. This attribute was added
in GCC 4.1.3. Older versions of clang would just ignore the
attribute but as lately it is supported also there.

This is currently unused but it is required for the
FORTIFY_SOURCE extension.

9 years agoAccept LE event on hccontrol socket.
Takanori Watanabe [Sun, 12 Apr 2015 15:08:41 +0000 (15:08 +0000)]
Accept LE event on hccontrol socket.

9 years agoAdd HCI/LMP revision information.
Takanori Watanabe [Sun, 12 Apr 2015 14:38:18 +0000 (14:38 +0000)]
Add HCI/LMP revision information.

9 years agoAdd a driver for the ARM Power State Coordination Interface (PSCI). This
Andrew Turner [Sun, 12 Apr 2015 13:00:58 +0000 (13:00 +0000)]
Add a driver for the ARM Power State Coordination Interface (PSCI). This
handles versions 0.1 and 0.2 of the standard on 32-bit ARM.

With this driver we can shutdown in QEMU. Further work is needed to
turn secondary cores on on boot and to support later revisions of the
specification.

Submitted by: Robin Randhawa <Robin.Randhawa at ARM.com>
Sponsored by: The FreeBSD Foundation

9 years agoFix a very minor typo.
Mark Murray [Sun, 12 Apr 2015 11:23:59 +0000 (11:23 +0000)]
Fix a very minor typo.

9 years agoDefine capabilities bits from the revision 007 of the document 302223
Konstantin Belousov [Sun, 12 Apr 2015 10:28:15 +0000 (10:28 +0000)]
Define capabilities bits from the revision 007 of the document 302223
"Intelб╝ Processor Vendor-Specific ACPI Interface Specification",
issied Dec 2014.  Previous revision 005 was from Sep 2006.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoAdd libxo(3) support to iscsictl(8).
Edward Tomasz Napierala [Sun, 12 Apr 2015 09:36:50 +0000 (09:36 +0000)]
Add libxo(3) support to iscsictl(8).

PR: 198396
Submitted by: Marie Helene Kvello-Aune <marieheleneka at gmail.com>
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoSwitch to the new v6 pmap code to increase its testing. It will now be
Andrew Turner [Sun, 12 Apr 2015 08:10:18 +0000 (08:10 +0000)]
Switch to the new v6 pmap code to increase its testing. It will now be
built as part of universe.

9 years agoRework r281162. Indeed, the flexible array member is preferable here.
Dmitry Chagin [Sun, 12 Apr 2015 06:21:58 +0000 (06:21 +0000)]
Rework r281162. Indeed, the flexible array member is preferable here.

Suggested by:   Justin T. Gibbs

MFC after: 3 days

9 years agoStart enabling the available GPIO pins on the Carambola 2.
Adrian Chadd [Sun, 12 Apr 2015 00:02:32 +0000 (00:02 +0000)]
Start enabling the available GPIO pins on the Carambola 2.

The carambola2 exposes all the gpio pins, but some are reserved for
core functions (eg usb, ethernet, etc.) Others are configured by default
to be available as normal GPIO pins to do interesting things with.

GPIO 18->23 is the I2S, SLIC and SPDIF device pins, but none of those
are currently used.  So, just allow those to show up.

Tested:

* AR9344, Carambola 2
* (.. bitbang SPI to an Adafruit LCD via libgpio, because FreeBSD could
  do with more shiny output devices that aren't network interfaces.)

TODO:

There are some other pins aren't currently included here, but should be.
The LED pins are for the internal switch inside the AR9344.

* GPIO 0+1 are "LED0 + LED1", but they're tied to high for bootstrapping.
* GPIO 13-17 are "LED2..7", but they're tied (H, L, L, L, H) for bootstrapping.
* GPIO 11 and 12 are UART RTS/CTS or I2S; but GPIO 12 is tied L for bootstrap.

9 years agoCorrect an off-by-one error in vm_reserv_reclaim_contig() that results in
Alan Cox [Sat, 11 Apr 2015 22:57:13 +0000 (22:57 +0000)]
Correct an off-by-one error in vm_reserv_reclaim_contig() that results in
an infinite loop.

Submitted by: Svatopluk Kraus
MFC after: 1 week

9 years agoChange the virtual address used to not be 0xc0000000, the arm loader
Andrew Turner [Sat, 11 Apr 2015 20:44:21 +0000 (20:44 +0000)]
Change the virtual address used to not be 0xc0000000, the arm loader
doesn't handle this address.

9 years agouiomove_object_page(): Avoid instantiating pages in sparse regions on reads.
Will Andrews [Sat, 11 Apr 2015 18:51:41 +0000 (18:51 +0000)]
uiomove_object_page(): Avoid instantiating pages in sparse regions on reads.

Check whether the page being requested is either resident or on swap.  If
not, read from the zero_region instead of instantiating an unnecessary page.

This avoids consuming memory for sparse files on tmpfs, when they are read
by applications that do not use SEEK_HOLE/SEEK_DATA (which is most of them).

Reviewed by: kib
MFC after: 1 week
Sponsored by: Spectra Logic

9 years agoAdd support for controlling the trackpoint when Synaptics is enabled.
Rui Paulo [Sat, 11 Apr 2015 18:45:22 +0000 (18:45 +0000)]
Add support for controlling the trackpoint when Synaptics is enabled.

To accomplish this, we must put the Synaptics hardware in passthrough
mode when talking to the trackpoint.

I only performed minor style modifications.

Submitted by: Jan Kokemüller <jan.kokemueller at gmail.com>
MFC after: 1 week

9 years agoImprove Synaptics support for newer touchpads.
Rui Paulo [Sat, 11 Apr 2015 18:44:07 +0000 (18:44 +0000)]
Improve Synaptics support for newer touchpads.

Enable two finger scrolling by default and disable the edge scrolling if
the touchpad has no physical zone for it.  Disable directional scrolling
by default to avoid using extended buttons as scroll buttons.

Add support for ClickPad.  On Lenovo laptops, this is the button
reported when one presses the touchpad.

While there, fix a problem where the extended buttons were not reporting
the button release event correctly: we need to save the state of the
buttons and report it to sysmouse until we receive a packet from the
touchpad indicating the button has been released.  This makes it
possible to use an extended button to resize a window.  On Lenovo
laptops, the major buttons are actually reported as extended buttons.

Tested by: many (current@)
MFC after: 1 week

9 years agoAdd support for the QEMU virt SoC. This is a SoC built depending on the
Andrew Turner [Sat, 11 Apr 2015 17:52:47 +0000 (17:52 +0000)]
Add support for the QEMU virt SoC. This is a SoC built depending on the
command line arguments passed in. It will then generate a dtb on the fly,
as such no dts will be added as it may be incorrect.

Relnotes: yes

9 years agoAdd support for the uart classes to set their default register shift value.
Andrew Turner [Sat, 11 Apr 2015 17:16:23 +0000 (17:16 +0000)]
Add support for the uart classes to set their default register shift value.
This is needed with the pl011 driver. Before this change it would default
to a shift of 0, however the hardware places the registers at 4-byte
addresses meaning the value should be 2.

This patch fixes this for the pl011 when configured using the fdt. The
other drivers have a default value of 0 to keep this a no-op.

MFC after: 1 week

9 years agoReplace struct filedesc argument in getsock_cap with struct thread
Mateusz Guzik [Sat, 11 Apr 2015 16:00:33 +0000 (16:00 +0000)]
Replace struct filedesc argument in getsock_cap with struct thread

This is is a step towards removal of spurious arguments.

9 years agofd: remove filedesc argument from fdclose
Mateusz Guzik [Sat, 11 Apr 2015 15:40:28 +0000 (15:40 +0000)]
fd: remove filedesc argument from fdclose

Just accept a thread instead. This makes it consistent with fdalloc.

No functional changes.

9 years agoAdd fdt support to the arm loader.efi
Andrew Turner [Sat, 11 Apr 2015 11:00:53 +0000 (11:00 +0000)]
Add fdt support to the arm loader.efi

9 years agoOnly add -fPIC to CFLAGS and -Wl,-znocombreloc to LDFLAGS on x86, they
Andrew Turner [Sat, 11 Apr 2015 10:36:48 +0000 (10:36 +0000)]
Only add -fPIC to CFLAGS and -Wl,-znocombreloc to LDFLAGS on x86, they
shouldn't be used on arm.

9 years agoMove reloc.c to the top level Makefile as it has become generic.
Andrew Turner [Sat, 11 Apr 2015 10:21:26 +0000 (10:21 +0000)]
Move reloc.c to the top level Makefile as it has become generic.

9 years agoUpdate the arm efi ldscript to generate a valid efi binary
Andrew Turner [Sat, 11 Apr 2015 10:07:58 +0000 (10:07 +0000)]
Update the arm efi ldscript to generate a valid efi binary

9 years agoThis modifies several FreeBSD drivers to use the GNU approach to
Ganbold Tsagaankhuu [Sat, 11 Apr 2015 08:34:41 +0000 (08:34 +0000)]
This modifies several FreeBSD drivers to use the GNU approach to
supply clk81 information.  It also changes the hardware strings
in some of the drivers to match what's present in the GNU files.

Submitted by:  John Wehle
Reviewed by:   imp

9 years agoThis modifies several FreeBSD drivers to use the hardware strings
Ganbold Tsagaankhuu [Sat, 11 Apr 2015 08:30:37 +0000 (08:30 +0000)]
This modifies several FreeBSD drivers to use the hardware strings
present in the GNU dts files.

Submitted by:  John Wehle
Reviewed by:   imp

9 years agoThis modifies the FreeBSD Amlogic DTS files to use the GNU files
Ganbold Tsagaankhuu [Sat, 11 Apr 2015 08:27:38 +0000 (08:27 +0000)]
This modifies the FreeBSD Amlogic DTS files to use the GNU files
as the base.

Submitted by: John Wehle
Reviewed by: imp

9 years agoThe GNU files don't include a DTS for the aml8726-m8b (which has
Ganbold Tsagaankhuu [Sat, 11 Apr 2015 08:25:53 +0000 (08:25 +0000)]
The GNU files don't include a DTS for the aml8726-m8b (which has
cortex-a5 cores unlike the aml8726-m8 which has cortex-a9 cores).

Submitted by: John Wehle
Reviewed by: imp

9 years agoThe GNU Amlogic DTS files have some errors (e.g. bad register
Ganbold Tsagaankhuu [Sat, 11 Apr 2015 08:17:39 +0000 (08:17 +0000)]
The GNU Amlogic DTS files have some errors (e.g. bad register
address, bad IRQ, etc) which are fixed by this patch.

John has sent these changes to the author of the files who said
he'll propagate the changes further upstream.

Submitted by: John Wehle
Reviewed by: imp

9 years agoFix even more warnings..
Enji Cooper [Sat, 11 Apr 2015 07:37:21 +0000 (07:37 +0000)]
Fix even more warnings..

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoFix more warnings I didn't catch in the first go-around
Enji Cooper [Sat, 11 Apr 2015 07:35:30 +0000 (07:35 +0000)]
Fix more warnings I didn't catch in the first go-around

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoFix warnings, bump WARNS to 6, and use a temporary socket instead of one in /tmp
Enji Cooper [Sat, 11 Apr 2015 07:33:04 +0000 (07:33 +0000)]
Fix warnings, bump WARNS to 6, and use a temporary socket instead of one in /tmp

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years ago- Remove the .t wrapper and put the "magic" of determining the number of
Enji Cooper [Sat, 11 Apr 2015 06:40:38 +0000 (06:40 +0000)]
- Remove the .t wrapper and put the "magic" of determining the number of
  testcases into the .c file
- Require root for now because it fails with SOCK_RAW without root privileges
- Increment the test count properly on socket create failure

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoFix the knob twiddling to work properly per src.opts.mk
Enji Cooper [Sat, 11 Apr 2015 06:38:50 +0000 (06:38 +0000)]
Fix the knob twiddling to work properly per src.opts.mk

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agonetmap: improve the netmap attach message on FreeBSD.
Rui Paulo [Sat, 11 Apr 2015 06:20:46 +0000 (06:20 +0000)]
netmap: improve the netmap attach message on FreeBSD.

MFC after: 1 week

9 years agoCatch up with r281373 and r281379.
Jung-uk Kim [Sat, 11 Apr 2015 05:38:07 +0000 (05:38 +0000)]
Catch up with r281373 and r281379.

9 years agoGenerate temporary files with mkstemp instead of mktemp
Enji Cooper [Sat, 11 Apr 2015 05:20:01 +0000 (05:20 +0000)]
Generate temporary files with mkstemp instead of mktemp

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoGarbage collect argc/argv and bump WARNS to 6
Enji Cooper [Sat, 11 Apr 2015 03:57:35 +0000 (03:57 +0000)]
Garbage collect argc/argv and bump WARNS to 6

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoGarbage collect argc/argv and bump WARNS to 6
Enji Cooper [Sat, 11 Apr 2015 03:56:23 +0000 (03:56 +0000)]
Garbage collect argc/argv and bump WARNS to 6

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years ago- Garbage collect argc/argv
Enji Cooper [Sat, 11 Apr 2015 03:54:43 +0000 (03:54 +0000)]
- Garbage collect argc/argv
- Use random paths instead of one in /tmp

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years ago- Garbage collect argc/argv; bump WARNS to 6
Enji Cooper [Sat, 11 Apr 2015 03:43:43 +0000 (03:43 +0000)]
- Garbage collect argc/argv; bump WARNS to 6
- Make the socket path random and move it out of /tmp as that's outside ATF's
  prescribed path

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoFix warnings and bump WARNS to 6
Enji Cooper [Sat, 11 Apr 2015 03:38:49 +0000 (03:38 +0000)]
Fix warnings and bump WARNS to 6
- Staticize variables as needed
- Garbage collect argc/argv
- Fix -Wsign-compare warnings by casting small sizeof to (int)

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoGarbage collect argc/argv and bump WARNS to 6
Enji Cooper [Sat, 11 Apr 2015 03:35:33 +0000 (03:35 +0000)]
Garbage collect argc/argv and bump WARNS to 6

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoMark signum unused in signal_handler; bump WARNS to 6
Enji Cooper [Sat, 11 Apr 2015 03:24:49 +0000 (03:24 +0000)]
Mark signum unused in signal_handler; bump WARNS to 6

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoMerge ACPICA 20150410.
Jung-uk Kim [Sat, 11 Apr 2015 03:23:41 +0000 (03:23 +0000)]
Merge ACPICA 20150410.

9 years agoFix a -Wuninitialized warning by setting the socket to -1 and bump WARNS to 6
Enji Cooper [Sat, 11 Apr 2015 03:19:48 +0000 (03:19 +0000)]
Fix a -Wuninitialized warning by setting the socket to -1 and bump WARNS to 6

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years ago- Don't use /tmp because it's outside ATF's prescribed sandbox
Enji Cooper [Sat, 11 Apr 2015 03:18:14 +0000 (03:18 +0000)]
- Don't use /tmp because it's outside ATF's prescribed sandbox
- Replace a hardcoded PATH_MAX value with sizeof(path)
- Use path like an array, not a pointer, and always try to unlink it in cleanup

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoFix warnings and bump WARNS to 6
Enji Cooper [Sat, 11 Apr 2015 03:13:09 +0000 (03:13 +0000)]
Fix warnings and bump WARNS to 6
- Garbage collect argc/argv (-Wunused)
- sleep(3) will always return an unsigned int; don't check for return codes <0
  (-Wsign-compare)

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years ago- Garbage collect argc/argv (-Wunused)
Enji Cooper [Sat, 11 Apr 2015 02:59:45 +0000 (02:59 +0000)]
- Garbage collect argc/argv (-Wunused)
- Bump WARNS to 6

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years ago- Use static buffers for temporary file paths instead of strdup of constant strings
Enji Cooper [Sat, 11 Apr 2015 02:50:44 +0000 (02:50 +0000)]
- Use static buffers for temporary file paths instead of strdup of constant strings
- Don't use /tmp because it's outside ATF's prescribed sandbox
- Use mkstemp instead of mktemp to eliminate warning

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoAttempt to fix build after 281351 by defining full prototype for the
Xin LI [Sat, 11 Apr 2015 01:06:59 +0000 (01:06 +0000)]
Attempt to fix build after 281351 by defining full prototype for the
functions that were moved to ip_reass.c.

9 years agoMerge changes from vendor driver version 1.1.1:
Xin LI [Sat, 11 Apr 2015 00:45:03 +0000 (00:45 +0000)]
Merge changes from vendor driver version 1.1.1:

v1.1.1 2015-03-26
 * Support 4Kn drive.
 * Change the SCSI target ID of the disk to be the index of physical
   connetion to the HBA.
 * Support staggered drive spin up.
 * Fix a bug that command would be timeout because of improper
   interrupt service routine.
 * Error handling to avoid scsi command lost which caused system
   hang up.
 * Fix a bug that fail to get the devcie's serial number via
   FreeNAS WebGUI.

Many thanks to HighPoint for continued support of FreeBSD!

MFC after: 2 weeks

9 years agoFix libfifolog dependency on libz
Ed Maste [Fri, 10 Apr 2015 21:24:38 +0000 (21:24 +0000)]
Fix libfifolog dependency on libz

Consumers should not need to encode fifolog's dependency on libz.
Handle it automatically in src.libnames.mk.

Differential Revision: https://reviews.freebsd.org/D2278
Reviewed by: bapt
Sponsored by: The FreeBSD Foundation

9 years agoiwn, wlan: fix typos
Eitan Adler [Fri, 10 Apr 2015 20:55:17 +0000 (20:55 +0000)]
iwn, wlan: fix typos
Fxi tow typos

Obtained from: DragonFlyBSD
MFC after: 3 days

9 years agoUse explicitly sized types in EFI module metadata
Ed Maste [Fri, 10 Apr 2015 19:26:45 +0000 (19:26 +0000)]
Use explicitly sized types in EFI module metadata

This will allow the same metadata struct to be used on all platforms.

Differential Revision: https://reviews.freebsd.org/D2275
Reviewed by: jhb

9 years agoFix the IPV6_MULTICAST_IF sockopt handling. RFC 3493 says when the
Andrey V. Elsukov [Fri, 10 Apr 2015 19:09:51 +0000 (19:09 +0000)]
Fix the IPV6_MULTICAST_IF sockopt handling. RFC 3493 says when the
interface index is specified as zero, the system should select the
interface to use for outgoing multicast packets. Even the comment
for the in6p_set_multicast_if() function says about index of zero.
But in fact for zero index the function just returns EADDRNOTAVAIL.

I.e. if you first set some interface and then will try reset it
with zero ifindex, you will get EADDRNOTAVAIL.

Reset im6o_multicast_ifp to NULL when interface index specified as
zero. Also return EINVAL in case when ifnet_byindex() returns NULL.
This will be the same behaviour as when ifindex is bigger than
V_if_index. And return EADDRNOTAVAIL only when interface is not
multicast capable.

Reported by: Olivier Cochard-Labbé
MFC after: 2 weeks
Sponsored by: Yandex LLC

9 years agoRemove docs that are not shipped with nvi anymore
Baptiste Daroussin [Fri, 10 Apr 2015 19:07:43 +0000 (19:07 +0000)]
Remove docs that are not shipped with nvi anymore

Reported by: emaste

9 years agotmpfs_getattr(): Return more correct allocated byte counts.
Will Andrews [Fri, 10 Apr 2015 19:04:39 +0000 (19:04 +0000)]
tmpfs_getattr(): Return more correct allocated byte counts.

For VREG vnodes, return the resident page count (multiplied by PAGE_SIZE)
for the tmpfs node's anonymous VM object that stores actual file contents.

For all other vnodes, return the tmpfs_node's tn_size, which should not
be rounded to a page.

This change allows using stat(2) to identify a sparse file on tmpfs.

Reviewed by: kib
MFC after: 1 week

9 years agoAdd build support for i386 loader.efi
Ed Maste [Fri, 10 Apr 2015 18:49:43 +0000 (18:49 +0000)]
Add build support for i386 loader.efi

Kernel changes are required for this to be useful but this will allow
others to experiment.

Differential Revision: https://reviews.freebsd.org/D2276

9 years agoLimit EFI framebuffer metadata to amd64 for now
Ed Maste [Fri, 10 Apr 2015 18:08:09 +0000 (18:08 +0000)]
Limit EFI framebuffer metadata to amd64 for now

The i386 loader.efi does not yet exist. Avoid dealing with vt and
framebuffer issues there until the initial bootstrapping is done.

9 years agoImport ACPICA 20150410.
Jung-uk Kim [Fri, 10 Apr 2015 17:54:53 +0000 (17:54 +0000)]
Import ACPICA 20150410.

9 years agoUpdate nvi to 2.1.3 which fixes the data corruption when locale conversion
Baptiste Daroussin [Fri, 10 Apr 2015 17:50:28 +0000 (17:50 +0000)]
Update nvi to 2.1.3 which fixes the data corruption when locale conversion
failed

9 years agoFor reasons that I am not understand yet, using the libmd version of
Xin LI [Fri, 10 Apr 2015 17:21:47 +0000 (17:21 +0000)]
For reasons that I am not understand yet, using the libmd version of
SHA256 would make libarchive based application to give:

archive_read_extract(): Lzma library error: Corrupted input data

(Internally this is LZMA_DATA_ERR)

However, the libmd version of SHA256 is supposed to give same result
as the bundled version do, and xz(1) is not affected.

As a precaution, revert the SHA256 portion of r281316 for now until
we figure out why it breaks libarchive interoperability as we can't
yet rule out this change have introduced an ABI breakage.

9 years agoUse OF_getencpropalloc() to handle endianess of the properties.
Ian Lepore [Fri, 10 Apr 2015 13:50:57 +0000 (13:50 +0000)]
Use OF_getencpropalloc() to handle endianess of the properties.

Submitted by: Michal Meloun

9 years agoAdd a pmap_kremove_device() to undo mappings made with pmap_kenter_device().
Ian Lepore [Fri, 10 Apr 2015 13:26:35 +0000 (13:26 +0000)]
Add a pmap_kremove_device() to undo mappings made with pmap_kenter_device().

Previously we used pmap_kremove(), but with ARM_NEW_PMAP it does the remove
in a way that isn't SMP-coherent (which is appropriate in some circumstances
such as mapping/unmapping sf buffers).  With matching enter/remove routines
for device mappings, each low-level implementation can do the right thing.

Reviewed by: Svatopluk Kraus <onwahe@gmail.com>

9 years agoImport nvi 2.1.3
Baptiste Daroussin [Fri, 10 Apr 2015 13:26:05 +0000 (13:26 +0000)]
Import nvi 2.1.3

Approved by: peter

9 years agoThe "get latency" and "get bitmode" device commands are read operations,
Ian Lepore [Fri, 10 Apr 2015 13:20:31 +0000 (13:20 +0000)]
The "get latency" and "get bitmode" device commands are read operations,
not writes.

9 years agoRedo r274966. Instead of global all-interface all-vnet undocumented sysctl,
Gleb Smirnoff [Fri, 10 Apr 2015 09:50:13 +0000 (09:50 +0000)]
Redo r274966. Instead of global all-interface all-vnet undocumented sysctl,
use per-interface flag, and document it.

Sponsored by: Nginx, Inc.