Commit Graph

212197 Commits

Author SHA1 Message Date
Jared McNeill
343044c43b Add Allwinner A83T thermal sensor controller support.
The A83T thermal sensor controller has three sensors. Sensor 0 corresponds
to CPU cluster 0, sensor 1 to CPU cluster 1, and sensor 2 to the GPU. This
driver exports the temperature sensor readings via sysctl.

Calibration data is obtained from SRAM found in the Secure ID module.

Reviewed by:		manu
Differential Revision:	https://reviews.freebsd.org/D6378
2016-05-15 22:36:55 +00:00
Cy Schubert
54da23a7b3 Make subsequent code reachable.
Reported by:	Coverity CID 1354625
MFC after:	3 days
2016-05-15 22:35:11 +00:00
Don Lewis
b0882deadb Use strlcpy() instead of strncpy() when copying ifname to ensure
that it is NUL terminated.  Additional NUL padding is not required
for short names.

Reported by:	Coverity
CID:		1009974
MFC after:	1 week
2016-05-15 22:31:03 +00:00
Don Lewis
dc47112fa5 Use strlcpy() instead of strncpy() when copying ifname to ensure
that it is NUL terminated.  Additional NUL padding is not required
for short names.

Reported by:	Coverity
CID:		99186, 991864, 991865
MFC after:	1 week
2016-05-15 22:17:41 +00:00
Don Lewis
8afa1c3d7a Use strlcpy() instead of strncpy() when copying ifname to ensure
that it is NUL terminated.  Additional NUL padding is not required
for short names.

MFC after:	1 week
2016-05-15 22:06:21 +00:00
Don Lewis
7b06334915 Use strlcpy() instead of strncpy() when copying ifname to ensure
that it is NUL terminated.  Additional NUL padding is not required
for short names.

Reported by:	Coverity
CID:		974852
MFC after:	1 week
2016-05-15 21:45:04 +00:00
Don Lewis
1ef3d54d20 When handling SIOCSIFNAME ensure that the new interface name is NUL
terminated.  Reject the rename attempt if the name is too long.

MFC after:	1 week
2016-05-15 21:37:36 +00:00
Mark Johnston
565e7fd3bc opt_kdtrace.h is not needed for SDT probes as of r258541. 2016-05-15 20:04:43 +00:00
Jared McNeill
792492eee3 Enable SATA power regulator at boot on Sinovoip BananaPi BPI-M3. 2016-05-15 17:25:31 +00:00
Jared McNeill
6a94069a5e Reduce complexity of RSB by always using polling mode. Unfortunately
gpiobus methods can be called with non-sleepable locks held.

Reviewed by:	mmel
2016-05-15 16:43:47 +00:00
Jared McNeill
4e760f013d Add gpio-leds for Sinovoip BananaPi BPI-M3.
The green LED on the board is wired to AXP813 GPIO0 and the blue
LED is wired to AXP813 GPIO1.
2016-05-15 15:56:48 +00:00
Jared McNeill
fafd846c91 Add support for the AXP813/AXP818 power key and GPIO pins. 2016-05-15 15:54:41 +00:00
Jared McNeill
37cc9a031b Allow RSB to be used from interrupt handlers.
The driver uses polling mode if cold or !THREAD_CAN_SLEEP() and now
implements the bus_* interface.
2016-05-15 15:52:34 +00:00
Michal Meloun
1dd6c13536 TEGRA: Also attach gpioc to tegra_gpio driver. Forgotten in r299854. 2016-05-15 15:31:44 +00:00
Michal Meloun
7f460e50ab TEGRA: Don't use common name 'iicb' for tegra specific IIC driver.
Using commn name for different drivers breaks generic kernel creation.
2016-05-15 15:14:46 +00:00
Michal Meloun
c953c6ed19 OFWIICBUS: Make ofwiicbus_devclass externaly visible.
It's needed for binding of iic controllers.
2016-05-15 15:13:56 +00:00
Michal Meloun
d85aca8d66 TEGRA: Don't use common name 'gpio' for tegra specific GPIO driver.
Using commn name for different drivers breaks generic kernel creation.
2016-05-15 14:47:50 +00:00
Michal Meloun
e3da01a384 OFWGPIOBUS: Make ofwgpiobus_devclass externaly visible.
It's needed for binding of gpio controllers.
2016-05-15 14:43:52 +00:00
Adrian Chadd
1e383b4bca [bwn] remove N-PHY registers for now.
I've submitted an alternative proposal to -core about just importing
the (converted) GPL PHY code in an alternate directory under sys/gnu/
so I don't have to rewrite it all to be BSD licenced.
2016-05-15 14:39:41 +00:00
Emmanuel Vadot
3d8b512e0b Allow arm generic_timer code to be included even if not present in the
SoC.

Reviewed by:	andrew
Approved by:	cognet (mentor)
Differential Revision:	https://reviews.freebsd.org/D6372
2016-05-15 13:20:59 +00:00
Jilles Tjoelker
ecaa1101c3 install: When preserving timestamps, also copy the nanoseconds part. 2016-05-15 13:17:05 +00:00
Edward Tomasz Napierala
dd49c93695 Remove NULL checks after M_WAITOK allocations from isp(4).
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-05-15 08:36:12 +00:00
Edward Tomasz Napierala
0d1654c39b Make it possible to reroot into NFS. This means one can have
eg an NFSv4 root over WiFi: boot from md_root (small rootfs image
preloaded by loader(8)), setup WiFi, and then reroot into the actual
root, over NFS.

Note that it's currently limited to NFSv4, and due to problems with
nfsuserd(8) it requres a workaround on the server side: one needs
to set the vfs.nfsd.enable_stringtouid=1 sysctl and not run nfsuserd(8)
on either the server or the client side.

Reviewed by:	rmacklem@
MFC after:	1 month
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D6347
2016-05-15 08:34:59 +00:00
Adrian Chadd
e542607041 [bwn] add DUALPHY; this may be useful for PHY-N and later dual-phy probing.
Obtained from:	Landon Fuller <landonf@landonf.org>
2016-05-15 07:02:34 +00:00
Adrian Chadd
882abba02f [bwn] commit the N-PHY register set.
Obtained from:	Linux b43 (register definitions.)
2016-05-15 06:11:40 +00:00
Pedro F. Giffuni
bdfd68dca7 routed(8): Use arc4random_uniform instead of arc4random.
Use arc4random_uniform() when the desired random number upper bound
is not a power of two.

While here, we don't need srandom() and friends anymore.

Obtained from:	OpenBSD (CVS rev. 1.20)
2016-05-15 06:06:22 +00:00
Enji Cooper
73ffff5f64 Make hostid_save depend on hostid
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2016-05-15 06:00:13 +00:00
Enji Cooper
322c831d0c Fix broken dependency with routed when MK_ROUTED != no
Remove routed as a requirement in NETWORKING, and put it in routed as a BEFORE
requirement instead

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2016-05-15 05:45:54 +00:00
Enji Cooper
904bea8330 Conditionalize installing etc/rc.d/atm{1,2,3}
`BEFORE: netif` was already in etc/rc.d/atm1, so no additional changes
are needed in that script

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2016-05-15 05:38:47 +00:00
Enji Cooper
fbee792a95 Remove etc/rc.d/{zfs,zvol} if MK_ZFS != no
MFC after: 2 weeks
X-MFC with: r299840
Sponsored by: EMC / Isilon Storage Division
2016-05-15 05:22:15 +00:00
Enji Cooper
0648b47f06 Conditionalize etc/rc.d/{zfs,zvol} install on MK_ZFS != no
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2016-05-15 04:39:36 +00:00
Enji Cooper
7e7d2a6f50 Make FILESYSTEMS, dumpon, and var not depend on zfs and zvol
Make zfs and zvol come before all of the items that depended on them
previously

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2016-05-15 04:38:50 +00:00
Enji Cooper
142e7499c5 Reduce redundancy after release-pkg merge to head in r298107
- Use BINDIR instead of FILESDIR
- Default all <FILESGROUPS>MODEs to BINMODE with a single for-loop at the
  bottom of the Makefile
- Move all of the conditionals under the relevant MK_* != no build conditional
  blocks

Sponsored by: EMC / Isilon Storage Division
2016-05-15 04:19:50 +00:00
Enji Cooper
9ea0bf43e5 Fix .Dd
Today is the 14th, not the 10th of May

Reported by: igor (derp)
Sponsored by: EMC / Isilon Storage Division
2016-05-15 03:44:32 +00:00
Enji Cooper
9e1f7d9aa0 Fix fully canonicalized example for myvariable.27...
`6` doesn't occur in the OID; it was spurious

Bump .Dd for the change

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2016-05-15 03:43:36 +00:00
Enji Cooper
3b8e9f554f Remove trailing whitespace in license tort
MFC after: 1 week
Reported by: igor
Sponsored by: EMC / Isilon Storage Division
2016-05-15 03:41:01 +00:00
Enji Cooper
471761b8bb Remove NO_WERROR and add WARNS?= 6
This now compiles cleanly on all architectures

MFC after: 1 month
Tested with: clang 3.8, gcc 4.2.1, gcc 4.5, make tinderbox
Sponsored by: EMC / Isilon Storage Division
2016-05-15 03:38:40 +00:00
Enji Cooper
09ac27c318 Fix -Wcast-align warnings
Use memcpy instead of using direct assignment of void* pointers with
CMSG_DATA(..), which changes alignment

MFC after: 3 weeks
Reported by: clang
Sponsored by: EMC / Isilon Storage Division
2016-05-15 03:36:19 +00:00
Mark Johnston
c81c183dae Use Node Information flag names instead of hard-coding their values.
MFC after:	1 week
2016-05-15 03:22:13 +00:00
Mark Johnston
e8800f3c2f Fix a few style issues in the ICMP sysctl descriptions.
MFC after:	1 week
2016-05-15 03:19:53 +00:00
Mark Johnston
82366c228b Add sysctl descriptions for net.inet6.ip6 and net.inet6.icmp6.
icmp6.redirtimeout, icmp6.nd6_maxnudhint and ip6.rr_prune are left
undocumented as they appear to have no effect. Some existing sysctl
descriptions were modified for consistency and style, and the
ip6.tempvltime and ip6.temppltime handlers were rewritten to be a bit
simpler and to avoid setting the sysctl value before validating it.

MFC after:	3 weeks
2016-05-15 03:18:03 +00:00
Pedro F. Giffuni
e09d48f656 routed(8): Misc. cleanups to squelch Coverity.
table.c:
Copy into fixed size buffer.

trace.c:
Argument got dup2() cannot be negative.
Copy into fixed size buffer.

CID:		1006785, 1006786, 271301
Obtained from:	NetBSD
MFC after:	2 weeks.
2016-05-15 03:04:21 +00:00
Mark Johnston
415f6c24dd Remove an always-false error check in the AIFADDR_IN6 handler.
CID:		1250792
MFC after:	1 week
2016-05-15 03:01:40 +00:00
Pedro F. Giffuni
65e2bd0ab8 routed(8): Dereference before null check.
CID:		272432
Obtained from:	NetBSD (CVS ref. 1.16)
MFC after:	2 weeks.
2016-05-15 02:41:20 +00:00
Pedro F. Giffuni
7b011d21db routed(8): Avoid NULL de-reference and two possible memory leaks.
The reports and fixes are straightforward but it's nice to be able
to confirm against NetBSD.

CID:		271080, 272306, 272307
Obtained from:	NetBSD (CVS ref. 1.21 - 1.23)
MFC after:	2 weeks.
2016-05-15 02:30:34 +00:00
Enji Cooper
126b5bb6a4 Use SNMPD_INPUT_FAILED instead of SNMP_CODE_FAILED
SNMPD_INPUT_FAILED is `enum snmpd_input_err` type (which matches the return
code from the function). SNMP_CODE_FAILED is `enum snmp_code` type.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2016-05-15 00:54:21 +00:00
Rick Macklem
72393e3d80 Fix fuse so that stale buffer cache data isn't read.
When I/O on a file under fuse is switched from buffered to DIRECT_IO,
it was possible to read stale (before a recent modification) data from
the buffer cache. This patch invalidates the buffer cache for the
file to fix this.

PR:		194293
MFC after:	2 weeks
2016-05-15 00:45:17 +00:00
Enji Cooper
99ca491ca6 Remove NO_WERROR.clang from this Makefile
This compiles with clang without warnings

MFC after: 1 month
Sponsored by: EMC / Isilon Storage Division
2016-05-15 00:42:18 +00:00
Enji Cooper
6047e12ca5 Replace malloc + memset(.., 0, ..) with calloc calls
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2016-05-15 00:40:05 +00:00
Enji Cooper
27c7c23864 Use strdup instead of malloc + strlcpy
Fix error messages on failure for calloc/strdup

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
2016-05-15 00:25:36 +00:00