Commit Graph

208738 Commits

Author SHA1 Message Date
Glen Barber
3c76ad5c10 Include correct is*ct*l program in iscsi package, and package the
legacy version separately.

Submitted by:	trasz
Sponsored by:	The FreeBSD Foundation
2016-02-16 01:18:49 +00:00
Glen Barber
0fe0fe112f MFH
Sponsored by:	The FreeBSD Foundation
2016-02-15 21:58:52 +00:00
Pedro F. Giffuni
179a5a39a8 fputs: Return the number of bytes written.
Fix r295631: wrong value.

Pointy hat:	pfg (me)
Pointed out by:	bde
2016-02-15 21:18:52 +00:00
John Baldwin
623277619d Correct the ABI name for Linux/i386 binaries under FreeBSD/i386.
This allows truss to work for these binaries again after r288424.

MFC after:	3 days
2016-02-15 20:27:16 +00:00
John Baldwin
142482cda6 Sign extend the error value for failing Linux/i386 system calls. This
restores the mapping of Linux errors to native FreeBSD errno values after
the refactoring in r288424.
2016-02-15 20:26:40 +00:00
Andrew Turner
501ce0d86b Add support for the Allwinner DMA controller. This will be used by the at
least the audio codec driver currently in review.

Submitted by:	Jared McNeill <jmcneill@invisible.ca>
Differential Revision:	https://reviews.freebsd.org/D5050
2016-02-15 19:56:35 +00:00
Andrew Turner
2ff143af3f Add support for the AXP209 Power System Management IC. This allows boards
with this and an Allwinner SoC to power off.

Submitted by:	Emmanuel Vadot <manu@bidouilliste.com>
Differential Revision:	https://reviews.freebsd.org/D4954
2016-02-15 19:31:23 +00:00
Andrew Turner
4d1defda24 Set sc->clkfreq removed in r295470
Reported by:	Jared McNeill <jmcneill@invisible.ca>
Pointy-hat to:	andrew
2016-02-15 19:14:24 +00:00
Pedro F. Giffuni
20055d7691 getln: We cannot expand the buffer beyond INT_MAX.
In such cases return ENOMEM. This is a limitation of our
implementation, alternatively you may consider getline(3).

Differential Revision:	https://reviews.freebsd.org/D442 (Partial)
Obtained from:	Apple Inc. (Libc 997.90.3)
Relnotes:	yes
2016-02-15 18:14:21 +00:00
Pedro F. Giffuni
2082bf26c8 fputs: Return the number of bytes written.
POSIX.1-2008 requires that successful completion simply return a
non-negative integer. We have regularly returned a constant value.
Another, equally valid, implementation convention implies returning
the number of bytes written.

Adopt this last convention to be in line with what Apple's libc
does. POSIX also explicitly notes:

Note that this implementation convention cannot be adhered to for strings
longer than {INT_MAX} bytes as the value would not be representable in the
return type of the function. For backwards-compatibility, implementations
can return the number of bytes for strings of up to {INT_MAX} bytes, and
return {INT_MAX} for all longer strings.

Developers shouldn't depend specifically on either convention but
the change may help port software from Apple.

Differential Revision:  https://reviews.freebsd.org/D442 (Partial)
Obtained from:  Apple Inc. (Libc 997.90.3 with changes)
Relnotes:	yes
2016-02-15 18:13:33 +00:00
Andrew Turner
740be1dc58 Fix the spelling of OF_getencprop. It will fix the data correctly for the
endian of the CPU so there is no need to call fdt32_to_cpu.

Sponsored by:	ABT Systems Ltd
2016-02-15 17:14:10 +00:00
Andrew Turner
96922be6b5 Remove an unused FDT header, fdt_common.h should only be needed in a few
places, mostly in sys/dev/fdt and legacy code.

Sponsored by:	ABT Systems Ltd
2016-02-15 17:05:03 +00:00
Andrew Turner
0df627dc54 Remove an unused static inline function.
Sponsored by:	ABT Systems Ltd
2016-02-15 16:55:44 +00:00
Svatopluk Kraus
c2849e3c11 Initial OMAP4 WUGEN pass-through driver. SPI interrupts are passed
through WUGEN to GIC. Hardware initialization is left in state after
reset as well as before.

This is needed after an update of Linux dts files.
2016-02-15 15:28:56 +00:00
Andrew Turner
5f250b53e8 Add support for the Allwinner i2c device. This is similar to the existing
Marvell twsi part, however uses different register locations, as such split
the existing driver into Marvell and Allwinner attachments.

While here clean a few style issues.

Submitted by:	Emmanuel Vadot <manu@bidouilliste.com>
Differential Revision:	https://reviews.freebsd.org/D4846
2016-02-15 15:11:26 +00:00
Adrian Chadd
0cc5515a85 Allow MIPS INTRNG code to be built without FDT support.
This patch allows the newly imported INTRNG code to be built without necessarily
having FDT support in the kernel.  This may be useful for some MIPS platforms
that wish to move to INTRNG, but not to FDT at the same time.

Basically all the code is already within ifdef's where FDT is concerned,
it's just the headers that aren't.

Submitted by:	Stanislav Galabov <sgalabov@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D5249
2016-02-15 14:34:35 +00:00
Andrew Turner
632381ed9d Move the twsi driver source to be under iicbus. It is in a separate
directory as it is expected multiple attachments will be added for the SoC
families that use this hardware.

Sponsored by:	ABT Systems Ltd
2016-02-14 23:51:13 +00:00
Andrew Turner
aa8dbafa71 Create the twsi device option in preparation to move the driver to a common
location. The device is also found in Allwinner SoCs.

Sponsored by:	ABT Systems Ltd
2016-02-14 23:42:07 +00:00
Conrad Meyer
f98d21e561 NTB: workaround for high traffic hardware hang
This patch comes from Dave Jiang's Linux tree, davejiang/ntb.  It hasn't
been accepted into Linus' tree, so I do not have an authoritative SHA1
to point at.  Original commit log:

=====================================================================
A hardware errata causes the NTB to hang when heavy bi-directional
traffic in addition to the usage of BAR0/1 (where the registers reside,
including the doorbell registers to trigger interrupts).

This workaround is only available on Haswell and Broadwell platform.
The workaround is to enable split BAR in the BIOS to allow the 64bit
BAR4 to be split into two 32bit BAR4 and BAR5. The BAR4 shall be pointed
to LAPIC region of the remote host. We will bypass the db mechanism and
directly trigger the MSIX interrupts. The offsets and vectors are
exchanged during transport scratch pad negotiation. The scratch pads are
now overloaded in order to allow the exchange of the information. This
gets around using the doorbell and prevents the lockup with additional
pcode changes in BIOS.

Signed-off-by:	Dave Jiang <dave.jiang@intel.com>
=====================================================================

Notable changes in the FreeBSD version of this patch:
* The MSIX BAR is configurable, like hw.ntb.b2b_mw_idx (msix_mw_idx).
  The Linux version of the patch only uses BAR4.
* MSIX negotiation aborts if the link goes down.

Obtained from:	Linux (Dual BSD/GPL driver)
Sponsored by:	EMC / Isilon Storage Division
2016-02-14 22:37:28 +00:00
Pedro F. Giffuni
00e24e4173 ext2fs: Remove panics for rename() race conditions.
Sync with r84642 from UFS:

The panics are inappropriate because the IN_RENAME flag only fixes a
few of the huge number of race conditions that can result in the
source path becoming invalid even prior to the VOP_RENAME() call.

Found accidentally while checking an issue from PVS Static Analysis.

MFC after:	3 days
2016-02-14 19:52:50 +00:00
Andrew Turner
15147f076e Remove an unused include. 2016-02-14 16:38:32 +00:00
Hans Petter Selasky
d5fb67a401 Restore maximum number of host keys to 64.
Discussed with:	adrian @ and avos @
2016-02-14 16:18:39 +00:00
Kevin Lo
daa1a379ce Fix a bug that caused nothing to be skipped when skipping exactly the
number of bytes present in a regular file was requested.

Obtained from:	OpenBSD
2016-02-14 14:23:56 +00:00
Colin Percival
bcccdfa37b Don't dereference a pointer immediately after determining that it is
equal to NULL. [1]

While I'm here, s/xb/xbd/ (the name changed a long time ago but this
instance wasn't corrected).

Reported by:	PVS-Studio [1]
2016-02-14 13:42:16 +00:00
Hans Petter Selasky
8cb15594b3 Fix variable assignment inside if-clause in the smsc driver.
Found by D5245 / PVS.

MFC after:	1 week
2016-02-14 07:20:07 +00:00
Hans Petter Selasky
fe3e452399 Reduce the number of supported WLAN keys in the rum driver, else we
risk bit shifting overflows. Found by D5245 / PVS.

MFC after:	1 week
2016-02-14 07:16:36 +00:00
Sepherosa Ziehau
ffc6b639c2 hyperv/hn: Fix typo in comment
Noticed by:	avos
Reviewed by:	adrian, avos, Hongjiang Zhang <honzhan microsoft com>
Approved by:	adrian
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D5199
2016-02-14 02:28:59 +00:00
Conrad Meyer
374b05e1ff ioat(4): On error detected in ithread, defer HW reset to taskqueue
The I/OAT HW reset process may sleep, so it is invalid to perform a
channel reset from the software interrupt thread.

Sponsored by:	EMC / Isilon Storage Division
2016-02-13 22:51:25 +00:00
Conrad Meyer
d2c55e5ad0 ioat(4): Also check for errors if the channel is suspended
Sponsored by:	EMC / Isilon Storage Division
2016-02-13 22:51:17 +00:00
Conrad Meyer
564af7a654 ioat(4): Decode/define more capabilities, operations
These are defined in the Intel Haswell EDS volume 2 (registers) (507849
v2.1).

Sponsored by:	EMC / Isilon Storage Division
2016-02-13 19:01:56 +00:00
Konstantin Belousov
2dd7d0560a Hide ucontext_t and mcontext_t when neither POSIX nor XSI features are
enabled in the compilation environment, i.e. for ANSI C use of
#include <signal.h>.

Requested and reviewed by:	bde
Sponsored by:	The FreeBSD Foundation
MFC after:	13 days
2016-02-13 17:23:55 +00:00
Conrad Meyer
007a703036 ioat(4): Recheck status register on zero-descriptor wakeups
Errors that halt the channel don't necessarily result in a completion
update, apparently.

Sponsored by:	EMC / Isilon Storage Division
2016-02-13 02:55:45 +00:00
Devin Teske
3ce83dbfcf Fix missing description for command usage
While "jng" or "jib" without arguments told you what each sub-command does,
sub-command usage didn't tell you (e.g., "jng bridge" or "jib addm" gave
only usage and not description).
2016-02-13 00:28:48 +00:00
Pedro F. Giffuni
e296c1df6f cd9660: More "check for NULL" cleaunps.
Cleanup some checks for NULL. Most of these were always unnecessary and
starting with r294954 brelse() doesn't need any NULL checks at all.

For now keep the checks somewhat consistent with NetBSD in case we want to
merge the cleanups to older versions.
2016-02-12 22:46:14 +00:00
Mark Johnston
eb3ff358dc Add a missing newline to a log message.
MFC after:	1 week
2016-02-12 21:17:00 +00:00
Mark Johnston
01869be58e Rename the flags field of struct nd_defrouter to "raflags".
This field contains the flags inherited from the corresponding router
advertisement message and is not for storing private state.

MFC after:	1 week
2016-02-12 21:15:57 +00:00
Ed Maste
715f438b42 elfcopy: enable PE and EFI support
Sponsored by:	The FreeBSD Foundation
2016-02-12 21:15:31 +00:00
Ed Maste
c1da297433 Add libpe for elfcopy(1) PE/COFF support
Sponsored by:	The FreeBSD Foundation
2016-02-12 21:12:47 +00:00
Mark Johnston
a4a7c8254c Simplify defrtrlist_update() slightly in preparation for future changes.
No functional change intended.

MFC after:	1 week
2016-02-12 21:06:48 +00:00
Mark Johnston
f60d595f34 Remove a bogus comment from nd6_na_input().
The splnet() call that it refers to has been removed, and a lock for the
default router list is in fact needed.

MFC after:	1 week
2016-02-12 21:01:53 +00:00
Mark Johnston
baebd3e54f Remove superfluous return statements from the neighbour discovery code.
MFC after:	1 week
2016-02-12 20:55:22 +00:00
Ed Maste
839529caa9 Update ELF Tool Chain to upstream rev 3400
Some notable improvements include:

readelf:
- Add AArch64 relocation definitions.
- Report value of unknown relocation types.

elfcopy:
- Consider symbols with STB_GNU_UNIQUE binding as global symbols.
- Fixed support for VMA adjustment for loadable sections found
  in relocatable objects.
- Handle nameless global symbols.
- Improve wildcard matching for !-prefixed symbols.
- Add PE/COFF support.

elfdump:
- Improve section type reporting.
- Add MIPS-specific section types.

This update also includes a significant number of bug fixes.

PR:		207091 [exp-run]
Sponsored by:	The FreeBSD Foundation
2016-02-12 20:54:02 +00:00
Mark Johnston
fc31564185 Fix style around allocations from M_IP6NDP.
- Don't cast the return value of malloc(9).
- Use M_ZERO instead of explicitly calling bzero(9).

MFC after:	1 week
2016-02-12 20:52:53 +00:00
Mark Johnston
97dca6a207 Remove some unreferenced NDP debug variable definitions.
MFC after:	1 week
2016-02-12 20:46:53 +00:00
Mark Johnston
785eb42adf Clear the cookie pointer on error in tmpfs_readdir().
It is otherwise left dangling, and callers that request cookies always free
the cookie buffer, even when VOP_READDIR(9) returns an error. This results
in a double free if tmpfs_readdir() returns an error to the NFS server or
the Linux getdents(2) emulation code.

Reported by:	pho
MFC after:	1 week
Security:	double free of malloc(9)-backed memory
Sponsored by:	EMC / Isilon Storage Division
2016-02-12 20:43:53 +00:00
Navdeep Parhar
748d440809 Remove duplicate definition (CPL_TRACE_PKT_T5). 2016-02-12 20:14:03 +00:00
Mark Felder
02686fb806 Document the new jail_reverse_stop parameter
While here clean up the documentation for jail_list

PR:		196152
Approved by:	jamie, wblock
MFC after:	1 week, with r295471
Differential Revision:	https://reviews.freebsd.org/D5243
2016-02-12 17:55:06 +00:00
Andrew Turner
ee211e0268 Stop adding an extra null terminator to strings, OF_getprop already returns
a null terminated string.
2016-02-12 17:04:03 +00:00
Benjamin Kaduk
3c56cded4e Update .Dd for r295565 2016-02-12 17:03:24 +00:00
Ian Lepore
0c0a157c15 Clarify the difference between 7- and 8-bit i2c addresses, used in FDT
versus hints-based configuration, respectively.

Reported by: Jukka Ukkonen <jau789@gmail.com>
2016-02-12 16:59:42 +00:00