102328 Commits

Author SHA1 Message Date
ae
c84e575eec MFC r271918 (by hrs):
- Virtualize interface cloner for gre(4).  This fixes a panic when destroying
    a vnet jail which has a gre(4) interface.

  - Make net.link.gre.max_nesting vnet-local.
2015-06-05 08:10:08 +00:00
ae
200ce7d836 Rework r281868 to not skip RTM announces for tunneling interfaces.
This is direct commit to stable/10.

Tested by:	tuexen@
2015-06-05 07:23:32 +00:00
hselasky
8707ccbe03 MFC r283922:
Fix for control endpoint handling in the DWC OTG driver. The data
stage processing is only allowed after the setup complete event has
been received. Else a race may occur and the OUT data can be corrupted.
While at it ensure resetting a FIFO has the required wait loop.
2015-06-05 07:17:14 +00:00
mav
ca4dbe2f75 MFC r283936: Restore AHCI quirks printing as base16.
smh@ at r278034 made it base17, that is somewhat odd. :)
2015-06-05 00:35:17 +00:00
imp
f94880e394 MFC: Merge more of the dtb machinery
Merge 278459,278460,278461,278462 which define DTBDIR and other things
needed for install to work. Although the commit in head kinda fixed
install_as_user, it's unknown if that works in 10.x (it didn't the last
time I tried).
2015-06-04 22:11:39 +00:00
slm
ceb5f63b1a MFC: r283661
- Updated all files with 2015 Avago copyright, and updated LSI's copyright
  dates.

- Changed all of the PCI device strings from LSI to Avago Technologies (LSI).

- Added a sysctl variable to control how StartStopUnit behavior works. User can
  select to spin down disks based on if disk is SSD or HDD.

- Inquiry data is required to tell if a disk will support SSU at shutdown or
  not. Due to the addition of mprssas_async, which gets Advanced Info but not
  Inquiry data, the setting of supports_SSU was moved to the
  mprsas_scsiio_complete function, which snoops for any Inquiry commands. And,
  since disks are shutdown as a target and not a LUN, this process was
  simplified by basing it on targets and not LUNs.

- Added a sysctl variable that sets the amount of time to retry after sending a
  failed SATA ID command. This helps with some bad disks and large disks that
  require a lot of time to spin up. Part of this change was to add a callout to
  handle timeouts with the SATA ID command. The callout function is called
  mprsas_ata_id_timeout(). (Fixes PR 191348)

- Changed the way resets work by allowing I/O to continue to devices that are
  not currently under a reset condition. This uses devq's instead of simq's and
  makes use of the MPSSAS_TARGET_INRESET flag. This change also adds a function
  called mprsas_prepare_tm().

- Some changes were made to reduce code duplication when getting a SAS address
  for a SATA disk.

- Fixed some formatting and whitespace.

- Bump version of mpr driver to 9.255.01.00-fbsd

PR:		191348
2015-06-04 16:27:18 +00:00
rmacklem
7e70fa5ddf MFC: r283273
The NFS client wasn't handling getdirentries(2) requests for sizes
that are not an exact multiple of DIRBLKSIZ correctly. Fortunately
readdir(3) always uses an exact multiple of DIRBLKSIZ, so few applications
were affected. This patch fixes this problem by reducing the size
of the directory read to an exact multiple of DIRBLKSIZ.
2015-06-04 12:35:00 +00:00
dteske
f38383848a MFC r268254 (jmg):
Add a hint that you can enable this by default if you want;
necessary if you want the keyboard break to work early in boot.
2015-06-03 22:24:57 +00:00
emaste
d77c39991b MFC r259438 by pjd: Fix syscalls that can be loaded as kernel modules
They were not given the flag allowing to call them from capability
  mode sandbox.

And regenerate init_sysent.c

Sponsored by:	The FreeBSD Foundation
2015-06-03 18:33:47 +00:00
hselasky
cec9850b29 MFC r283103:
Fix for DWC OTG device side isochronous transfers. The even or odd
isochronous frame bit needs to be flipped.
2015-06-03 15:41:03 +00:00
hselasky
79cd6230a5 MFC r282650 and r282651:
Extend the maximum number of allowed PCM channels in a PCM stream to
127 and decrease the maximum number of sub-channels to 1. These
definitions are only used inside the kernel and can be changed later
if more than one sub-channel is desired. This has been done to allow
so-called USB audio rack modules to work with FreeBSD.

Add support for more than 8 audio channels per PCM stream for USB
audio class compliant devices under FreeBSD. Tested using 16 recording
and 16 playback audio channels simultaneously.

Bump the FreeBSD version to force recompiling all external modules.
2015-06-03 15:32:43 +00:00
emaste
02441119bc MFC r261220 by csjp: Allow sigwait(2) in capabilities mode.
It's common for multi-threaded processes to create a thread for
  the purpose of synchronously processing signals. Allow such processes to
  utilize a capabilities sandbox.
2015-06-03 13:12:08 +00:00
emaste
e6fee85e82 MFC r259436,259437 by pjd: Allow for pselect(2) in capability mode. 2015-06-03 13:10:25 +00:00
emaste
d97b35fcad Regen for r283940. 2015-06-03 11:39:29 +00:00
emaste
2c4dd777cb MFC r257736 (by pjd):
- Remove mac_get_fd/mac_set_fd - those are not syscalls. The
    __mac_get_fd() and __mac_set_fd() syscalls are listed earlier.
  - Correct typo in syscall name. It should be sched_rr_get_interval,
    not sched_rr_getinterval.
2015-06-03 11:36:47 +00:00
ae
78931b5bd8 MFC r283146:
In the reply to SADB_X_SPDGET message use the same sequence number that
  was in the request. Some IKE deamons expect it will the same. Linux and
  NetBSD also follow this behaviour.

  PR:		137309
2015-06-03 02:50:58 +00:00
imp
44bead40e5 MFC:
r283014: Disable unmapped I/O: it is broken for unaligned pages
r283126: Fix comments
2015-06-02 21:36:45 +00:00
imp
a5587d67f9 MFC:
Merge r276846: Add infrastructure to build dtb files from dts files.
2015-06-02 21:24:47 +00:00
jhb
017f11d1f3 MFC 281887:
Reassign copyright statements on several files from Advanced
Computing Technologies LLC to Hudson River Trading LLC.
2015-06-02 19:20:39 +00:00
jhb
a5ce7c460f MFC 281601:
Remove THRMISC_VERSION.  The thrmisc structure doesn't include a version
number, so this wasn't used (and can't easily be added).  If at some point
we want to extend thrmisc, we will probably need to just add a new note
type and ensure that the new type includes a version number.
2015-06-02 14:55:55 +00:00
jhb
cb2edec922 MFC 281266:
Move the 32-bit compatible procfs types from freebsd32.h to <sys/procfs.h>
and export them to userland.
- Define __HAVE_REG32 on platforms that define a reg32 structure and check
  for this in <sys/procfs.h> to control when to export prstatus32, etc.
- Add prstatus32_t and prpsinfo32_t typedefs for the 32-bit structures.
  libbfd looks for these types, and having them fixes 'gcore' in gdb of a
  32-bit process on a 64-bit platform.
- Use the structure definitions from <sys/procfs.h> in gcore's elf32 core
  dump code instead of duplicating the definitions.
2015-06-02 14:54:53 +00:00
ae
3c9fd21963 MFC r283101:
Teach key_expire() send SADB_EXPIRE message with the SADB_EXT_LIFETIME_HARD
  extension header type. The key_flush_sad() now will send SADB_EXPIRE
  message when HARD lifetime expires. This is required by RFC 2367 and some
  keying daemons rely on these messages. HARD lifetime messages have
  precedence over SOFT lifetime messages, so now they will be checked first.
  Also now SADB_EXPIRE messages will be send even the SA has not been used,
  because keying daemons might want to rekey such SA.

  PR:		200282, 200283

MFC r283102:
  Change SA's state before sending SADB_EXPIRE message. This state will
  be reported to keying daemon.
2015-06-02 03:51:33 +00:00
ae
bf9acc9587 MFC r275390:
Remove unused declartations.

MFC r275437:
  ANSIfy function declarations.

MFC r275438:
  Remove __P() macro.

Sponsored by:	Yandex LLC
2015-06-02 03:43:36 +00:00
ae
fcbaea9548 MFC r275392:
Remove route chaching support from ipsec code. It isn't used for some time.
  * remove sa_route_union declaration and route_cache member from struct secashead;
  * remove key_sa_routechange() call from ICMP and ICMPv6 code;
  * simplify ip_ipsec_mtu();
  * remove #include <net/route.h>;

Sponsored by:	Yandex LLC
2015-06-02 03:14:42 +00:00
ae
f780971d93 MFC r283104:
Read GEOM_UNCOMPRESS metadata using several requests that fit into
  MAXPHYS. For large compressed images the metadata size can be bigger
  than MAXPHYS and this triggers KASSERT in g_read_data().
  Also use g_free() to free memory allocated by g_read_data().

  PR:		199476
2015-06-02 02:05:32 +00:00
jkim
045ad2b6bb MFC: r283261
Do not probe Intel PIIX4 south bridge quirks on amd64.
2015-06-01 19:26:24 +00:00
jhb
34dd7e04e0 MFC 283123:
Fix two bugs that could result in PMC sampling effectively stopping.
In both cases, the the effect of the bug was that a very small positive
number was written to the counter. This means that a large number of
events needed to occur before the next sampling interrupt would trigger.
Even with very frequently occurring events like clock cycles wrapping all
the way around could take a long time. Both bugs occurred when updating
the saved reload count for an outgoing thread on a context switch.

First, the counter-independent code compares the current reload count
against the count set when the thread switched in and generates a delta
to apply to the saved count. If this delta causes the reload counter
to go negative, it would add a full reload interval to wrap it around to
a positive value. The fix is to add the full reload interval if the
resulting counter is zero.

Second, occasionally the raw counter value read during a context switch
has actually wrapped, but an interrupt has not yet triggered. In this
case the existing logic would return a very large reload count (e.g.
2^48 - 2 if the counter had overflowed by a count of 2). This was seen
both for fixed-function and programmable counters on an E5-2643.
Workaround this case by returning a reload count of zero.

PR:		198149
Sponsored by:	Norse Corp, Inc.
2015-06-01 18:08:56 +00:00
jhb
7a2aa2a780 MFC 282641,282658:
- Move hwpmc(4) debugging code under a new HWPMC_DEBUG option instead of
  the broader DEBUG option.
- Convert hwpmc(4) debug printfs over to KTR.

Sponsored by:	Norse Corp, Inc.
2015-06-01 17:57:05 +00:00
kib
082794a940 MFC r283515:
Remove excess Giant acquisition around the dounmount() call.
2015-06-01 06:56:49 +00:00
np
b62b670049 MFC r273480, r273750, r273753, r273797, and r274461.
r273480:
cxgbe/iw_cxgbe: wake up waiters after flushing the qp.

r273750:
Some cxgbe/iw_cxgbe fixes:
- Free rt in c4iw_connect only if it is allocated.
- Call soclose instead of so_shutdown if there is an abort from the peer.
- Close socket and return failure if TOE is not enabled.

r273753:
iwcm_event status needs to be populated for close_complete_upcall

r273797:
Always request a completion for every work request for iWARP.  The
initial MPA exchange must be tracked this way so that t4_tom's state for
the tid is all clean at the time the tid transitions to RDMA mode.  Once
it does, t4_tom is out of the way and iw_cxgbe uses the qp endpoints
directly.

r274461:
iw_cxgbe: don't forget to close the socket in c4iw_connect if soconnect
fails.
2015-05-31 23:47:08 +00:00
ae
e38e54f9c4 MFC r283313:
Properly update TX statistics for wlan(4).
  ieee80211_pwrsave() can fail due to queue overflow, check its return code
  and increment oerrors counter when it fails. Also handle more error cases
  and update oerrors counter when we don't send mbuf due to some errors.
  Return ENETDOWN when parent interface isn't ready. Update obytes and omcasts
  counters in corresponding places.

PR:		184626
Differential Revision:	https://reviews.freebsd.org/D2621
2015-05-31 23:29:04 +00:00
np
5b5fec6948 MFC r272719:
cxgbe/tom: don't leak resources tied to an active open request that
cannot be sent to the chip because a prerequisite L2 resolution
failed.
2015-05-31 23:11:25 +00:00
ae
8272d42d32 MFC r282965:
Add an ability accept encapsulated packets from different sources by one
  gif(4) interface. Add new option "ignore_source" for gif(4) interface.
  When it is enabled, gif's encapcheck function requires match only for
  packet's destination address.

  Differential Revision:	https://reviews.freebsd.org/D2004
  Sponsored by:	Yandex LLC
2015-05-31 22:58:41 +00:00
ae
e8c339bab5 MFC r283117:
Remove unneded mbuf length adjustment, M_PREPEND() already did that.

PR:		139387
2015-05-31 22:49:32 +00:00
tuexen
baef3fdea0 MFC r283691:
Remove printf() noise...
2015-05-31 13:07:22 +00:00
tuexen
5cacc4c33e MFC r283666:
Report the MTU consistently as specified in
https://tools.ietf.org/html/rfc6458
Thanks to Irene Ruengeler for helping me to fix this bug.
2015-05-31 13:04:38 +00:00
tuexen
bbe91198b3 MFC r283665:
Take source and destination address into account when determining
the scope.
This fixes a problem when a client with a global address
connects to a server with a private address.
Thanks to Irene Ruengeler in helping me to find the issue.
2015-05-31 13:01:58 +00:00
tuexen
3a8e5cd397 MFC r283664:
Retire SCTP_DONT_DO_PRIVADDR_SCOPE which was never defined.
2015-05-31 12:59:22 +00:00
tuexen
f2a969c70c MFC r283662:
Fix a bug where messages would not be sent in SHUTDOWN_RECEIVED state.
This problem was reported by Mark Bonnekessel and Markus Boese.
Thanks to Irene Ruengeler for helping me to fix the cause of
the problem. It can be tested with the following packetdrill script:

+0.0 socket(..., SOCK_STREAM, IPPROTO_SCTP) = 3
+0.0 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
+0.0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
// Check the handshake with an empty(!) cookie
+0.1 connect(3, ..., ...) = -1 EINPROGRESS (Operation now in progress)
+0.0 > sctp: INIT[flgs=0, tag=1, a_rwnd=..., os=..., is=..., tsn=0, ...]
+0.1 < sctp: INIT_ACK[flgs=0, tag=2, a_rwnd=10000, os=1, is=1, tsn=0, STATE_COOKIE[len=4, val=...]]
+0.0 > sctp: COOKIE_ECHO[flgs=0, len=4, val=...]
+0.1 < sctp: COOKIE_ACK[flgs=0]
+0.0 getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
+0.0 write(3, ..., 1024) = 1024
+0.0 > sctp: DATA[flgs=BE, len=1040, tsn=0, sid=0, ssn=0, ppid=0]
+0.0 write(3, ..., 1024) = 1024 // Pending due to Nagle
+0.0 < sctp: SHUTDOWN[flgs=0, cum_tsn=0]
+0.0 > sctp: DATA[flgs=BE, len=1040, tsn=1, sid=0, ssn=1, ppid=0]
+0.0 < sctp: SACK[flgs=0, cum_tsn=1, a_rwnd=10000, gaps=[], dups=[]] // Do we need another SHUTDOWN here?
+0.0 > sctp: SHUTDOWN_ACK[flgs=0]
+0.0 < sctp: SHUTDOWN_COMPLETE[flgs=0]
+0.0 close(3) = 0
2015-05-31 12:56:22 +00:00
tuexen
c07a13950d MFC r283658:
Use macros for overhead in a consistent way. No functional change.
Thanks to Irene Ruengeler for suggesting the change.
2015-05-31 12:53:16 +00:00
tuexen
4cc7a6bb7a MFC r283654:
Some more debug info cleanup.
2015-05-31 12:50:10 +00:00
tuexen
beb47cc587 MFC r283650:
Fix and cleanup the debug information. This has no user-visible changes.
Thanks to Irene Ruengeler for proving a patch.
2015-05-31 12:46:40 +00:00
tuexen
b583c15e81 MFC r283648:
Address some compiler warnings. No functional change.
2015-05-31 12:42:34 +00:00
kib
80880ee480 MFC r283320:
Always obey thread request to not stop on non-boundary.
2015-05-30 08:54:42 +00:00
erj
d390788aa7 MFC r281236 -- extended media types in if_media.h.
Approved by:	jfv (mentor)
2015-05-29 23:02:12 +00:00
davidcs
94b7042c30 MFC r283274
Submitted by:	gary.zambrano@qlogic.com
Approved by:davidcs@freebsd.org
2015-05-29 21:30:11 +00:00
davidcs
39353769d3 MFC r283269
Submitted by:gary.zambrano@qlogic.com
Approved by:davidcs@freebsd.org
2015-05-29 20:00:02 +00:00
tuexen
09fd91eb46 MFC r282810:
Ensure that the COOKIE-ACK can be sent over UDP if the COOKIE-ECHO was
received over UDP.
Thanks to Felix Weinrank for makeing me aware of the problem and to
Irene Ruengeler for providing the fix.
2015-05-29 13:37:04 +00:00
tuexen
a2dbf980ab MFC r282042:
Don't panic under INVARIANTS when receiving a SACK which cumacks
a TSN never sent.
While there, fix two typos.
2015-05-29 13:34:31 +00:00
tuexen
65d8b9f172 MFC r280714:
Improve the selection of the destination address of SACK chunks.
This fixes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196755
and is joint work with rrs@.
2015-05-29 13:26:05 +00:00