freebsd.git
7 years agoMerge compiler-rt trunk r291476.
dim [Mon, 9 Jan 2017 22:49:35 +0000 (22:49 +0000)]
Merge compiler-rt trunk r291476.

7 years agoUpdate the libc++ Makefile to be more like the other llvm and clang
dim [Mon, 9 Jan 2017 22:46:47 +0000 (22:46 +0000)]
Update the libc++ Makefile to be more like the other llvm and clang
Makefiles.

7 years agoMerge libc++ trunk r291476, update Makefile, ObsoleteFiles.inc and
dim [Mon, 9 Jan 2017 22:41:53 +0000 (22:41 +0000)]
Merge libc++ trunk r291476, update Makefile, ObsoleteFiles.inc and
OptionalObsoleteFiles.inc.

7 years agoMerge llvm, clang, lld and lldb trunk r291476.
dim [Mon, 9 Jan 2017 22:32:19 +0000 (22:32 +0000)]
Merge llvm, clang, lld and lldb trunk r291476.

7 years agoVendor import of compiler-rt trunk r291476:
dim [Mon, 9 Jan 2017 21:23:31 +0000 (21:23 +0000)]
Vendor import of compiler-rt trunk r291476:
https://llvm.org/svn/llvm-project/compiler-rt/trunk@291476

7 years agoVendor import of clang trunk r291476:
dim [Mon, 9 Jan 2017 21:23:21 +0000 (21:23 +0000)]
Vendor import of clang trunk r291476:
https://llvm.org/svn/llvm-project/cfe/trunk@291476

7 years agoVendor import of llvm trunk r291476:
dim [Mon, 9 Jan 2017 21:23:09 +0000 (21:23 +0000)]
Vendor import of llvm trunk r291476:
https://llvm.org/svn/llvm-project/llvm/trunk@291476

7 years agoMerge ^/head r311808 through r311811.
dim [Mon, 9 Jan 2017 19:42:22 +0000 (19:42 +0000)]
Merge ^/head r311808 through r311811.

7 years agoAdd additional libc++ 4.0.0 headers.
dim [Mon, 9 Jan 2017 19:37:17 +0000 (19:37 +0000)]
Add additional libc++ 4.0.0 headers.

7 years agoMerge ^/head r311692 through r311807.
dim [Mon, 9 Jan 2017 19:25:49 +0000 (19:25 +0000)]
Merge ^/head r311692 through r311807.

7 years agoAdd recently added libc++ headers to OptionalObsoleteFiles.inc.
dim [Mon, 9 Jan 2017 19:22:29 +0000 (19:22 +0000)]
Add recently added libc++ headers to OptionalObsoleteFiles.inc.

MFC after: 3 days

7 years agoAfter r311565, also remove llvm-ranlib from ObsoleteFiles.inc.
dim [Mon, 9 Jan 2017 19:12:41 +0000 (19:12 +0000)]
After r311565, also remove llvm-ranlib from ObsoleteFiles.inc.

7 years agoRewrite CTL statistics in more simple and scalable way.
mav [Mon, 9 Jan 2017 18:18:15 +0000 (18:18 +0000)]
Rewrite CTL statistics in more simple and scalable way.

Instead of collecting statistics for each combination of ports and logical
units, that consumed ~45KB per LU with present number of ports, collect
separate statistics for every port and every logical unit separately, that
consume only 176 bytes per each single LU/port.  This reduces struct
ctl_lun size down to just 6KB.

Also new IOCTL API/ABI does not hardcode number of LUs/ports, and should
allow handling of very large quantities.

MFC after: 2 weeks (probably keeping old API enabled for some time)

7 years agoAdd sdhci_handle_card_present_locked() that can be called from the interrupt
ian [Mon, 9 Jan 2017 17:10:50 +0000 (17:10 +0000)]
Add sdhci_handle_card_present_locked() that can be called from the interrupt
handler which already holds the mutex, and have sdhci_handle_card_present()
be just a tiny wrapper that does the locking for external callers.

This should fix the recursive locking panics seen on rpi3.

Reported by: Shawn Webb

7 years ago- Add support for Intel Apollo Lake and Bay Trail eMMC controllers.
marius [Mon, 9 Jan 2017 17:07:13 +0000 (17:07 +0000)]
- Add support for Intel Apollo Lake and Bay Trail eMMC controllers.
  Besides slots always having non-removable media, these HCIs require
  a custom hardware reset sequence after power-up.
- Flesh out the support for Intel Braswell eMMC controllers further.
  Apart from also requiring said reset code, the timeout clock needs to
  be hardcoded to 1 MHz for these.
  Both the special reset and timeout clock handlings are implemented as
  global sdhci(4) quirks as the same treatment will be necessary for
  Intel eMMC controllers attached via ACPI (once sdhci(4) grows such a
  front-end).
- In sdhci_init_slot(), use the right capability field for determining
  the announced bus width based on MMC_CAP_*_BIT_DATA.
- Correct inverted sdhci_pci_softc member comments added in r276469. [1]

Submitted by: Anton Yuzhaninov [1]
MFC after: 5 days

7 years agoIn mmcsd_task(), bio_resid was not being set to 0 on a successful read
marius [Mon, 9 Jan 2017 17:05:39 +0000 (17:05 +0000)]
In mmcsd_task(), bio_resid was not being set to 0 on a successful read
or write, resulting in random short-read and short-write returns for
requests. Fixing this fixes nominal block I/O via mmcsd(4).

Obtained from: DragonFlyBSD (fd4b97583be1a1e57234713c25f6e81bc0411cb0)
MFC after: 5 days

7 years agoAllocate memory for prevent flags only for removable LUs.
mav [Mon, 9 Jan 2017 16:21:06 +0000 (16:21 +0000)]
Allocate memory for prevent flags only for removable LUs.

This array takes 64KB of RAM now, that was more then half of struct ctl_lun
size.  If at some point we support more ports, this may need another tune.

MFC after: 2 weeks

7 years agoUse standard Versions.def for libprocstat.
kib [Mon, 9 Jan 2017 11:11:52 +0000 (11:11 +0000)]
Use standard Versions.def for libprocstat.

This makes the versions inheritance consistent for our versioned libraries.

Extracted from: ino64
Discussed with: kan
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoUse tab for indent.
kib [Mon, 9 Jan 2017 10:47:20 +0000 (10:47 +0000)]
Use tab for indent.

Extracted from: ino64 work by gleb
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoFix rstat: symbol not in namelist from netstat
smh [Mon, 9 Jan 2017 09:28:03 +0000 (09:28 +0000)]
Fix rstat: symbol not in namelist from netstat

Load kvm symbols earlier to prevent rstat: symbol not in namelist
error when running netstat -rs.

Submitted by: Sebastian Huber <sebastian.huber@embedded-brains.de>
MFC after: 1 week
Sponsored by: Multiplay

7 years agoFix typo.
delphij [Mon, 9 Jan 2017 07:36:31 +0000 (07:36 +0000)]
Fix typo.

MFC after: 3 days

7 years agoAdd a REVISION section to track changes for the BEGEMOT-NETGRAPH MIB file
ngie [Mon, 9 Jan 2017 06:36:17 +0000 (06:36 +0000)]
Add a REVISION section to track changes for the BEGEMOT-NETGRAPH MIB file

This change also documents the modification harti made to a handful of
objects in r122758 (the max OCTET STRING width was increased from 15 to
31 octets)

MFC after: 1 week

7 years agoAdd a REVISION section to track changes for the BEGEMOT-MIB MIB file
ngie [Mon, 9 Jan 2017 06:27:30 +0000 (06:27 +0000)]
Add a REVISION section to track changes for the BEGEMOT-MIB MIB file

There haven't been any changes to the MIB definition, so the REVISION
remains static at the version it was imported at

MFC after: 1 week

7 years agoAdd a REVISION section to track changes for the FOKUS-MIB MIB file
ngie [Mon, 9 Jan 2017 06:24:28 +0000 (06:24 +0000)]
Add a REVISION section to track changes for the FOKUS-MIB MIB file

There haven't been any changes to the MIB definition, so the REVISION
remains static at the version it was imported at

MFC after: 1 week

7 years agoAdd a REVISION section to track changes for the BEGEMOT-ATM-FREEBSD-MIB MIB file
ngie [Mon, 9 Jan 2017 06:19:20 +0000 (06:19 +0000)]
Add a REVISION section to track changes for the BEGEMOT-ATM-FREEBSD-MIB MIB file

There haven't been any changes to the MIB definition, so the REVISION
remains static at the version it was imported at

MFC after: 1 week

7 years agoSimilar to r311750, check for the result from smiGetModule to avoid a segfault
ngie [Mon, 9 Jan 2017 06:13:27 +0000 (06:13 +0000)]
Similar to r311750, check for the result from smiGetModule to avoid a segfault
when dereferencing a NULL pointer later on.

Choose to just check for the NULL pointer in the next for-loop for now to fix
the issue with a minimal amount of code churn

sys/queue.h use here would make more sense than using a static table

MFC after: 5 days

7 years agoUse calloc instead of malloc + memset(.., 0, ..)
ngie [Mon, 9 Jan 2017 06:03:49 +0000 (06:03 +0000)]
Use calloc instead of malloc + memset(.., 0, ..)

MFC after: 5 days

7 years agoCheck result from smiGetFirstNode and smiGetNodeByOID
ngie [Mon, 9 Jan 2017 05:51:38 +0000 (05:51 +0000)]
Check result from smiGetFirstNode and smiGetNodeByOID

This avoids a segfault with malformed or unanticipated files,
like IPV6-TC.txt (a file containing just TEXTUAL-CONVENTIONS).

MFC after: 5 days
Found with: gensnmpdef /usr/local/share/snmp/mibs/IPV6-TC.txt

7 years agoBump WARNS up from 0 to 6
ngie [Mon, 9 Jan 2017 05:46:41 +0000 (05:46 +0000)]
Bump WARNS up from 0 to 6

MFC after: 5 days

7 years agoDocument bsd.snmpmod.mk from a high-level
ngie [Mon, 9 Jan 2017 04:35:55 +0000 (04:35 +0000)]
Document bsd.snmpmod.mk from a high-level

MFC after: 2 weeks

7 years agohyperv: Add method to read 64bit Hyper-V specific time value.
sephe [Mon, 9 Jan 2017 03:38:41 +0000 (03:38 +0000)]
hyperv: Add method to read 64bit Hyper-V specific time value.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D9057

7 years agoAdd a REVISION section to track changes for the BEGEMOT-IP-MIB MIB file
ngie [Mon, 9 Jan 2017 03:21:21 +0000 (03:21 +0000)]
Add a REVISION section to track changes for the BEGEMOT-IP-MIB MIB file

There haven't been any changes to the MIB definition, so the REVISION
remains static at the version it was imported at

MFC after: 1 week

7 years agoAdd a REVISION section to track changes for the hostres module
ngie [Mon, 9 Jan 2017 03:18:19 +0000 (03:18 +0000)]
Add a REVISION section to track changes for the hostres module

There haven't been any changes to the MIB definition, so the REVISION remains
static at the version it was imported at

MFC after: 1 week

7 years agoImprove the smilint target in the hostres and mibII modules
ngie [Mon, 9 Jan 2017 03:14:04 +0000 (03:14 +0000)]
Improve the smilint target in the hostres and mibII modules

- Mark the smilint target .PHONY so it's always executed when requested
- Leverage .PATH for BMIBS instead of spelling the path out longhand
  for them

MFC after: 1 week

7 years agoUse SRCTOP instead of spelling out the full path with .CURDIR
ngie [Mon, 9 Jan 2017 03:08:21 +0000 (03:08 +0000)]
Use SRCTOP instead of spelling out the full path with .CURDIR

This helps condense the output for CFLAGS and .PATH

MFC after: 3 days

7 years agoUse the new sdhci_fdt_gpio helper functions to add full support for FDT
ian [Mon, 9 Jan 2017 02:04:54 +0000 (02:04 +0000)]
Use the new sdhci_fdt_gpio helper functions to add full support for FDT
gpio pins for detecting card insert/remove and write protect.

7 years agoUse the new sdhci_fdt_gpio helper functions to add full support for FDT
ian [Mon, 9 Jan 2017 01:57:51 +0000 (01:57 +0000)]
Use the new sdhci_fdt_gpio helper functions to add full support for FDT
gpio pins for detecting card insert/remove and write protect.

7 years agoAdd new helper routines for sdhci bridge drivers that use gpio pins for
ian [Mon, 9 Jan 2017 01:54:36 +0000 (01:54 +0000)]
Add new helper routines for sdhci bridge drivers that use gpio pins for
card presence and write protect switch detection.

A bridge driver just needs to call the setup routine in its attach(), the
teardown in its detach(), and write a couple tiny glue functions to connect
the sdhci interface functions to the new helper functions.  This is not
extensively documented, but multiple examples will exist real soon.

7 years agoUse nitems(mib) instead of hardcoding mib's length when calling sysctl(3)
ngie [Mon, 9 Jan 2017 01:47:00 +0000 (01:47 +0000)]
Use nitems(mib) instead of hardcoding mib's length when calling sysctl(3)

MFC after: 3 days

7 years agoAdd support for non-removable media, and a quirk to use polling to detect
ian [Mon, 9 Jan 2017 01:15:18 +0000 (01:15 +0000)]
Add support for non-removable media, and a quirk to use polling to detect
card insert/remove events on controllers that don't implement the insert
and remove interrupts.

Bridge drivers can set a new slot option, SDHCI_NON_REMOVABLE, to indicate
non-removable media (such as eMMC).  The sdhci driver will not enable
insert/remove interrupts, and sdhci_generic_get_card_present() will always
return true.

Bridge drivers can set a new quirk, SDHCI_QUIRK_POLL_CARD_PRESENT, and the
sdhci driver will not enable insert/remove interrupts, and instead will use
a callout to poll the card-present status at 5 Hz.

For bridge drivers that get notified of card insert/remove via gpio
interrupts, there is a new sdhci_handle_card_present() function they can
call from the gpio interrupt handler to inform the sdhci code of the event.

In addition to adding these new features, the existing code to debounce card
insertions was updated to use taskqueue_enqueue_timeout() instead of
scheduling a callout to do the taskqueue_enqueue().  There is also now a
comment explaining that insertion-debounce is what's going on -- it took me
a long time to realize that's what the old sdhci_card_delay() routine was
really doing.  There is no functional difference between the old and new
debounce code (I hope!).

7 years agoUse nitems({mib,name}) instead of hardcoding their value
ngie [Mon, 9 Jan 2017 00:54:18 +0000 (00:54 +0000)]
Use nitems({mib,name}) instead of hardcoding their value

MFC after: 3 days

7 years agolib/libutil/kinfo_*: style cleanup
ngie [Mon, 9 Jan 2017 00:47:23 +0000 (00:47 +0000)]
lib/libutil/kinfo_*: style cleanup

- Use nitems(mib) instead of hardcoding mib's length
- Sort sys/ #includes

MFC after: 3 days

7 years agoUse nitems(mib) instead of hardcoding mib's length
ngie [Mon, 9 Jan 2017 00:38:19 +0000 (00:38 +0000)]
Use nitems(mib) instead of hardcoding mib's length

MFC after: 3 days

7 years agoSort #includes
ngie [Mon, 9 Jan 2017 00:37:09 +0000 (00:37 +0000)]
Sort #includes

MFC after: 3 days

7 years agoClean up trailing whitespace
ngie [Mon, 9 Jan 2017 00:33:27 +0000 (00:33 +0000)]
Clean up trailing whitespace

MFC after: 3 days

7 years agoStyle fixes
ngie [Mon, 9 Jan 2017 00:29:23 +0000 (00:29 +0000)]
Style fixes

- Delete trailing whitespace
- Use nitems(mib) instead of hardcoding the mib length

MFC after: 3 days

7 years agoStyle(9) fixes
ngie [Mon, 9 Jan 2017 00:25:33 +0000 (00:25 +0000)]
Style(9) fixes

- Sort sys/ #includes
- Use nitems instead of hardcoding the length of `mib`

MFC after: 3 days

7 years agortwn_usb(4): fix Rx buffer size calculation.
avos [Sun, 8 Jan 2017 23:41:17 +0000 (23:41 +0000)]
rtwn_usb(4): fix Rx buffer size calculation.

Use device-specific Rx buffer size to ensure that data will not be
truncated + add a warning if truncation was detected (the driver
cannot handle this case correctly yet).

Tested with:
 - RTL8188CUS, RTL8188EU and RTL8821AU, STA / AP modes.

7 years agoUpdate pciids to 2017.01.08
bapt [Sun, 8 Jan 2017 23:25:46 +0000 (23:25 +0000)]
Update pciids to 2017.01.08

MFC after: 1 day

7 years agoKnock a page off VM_MAX_KERNEL_ADDRESS
jhibbits [Sun, 8 Jan 2017 21:12:46 +0000 (21:12 +0000)]
Knock a page off VM_MAX_KERNEL_ADDRESS

There are places where checks are made against VM_MAX_KERNEL_ADDRESS, or
virtual_end (set to VM_MAX_KERNEL_ADDRESS).  With 32-bit checks, an address will
always be less than or equal to 0xffffffff.  Drop a page, so those checks can
terminate loops safely.

7 years agoUse correct PCI device id for virtio-rng.
grehan [Sun, 8 Jan 2017 20:58:58 +0000 (20:58 +0000)]
Use correct PCI device id for virtio-rng.
This prevented the device from attaching with a
Windows guest (most other guests use the device type
for matching)

PR: 212711
Submitted by: jbeich
MFC after: 3 days

7 years agoConvert gpioc to use the make_dev_s(9) KPI. This fix a possible race where
loos [Sun, 8 Jan 2017 20:41:32 +0000 (20:41 +0000)]
Convert gpioc to use the make_dev_s(9) KPI.  This fix a possible race where
si_drv1 can be accessed before it gets set.

This is inspired on r311700.

MFC after: 3 days

7 years agoConvert etherswitch to use the make_dev_s(9) KPI. This fix a possible race
loos [Sun, 8 Jan 2017 20:37:41 +0000 (20:37 +0000)]
Convert etherswitch to use the make_dev_s(9) KPI.  This fix a possible race
where si_drv1 can be accessed before it gets set.

MFC after: 3 days
Suggested by: kib
Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agoMake sure the 'Always-one' bit is always set to one,
grehan [Sun, 8 Jan 2017 20:29:35 +0000 (20:29 +0000)]
Make sure the 'Always-one' bit is always set to one,
in the first byte of the 3-byte mouse data report.
Plan9/9front requires this.

Switch over to using #defines for the data report bits.

Verified no regression on Win10/Fedora-live.

Reported and tested by: Trent Thompson (trentnthompson at gmail com)
MFC after: 1 week

7 years agoClean out stuff we don't use.
dim [Sun, 8 Jan 2017 19:48:13 +0000 (19:48 +0000)]
Clean out stuff we don't use.

7 years agoMerge compiler-rt r291274.
dim [Sun, 8 Jan 2017 19:47:17 +0000 (19:47 +0000)]
Merge compiler-rt r291274.

7 years agoMerge libc++ r291274, and update the library Makefile.
dim [Sun, 8 Jan 2017 19:39:03 +0000 (19:39 +0000)]
Merge libc++ r291274, and update the library Makefile.

7 years agoRelease the ND6 list lock before making a prefix off-link in nd6_timer().
markj [Sun, 8 Jan 2017 18:46:00 +0000 (18:46 +0000)]
Release the ND6 list lock before making a prefix off-link in nd6_timer().

Reported by: Jim <BM-2cWfdfG5CJsquqkJyry7hZT9LypbSEWEkQ@bitmessage.ch>
X-MFC With: r306829

7 years agoNow that the PRESENT_STATE register is only used for the inhibit bits loop
ian [Sun, 8 Jan 2017 18:28:06 +0000 (18:28 +0000)]
Now that the PRESENT_STATE register is only used for the inhibit bits loop
in this function, eliminate the state variable and restructure the loop to
read the register just once at the top of the loop.

Suggested by: skra

7 years agoMerge ^/head r311684 through r311691.
dim [Sun, 8 Jan 2017 18:17:35 +0000 (18:17 +0000)]
Merge ^/head r311684 through r311691.

7 years agoFor kernel builds, make the -Waddress-of-packed-member warning non-fatal.
dim [Sun, 8 Jan 2017 18:14:28 +0000 (18:14 +0000)]
For kernel builds, make the -Waddress-of-packed-member warning non-fatal.
The warning is informative, but often there is no real alignment problem.

7 years agoFix logic error in gvinum's gv_set_sd_state()
dim [Sun, 8 Jan 2017 17:56:54 +0000 (17:56 +0000)]
Fix logic error in gvinum's gv_set_sd_state()

With clang 4.0.0, I'm getting the following warnings:

    sys/geom/vinum/geom_vinum_state.c:186:7: error: logical not is only
    applied to the left hand side of this bitwise operator
    [-Werror,-Wlogical-not-parentheses]
                    if (!flags & GV_SETSTATE_FORCE)
                        ^      ~

The logical not operator should obiously be called after masking.

Reviewed by: mav, pfg
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D9093

7 years agoDisable -Waddress-of-packed-member for WARNS <= 3.
dim [Sun, 8 Jan 2017 14:49:50 +0000 (14:49 +0000)]
Disable -Waddress-of-packed-member for WARNS <= 3.

7 years agoMerge ^/head r311546 through r311683.
dim [Sun, 8 Jan 2017 14:36:18 +0000 (14:36 +0000)]
Merge ^/head r311546 through r311683.

7 years agoMake CTL_GETSTATS ioctl return partial data if buffer is small.
mav [Sun, 8 Jan 2017 13:26:34 +0000 (13:26 +0000)]
Make CTL_GETSTATS ioctl return partial data if buffer is small.

MFC after: 2 weeks

7 years agoAdd direction argument to ipsec_setspidx_inpcb() function.
ae [Sun, 8 Jan 2017 12:40:07 +0000 (12:40 +0000)]
Add direction argument to ipsec_setspidx_inpcb() function.

This function is used only by ipsec_getpolicybysock() to fill security
policy index selector for locally generated packets (that have INPCB).
The function incorrectly assumes that spidx is the same for both directions.
Fix this by using new direction argument to specify correct INPCB security
policy - sp_in or sp_out. There is no need to fill both policy indeces,
because they are overwritten for each packet.
This fixes security policy matching for outbound packets when user has
specified TCP/UDP ports in the security policy upperspec.

PR: 213869
MFC after: 1 week

7 years ago[net80211] add roaming parameters for 11ac.
adrian [Sun, 8 Jan 2017 10:13:05 +0000 (10:13 +0000)]
[net80211] add roaming parameters for 11ac.

These are mostly placeholders for now.

7 years ago[net80211] use the correct freq2 field when populating VHT operation element.
adrian [Sun, 8 Jan 2017 10:07:54 +0000 (10:07 +0000)]
[net80211] use the correct freq2 field when populating VHT operation element.

Whilst here, leave a TODO comment so I revisit this routine in the context
of hostap operation probe requests for IBSS/mesh.

7 years agoiso_rrip.h: Hide kernel definitions from makefs(8)
cem [Sun, 8 Jan 2017 09:16:07 +0000 (09:16 +0000)]
iso_rrip.h: Hide kernel definitions from makefs(8)

Reported by: O. Hartmann <ohartmann at walstatt.org>

7 years agolibprocstat: Include cd9660 headers in the same order as the kernel
cem [Sun, 8 Jan 2017 08:36:37 +0000 (08:36 +0000)]
libprocstat: Include cd9660 headers in the same order as the kernel

Fix userspace build after r311665.

7 years agochown/chgrp: Add SIGINFO handler
cem [Sun, 8 Jan 2017 06:58:42 +0000 (06:58 +0000)]
chown/chgrp: Add SIGINFO handler

PR: 191884
Submitted by: Dan McGregor <dan.mcgregor at usask.ca>
Reviewed by: mjg@ (earlier version)

7 years agochmod: Add SIGINFO handler
cem [Sun, 8 Jan 2017 06:50:53 +0000 (06:50 +0000)]
chmod: Add SIGINFO handler

PR: 191884
Submitted by: Dan McGregor <dan.mcgregor at usask.ca>
Reviewed by: mjg@ (earlier version)

7 years agoAdd some additional ACPI methods for DRM
cem [Sun, 8 Jan 2017 06:26:33 +0000 (06:26 +0000)]
Add some additional ACPI methods for DRM

Add AcpiGetDataFull and AcpiGetTableWithSize.

Submitted by: Matt Macy

7 years agoDo not truncate inode calculation from ISO9660 block offset
cem [Sun, 8 Jan 2017 06:22:35 +0000 (06:22 +0000)]
Do not truncate inode calculation from ISO9660 block offset

PR: 190655
Reported by: Thomas Schmitt <scdbackup at gmx.net>
Obtained from: NetBSD sys/fs/cd9660/cd9660_node.c,r1.31

7 years agocd9660: Expand internal inum size to 64 bits
cem [Sun, 8 Jan 2017 06:21:49 +0000 (06:21 +0000)]
cd9660: Expand internal inum size to 64 bits

Inums in cd9660 refer to byte offsets on the media.  DVD and BD media
can have entries above 4GB, especially with multi-session images.

PR: 190655
Reported by: Thomas Schmitt <scdbackup at gmx.net>

7 years agommc: Accept even lower voltage for Cherryview
cem [Sun, 8 Jan 2017 06:20:21 +0000 (06:20 +0000)]
mmc: Accept even lower voltage for Cherryview

And HP x2 210, per DragonFlyBSD 240bd9cd58f8259c12c14a8006837e698.

Submitted by: Johannes Lundberg <yohanesu75 at gmail.com>
No objection: gonzo@
Obtained from: DragonFlyBSD

7 years ago[net80211] include the prototype VHT code into the build.
adrian [Sun, 8 Jan 2017 04:27:08 +0000 (04:27 +0000)]
[net80211] include the prototype VHT code into the build.

Note: it isn't called anywhere yet!

7 years ago[net80211] Add initial VHT support routines.
adrian [Sun, 8 Jan 2017 04:25:41 +0000 (04:25 +0000)]
[net80211] Add initial VHT support routines.

This is a skeleton set based on ieee80211_ht.c.  It implements some IE
parsing, some basic unfinished negotiation, and channel promotion/demotion.

However, by itself it's not enough to do VHT - notably, the actual
channel promotion for STA mode at least is done in ieee80211_ht.c as
part of htinfo_update_chw().  I was .. quite amused when I found that
out.

I'm checking this in so others can see progress rather than one huge
commit when VHT is "done" (which will likely be quite a while.)

7 years ago[net80211] add a "is VHT available" macro.
adrian [Sun, 8 Jan 2017 04:23:05 +0000 (04:23 +0000)]
[net80211] add a "is VHT available" macro.

We have run out of config bits, sigh, so until I expand the ic config
bits, just use this macro as a substitute.

7 years agoAdd a new sdhci interface method, get_card_present().
ian [Sun, 8 Jan 2017 02:32:53 +0000 (02:32 +0000)]
Add a new sdhci interface method, get_card_present().

Many embedded SoC controllers that are (more or less) sdhci-compatible don't
implement card detect, and the related values in the PRESENT_STATE register
aren't useful.  A bridge driver can now implement get_card_present() to read
a gpio pin or whatever else is necessary for that system.

The default implementation reads the CARD_PRESENT bit from the PRESENT_STATE
register, so existing drivers will keep working (or keep not-fully-working,
since many drivers right now can't detect card insert/remove).

7 years agoremove network mask calculation for Classful network
bapt [Sat, 7 Jan 2017 23:42:17 +0000 (23:42 +0000)]
remove network mask calculation for Classful network

Nowadays it's not necessary to compute network mask from the IP address and
compare to given by DHCP.

Submitted by: kczekirda
Reviewed by: glebius, bapt
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D8740

7 years agoOnly write to *active once, even when GPIO_ACTIVE_LOW is set.
ian [Sat, 7 Jan 2017 22:55:23 +0000 (22:55 +0000)]
Only write to *active once, even when GPIO_ACTIVE_LOW is set.

7 years agocxgbe/t4_tom: Fix tid accounting. An offloaded IPv6 connection uses 2
np [Sat, 7 Jan 2017 20:26:19 +0000 (20:26 +0000)]
cxgbe/t4_tom: Fix tid accounting.  An offloaded IPv6 connection uses 2
tids, not 1, in the hardware.

MFC after: 3 days
Sponsored by: Chelsio Communications

7 years agoAdd skein(3) front ends to the md5 manpage
allanjude [Sat, 7 Jan 2017 19:43:40 +0000 (19:43 +0000)]
Add skein(3) front ends to the md5 manpage

Reported by: emaste

7 years agolibmd: add noexec stack annotation in skein_block_asm.s
emaste [Sat, 7 Jan 2017 19:26:25 +0000 (19:26 +0000)]
libmd: add noexec stack annotation in skein_block_asm.s

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

7 years agostyle(9) fix
allanjude [Sat, 7 Jan 2017 17:37:39 +0000 (17:37 +0000)]
style(9) fix

Submitted by: jmallett

7 years agoExport __cxa_thread_atexit_impl as an alias for __cxa_thread_atexit.
kib [Sat, 7 Jan 2017 16:05:19 +0000 (16:05 +0000)]
Export __cxa_thread_atexit_impl as an alias for __cxa_thread_atexit.

libstdc++ before gcc r244057 expected that libc provided
__cxa_thread_atexit_impl, and libstdc++ implemented
__cxa_thread_atexit, by forwarding the calls to _impl.  Mentioned gcc
revision checks for __cxa_thread_atexit in libc and does not provide
the symbol from libstdc++ if found.

This change helps older gcc, in particular, all released versions
which implement thread_local, by consolidating the implementation into
libc.  For that versions, if configured with the current libc, the
__cxa_thread_atexit is exported from libstdc++ as a trivial wrapper
around libc::__cxa_thread_atexit_impl.

The __cxa_thread_atexit implementation is put into separate source
file to allow for static linking with older libstdc++.a.

gcc bugzilla: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78968
Reported by: Hannes Hauswedell <h2+fbsdports@fsfe.org>
PR: 215709
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

7 years agoRestore priority value for OGIO_KEYMAP
lifanov [Sat, 7 Jan 2017 15:58:57 +0000 (15:58 +0000)]
Restore priority value for OGIO_KEYMAP

PR: 206678
Submitted by: ecturt@gmail.com
Reviewed by: cem
Approved by: cem, matthew (mentor)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D5095

7 years agoFix the following clang 4.0.0 warning in ngatm's snmp_atm.c:
dim [Sat, 7 Jan 2017 15:57:12 +0000 (15:57 +0000)]
Fix the following clang 4.0.0 warning in ngatm's snmp_atm.c:

    contrib/ngatm/snmp_atm/snmp_atm.c:173:6: error: logical not is only
    applied to the left hand side of this bitwise operator
    [-Werror,-Wlogical-not-parentheses]
            if (!ifmr.ifm_status & IFM_AVALID) {
                ^                ~

Obviously, the masking needs to be done before the logical not
operation.  Add parentheses to make it so.

MFC after:      3 days

7 years agoAdd one more dependency for lld.
dim [Sat, 7 Jan 2017 15:18:49 +0000 (15:18 +0000)]
Add one more dependency for lld.

7 years agolibunwind: add noexec stack annotation
emaste [Sat, 7 Jan 2017 14:40:58 +0000 (14:40 +0000)]
libunwind: add noexec stack annotation

Reported by: vangyzen
Reviewed by: kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D9075

7 years agoDefine _POSIX_PRIORITY_SCHEDULING as 0.
kib [Sat, 7 Jan 2017 12:24:45 +0000 (12:24 +0000)]
Define _POSIX_PRIORITY_SCHEDULING as 0.

sched_*(2) syscalls might be not available at runtime.  Defining this
constant as zero directs POSIX-compliant code to call sysconf(3) to
detect the feature at runtime, and forces libc sysconf(3) to ask
kernel.

Noted by: ngie
Reviewed by: jilles, ngie
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D9055

7 years agosfxge(4): allow DMA descs to cross 4k boundary on EF10
arybchik [Sat, 7 Jan 2017 10:55:38 +0000 (10:55 +0000)]
sfxge(4): allow DMA descs to cross 4k boundary on EF10

Siena has limitation on maximum byte count and 4k boundary crosssing
(which is stricter than maximum byte count).
EF10 has limitation on maximum byte count only.

Reviewed by:    philip
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D9061

7 years agosfxge(4): treat EFX_LINK_UNKOWN as link down
arybchik [Sat, 7 Jan 2017 10:52:02 +0000 (10:52 +0000)]
sfxge(4): treat EFX_LINK_UNKOWN as link down

It is safer to consider EFX_LINK_UNKNOWN as link down.
link_mode is set to EFX_LINK_UNKNOWN on port stop and fini.

Reviewed by:    philip
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D9060

7 years agosfxge(4): use SFXGE_LINK_UP() to report link up state
arybchik [Sat, 7 Jan 2017 10:51:12 +0000 (10:51 +0000)]
sfxge(4): use SFXGE_LINK_UP() to report link up state

Reviewed by:    philip
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D9059

7 years agoMake 'camcontrol modepage' support subpages.
mav [Sat, 7 Jan 2017 09:56:12 +0000 (09:56 +0000)]
Make 'camcontrol modepage' support subpages.

MFC after: 2 weeks

7 years agoMake do_buff_decode() not read past the end of the buffer.
mav [Sat, 7 Jan 2017 09:33:11 +0000 (09:33 +0000)]
Make do_buff_decode() not read past the end of the buffer.

Abort format processing as soon as we have no enough data.

MFC after: 2 weeks

7 years agoMove the mibII module up so uncommenting the bridge module works
ngie [Sat, 7 Jan 2017 09:03:40 +0000 (09:03 +0000)]
Move the mibII module up so uncommenting the bridge module works

Add a note about how module ordering and dependent modules

MFC after: 1 week

7 years agoConditionalize building libwrap support into sshd
ngie [Sat, 7 Jan 2017 08:08:35 +0000 (08:08 +0000)]
Conditionalize building libwrap support into sshd

Only build libwrap support into sshd if MK_TCP_WRAPPERS != no

This will unbreak the build if libwrap has been removed from the system

MFC after: 2 weeks
PR: 210141
Submitted by: kpect@protonmail.com
Differential Revision: D9049

7 years agoUnbreak lib/libsysdecode after r311568 by decoding MSG_MORETOCOME flag
ngie [Sat, 7 Jan 2017 07:54:23 +0000 (07:54 +0000)]
Unbreak lib/libsysdecode after r311568 by decoding MSG_MORETOCOME flag
in msgflags

MFC after: 1 month
X-MFC with: r311568
Pointyhat to: jhb
Reported by: cy
Submitted by: Michael Butler <imb@protected-networks.net>
Sponsored by: Dell EMC Isilon