freebsd.git
10 years ago- Fix an off by one error when checking for the stop event. This resulted
jhb [Tue, 22 Apr 2014 15:17:32 +0000 (15:17 +0000)]
- Fix an off by one error when checking for the stop event.  This resulted
  in not showing the most recent event by default.
- When the stop even is hit, break out of the outer loop to stop fetching
  more events.

MFC after: 1 week

10 years agoDon't claim the adapter is idle if it is clearing a drive.
jhb [Tue, 22 Apr 2014 15:15:54 +0000 (15:15 +0000)]
Don't claim the adapter is idle if it is clearing a drive.

MFC after: 1 week

10 years agoFixes mkdir for the NFSv2 client that was broken by r264705.
rmacklem [Tue, 22 Apr 2014 04:42:46 +0000 (04:42 +0000)]
Fixes mkdir for the NFSv2 client that was broken by r264705.

Reported by: bdrewery
MFC after: 2 weeks

10 years agoVarious style(9) fixes and typos in grep, sort and patch.
pfg [Mon, 21 Apr 2014 22:52:18 +0000 (22:52 +0000)]
Various style(9) fixes and typos in grep, sort and patch.

MFC after: 3 days

10 years agoAdd parameterized position handling to printf(1).
pfg [Mon, 21 Apr 2014 22:47:18 +0000 (22:47 +0000)]
Add parameterized position handling to printf(1).

Add a new %n$ option to change the order of the parameters as
done in the ksh93 builtin printf (among others).

For example:
%printf '%2$1d %1$s\n' one 2 three 4
2 one
4 three

The feature was written by Garret D'Amore under a
BSD license for Nexenta/illumos.

Reference:
http://garrett.damore.org/2010/10/new-implementation-of-printf.html

PR: bin/152934
Obtained from: Illumos
MFC after: 2 weeks

10 years agoPrevent building tests when bootstrapping make.
jmmv [Mon, 21 Apr 2014 22:36:31 +0000 (22:36 +0000)]
Prevent building tests when bootstrapping make.

Should fix the breakage reported by tinderbox when WITHOUT_BMAKE is set,
which was probably introduced in r263346..

10 years agoAdd placeholder Kyuafiles for various top-level hierarchies.
jmmv [Mon, 21 Apr 2014 21:39:25 +0000 (21:39 +0000)]
Add placeholder Kyuafiles for various top-level hierarchies.

This change adds tests/ directories in the source tree to create various
subdirectories in /usr/tests/ and to install placeholder Kyuafiles for
them.

the relevant hierarchies are: cddl, etc, games, gnu and secure.

The reason for this is to simplify the addition of new test programs for
utilities or libraries under any of these directories.  Doing so on a
case by case basis is unnecessary and is quite an obscure process.

10 years agoUse case insensitive match in portsnap.
delphij [Mon, 21 Apr 2014 19:33:27 +0000 (19:33 +0000)]
Use case insensitive match in portsnap.

PR: bin/186510
Submitted by: olli
MFC after: 2 weeks

10 years agoAdd {} braces so that the code conforms to the indentation.
rmacklem [Mon, 21 Apr 2014 19:17:19 +0000 (19:17 +0000)]
Add {} braces so that the code conforms to the indentation.
Fortunately, I don't think doing the assignment of cap->tsomax
unconditionally causes any problem.

Reviewed by: glebius
MFC after: 2 weeks

10 years agoFor an NFSv4 mount with the "nocto" option, don't get the
rmacklem [Mon, 21 Apr 2014 19:10:23 +0000 (19:10 +0000)]
For an NFSv4 mount with the "nocto" option, don't get the
up to date file attributes upon close. This reduces the
Getattr RPC count by about 65% for software builds.

MFC after: 2 weeks

10 years agolibc/stdio: Fail fdopen() on an execute-only fd.
jilles [Mon, 21 Apr 2014 17:40:23 +0000 (17:40 +0000)]
libc/stdio: Fail fdopen() on an execute-only fd.

An execute-only fd (opened with O_EXEC) allows neither read() nor write()
and is therefore incompatible with all stdio modes. Therefore, the [EINVAL]
error applies.

Also adjust the similar check in freopen() with a NULL path, even though
this checks an fd which is already from a FILE.

10 years agourndis(4) will first appear in 9.3-RELEASE.
gjb [Mon, 21 Apr 2014 16:35:19 +0000 (16:35 +0000)]
urndis(4) will first appear in 9.3-RELEASE.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

10 years agolibc: Add fopen() test to regression Makefile.
jilles [Mon, 21 Apr 2014 12:39:35 +0000 (12:39 +0000)]
libc: Add fopen() test to regression Makefile.

10 years agoRename the fp{get,set}* files so they no longer conflict with the softfloat
andrew [Mon, 21 Apr 2014 09:43:22 +0000 (09:43 +0000)]
Rename the fp{get,set}* files so they no longer conflict with the softfloat
version of these files. Keep them within this directory so they can be used
to implement the armv6 version of these functions.

10 years agoRewrite the cleanup code to, well, actually work right.
adrian [Mon, 21 Apr 2014 06:07:08 +0000 (06:07 +0000)]
Rewrite the cleanup code to, well, actually work right.

The existing cleanup code was based on the Atheros reference driver
from way back and stuff that was in Linux ath9k.  It turned out to be ..
rather silly.

Specifically:

* The whole method of determining whether there's hardware-queued frames
  was fragile and the BAW would never quite work right afterwards.

* The cleanup path wouldn't correctly pull apart aggregate frames in the
  queue, so frames would not be freed and the BAW wouldn't be correctly
  updated.

So to implement this:

* Pull the aggregate frames apart correctly and handle each separately;
* Make the atid->incomp counter just track the number of hardware queued
  frames rather than try to figure it out from the BAW;
* Modify the aggregate completion path to handle it as a single frame
  (atid->incomp tracks the one frame now, not the subframes) and
  remove the frames from the BAW before completing them as normal frames;
* Make sure bf->bf_next is NULled out correctly;
* Make both aggregate session and non-aggregate path frames now be
  handled via the incompletion path.

TODO:

* kill atid->incomp; the driver tracks the hardware queued frames
  for each TID and so we can just use that.

This is a stability fix that should be merged back to stable/10.

Tested:

* AR5416, STA

MFC after: 7 days

10 years ago* Modify the debugging output from pause/resume to note the TID and STA
adrian [Mon, 21 Apr 2014 02:09:14 +0000 (02:09 +0000)]
* Modify the debugging output from pause/resume to note the TID and STA
  MAC
* Now that the paused < 0 bugs have been identified, make the DPRINTF()
  a device_printf() again.  Anything else that shows up here needs to be
  fixed immediately.

Tested:

* AR5416, STA mode

MFC after: 7 days

10 years agoMake sure bf_next is NULL'ed out when we're completing up an aggregate
adrian [Mon, 21 Apr 2014 02:05:51 +0000 (02:05 +0000)]
Make sure bf_next is NULL'ed out when we're completing up an aggregate
frame through the cleanup path.

Whilst here, fix the indenting for something I messed up.

Tested:

* AR5416, STA mode

10 years agobsd-family-tree: Add missing releases
eadler [Mon, 21 Apr 2014 02:04:37 +0000 (02:04 +0000)]
bsd-family-tree: Add missing releases

- NetBSD 6.0.4
- DragonFly 3.6.2

10 years agoFix a cleanup hang if cleanup gets called _during_ an active cleanup.
adrian [Mon, 21 Apr 2014 01:02:49 +0000 (01:02 +0000)]
Fix a cleanup hang if cleanup gets called _during_ an active cleanup.

During power save testing I noticed that the cleanup code is being
called during a RUN->RUN state transition.  It's because the net80211
stack is treating that (for reasons I don't quitey know yet) as a
reassociation and this calls the node cleanup code.  The reason it's
seeing a RUN->RUN transition is because during active power save
stuff it's possible that the RUN->SLEEP and SLEEP->RUN transitions
happen so quickly that the deferred net80211 vap state code
"loses" a transition, namely the intermediary SLEEP transition.

So, this was causing the node reassociation code to sometimes be called
twice in quick succession and this would result in ath_tx_tid_cleanup()
to be called again.  The code calling it would always call pause, and
then only call resume if the TID didn't have "cleanup_inprogress" set.
Unfortunately it didn't check if it was already set on entry, so it
would pause but not call resume.  Thus, paused would be called more
than once (once before each entry into ath-tx_tid_cleanup()) but resume
would only be called once when the cleanup state was finished.

This doesn't entirely fix all of the issues seen in the cleanup path
but it's a necessary first step.

Since this is a stability fix, it should be merged to stable/10 at some
point.

Tested:

* AR5416, STA mode

MFC after: 7 days

10 years agoModify the NFSv4 client create/mkdir RPC so that it acquires
rmacklem [Sun, 20 Apr 2014 22:19:00 +0000 (22:19 +0000)]
Modify the NFSv4 client create/mkdir RPC so that it acquires
post-create/mkdir directory attributes. This allows the RPC to
name cache the newly created directory and reduces the lookup RPC
count for applications creating a lot of directories.

MFC after: 2 weeks

10 years agoAdd consistency checks to ensure that fragments of a user message
tuexen [Sun, 20 Apr 2014 21:11:39 +0000 (21:11 +0000)]
Add consistency checks to ensure that fragments of a user message
have the same U-bit.

MFC after: 3 days

10 years agoApply a slightly different color hammer to arm/release.sh:
gjb [Sun, 20 Apr 2014 20:46:06 +0000 (20:46 +0000)]
Apply a slightly different color hammer to arm/release.sh:

 - gcc(1) fails to build usr.bin/dtc
 - lack of WITH_GNUCXX=1 causes cc1plus(1) calls to fail
 - u-boot fails to build with clang (hard-coded gcc(1) calls)

Implement the proper incantation of WITH_/WITHOUT_ knobs
to get arm snapshot builds working again.

Since the cc(1) binary is no longer expected to be clang(1),
remove the chroot(8) post-install cc(1) overwrite.

MFC After: 3 days
X-MFC-With: r264518,r264697,r264698
Tested on: stable/10@r264677 RPI-B
Sponsored by: The FreeBSD Foundation

10 years agoRemove uncessary cache and TLB maintenance ops.
ian [Sun, 20 Apr 2014 18:21:05 +0000 (18:21 +0000)]
Remove uncessary cache and TLB maintenance ops.

 - These were needed on armv4/5 (VIVT cache), not needed on armv6.
 - The wbinv_all call can't be used on SMP systems; cache operations by
   set/way are not broadcast to other cores.
 - The TLB maintenance operations needed for pmap_growkernel() happen in
   pmap_grow_l2_bucket(), so there's no need to flush all TLB entries at
   the end.
 - There may not be any need for the TLB flush at the beginning of
   pmap_release(), but it's left in for now pending more investigation.

Pointed out by:    Svatopluk Kraus <onwahe@gmail.com>
Discussed with:    cognet@

10 years agoSend also a packet containing an ABORT chunk in response to an OOTB packet
tuexen [Sun, 20 Apr 2014 18:15:23 +0000 (18:15 +0000)]
Send also a packet containing an ABORT chunk in response to an OOTB packet
containing a COOKIE-ECHO chunk.

MFC after: 3 days

10 years agoFix EOL escape.
gjb [Sun, 20 Apr 2014 16:34:10 +0000 (16:34 +0000)]
Fix EOL escape.

MFC after: 3 days
X-MFC-With: r264697
Sponsored by: The FreeBSD Foundation

10 years agoWhen building the 'xdev' target when WITH_GCC=1 and
gjb [Sun, 20 Apr 2014 16:33:28 +0000 (16:33 +0000)]
When building the 'xdev' target when WITH_GCC=1 and
WITHOUT_CLANG_IS_CC=1, it appears WITHOUT_CLANG=1 must
also be set.

While here, reorder the lines to put the WITH_* and
WITHOUT_* entries on the same line.

MFC After: 3 days
X-MFC-With: r264518
Tested on: stable/10@r264677
Sponsored by: The FreeBSD Foundation

10 years agoAdd the deprecated fp{get,set}* functions, a few ports use them.
andrew [Sun, 20 Apr 2014 14:58:14 +0000 (14:58 +0000)]
Add the deprecated fp{get,set}* functions, a few ports use them.

10 years agoFix a comment typo; conversion tables are for leap years, not leap seconds.
ian [Sun, 20 Apr 2014 13:37:22 +0000 (13:37 +0000)]
Fix a comment typo; conversion tables are for leap years, not leap seconds.

10 years agoApply upstream patch for EC calculation bug and bump version addendum.
des [Sun, 20 Apr 2014 11:34:33 +0000 (11:34 +0000)]
Apply upstream patch for EC calculation bug and bump version addendum.

10 years agoBackport from projects/pf r263908:
mm [Sun, 20 Apr 2014 09:17:48 +0000 (09:17 +0000)]
Backport from projects/pf r263908:

De-virtualize UMA zone pf_mtag_z and move to global initialization part.

The m_tag struct does not know about vnet context and the pf_mtag_free()
callback is called unaware of current vnet. This causes a panic.

MFC after: 1 week

10 years agoMFi386: r257858 (by kib)
nyan [Sun, 20 Apr 2014 05:40:13 +0000 (05:40 +0000)]
MFi386: r257858 (by kib)

  Fix signal delivery for the iBCS2 binaries.

10 years agobsd-family-tree: Add NetBSD 6.1.4, 6.0.5
eadler [Sun, 20 Apr 2014 03:27:38 +0000 (03:27 +0000)]
bsd-family-tree: Add NetBSD 6.1.4, 6.0.5

Part of 6.0.4 is still missing: this really needs to be automated

10 years agosys/capsicum.h: Remove not very useful visibility guards.
jilles [Sat, 19 Apr 2014 22:18:57 +0000 (22:18 +0000)]
sys/capsicum.h: Remove not very useful visibility guards.

Since <sys/capsicum.h> does not comply to any standards, standards-compliant
applications do not include it and it is not useful to restrict what is
exposed depending on the requested standard.

In addition, the use of types like u_int makes the header fail in strict
standards compliance modes anyway.

10 years agoUse consistently debug output instead of an unconditional printf.
tuexen [Sat, 19 Apr 2014 20:55:51 +0000 (20:55 +0000)]
Use consistently debug output instead of an unconditional printf.

MFC after: 3 days

10 years agoModify the NFSv4 client open/create RPC so that it acquires
rmacklem [Sat, 19 Apr 2014 19:40:20 +0000 (19:40 +0000)]
Modify the NFSv4 client open/create RPC so that it acquires
post-open/create directory attributes. This allows the RPC to
name cache the newly created file and reduces the lookup RPC
count by about 10% for software builds.

MFC after: 2 weeks

10 years agoadd a TON of missing event handlers with quite possibly bogus
jmg [Sat, 19 Apr 2014 19:32:54 +0000 (19:32 +0000)]
add a TON of missing event handlers with quite possibly bogus
descrptions... If you're one of the many people who forgot to document
their work and don't like my description, well, do your job and update
it...

10 years agoSend the correct error cause, when a DATA chunk with no user data
tuexen [Sat, 19 Apr 2014 19:21:06 +0000 (19:21 +0000)]
Send the correct error cause, when a DATA chunk with no user data
is received. This bug was reported by Irene Ruengeler.

MFC after: 3 days

10 years agogarbage collect something that hasn't been triggered in almost 5 years...
jmg [Sat, 19 Apr 2014 19:08:08 +0000 (19:08 +0000)]
garbage collect something that hasn't been triggered in almost 5 years...
the last consumer was removed a couple years ago...

10 years agologin: Remove broken dialup log message.
jilles [Sat, 19 Apr 2014 13:47:32 +0000 (13:47 +0000)]
login: Remove broken dialup log message.

For 10 years, the "DIALUP <tty>, <user>" message has required having a
hostname (-h) instead of not having a hostname; therefore, it is never
logged. Given that dialup is obsolete and this has not been fixed, remove
the log message.

Note that LOGALL, which is defined by default, logs a message for all
logins, including dialup logins.

10 years agolanginfo.h: Hide YESSTR and NOSTR in strict POSIX mode.
jilles [Sat, 19 Apr 2014 12:38:01 +0000 (12:38 +0000)]
langinfo.h: Hide YESSTR and NOSTR in strict POSIX mode.

YESSTR and NOSTR are obsolete and are only in old SUS.

10 years agoUpdate UMASS manual page to mention newer host controller drivers.
hselasky [Sat, 19 Apr 2014 06:32:51 +0000 (06:32 +0000)]
Update UMASS manual page to mention newer host controller drivers.

Submitted by: Aseem Jolly <aseem.jolly@gmail.com>

10 years agoInstall newly added bsd.mkopt.mk.
jkim [Sat, 19 Apr 2014 04:59:56 +0000 (04:59 +0000)]
Install newly added bsd.mkopt.mk.

10 years agoadd link to crypto(4)...
jmg [Sat, 19 Apr 2014 01:52:03 +0000 (01:52 +0000)]
add link to crypto(4)...

MFC after: 1 week

10 years agoModify the Lookup RPC for NFSv4 so that it acquires directory
rmacklem [Fri, 18 Apr 2014 22:05:34 +0000 (22:05 +0000)]
Modify the Lookup RPC for NFSv4 so that it acquires directory
attributes. This allows the client to cache directory names
when they are looked up, reducing the Lookup RPC count by
about 40% for software builds.

MFC after: 2 weeks

10 years agoMFV r264668:
delphij [Fri, 18 Apr 2014 22:04:58 +0000 (22:04 +0000)]
MFV r264668:

4754 io issued to near-full luns even after setting noalloc threshold
4755 mg_alloc_failures is no longer needed

illumos/illumos@b6240e830b871f59c22a3918aebb3b36c872edba

MFC after: 2 weeks

10 years agoMFV r264667:
delphij [Fri, 18 Apr 2014 21:35:23 +0000 (21:35 +0000)]
MFV r264667:

4752 fan out read zio taskqs

illumos/illumos-gate@1b497ab83e8f1c58bba5da59c649207a442a4720

10 years agoMFV r264666:
delphij [Fri, 18 Apr 2014 21:15:12 +0000 (21:15 +0000)]
MFV r264666:

4374 dn_free_ranges should use range_tree_t

illumos/illumos-gate@bf16b11e8deb633dd6c4296d46e92399d1582df4

MFC after: 2 weeks

10 years agoDocument YES_HESIOD disappearing.
imp [Fri, 18 Apr 2014 17:06:18 +0000 (17:06 +0000)]
Document YES_HESIOD disappearing.

10 years agoRetire compatibility YES_HESIOD. If you haven't upgraded in the last
imp [Fri, 18 Apr 2014 17:04:34 +0000 (17:04 +0000)]
Retire compatibility YES_HESIOD. If you haven't upgraded in the last
decade to WITH_HESIOD, your are in for a rude surprise...

10 years agoMove the generic part of bsd.opts.mk into bsd.mkopts.mk to allow for
imp [Fri, 18 Apr 2014 17:04:26 +0000 (17:04 +0000)]
Move the generic part of bsd.opts.mk into bsd.mkopts.mk to allow for
the WITH/WITHOUT_FOO -> MK_FOO={yes,no} stuff to be used elsewhere.

10 years agoAllow setting of MK_FOO by anybody. There are too many edge cases that
imp [Fri, 18 Apr 2014 17:04:18 +0000 (17:04 +0000)]
Allow setting of MK_FOO by anybody. There are too many edge cases that
we're preventing now with this policy. However, these edge cases
should be rare and all that set MK_FOO directly.
WITH_FOO and WITHOUT_FOO both being defined now result in the
non-default behavior happening silently. Users needing determinism
here fall into the edge case exception for MK_FOO setting.

10 years agoCopy bsd.own.mk to bsd.opts.mk and separate out the option setting
imp [Fri, 18 Apr 2014 17:04:09 +0000 (17:04 +0000)]
Copy bsd.own.mk to bsd.opts.mk and separate out the option setting
code from the rest. Include bsd.opts.mk in bsd.own.mk to preserve
current behavior. Future revisions will replace the inclusion of
bsd.own.mk elsewhere with bsd.opts.mk or a more appropriate new
file that's still being finalized.

10 years agoSeparate out enabling building clang and/or gcc for the system and
imp [Fri, 18 Apr 2014 17:03:58 +0000 (17:03 +0000)]
Separate out enabling building clang and/or gcc for the system and
building clang and/or gcc as the bootstrap compiler. Normally, the
default compiler is used. WITH_CLANG_BOOTSTRAP and/or
WITH_GCC_BOOTSTRAP will enable building these compilers as part
bootstrap phase.  WITH/WITHOUT_CLANG_IS_CC controls which compiler is
used by default for the bootstrap phase, as well as which compiler is
installed as cc.  buildworld now successfully completes building the
cross compiler with WITHOUT_CLANG=t and WITHOUT_GCC=t and produces a
built system with neither of these included.

Similarlly, MK_BINUTILS_BOOTSTRAP controls whether binutils is built
during this phase.

WITHOUT_CROSS_COMPILER will now force MK_BINUTILS_BOOTSTRAP=no,
MK_CLANG_BOOTSTRAP=no and MK_GCC_BOOTSTRAP=no.

BOOTSTRAP_COMPILER was considered, but rejected, since pc98 needs both
clang and gcc to bootstrap still. It should be revisisted in the
future if this requirement goes away. Values should be gcc, clang or
none. It could also be a list.

The odd interaction with Xfoo cross/external tools needs work, but
is beyond the scope of this change as well.

10 years agoConvert NO_MANCOMPRESSED to MK_MANCOMPRESSED.
imp [Fri, 18 Apr 2014 17:03:49 +0000 (17:03 +0000)]
Convert NO_MANCOMPRESSED to MK_MANCOMPRESSED.

10 years agoTake out the hack to write -1's to non-NAND. Always do a BIO_DELETE on
imp [Fri, 18 Apr 2014 17:03:43 +0000 (17:03 +0000)]
Take out the hack to write -1's to non-NAND. Always do a BIO_DELETE on
the ranges we want to erase. This is nicer to SSDs that want TRIMs
anyway.

10 years agoMore properly account for free/reserved segments to avoid deadlock or
imp [Fri, 18 Apr 2014 17:03:35 +0000 (17:03 +0000)]
More properly account for free/reserved segments to avoid deadlock or
worse when filling up a device and then trying to erase files to make
space. Without enough space, you can't do that. Also, ensure that the
metadata writes don't generate ENOSPC. They will be retried later
since the buffers are still dirty...

Submitted by: mjg@

10 years agoAn abstracted down version of the NanoBSD config files as used by
imp [Fri, 18 Apr 2014 17:03:09 +0000 (17:03 +0000)]
An abstracted down version of the NanoBSD config files as used by
FreeNAS and the BSDRP folks.

10 years agoAdd -x to the removal of trees to prevent crossing mount points to
imp [Fri, 18 Apr 2014 16:53:56 +0000 (16:53 +0000)]
Add -x to the removal of trees to prevent crossing mount points to
limit the damage from errored out runs and failure to unmount loopback
mounts properly.

10 years agoDon't build EISA by default anymore. Remove from i386 GENERIC and
imp [Fri, 18 Apr 2014 16:53:06 +0000 (16:53 +0000)]
Don't build EISA by default anymore. Remove from i386 GENERIC and
create an option that defaults to "no" on all platforms to not build
the EISA bits.

Discussed on: arch@

10 years agoAdd new USB quirk.
hselasky [Fri, 18 Apr 2014 16:19:33 +0000 (16:19 +0000)]
Add new USB quirk.

Submitted by: kwm @
MFC after: 1 week

10 years agoAdd support for the PIT 'readback' command -- based on a patch by grehan@.
tychon [Fri, 18 Apr 2014 16:05:12 +0000 (16:05 +0000)]
Add support for the PIT 'readback' command -- based on a patch by grehan@.

Approved by: grehan (co-mentor)

10 years agoFix ACPI DSDT indentation cosmetic breakage introduced in r264631 --
tychon [Fri, 18 Apr 2014 16:01:19 +0000 (16:01 +0000)]
Fix ACPI DSDT indentation cosmetic breakage introduced in r264631 --
pointed out by jhb@.

Approved by: grehan (co-mentor)

10 years agoRespect the destination operand size of the 'Input from Port' instruction.
tychon [Fri, 18 Apr 2014 15:22:56 +0000 (15:22 +0000)]
Respect the destination operand size of the 'Input from Port' instruction.

Approved by: grehan (co-mentor)

10 years agoNow that I figured out where the ethernet addresses come from
bz [Fri, 18 Apr 2014 14:21:10 +0000 (14:21 +0000)]
Now that I figured out where the ethernet addresses come from
on NetFPGA-10G, assign one to the interface by default in a very
similar way.

MFC after: 6 days
X-Easter-Egg-Hunt: yes

10 years agoAdd support for specifying USB controller mode via FDT.
hselasky [Fri, 18 Apr 2014 08:31:55 +0000 (08:31 +0000)]
Add support for specifying USB controller mode via FDT.
Add FDT support to the DWC OTG kernel module.

Submitted by: John Wehle <john@feith.com>
PR: usb/188683
MFC after: 1 week

10 years agoEnable and disable the PMC unit at load/unload time, respectively.
jhibbits [Fri, 18 Apr 2014 06:39:00 +0000 (06:39 +0000)]
Enable and disable the PMC unit at load/unload time, respectively.

MFC after: 3 weeks

10 years agoAdd support for reading the PIT Counter 2 output signal via the NMI
tychon [Fri, 18 Apr 2014 00:02:06 +0000 (00:02 +0000)]
Add support for reading the PIT Counter 2 output signal via the NMI
Status and Control register at port 0x61.

Be more conservative about "catching up" callouts that were supposed
to fire in the past by skipping an interrupt if it was
scheduled too far in the past.

Restore the PIT ACPI DSDT entries and add an entry for NMISC too.

Approved by: neel (co-mentor)

10 years agoFor NFS mounts using rsize,wsize=65536 over TSO enabled
rmacklem [Thu, 17 Apr 2014 23:31:50 +0000 (23:31 +0000)]
For NFS mounts using rsize,wsize=65536 over TSO enabled
network interfaces limited to 32 transmit segments, there
are two known issues.
The more serious one is that for an I/O of slightly less than 64K,
the net device driver prepends an ethernet header, resulting in a
TSO segment slightly larger than 64K. Since m_defrag() copies this
into 33 mbuf clusters, the transmit fails with EFBIG.
A tester indicated observing a similar failure using iSCSI.

The second less critical problem is that the network
device driver must copy the mbuf chain via m_defrag()
(m_collapse() is not sufficient), resulting in measurable overhead.

This patch reduces the default size of if_hw_tsomax
slightly, so that the first issue is avoided.
Fixing the second issue will require a way for the
network device driver to inform tcp_output() that it
is limited to 32 transmit segments.

Reported and tested by: csforgeron@gmail.com, markus.gebert@hostpoint.ch
MFC after: 2 weeks

10 years agofcntl.h: Make visible various POSIX.1-2008 features.
jilles [Thu, 17 Apr 2014 21:29:22 +0000 (21:29 +0000)]
fcntl.h: Make visible various POSIX.1-2008 features.

Also, remove #if __BSD_VISIBLE where it is redundant. When __BSD_VISIBLE is
defined to 1, __POSIX_VISIBLE, __XSI_VISIBLE and __ISO_C_VISIBLE are also
defined to the newest supported version.

PR: 188173
Reviewed by: pluknet

10 years agoFix typo and case inconsistency in MIPS CP0 register names.
rwatson [Thu, 17 Apr 2014 20:42:03 +0000 (20:42 +0000)]
Fix typo and case inconsistency in MIPS CP0 register names.

MFC after: 3 days

10 years agouse correct (integer) type for the temperature sysctl
emax [Thu, 17 Apr 2014 19:29:15 +0000 (19:29 +0000)]
use correct (integer) type for the temperature sysctl

Reviewed by: np, scottl
Obtained from: Netflix
MFC after: 3 days

10 years agoFix typo.
kib [Thu, 17 Apr 2014 18:13:23 +0000 (18:13 +0000)]
Fix typo.

MFC after: 3 days

10 years agoFix releasing the lock in the parent atrun process after the queue
ghelmer [Thu, 17 Apr 2014 16:00:26 +0000 (16:00 +0000)]
Fix releasing the lock in the parent atrun process after the queue
directory has been processed. Otherwise, a long-running child process
caused other atrun invocations to stall unnecessarily.

10 years agoCorrect AMD chipsets identification.
mav [Thu, 17 Apr 2014 14:16:02 +0000 (14:16 +0000)]
Correct AMD chipsets identification.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after: 2 weeks

10 years agoStop casting the const char * to void * to char * to make compile more happy
bz [Thu, 17 Apr 2014 14:15:53 +0000 (14:15 +0000)]
Stop casting the const char * to void * to char * to make compile more happy
after r264573.

Someone submit to: OpenBSD
MFC after: 13 days
X-MFC with: r264573

10 years agoRemove duplicate extern declarations after r264573.
bz [Thu, 17 Apr 2014 13:57:37 +0000 (13:57 +0000)]
Remove duplicate extern declarations after r264573.
Makes things compile better.

Someone submit to: OpenBSD
MFC after: 13 days
X-MFC with: r264573

10 years agoBased on xlp_machdep.c and completed the list of options based on
bz [Thu, 17 Apr 2014 13:02:59 +0000 (13:02 +0000)]
Based on xlp_machdep.c and completed the list of options based on
boot/mips/beri/loader/metadata.c allow FDT configuration to set
command line options.
This leads to an interesting quesiton of future interactions with loader.
However for configurations without loader this allows bootverbose or boot
single user to be set by compiling a new kernel, which is good enough for
testing and debugging.

Reviewed by: rwatson
MFC after: 1 week

10 years agoRemove redundant code.
trasz [Thu, 17 Apr 2014 12:53:56 +0000 (12:53 +0000)]
Remove redundant code.

Sponsored by: The FreeBSD Foundation

10 years agoAdd the initial version of if_nf10bmac(4), a driver to support an
bz [Thu, 17 Apr 2014 12:33:26 +0000 (12:33 +0000)]
Add the initial version of if_nf10bmac(4), a driver to support an
NetFPGA-10G Embedded CPU Ethernet Core.

The current version operates on a simple PIO based interface connected
to a NetFPGA-10G port.

To avoid confusion: this driver operates on a CPU running on the FPGA,
e.g. BERI/mips, and is not suited for the PCI host interface.

MFC after: 1 week
Relnotes: yes
Sponsored by: DARPA/AFRL

10 years agoRemove redundant unlock.
ae [Thu, 17 Apr 2014 12:22:08 +0000 (12:22 +0000)]
Remove redundant unlock.

This code was removed from the opensolaris and darwin's
netsmb implementations, in DfBSD it also has been disabled.

PR: 36566, 87859, 139407, 161579, 175557, 178412, 186652
MFC after: 2 weeks
Sponsored by: Yandex LLC

10 years agoAdd a missing break in the TCP case.
brueffer [Thu, 17 Apr 2014 10:27:18 +0000 (10:27 +0000)]
Add a missing break in the TCP case.

Reviewed by: bms
MFC after: 1 week

10 years agoRemove unused variable.
ae [Thu, 17 Apr 2014 06:40:11 +0000 (06:40 +0000)]
Remove unused variable.

PR: 173521
MFC after: 1 week
Sponsored by: Yandex LLC

10 years agoMinor style(9) cleanups
pfg [Thu, 17 Apr 2014 01:43:15 +0000 (01:43 +0000)]
Minor style(9) cleanups

#define should be followed by a tab.

MFC after: 3 days

10 years agoSync with OpenBSD.
delphij [Wed, 16 Apr 2014 23:14:05 +0000 (23:14 +0000)]
Sync with OpenBSD.

MFC after: 2 weeks

10 years agowhen watchdogd is asked to exit nicely (via SIGTERM) it will
emax [Wed, 16 Apr 2014 22:26:42 +0000 (22:26 +0000)]
when watchdogd is asked to exit nicely (via SIGTERM) it will
stop timer. since watchdogd rc.d script is marked as 'shutdown'
it will exit (on shutdown) and stop timer. if system happens to
hung after watchdogd exited, manual reset is required. when one
operates in "lights-out" type of environments and without
readily available "remote hands" it could create a problem.

this provides ability to override "stop signal" for watchdogd.
default behavior is preserved, i.e. watchdogd will still be killed
via SIGTERM and timer will be stopped. in order to activate new
feature, one needs to put

watchdogd_sig_stop="KILL"

into /etc/rc.conf and also make sure watchdogd timeout is set
to long enough value allowing system to come back online before
timeout fires.

Obtained from: Netflix
MFC after: 1 week

10 years agoDo not set M_BESTFIT if a strategy has already been provided. This
np [Wed, 16 Apr 2014 21:39:43 +0000 (21:39 +0000)]
Do not set M_BESTFIT if a strategy has already been provided.  This
fixes problems when using M_FIRSTFIT.

Reviewed by: jeff@
MFC after: 1 week

10 years agoClose the race in older code, that caused connection stuck after r264348.
mav [Wed, 16 Apr 2014 19:59:06 +0000 (19:59 +0000)]
Close the race in older code, that caused connection stuck after r264348.

Reviewed by: trasz
MFC after: 2 weeks
Sponsored by: iXsystems, Inc.

10 years agoInclude opt_ddb.h in the list of SRCS, since we include it.
imp [Wed, 16 Apr 2014 19:49:44 +0000 (19:49 +0000)]
Include opt_ddb.h in the list of SRCS, since we include it.

MFC after: 3d

10 years agoFix VIRTUAL and PROF interval timers for short intervals, broken at r247903.
mav [Wed, 16 Apr 2014 18:37:46 +0000 (18:37 +0000)]
Fix VIRTUAL and PROF interval timers for short intervals, broken at r247903.

Due to the way those timers are implemented, we can't handle very short
intervals.  In addition to that mentioned patch caused math overflows
for short intervals.  To avoid that round those intervals to 1 tick.

PR: kern/187668
MFC after: 1 week

10 years agoMake it possible for the initiator side to operate in both proxy
trasz [Wed, 16 Apr 2014 18:23:36 +0000 (18:23 +0000)]
Make it possible for the initiator side to operate in both proxy
and normal mode; this makes it possible to compile with the former
by default, but use it only when neccessary.  That's especially
important for the userland part.

Sponsored by: The FreeBSD Foundation

10 years agoFix typo.
trasz [Wed, 16 Apr 2014 17:39:59 +0000 (17:39 +0000)]
Fix typo.

Sponsored by: The FreeBSD Foundation

10 years agoAdd kern.iscsi.fail_on_disconnection; this is required for gmultipath
trasz [Wed, 16 Apr 2014 17:39:10 +0000 (17:39 +0000)]
Add kern.iscsi.fail_on_disconnection; this is required for gmultipath
to work.

Sponsored by: The FreeBSD Foundation

10 years agoRemove the libkse directory. It was unhooked from the build and kernel
brooks [Wed, 16 Apr 2014 17:12:59 +0000 (17:12 +0000)]
Remove the libkse directory.  It was unhooked from the build and kernel
support removed in 2008 (prior to 8.0).

Approved by: deischen, imp
MFC after: 3 days

10 years agoUse ETHER_ALIGN as argument to m_adj() to offset the beginning of packet
bz [Wed, 16 Apr 2014 15:28:17 +0000 (15:28 +0000)]
Use ETHER_ALIGN as argument to m_adj() to offset the beginning of packet
rather than the magic number 2.

While here fix a typo in a comment.

No functional changes.

MFC after: 1 week
Sponsored by: DARPA/AFRL

10 years agoSet oif only for outgoing packets.
ae [Wed, 16 Apr 2014 14:37:11 +0000 (14:37 +0000)]
Set oif only for outgoing packets.

PR: 188543
MFC after: 1 week
Sponsored by: Yandex LLC

10 years agoWhen switching variables to flags in r243185 a few cases were missed.
bz [Wed, 16 Apr 2014 12:29:45 +0000 (12:29 +0000)]
When switching variables to flags in r243185 a few cases were missed.
After r263152 this leaves unused variables if route(8) is compiled
without INET support.
Switch the remaining variable accesses to flags and remove now obsolete
variables.

Reviewed by: glebius
MFC after: 1 week

10 years agoRemove useless debug.
trasz [Wed, 16 Apr 2014 11:28:38 +0000 (11:28 +0000)]
Remove useless debug.

Sponsored by: The FreeBSD Foundation

10 years agoBe more strict with locking for is_waiting_for_iscsid variable.
trasz [Wed, 16 Apr 2014 11:28:05 +0000 (11:28 +0000)]
Be more strict with locking for is_waiting_for_iscsid variable.

Sponsored by: The FreeBSD Foundation

10 years agoGet rid of ISCSIDCLOSE; it wasn't used and is redundant anyway,
trasz [Wed, 16 Apr 2014 11:19:49 +0000 (11:19 +0000)]
Get rid of ISCSIDCLOSE; it wasn't used and is redundant anyway,
because of ISCSIDFAIL.

Sponsored by: The FreeBSD Foundation

10 years agoEnglish.
trasz [Wed, 16 Apr 2014 11:07:29 +0000 (11:07 +0000)]
English.

Sponsored by: The FreeBSD Foundation