]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoRemove extra tabs.
glebius [Thu, 17 Sep 2015 20:21:55 +0000 (20:21 +0000)]
Remove extra tabs.

8 years agoVarious small cleanups to EFI loader Makefiles.
jhb [Thu, 17 Sep 2015 18:32:51 +0000 (18:32 +0000)]
Various small cleanups to EFI loader Makefiles.

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D3641

8 years agoUse strlcpy() instead of strncpy() because subsequent mkstemps expects
delphij [Thu, 17 Sep 2015 18:11:26 +0000 (18:11 +0000)]
Use strlcpy() instead of strncpy() because subsequent mkstemps expects
the string be nul-terminated.

Reviewed by: neel
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D3685

8 years agoDocument src-env.conf and note its use for MAKEOBJDIRPREFIX and WITH_META_MDOE.
bdrewery [Thu, 17 Sep 2015 17:45:20 +0000 (17:45 +0000)]
Document src-env.conf and note its use for MAKEOBJDIRPREFIX and WITH_META_MDOE.

Sponsored by: EMC / Isilon Storage Division

8 years agoInclude bsd.mkopt.mk after local.sys.env.mk (which includes /etc/src-env.conf).
bdrewery [Thu, 17 Sep 2015 17:35:06 +0000 (17:35 +0000)]
Include bsd.mkopt.mk after local.sys.env.mk (which includes /etc/src-env.conf).

This will allow setting WITH_META_MODE in that file rather that requiring
it to be set in the environment.

Sponsored by: EMC / Isilon Storage Division

8 years agoUse proper byteswap macro. This isn't a functional change.
glebius [Thu, 17 Sep 2015 17:27:49 +0000 (17:27 +0000)]
Use proper byteswap macro. This isn't a functional change.

8 years agoWhen reporting TPT UA, report which of thresholds was reached.
mav [Thu, 17 Sep 2015 17:00:36 +0000 (17:00 +0000)]
When reporting TPT UA, report which of thresholds was reached.

8 years agoFix /sbin/route to never look up (invalid) interface names through DNS
rstone [Thu, 17 Sep 2015 16:56:49 +0000 (16:56 +0000)]
Fix /sbin/route to never look up (invalid) interface names through DNS

/sbin/route has a bug where if it is passed an interface name that does
not exist, it falls through and winds up interpreting it as a hostname.
It fails out eventually, but on a system where DNS lookup is broken you
can end up waiting for up to 60 seconds waiting for the DNS lookup to
timeout.  I'm not quite sure what happens if the DNS lookup somehow
succeeds but I doubt that can end well.

Reviewed by: markj, cem
MFC after: 2 weeks
Sponsored by: EMC/Isilon Storage Division

8 years agoFix makeman creating obj directories due to turning on WITH_AUTO_OBJ.
bdrewery [Thu, 17 Sep 2015 16:38:32 +0000 (16:38 +0000)]
Fix makeman creating obj directories due to turning on WITH_AUTO_OBJ.

r284708 addressed this slightly but seems to have put the make(showconfig)
guard in the wrong place.  Rather than guard setting the default obj directory,
guard inclusion of auto.obj.mk.  This avoids creating SRCTOP/obj and
SRCTOP/release/obj when running makeman.

Sponsored by: EMC / Isilon Storage Division

8 years agoWhen chrooted, we need to strip the chroot directory from the front of
des [Thu, 17 Sep 2015 16:19:36 +0000 (16:19 +0000)]
When chrooted, we need to strip the chroot directory from the front of
included paths.  Don't forget to do it for globs as well.

8 years agoUpgrade to Unbound 1.5.4.
des [Thu, 17 Sep 2015 16:10:11 +0000 (16:10 +0000)]
Upgrade to Unbound 1.5.4.

8 years agoimport unbound 1.5.4
des [Thu, 17 Sep 2015 15:21:27 +0000 (15:21 +0000)]
import unbound 1.5.4

8 years agoAdd Intel Skylake/I219 Support
sbruno [Thu, 17 Sep 2015 15:11:45 +0000 (15:11 +0000)]
Add Intel Skylake/I219 Support
- New em(4) device in currently shipping products

Differential Revision: https://reviews.freebsd.org/D3163
Submitted by: erj@freebsd.org
Reviewed by: jfv@freebsd.org
MFC after: 2 weeks
Sponsored by: Intel Corporation

8 years agoReport number of failed XCOPY segment.
mav [Thu, 17 Sep 2015 14:22:52 +0000 (14:22 +0000)]
Report number of failed XCOPY segment.

8 years agoReport proper medium error code for VERIFY commands.
mav [Thu, 17 Sep 2015 12:52:18 +0000 (12:52 +0000)]
Report proper medium error code for VERIFY commands.

8 years agoRemove more unused variables leading to compile time errors.
bz [Thu, 17 Sep 2015 12:04:41 +0000 (12:04 +0000)]
Remove more unused variables leading to compile time errors.

8 years ago.. oops, flip on QoS.
adrian [Thu, 17 Sep 2015 07:04:15 +0000 (07:04 +0000)]
.. oops, flip on QoS.

8 years agoRemove an entry. It was re-added in r287780.
jkim [Thu, 17 Sep 2015 07:01:40 +0000 (07:01 +0000)]
Remove an entry.  It was re-added in r287780.

8 years agoRemove unused variable leading to compile errors.
bz [Thu, 17 Sep 2015 06:07:49 +0000 (06:07 +0000)]
Remove unused variable leading to compile errors.

8 years agoRegenerate
bdrewery [Thu, 17 Sep 2015 05:07:39 +0000 (05:07 +0000)]
Regenerate

8 years agoUpdate META_MODE dependencies.
bdrewery [Thu, 17 Sep 2015 05:06:34 +0000 (05:06 +0000)]
Update META_MODE dependencies.

8 years agoDocument NO_SILENT for META_MODE.
bdrewery [Thu, 17 Sep 2015 05:01:04 +0000 (05:01 +0000)]
Document NO_SILENT for META_MODE.

Reword and add some formatting as well.

8 years agoRework r287900 to keep arm64/aarch64 stable in the TARGETS list.
bdrewery [Thu, 17 Sep 2015 04:54:49 +0000 (04:54 +0000)]
Rework r287900 to keep arm64/aarch64 stable in the TARGETS list.

This is relevant for makeman using the 'make targets' output in src.conf(5).

This makes a _UNIVERSE_TARGETS that removes arm64 if the build
requirements are not met.

8 years agoLet makeman run 'make showconfig' without hitting the aarch64 error.
bdrewery [Thu, 17 Sep 2015 04:48:15 +0000 (04:48 +0000)]
Let makeman run 'make showconfig' without hitting the aarch64 error.

8 years agoBring over the QoS logic from the Linux r92su driver.
adrian [Thu, 17 Sep 2015 04:45:29 +0000 (04:45 +0000)]
Bring over the QoS logic from the Linux r92su driver.

* the tx descriptor TID is priority, not TID.
* the tx descriptor queue id mapping is separate from the
  TID/priority; rather than just "BE".

TODO:

* go and re-re-re-verify the queue mappings; the linux and openbsd
  mappings aren't exactly the same.  I need to verify all of this
  before I try to flip on 11n RX.

8 years agoGet arm64/aarch64 into 'make targets' output to fix makeman.
bdrewery [Thu, 17 Sep 2015 04:43:07 +0000 (04:43 +0000)]
Get arm64/aarch64 into 'make targets' output to fix makeman.

8 years agoMETA_MODE: Default OBJROOT to the traditional /usr/src/SRCTOP/.
bdrewery [Thu, 17 Sep 2015 04:22:00 +0000 (04:22 +0000)]
META_MODE: Default OBJROOT to the traditional /usr/src/SRCTOP/.

This avoids easily colliding multiple src trees with the same objects.  Having
multiple checkouts in dir/ dir2/ dir3/ would all use obj/ without any unique
identifier inside of obj/.  This pattern is more likely to be used due
to the non-META_MODE behavior working with it fine.

In environments where ../obj/ is wanted as the obj directory the value of
OBJROOT can be set to ${SRCTOP:H}/obj/ instead via src-env.conf (set by
SRC_ENV_CONF) or environment.  For environment it must be single quoted or
escaped.  This will be more likely for vendors who are building images or using
NFS for builds.  In those cases MAKEOBJDIRPREFIX may already be utilized and
is supported.

Discussed with: imp
Sponsored by: EMC / Isilon Storage Division

8 years agoMETA_MODE: Allow MAKEOBJDIRPREFIX to work more closely to its traditional behavior.
bdrewery [Thu, 17 Sep 2015 04:01:05 +0000 (04:01 +0000)]
META_MODE: Allow MAKEOBJDIRPREFIX to work more closely to its traditional behavior.

The preferred way to modify the object directory root is to use OBJROOT.
However, setting OBJROOT to ${MAKEOBJDIRPREFIX}/${SRCTOP}/ effectively behaves
as expected.

The problem with this before was that setting OBJROOT to contain SRCTOP
resulted in a recursive replacement (/usr/obj/usr/obj/usr/src/). Anchoring to
the start of the path for replacing SRCCTOP in CURDIR resolves this by
avoiding replacing SRCTOP when CURDIR is within the OBJDIR.

Sponsored by: EMC / Isilon Storage Division

8 years agoProgram the firmware setup stuff with the current hardware setup:
adrian [Thu, 17 Sep 2015 03:42:18 +0000 (03:42 +0000)]
Program the firmware setup stuff with the current hardware setup:

* Do 1T1R for now, until we read the config out of ROM and use it.
* Disable turbo mode, I dunno what this is, but the linux drivers
  have this disabled.
* Set the firmware endpoints to what we read from USB.

Tested:

* RTL8712 cut 3, STA mode

8 years agoUse the H2C endpoint for sending firmware commands, rather than the voice
adrian [Thu, 17 Sep 2015 03:19:09 +0000 (03:19 +0000)]
Use the H2C endpoint for sending firmware commands, rather than the voice
data queues.

This is similar to the openbsd and rtlwifi/r92su drivers.

Note: this driver still assumes it's a 4-endpoint device; I'll enforce
that in a follow-up commit.

8 years agoAdd 11n and QoS methods.
adrian [Thu, 17 Sep 2015 03:13:01 +0000 (03:13 +0000)]
Add 11n and QoS methods.

The firmware takes care of ampdu tx/rx (except for RX reordering, grr),
QoS/WME and other bits/pieces.  So they're stubs, just in case.

8 years agoPrepare for 11n - get the number of endpoints and whether 11n is available.
adrian [Thu, 17 Sep 2015 03:08:02 +0000 (03:08 +0000)]
Prepare for 11n - get the number of endpoints and whether 11n is available.

8 years agoBump RX_LIST_COUNT so we don't fall behind during active traffic.
adrian [Thu, 17 Sep 2015 03:01:55 +0000 (03:01 +0000)]
Bump RX_LIST_COUNT so we don't fall behind during active traffic.

8 years agoUse DELAY() rather than usb_pause_mtx() - the latter releases the lock
adrian [Thu, 17 Sep 2015 03:01:19 +0000 (03:01 +0000)]
Use DELAY() rather than usb_pause_mtx() - the latter releases the lock
before waiting, which prevents the lock from really acting like
a hardware serialiser.  Sigh.

8 years agoMETA_MODE: Don't define the default MAKEOBJDIR twice. Just expand the default.
bdrewery [Thu, 17 Sep 2015 00:17:32 +0000 (00:17 +0000)]
META_MODE: Don't define the default MAKEOBJDIR twice. Just expand the default.

Sponsored by: EMC / Isilon Storage Division

8 years agoFix kqueue write events for files > 2GB
smh [Thu, 17 Sep 2015 00:03:55 +0000 (00:03 +0000)]
Fix kqueue write events for files > 2GB

Due to the use of int's for file offsets in the VOP_WRITE_(PRE|POST)
macros, kqueue write events for files greater 2GB where never fired.

This caused tail -f on a file greater 2GB to never see updates.

MFC after: 1 week
Relnotes: YES
Sponsored by: Multiplay

8 years agoUpdate META_MODE architectures for universe
bdrewery [Wed, 16 Sep 2015 23:59:53 +0000 (23:59 +0000)]
Update META_MODE architectures for universe

8 years agoBlock secondary ITS instances from attaching on ARM64
zbb [Wed, 16 Sep 2015 23:59:45 +0000 (23:59 +0000)]
Block secondary ITS instances from attaching on ARM64

Currently FreeBSD supports only single PIC controller. Some systems
that have more than one (like ThunderX dual-socket) fails to boot.
Disable other PICes until proper handling is implemented in the
generic interrupt code.

Reviewed by:   imp
Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3682

8 years agoRelease memory for CPUs that fail to init on ARM64
zbb [Wed, 16 Sep 2015 23:46:20 +0000 (23:46 +0000)]
Release memory for CPUs that fail to init on ARM64

cpu_init_fdt will now release memory allocated for structures
serving CPUs that have failed to init.

Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3297

8 years agoAdd domain support to PCI bus allocation
zbb [Wed, 16 Sep 2015 23:34:51 +0000 (23:34 +0000)]
Add domain support to PCI bus allocation

When the system has more than a single PCI domain, the bus numbers
are not unique, thus they cannot be used for "pci" device numbering.
Change bus numbers to -1 (i.e. to-be-determined automatically)
wherever the code did not care about domains.

Reviewed by:   jhb
Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3406

8 years agoIf forwarders were specified on the command line, create an empty
des [Wed, 16 Sep 2015 23:09:31 +0000 (23:09 +0000)]
If forwarders were specified on the command line, create an empty
resolvconf.conf so that resolvconf won't replace the manually configured
forwarders with dynamically configured ones the next time the lease is
renewed.

8 years agoMETA_MODE: Don't create obj directories automatically when running make -V.
bdrewery [Wed, 16 Sep 2015 23:01:16 +0000 (23:01 +0000)]
META_MODE: Don't create obj directories automatically when running make -V.

Sponsored by: EMC / Isilon Storage Division

8 years agoFix reading after end of file for file-backed LUNs.
mav [Wed, 16 Sep 2015 21:43:51 +0000 (21:43 +0000)]
Fix reading after end of file for file-backed LUNs.

If backing file is smaller then the LUN size, we have to explicitly clear
the rest of the buffer to not leak some random data from previous I/Os.

8 years agoIn tcp_ctlinput() separate the (ip == NULL) block from the rest of the
glebius [Wed, 16 Sep 2015 21:42:33 +0000 (21:42 +0000)]
In tcp_ctlinput() separate the (ip == NULL) block from the rest of the
function to reduce so many levels of indentation.  Style the lines that
got now indentation reduced.  No functional change.

Checked with: md5

8 years agoMETA_MODE: Fix OBJROOT ending in two // when it does not yet exist.
bdrewery [Wed, 16 Sep 2015 20:58:43 +0000 (20:58 +0000)]
META_MODE: Fix OBJROOT ending in two // when it does not yet exist.

This would lead to the 2nd build (after the first with a missing OBJROOT) to
always rebuild everything as the 'command' would have changed due to the path
changing from having // to only /.

Sponsored by: EMC / Isilon Storage Division

8 years agoAlways clear TDB_USERWR before fetching system call arguments. The
jhb [Wed, 16 Sep 2015 20:55:00 +0000 (20:55 +0000)]
Always clear TDB_USERWR before fetching system call arguments.  The
TDB_USERWR flag may still be set after a debugger detaches from a
process via PT_DETACH.  Previously the flag would never be cleared
forcing a double fetch of the system call arguments for each system
call.  Note that the flag cannot be cleared at PT_DETACH time in case
one of the threads in the process is currently stopped in
syscallenter() and the debugger has modified the arguments for that
pending system call before detaching.

Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D3678

8 years agoFix check from r287867 for valid MAKEOBJDIR from top-level builds.
bdrewery [Wed, 16 Sep 2015 19:58:04 +0000 (19:58 +0000)]
Fix check from r287867 for valid MAKEOBJDIR from top-level builds.

MAKEOBJDIR is based on OBJTOP so cannot be expanded until OBJTOP is set.

Reported by: Nikolai Lifanov <lifanov@mail.lifanov.com>
Sponsored by: EMC / Isilon Storage Division

8 years agoMake COMPARE AND WRITE report offset of difference.
mav [Wed, 16 Sep 2015 18:33:04 +0000 (18:33 +0000)]
Make COMPARE AND WRITE report offset of difference.

8 years agoError and give better feedback for invalid MAKEOBJDIR settings.
bdrewery [Wed, 16 Sep 2015 18:02:04 +0000 (18:02 +0000)]
Error and give better feedback for invalid MAKEOBJDIR settings.

Submitted by: sjg

8 years agoFix fixed sense writing when passed more data then it can fit.
mav [Wed, 16 Sep 2015 17:56:24 +0000 (17:56 +0000)]
Fix fixed sense writing when passed more data then it can fit.

MFC after: 1 week

8 years agoIgnore CCACHE_DIR for meta mode decisions.
bdrewery [Wed, 16 Sep 2015 17:44:45 +0000 (17:44 +0000)]
Ignore CCACHE_DIR for meta mode decisions.

Sponsored by: EMC / Isilon Storage Division

8 years agoWhen a process group leader exits, all of the processes in the group are
jhb [Wed, 16 Sep 2015 16:40:07 +0000 (16:40 +0000)]
When a process group leader exits, all of the processes in the group are
sent SIGHUP and SIGCONT if any of the processes are stopped.  Currently this
behavior is triggered for any type of process stop including ptrace() stops
and transient stops for single threading during exit() and execve().
Thus, if a debugger is attached to a process in a group when the leader
exits, the entire group can be HUPed.  Instead, only send the signals if a
process in the group is stopped due to SIGSTOP.

PR: 201149
Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D3681

8 years agoFix build broken by r287861.
melifaro [Wed, 16 Sep 2015 15:40:08 +0000 (15:40 +0000)]
Fix build broken by r287861.

Spotted by: zb

8 years agoSimplify the way of attaching IPv6 link-layer header.
melifaro [Wed, 16 Sep 2015 14:26:28 +0000 (14:26 +0000)]
Simplify the way of attaching IPv6 link-layer header.

Problem description:
How do we currently perform layer 2 resolution and header imposition:

For IPv4 we have the following chain:
  ip_output() -> (ether|atm|whatever)_output() -> arpresolve()

Lookup is done in proper place (link-layer output routine) and it is possible
  to provide cached lle data.

For IPv6 situation is more complex:
  ip6_output() -> nd6_output() -> nd6_output_ifp() -> (whatever)_output() ->
    nd6_storelladdr()

We have ip6_ouput() which calls nd6_output() instead of link output routine.
nd6_output() does the following:
  * checks if lle exists, creates it if needed (similar to arpresolve())
  * performes lle state transitions (similar to arpresolve())
  * calls nd6_output_ifp() which pushes packets to link output routine along
    with running SeND/MAC hooks regardless of lle state
    (e.g. works as run-hooks placeholder).

After that, iface output routine like ether_output() calls nd6_storelladdr()
  which performs lle lookup once again.

As a result, we perform lookup twice for each outgoing packet for most types
  of interfaces. We also need to maintain runtime-checked table of 'nd6-free'
  interfaces (see nd6_need_cache()).

Fix this behavior by eliminating first ND lookup. To be more specific:
  * make all nd6_output() consumers use nd6_output_ifp() instead
  * rename nd6_output[_slow]() to nd6_resolve_[slow]()
  * convert nd6_resolve() and nd6_resolve_slow() to arpresolve() semantics,
    e.g. copy L2 address to buffer instead of pushing packet towards lower
    layers
  * Make all nd6_storelladdr() users use nd6_resolve()
  * eliminate nd6_storelladdr()

The resulting callchain is the following:
  ip6_output() -> nd6_output_ifp() -> (whatever)_output() -> nd6_resolve()

Error handling:
Currently sending packet to non-existing la results in ip6_<output|forward>
  -> nd6_output() -> nd6_output _lle() which returns 0.
In new scenario packet is propagated to <ether|whatever>_output() ->
  nd6_resolve() which will return EWOULDBLOCK, and that result
  will be converted to 0.

(And EWOULDBLOCK is actually used by IB/TOE code).

Sponsored by: Yandex LLC
Differential Revision: https://reviews.freebsd.org/D1469

8 years agoFrontends don't need to set errors themselves.
mav [Wed, 16 Sep 2015 13:25:35 +0000 (13:25 +0000)]
Frontends don't need to set errors themselves.

8 years agoUse KASSERT for some checks, that are late to do.
ae [Wed, 16 Sep 2015 13:17:00 +0000 (13:17 +0000)]
Use KASSERT for some checks, that are late to do.

Discussed with: melifaro, glebius

8 years agoConstantify lookup key in several nd6_* functions.
melifaro [Wed, 16 Sep 2015 11:06:07 +0000 (11:06 +0000)]
Constantify lookup key in several nd6_* functions.

8 years agoRemove superfluous m_freem().
oleg [Wed, 16 Sep 2015 10:07:45 +0000 (10:07 +0000)]
Remove superfluous m_freem().

MFC after: 1 month

8 years agoDon't flap the HA link if sysctl is reset to the same value.
mav [Wed, 16 Sep 2015 09:59:05 +0000 (09:59 +0000)]
Don't flap the HA link if sysctl is reset to the same value.

8 years agoUse M_WAITOK rather than M_NOWAIT since it's not used within
kevlo [Wed, 16 Sep 2015 07:26:18 +0000 (07:26 +0000)]
Use M_WAITOK rather than M_NOWAIT since it's not used within
interrupt context.

8 years agoFix a debug message which didn't quite get it right about eeprom version.
kevlo [Wed, 16 Sep 2015 07:18:54 +0000 (07:18 +0000)]
Fix a debug message which didn't quite get it right about eeprom version.

8 years agoRemove checks for a NULL return value from M_WAITOK allocations.
kevlo [Wed, 16 Sep 2015 07:16:21 +0000 (07:16 +0000)]
Remove checks for a NULL return value from M_WAITOK allocations.

8 years agoUnify loopback route switching:
melifaro [Wed, 16 Sep 2015 06:23:15 +0000 (06:23 +0000)]
Unify loopback route switching:
* prepare gateway before insertion
* use RTM_CHANGE instead of explicit find/change route
* Remove fib argument from ifa_switch_loopback_route added in r264887:
  if old ifp fib differes from new one, that the caller
  is doing something wrong
* Make ifa_*_loopback_route call single ifa_maintain_loopback_route().

8 years agoSimilar to r287844, create 'symlinks' cookie in proper place with -j and META_MODE.
bdrewery [Wed, 16 Sep 2015 04:27:12 +0000 (04:27 +0000)]
Similar to r287844, create 'symlinks' cookie in proper place with -j and META_MODE.

Sponsored by: EMC / Isilon Storage Division

8 years agoCreate 'copies' cookie in proper place in META_MODE.
bdrewery [Wed, 16 Sep 2015 04:07:39 +0000 (04:07 +0000)]
Create 'copies' cookie in proper place in META_MODE.

With -j the cookie would be created in CURDIR/sys/teken rather than OBJDIR.

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd a number of models to the bsdinstall GPT hack blacklist
allanjude [Wed, 16 Sep 2015 03:32:27 +0000 (03:32 +0000)]
Add a number of models to the bsdinstall GPT hack blacklist

PR: 194359
Approved by: bapt (mentor)
MFC after: 2 weeks
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D3525

8 years agoMake ifconfig always exit with an error code if an important ioctl fails
allanjude [Wed, 16 Sep 2015 03:03:19 +0000 (03:03 +0000)]
Make ifconfig always exit with an error code if an important ioctl fails

PR: 203062
Arm Twisting by: Kristof Provost
Reviewed by: kp
Approved by: bapt (mentor)
MFC after: 2 weeks
Relnotes: yes
Sponsored by: ScaleEngine Inc.
Sponsored by: vBSDCon
Differential Revision: https://reviews.freebsd.org/D3644

8 years agoAdd ASUS Sandybridge laptops to the similar x2apic disable logic
adrian [Wed, 16 Sep 2015 01:44:11 +0000 (01:44 +0000)]
Add ASUS Sandybridge laptops to the similar x2apic disable logic
that was recently added for Lenovo laptops.

This is a prime candidate for conversion into a table and also
checking other fields like "product".

Tested:

* ASUS UX31E

8 years agoEnsure that the MAD agent's delayed taskqueue is completely stopped
markj [Tue, 15 Sep 2015 23:56:31 +0000 (23:56 +0000)]
Ensure that the MAD agent's delayed taskqueue is completely stopped
before proceeding. Otherwise, nothing prevents it from running after the
MAD agent struct has been been freed, and this results in a use-after-free
when the task's ta_pending count is incremented in the callout handler.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoarm64: add kbd.c to the build for ukbd to fix the build
emaste [Tue, 15 Sep 2015 23:44:19 +0000 (23:44 +0000)]
arm64: add kbd.c to the build for ukbd to fix the build

Pointy hat to: emaste

8 years agosysctl: switch sysctllock to a sleepable rmlock, take 2
mjg [Tue, 15 Sep 2015 23:06:56 +0000 (23:06 +0000)]
sysctl: switch sysctllock to a sleepable rmlock, take 2

This restores r285125. Previous attempt was reverted due to a bug in rmlocks,
which is fixed since r287833.

8 years agoThreads holding a read lock of a sleepable rm lock are not permitted
jhb [Tue, 15 Sep 2015 22:16:21 +0000 (22:16 +0000)]
Threads holding a read lock of a sleepable rm lock are not permitted
to sleep.  The rmlock implementation enforces this by disabling
sleeping when a read lock is acquired. To simplify the implementation,
sleeping is disabled for most of the duration of rm_rlock.  However,
it doesn't need to be disabled until the lock is acquired.  If a
sleepable rm lock is contested, then rm_rlock may need to acquire the
backing sx lock.  This tripped the overly-broad assertion.  Fix by
relaxing the assertion around the call to sx_xlock().

Reported by: mjg
Reviewed by: kib, mjg
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D3324

8 years agoRemove redundant 'man page'
brd [Tue, 15 Sep 2015 21:16:45 +0000 (21:16 +0000)]
Remove redundant 'man page'

Reviewed by: allanjude

8 years agokevent(2): Note DOOMED vnodes with NOTE_REVOKE
cem [Tue, 15 Sep 2015 20:22:30 +0000 (20:22 +0000)]
kevent(2): Note DOOMED vnodes with NOTE_REVOKE

In poll mode, check for and wake VBAD vnodes.  (Vnodes that are VBAD at
registration will never be woken by the RECLAIM trigger.)

Add post-VOP_RECLAIM hook to trigger notes on vnode reclamation.  (Vnodes that
were fine at registration but are vgoned while being monitored should signal
waiters.)

Reviewed by: kib
Approved by: markj (mentor)
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D3675

8 years agoRemove unnecessary tcp state transition call.
hiren [Tue, 15 Sep 2015 20:04:30 +0000 (20:04 +0000)]
Remove unnecessary tcp state transition call.

Differential Revision: D3451
Reviewed by: markj
MFC after: 2 weeks
Sponsored by: Limelight Networks

8 years agoarm64: add xhci driver and umass/ukbd to GENERIC for Cavium ThunderX
emaste [Tue, 15 Sep 2015 19:59:35 +0000 (19:59 +0000)]
arm64: add xhci driver and umass/ukbd to GENERIC for Cavium ThunderX

Sponsored by: The FreeBSD Foundation

8 years agoAdd support for Sierra MC7355 card
garga [Tue, 15 Sep 2015 18:21:56 +0000 (18:21 +0000)]
Add support for Sierra MC7355 card

Submitted by: Jeremy Porter <jporter@netgate.com>
Approved by: loos
Obtained from: pfSense
MFC after: 1 week
Sponsored by: Rubicon Communications (Netgate)

8 years agoAdd a way to specify stripesize and stripeoffset to gnop(8). This makes
trasz [Tue, 15 Sep 2015 18:01:59 +0000 (18:01 +0000)]
Add a way to specify stripesize and stripeoffset to gnop(8). This makes
it possible to "simulate" 4K media, to eg test alignment handling.

Reviewed by: mav@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3664

8 years agoSimplify nd6_cache_lladdr:
melifaro [Tue, 15 Sep 2015 17:16:31 +0000 (17:16 +0000)]
Simplify nd6_cache_lladdr:
* Move isRouter calculation code to separate nd6_is_router() function.
* Make nd6_cache_lladdr() return void: its return value hasn't been used
  since r53541 KAME import in 1999.

Sponsored by: Yandex LLC

8 years agoAdd Cavium ThunderX xHCI controller PCI ID
emaste [Tue, 15 Sep 2015 16:08:25 +0000 (16:08 +0000)]
Add Cavium ThunderX xHCI controller PCI ID

There is an issue with interrupts at the moment, but it works with
polling mode set (hw.usb.xhci.use_polling=1).

Reviewed by: hselasky
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3665

8 years agoFix grammer in an error message
brd [Tue, 15 Sep 2015 14:24:19 +0000 (14:24 +0000)]
Fix grammer in an error message

PR: 202310
Submitted by: Chris Petrik <chris@bsdjunk.com>
Approved by: will

8 years agoAdd ctl-lun config option for consistency in HA setups.
mav [Tue, 15 Sep 2015 13:37:48 +0000 (13:37 +0000)]
Add ctl-lun config option for consistency in HA setups.

8 years agoBump .Dd.
pluknet [Tue, 15 Sep 2015 13:24:52 +0000 (13:24 +0000)]
Bump .Dd.

8 years agoDocument NGM_PPPOE_SETMAXP.
glebius [Tue, 15 Sep 2015 12:19:01 +0000 (12:19 +0000)]
Document NGM_PPPOE_SETMAXP.

Submitted by: Dmitry Luhtionov <dmitryluhtionov gmail.com>

8 years agoPerform I2C transmission in a single burst when mode is "none" or not set
zbb [Tue, 15 Sep 2015 11:21:16 +0000 (11:21 +0000)]
Perform I2C transmission in a single burst when mode is "none" or not set

Some more automated I2C controllers cannot explicitly create
START/STOP/etc. conditions on the bus.
Instead, the correct condition is set automatically according
to the pending transfer status.
This particular behavior can cause trouble if some I2C slave
requires sending address offset within the chip followed by
the actual data or command. In that case we cannot assume that
the driver will not STOP immediately after sending
offset.

To avoid that, do not split offset transfer from data transfer
for default transmission modes and do exactly that if requested
in command line (stop-start and repeated-start modes).
This more generic approach should cover special cases like
the one described.

Reviewed by:   imp
Submitted by:  Marcin Mazurek <mma@semihalf.com>
Obtained from: Semihalf

8 years agoMake CAM log errors that make it wait.
mav [Tue, 15 Sep 2015 10:57:16 +0000 (10:57 +0000)]
Make CAM log errors that make it wait.

Waiting can take minutes, and it would be good for user to know what is
going on.

MFC after: 2 weeks

8 years agoFix completion/error status reporting.
mav [Tue, 15 Sep 2015 10:42:53 +0000 (10:42 +0000)]
Fix completion/error status reporting.

8 years agoClose potential race between datamove and HA failover.
mav [Tue, 15 Sep 2015 09:36:46 +0000 (09:36 +0000)]
Close potential race between datamove and HA failover.

8 years ago* Improve logging invalid arp messages
melifaro [Tue, 15 Sep 2015 08:50:44 +0000 (08:50 +0000)]
* Improve logging invalid arp messages
* Remove redundant check in ip_arpinput

Suggested by: glebius
MFC after: 2 weeks

8 years ago* Require explicitl lle unlink prior to calling llentry_delete().
melifaro [Tue, 15 Sep 2015 06:48:19 +0000 (06:48 +0000)]
* Require explicitl lle unlink prior to calling llentry_delete().
  This one slightly decreases time of holding afdata wlock.
* While here, make nd6_free() return void. No one has used its return value
  since r186119.

8 years agoRemove an unneeded typedef of ip6_t from the DTrace ip provider library.
markj [Tue, 15 Sep 2015 05:16:26 +0000 (05:16 +0000)]
Remove an unneeded typedef of ip6_t from the DTrace ip provider library.
It causes an error when ipfilter is enabled, since ipl.ko contains an
identical typedef.

PR: 203092
MFC after: 1 week

8 years agoPreserve the device queue status before retrying a sense request in
markj [Tue, 15 Sep 2015 05:09:17 +0000 (05:09 +0000)]
Preserve the device queue status before retrying a sense request in
chdone(). Previously, the retry could clear the CAM_DEV_QFRZN bit in the
CCB status, leaving the queue frozen.

Submitted by: Jeff Miller <Jeff.Miller@isilon.com>
Reviewed by: ken
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoUnconditionally build CTF tools in the bootstrap-tools phase of the build.
markj [Tue, 15 Sep 2015 05:01:44 +0000 (05:01 +0000)]
Unconditionally build CTF tools in the bootstrap-tools phase of the build.

Stale CTF tools are a frequent source of DTrace issues, and they compile
quickly enough that the increase in build time is negligible.

Reviewed by: emaste, imp
Differential Revision: https://reviews.freebsd.org/D3670

8 years agoReplace the scan event input path hack with the new rx-stats based method.
adrian [Tue, 15 Sep 2015 03:01:40 +0000 (03:01 +0000)]
Replace the scan event input path hack with the new rx-stats based method.
This allows for arbitrary channel info to be placed in the input call rather
than the totally gross hack of overriding ic_curchan.

Without this I'm sure ic_curchan setting was racing with the scan code
setting the channel itself..

8 years agoFix code typo (no functional change)
dteske [Mon, 14 Sep 2015 21:26:48 +0000 (21:26 +0000)]
Fix code typo (no functional change)

MFC after: 3 days
X-MFC-to: stable/10

8 years agoRegression: fix usershow -7
bapt [Mon, 14 Sep 2015 19:23:00 +0000 (19:23 +0000)]
Regression: fix usershow -7

Submitted by: Dan McGregor (via IRC)
MFC after: 2 days

8 years agoFix the handling of IPv6 On-Link Redirects.
vangyzen [Mon, 14 Sep 2015 19:17:25 +0000 (19:17 +0000)]
Fix the handling of IPv6 On-Link Redirects.

On receipt of a redirect message, install an interface route for the
redirected destination.  On removal of the corresponding Neighbor Cache
entry, remove the interface route.

This requires changes in rtredirect_fib() to cope with an AF_LINK
address for the gateway and with the absence of RTF_GATEWAY.

This fixes the "Redirected On-Link" test cases in the Tahi IPv6 Ready Logo
Phase 2 test suite.

Unrelated to the above, fix a recursion on the radix node head lock
triggered by the Tahi Redirected to Alternate Router test cases.

When I first wrote this patch in October 2012, all Section 2
(Neighbor Discovery) test cases passed on 10-CURRENT, 9-STABLE,
and 8-STABLE.  cem@ recently rebased the 10.x patch onto head and reported
that it passes Tahi.  (Thanks!)

These other test cases also passed in 2012:

* the RTF_MODIFIED case, with IPv4 and IPv6 (using a
  RTF_HOST|RTF_GATEWAY route for the destination)

* the redirected-to-self case, with IPv4 and IPv6

* a valid IPv4 redirect

All testing in 2012 was done with WITNESS and INVARIANTS.

Tested by:    EMC / Isilon Storage Division via Conrad Meyer (cem) in 2015,
              Mark Kelley <mark_kelley@dell.com> in 2012,
              TC Telkamp <terence_telkamp@dell.com> in 2012
PR:           152791
Reviewed by:  melifaro (current rev), bz (earlier rev)
Approved by:  kib (mentor)
MFC after:    1 month
Relnotes:     yes
Sponsored by: Dell Inc.
Differential Revision: https://reviews.freebsd.org/D3602

8 years agoUse unsigned variables in a few places.
rodrigc [Mon, 14 Sep 2015 18:59:01 +0000 (18:59 +0000)]
Use unsigned variables in a few places.

Eliminates gcc 4.9 warnings.

8 years agoUse ANSI C prototypes.
rodrigc [Mon, 14 Sep 2015 18:44:13 +0000 (18:44 +0000)]
Use ANSI C prototypes.

Eliminates gcc 4.9 warnings.

8 years ago* Do more fine-grained locking: call eventhandlers/free_entry
melifaro [Mon, 14 Sep 2015 16:48:19 +0000 (16:48 +0000)]
* Do more fine-grained locking: call eventhandlers/free_entry
  without holding afdata wlock
* convert per-af delete_address callback to global lltable_delete_entry() and
  more low-level "delete this lle" per-af callback
* fix some bugs/inconsistencies in IPv4/IPv6 ifscrub procedures

Sponsored by: Yandex LLC
Differential Revision: https://reviews.freebsd.org/D3573