Commit Graph

197448 Commits

Author SHA1 Message Date
Gleb Smirnoff
8dc98c2a36 Toss declarations to fix regular build and NO_INET6 build. 2015-02-16 21:52:28 +00:00
Pedro F. Giffuni
46bf2f5317 rexec(3): prevent uninitialized access to "port" variable.
CID:	1018716 (and clang static checker)
2015-02-16 21:35:29 +00:00
Hans Petter Selasky
3122da88ca Define standard formatting strings to print GIDs
in a separate header file.

Sponsored by:	Mellanox Technologies
MFC after:	3 days
2015-02-16 21:26:16 +00:00
Hans Petter Selasky
7383a0591c The kasprintf() function cannot be inlined due to using a variable
number of arguments. Move it to a C-file in the linuxapi module to
make the function usable.

Sponsored by:	Mellanox Technologies
MFC after:	3 days
2015-02-16 21:22:56 +00:00
Sean Bruno
13087ee99f Add example for upcoming aarch64/arm64 targets. 2015-02-16 20:55:37 +00:00
Luiz Otavio O Souza
b4ae2f3c55 Add a mask to match only the relative base address of BSC controllers.
This should fix the attach of BSC on RPI2 (based on andrew@ dmesg).
2015-02-16 19:06:31 +00:00
John-Mark Gurney
69d4c287d3 remove NULL check as M_WAITOK will not return NULL
Reviewed by:	jhb
Sponsored by:	FreeBSD Foundation
2015-02-16 18:43:52 +00:00
Gleb Smirnoff
f0b0fe5b45 Commit a miss from r278843.
Pointy hat to:	glebius
2015-02-16 18:33:33 +00:00
Brad Davis
936bdf364d Fix build.
Approved by:	gibbs
2015-02-16 18:06:24 +00:00
Sergey Kandaurov
723ea6bc93 kdump: sendfile(2) "flags" argument needs casting on 64-bit platforms.
MFC after:	1 week
Sponsored by:	Nginx, Inc.
2015-02-16 17:19:28 +00:00
Hans Petter Selasky
271aa1089b The "frag_info" pointer is already pointing to an array index.
Don't index twice.

Sponsored by:	Mellanox Technologies
MFC after:	3 days
2015-02-16 17:05:59 +00:00
Roger Pau Monné
69138e8788 xen/intr: improve handling of legacy IRQs
Devices that use ISA IRQs expect them to be already configured, and don't
call bus_config_intr, which prevents those IRQs from working on Xen. In
order to solve it pre-register all the legacy IRQs with the default values
(edge triggered, low polarity) if no override is found.

While there add a panic if the registration of an interrupt override fails.

Sponsored by: Citrix Systems R&D
2015-02-16 16:37:59 +00:00
Roger Pau Monné
a2c5251281 xen/intr: improve PIRQ handling
Improve and cleanup the Xen PIRQ event channel code:

 - Remove the xi_shared field as it is unused.
 - Clean the "pending" bit in the EOI handler, this is more similar to how
   native interrupts are handled.
 - Don't mask edge triggered PIRQs, edge trigger interrupts cannot be
   masked.
 - Panic if PHYSDEVOP_eoi fails.
 - Remove the usage of the PHYSDEVOP_alloc_irq_vector hypercall because
   it's just a no-op in the Xen versions that are supported by FreeBSD Dom0.

Sponsored by: Citrix Systems R&D
2015-02-16 16:30:42 +00:00
Hans Petter Selasky
537116c230 Reduce number of memory buffers a bit. 2015-02-16 15:47:55 +00:00
Hans Petter Selasky
b41892e1f8 Avoid recursive locking. 2015-02-16 15:46:16 +00:00
Hans Petter Selasky
4464c5e5e6 Swap screen dimensions back to normal. 2015-02-16 15:39:51 +00:00
Hans Petter Selasky
2d759c8259 Handle VBUS error interrupts.
Submitted by:	SAITOU Toshihide <toshi@ruby.ocn.ne.jp>
PR:		190471
MFC after:	1 week
2015-02-16 15:34:10 +00:00
Andriy Gapon
7116636e6b vt: move suspend/resume event handlers registration outside of mutex scope
This is to avoid a witness warning about a waiting memory allocation in
the evnt hanlder registration code.

Reported by:	markj
MFC after:	3 days
X-MFC with:	r277795
2015-02-16 13:02:00 +00:00
Jilles Tjoelker
e63db0d3e5 symlink(7): Mention chflagsat() (can take AT_SYMLINK_NOFOLLOW).
MFC after:	1 week
2015-02-16 12:56:55 +00:00
Hans Petter Selasky
00ad411a77 Allow the display port to be powered off. 2015-02-16 11:54:45 +00:00
Hans Petter Selasky
b914a5291b Forward the FBIO_BLANK IOCTL to framebuffer clients. Bump the FreeBSD
version to force re-compilation of external video driver kernel
modules.

Discussed with:		ray @
2015-02-16 11:49:48 +00:00
Roger Pau Monné
f79cdf2998 xen: fix xenstore dev
Xenstore user-space device has two problems currently:
 - It does not correctly handle concurrent clients, because it's storing
   each client data in dev->si_drv1.
 - It does not correctly free this data when the client closes the device.

In order to solve both of this issues store the per-client data using
cdevpriv, which also comes with a hook in order to perform the necessary
cleanup on device close.

While there also make the device eternal.

Sponsored by: Citrix Systems R&D
Reported and Tested by: thompsa
MFC after: 2 weeks
2015-02-16 09:53:43 +00:00
Gleb Smirnoff
39a58828ef In the forwarding case refragment the reassembled packets with the same
size as they arrived in. This allows the sender to determine the optimal
fragment size by Path MTU Discovery.

Roughly based on the OpenBSD work by Alexander Bluhm.

Submitted by:		Kristof Provost
Differential Revision:	D1767
2015-02-16 07:01:02 +00:00
Gleb Smirnoff
6c269f6912 Factor out ip6_fragment() function, to be used in IPv6 stack and pf(4).
Submitted by:		Kristof Provost
Differential Revision:	D1766
2015-02-16 06:30:27 +00:00
Andrew Rybchenko
2cd617a883 sfxge: flush all Tx queues from if_qflush
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor), glebius
2015-02-16 06:16:38 +00:00
Kevin Lo
75a8079ded Xref the following in wlan(4):
- rsu(4)
- urtwn(4)
2015-02-16 06:12:55 +00:00
Andrew Rybchenko
0ff2378988 sfxge: style fixes
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-02-16 06:12:04 +00:00
Andrew Rybchenko
d67580d164 sfxge: SYSCTL_IN/OUT should not be called with non-sleepable lock held
The problem is found using WITNESS option enabled.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-02-16 06:10:17 +00:00
Andrew Rybchenko
0b28bbdca9 sfxge: remove inline specifiers
Now compiler does not need any help.
The patch does not change generated code.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor), glebius
2015-02-16 06:08:13 +00:00
Andrew Rybchenko
fd59fc3478 sfxge: remove used sfxge_tso_state member dma_seg_i
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-02-16 06:07:01 +00:00
Andrew Rybchenko
3f1e3499ed sfxge: remove full_packet_size from sfxge_tso_state
It makes sfxge_tso_state smaller and even makes tso_start_new_packet()
few bytes smaller. Data used to calculate packet size are used nearby,
so it should be no problems with cache etc.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor), glebius
2015-02-16 06:04:26 +00:00
Gleb Smirnoff
6004805208 Missed from r278831. 2015-02-16 06:02:46 +00:00
Andrew Rybchenko
c9795115dc sfxge: remove unused variable
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor), glebius
2015-02-16 06:00:43 +00:00
Gleb Smirnoff
e5ee706031 Move ip6_deletefraghdr() to frag6.c.
Suggested by:	bz
2015-02-16 05:58:32 +00:00
Gleb Smirnoff
f5ceb22b78 Update the pf fragment handling code to closer match recent OpenBSD.
That partially fixes IPv6 fragment handling. Thanks to Kristof for
working on that.

Submitted by:		Kristof Provost
Tested by:		peter
Differential Revision:	D1765
2015-02-16 03:38:27 +00:00
John-Mark Gurney
add9975cd1 install the man page...
Sponsored by:	FreeBSD Foundation
2015-02-16 02:20:11 +00:00
Adrian Chadd
0332e7d4d6 Remove this - I made it all work again a looong time ago. 2015-02-16 02:05:34 +00:00
Gleb Smirnoff
0b438b0fb8 Factor out ip6_deletefraghdr() function, to be shared between IPv6
stack and pf(4).

Submitted by:	Kristof Provost
Reviewed by:	ae
Differential Revision:	D1764
2015-02-16 01:12:20 +00:00
Sean Bruno
b8fc9a86a8 If no arguments are passed to a subcommand that requires arguments,
error out before we deref a null pointer in the check for max length.

Thanks to otis in IRC for the bug report.

MFC after:	3 days
2015-02-15 23:58:57 +00:00
Jilles Tjoelker
7034d8df04 sh: Various cleanups to expand.c:
* Remove some gotos.
* Remove unused parameter.
* Remove duplicate code.
2015-02-15 22:38:00 +00:00
Hans Petter Selasky
a63352afc0 Add new device ID. 2015-02-15 22:06:28 +00:00
Hans Petter Selasky
b161d69825 Bugfixes. Check if a framebuffer is present before using it. Dequeue
element from correct head structure. No need to multiply framebuffer
offset by two. It is already given in bytes.
2015-02-15 22:05:30 +00:00
Jilles Tjoelker
781bfb5a53 sh: Prefer "" to nullstr where possible. 2015-02-15 21:47:43 +00:00
Brad Davis
cec1a873d7 Really fix the pw_usernext tests.
PR:		197612
Approved by:	will
2015-02-15 21:42:10 +00:00
Jilles Tjoelker
a4652c280b sh: Add stsavestr(), like savestr() but allocates using stalloc(). 2015-02-15 21:41:29 +00:00
Jilles Tjoelker
51492908f9 touch: Fix some subtle bugs related to NULL times fallback:
* Do not subvert vfs.timestamp_precision by reading the time and passing
  that to utimensat(). Instead, pass UTIME_NOW. A fallback to a NULL times
  pointer is no longer used.

* Do not ignore -a/-m if the user has write access but does not own the
  file. Leave timestamps unchanged using UTIME_OMIT and do not fall back to
  a NULL times pointer (which would set both timestamps) if that fails.

Reviewed by:	bde
2015-02-15 21:28:00 +00:00
Adrian Chadd
b8871f0823 Add initial support to the AR9300 HAL to support FreeBSD's intmit API.
I don't like having it in this function; I may migrate it to ar9300_freebsd.c
at some point to keep the HAL code pollution down.

This allows ANI to be disabled via a sysctl.

Tested:

* AR9331, STA/TDMA modes
2015-02-15 21:15:09 +00:00
Pedro F. Giffuni
78a452c36e Replace strcpy() with strlcpy()
The risk of an overrun here is very low but check the
length, JIC.

CID:	1019039
2015-02-15 21:11:07 +00:00
Pedro F. Giffuni
1a4161a15d Reverse one of the initializations from r278804.
It does no harm but this is not needed after the
correction in r278805 and I prefer to keep this
code very similar to it's original state.
2015-02-15 21:03:49 +00:00
Ed Maste
b0aa0c6e1b timeout: handle zombie grandchildren
timeout previously collected only one child status with wait(2). If this
was one of the grandchildren timeout would return to sigsuspend and wait
until the timeout expired. Instead, loop for all children.

PR:		kern/197608
Reviewed by:	bapt, kib
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2015-02-15 20:10:53 +00:00