]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoAttempt toward a buildable universe by silenting a few warnings for OFED.
Xin LI [Sat, 10 Nov 2012 00:32:47 +0000 (00:32 +0000)]
Attempt toward a buildable universe by silenting a few warnings for OFED.

11 years agoUse %s when calling make_dev with a string pointer. This makes
Xin LI [Fri, 9 Nov 2012 21:41:07 +0000 (21:41 +0000)]
Use %s when calling make_dev with a string pointer.  This makes
clang happy.

MFC after: 2 weeks

11 years agoUndo over-aggressive conversion of spaces to tabs. ie: those within
Peter Wemm [Fri, 9 Nov 2012 20:19:56 +0000 (20:19 +0000)]
Undo over-aggressive conversion of spaces to tabs. ie: those within
format strings, "period, space, space" in comment text, etc.

11 years agoReduce LLVM's default stack alignment for i386 from 16 to 4 bytes, as
Dimitry Andric [Fri, 9 Nov 2012 18:56:27 +0000 (18:56 +0000)]
Reduce LLVM's default stack alignment for i386 from 16 to 4 bytes, as
the FreeBSD ABI requires.  This is essentially a revert of upstream llvm
commit r126226, and it will be reverted by upstream too.

MFC after: 1 week

11 years agoSimplify sending keepalives.
Alexander V. Chernikov [Fri, 9 Nov 2012 18:23:38 +0000 (18:23 +0000)]
Simplify sending keepalives.
Prepare ipfw_tick() to be used by other consumers.

Reviewed by: ae(basically)
MFC after: 2 weeks

11 years agoComplete MPSAFE VFS interface and remove MNTK_MPSAFE flag.
Attilio Rao [Fri, 9 Nov 2012 18:02:25 +0000 (18:02 +0000)]
Complete MPSAFE VFS interface and remove MNTK_MPSAFE flag.
Porters should refer to __FreeBSD_version 1000021 for this change as
it may have happened at the same timeframe.

11 years agoDont compile some files in drm with -finline-limit=1350. GCC 4.2.1 doesnt
Roman Divacky [Fri, 9 Nov 2012 17:46:07 +0000 (17:46 +0000)]
Dont compile some files in drm with -finline-limit=1350. GCC 4.2.1 doesnt
need that and clang does not support that. This effectively reverts r126542.

11 years agoFix LOW and FULL speed USB INTERRUPT endpoint support for the
Hans Petter Selasky [Fri, 9 Nov 2012 16:28:58 +0000 (16:28 +0000)]
Fix LOW and FULL speed USB INTERRUPT endpoint support for the
DWC OTG driver. Fix a hang issue when using LOW and FULL speed
BULK traffic. Make sure we don't ask for data in the last
microframe. This allows using devices like USB mice and USB
keyboards connected to the RPI-B.

Suggested by: gonzo @

11 years agoDo not try to enable new features in the %cr4 if running under
Konstantin Belousov [Fri, 9 Nov 2012 16:00:30 +0000 (16:00 +0000)]
Do not try to enable new features in the %cr4 if running under
hypervisor.  Apparently, hypervisors failed to filter out 'Standard
Extended Features' report from CPUID, but deliver #gp when
corresponding bit in %cr4 is toggled.

This shall be reconsidered later, after hypervisors correct the bug.

Reported and tested by: joel
Reviewed by: avg
MFC after: 2 weeks

11 years agoGive tw_osl_dbg_printf format string to pacify clang warning.
Roman Divacky [Fri, 9 Nov 2012 15:29:52 +0000 (15:29 +0000)]
Give tw_osl_dbg_printf format string to pacify clang warning.

11 years agoGive device_printf format string to pacify clang warning.
Roman Divacky [Fri, 9 Nov 2012 14:58:26 +0000 (14:58 +0000)]
Give device_printf format string to pacify clang warning.

11 years agoCast VIA_READ to (void) where the result is unused.
Roman Divacky [Fri, 9 Nov 2012 14:46:23 +0000 (14:46 +0000)]
Cast VIA_READ to (void) where the result is unused.

11 years agoRemove unused static mn_timeout.
Roman Divacky [Fri, 9 Nov 2012 14:14:51 +0000 (14:14 +0000)]
Remove unused static mn_timeout.

11 years agoGive panic format string to pacify clang warning.
Roman Divacky [Fri, 9 Nov 2012 13:58:52 +0000 (13:58 +0000)]
Give panic format string to pacify clang warning.

11 years agoBelatedly (by many years!) bump the version numbers in the src/-side
Glen Barber [Fri, 9 Nov 2012 04:52:15 +0000 (04:52 +0000)]
Belatedly (by many years!) bump the version numbers in the src/-side
documentation pages.

Saddened by: this file

11 years ago - Correct rev 242734, segments can sometimes get stuck. Be a bit more
Jeff Roberson [Fri, 9 Nov 2012 04:04:25 +0000 (04:04 +0000)]
 - Correct rev 242734, segments can sometimes get stuck.  Be a bit more
   defensive with segment state.

Reported by:  b. f. <bf1783@googlemail.com>

11 years agoAdd support for Advantech PCI-1602 RS-485/RS-422 serial card
Eitan Adler [Fri, 9 Nov 2012 01:51:06 +0000 (01:51 +0000)]
Add support for Advantech PCI-1602 RS-485/RS-422 serial card

PR: kern/169726
Submitted by: Jan Mikkelsen <janm@transactionware.com>
Approved by: cperciva (implicit)
MFC after: 5 days

11 years agoFix a very incorrect description.
Adrian Chadd [Fri, 9 Nov 2012 01:28:11 +0000 (01:28 +0000)]
Fix a very incorrect description.

11 years agoReplace spaces by tabs where appropriate.
Greg Lehey [Thu, 8 Nov 2012 23:46:15 +0000 (23:46 +0000)]
Replace spaces by tabs where appropriate.

Reminded by: jh@

11 years agoReplace spaces with tabs where appropriate.
Greg Lehey [Thu, 8 Nov 2012 23:45:19 +0000 (23:45 +0000)]
Replace spaces with tabs where appropriate.

Reminded by: jh@

11 years agoShrink boot2 by 8 bytes, by eliminating some unneeded instructions in
Dimitry Andric [Thu, 8 Nov 2012 23:21:02 +0000 (23:21 +0000)]
Shrink boot2 by 8 bytes, by eliminating some unneeded instructions in
sio.S.  This is not particularly needed for head right now, but it is
intended to merge to stable/9, to fix boot2 build with clang there.

Reviewed by: avg
MFC after: 3 days

11 years agoFix the build - fix up the ath_alq code to not compile by default.
Adrian Chadd [Thu, 8 Nov 2012 23:11:59 +0000 (23:11 +0000)]
Fix the build - fix up the ath_alq code to not compile by default.

11 years agoNot only load pccard_ether settings, also load network settings. This
Nick Hibma [Thu, 8 Nov 2012 20:34:12 +0000 (20:34 +0000)]
Not only load pccard_ether settings, also load network settings. This
is only a problem when a /etc/rc.conf.d/network file is being used.

PR: conf/160373
Submitted by: n_hibma
MFC after: 1 week

11 years agoAdd some hooks into the driver to attach, detach and record EDMA descriptor
Adrian Chadd [Thu, 8 Nov 2012 18:11:31 +0000 (18:11 +0000)]
Add some hooks into the driver to attach, detach and record EDMA descriptor
events.

This is primarily for the TX EDMA and TX EDMA completion. I haven't yet
tied it into the EDMA RX path or the legacy TX/RX path.

Things that I don't quite like:

* Make the pointer type 'void' in ath_softc and have if_ath_alq*()
  return a malloc'ed buffer.  That would remove the need to include
  if_ath_alq.h in if_athvar.h.
* The sysctl setup needs to be cleaned up.

11 years agoAdd my initial cut at driver-layer ALQ support.
Adrian Chadd [Thu, 8 Nov 2012 18:07:29 +0000 (18:07 +0000)]
Add my initial cut at driver-layer ALQ support.

I'm using this to debug EDMA TX and RX descriptors and it's really helpful
to have a non-printf() way to decode frames.

I won't link this into the build until I've tidied it up a little more.

This will eventually be behind ATH_DEBUG_ALQ.

11 years agoOops, fix bogus spacing.
Adrian Chadd [Thu, 8 Nov 2012 17:46:27 +0000 (17:46 +0000)]
Oops, fix bogus spacing.

11 years agoImplement the ATH_RESET_NOLOSS path for TX stop and start; this is needed
Adrian Chadd [Thu, 8 Nov 2012 17:43:58 +0000 (17:43 +0000)]
Implement the ATH_RESET_NOLOSS path for TX stop and start; this is needed
for 802.11n TX device restarting.

Remove the debug printf()s; they're no longer needed here.

11 years agoConvert this to a debug printf; it's working fine now.
Adrian Chadd [Thu, 8 Nov 2012 17:32:55 +0000 (17:32 +0000)]
Convert this to a debug printf; it's working fine now.

11 years agoMake the USB ethernet methods constant again in if_udav.c,
Hans Petter Selasky [Thu, 8 Nov 2012 16:31:13 +0000 (16:31 +0000)]
Make the USB ethernet methods constant again in if_udav.c,
so that both adapter variants can be attached at the same
time.

MFC after: 0 days

11 years agosh: Add tests for modifying an alias (r242766).
Jilles Tjoelker [Thu, 8 Nov 2012 13:36:19 +0000 (13:36 +0000)]
sh: Add tests for modifying an alias (r242766).

Note: parser/alias10.0 will eat a lot of memory/cpu time when it fails (with
the old sh).

11 years agosh: Fix two issues when an alias is redefined:
Jilles Tjoelker [Thu, 8 Nov 2012 13:33:48 +0000 (13:33 +0000)]
sh: Fix two issues when an alias is redefined:

 * The last character is not displayed.
 * If the alias ends with itself (as a word), an infinite memory-eating loop
   occurs.

If an alias is defined initially, a space is appended to avoid recursion but
this did not happen when an alias was later modified.

PR: bin/173418
Submitted by: Daniel F.
MFC after: 1 week

11 years agoAdd new USB device ID.
Kevin Lo [Thu, 8 Nov 2012 09:29:05 +0000 (09:29 +0000)]
Add new USB device ID.

11 years agoMake r242655 build on sparc64. While at it, make vm_{max,min}_kernel_address
Marius Strobl [Thu, 8 Nov 2012 08:10:32 +0000 (08:10 +0000)]
Make r242655 build on sparc64. While at it, make vm_{max,min}_kernel_address
vm_offset_t as they should be.

11 years agoReduce differences between these two initarms a bit more.
Warner Losh [Thu, 8 Nov 2012 04:02:36 +0000 (04:02 +0000)]
Reduce differences between these two initarms a bit more.

11 years agoCleanup some whitspace in this file to get it out of an upcoming patch.
Bjoern A. Zeeb [Thu, 8 Nov 2012 03:29:55 +0000 (03:29 +0000)]
Cleanup some whitspace in this file to get it out of an upcoming patch.

MFC after: 10 days

11 years agoZero the newly allocated md(4) swap-backed page to prevent random
Konstantin Belousov [Thu, 8 Nov 2012 03:17:41 +0000 (03:17 +0000)]
Zero the newly allocated md(4) swap-backed page to prevent random
kernel memory leakage to userspace. For the typical use, when a
filesystem put on the md disk, the change only results in CPU and
memory bandwidth spent to zero the page, since filsystems make sure
that user never see unwritten content.  But if md disk is used as raw
device by userspace, the garbage is exposed.

Reported by: Paul Schenkeveld <freebsd@psconsult.nl>
MFC after: 2 weeks

11 years agoMake parameters to -c and -k options optional. If no parameters are
Greg Lehey [Thu, 8 Nov 2012 02:55:30 +0000 (02:55 +0000)]
Make parameters to -c and -k options optional.  If no parameters are
supplied, print information for all keywords.

Improve output of -c option, in particular in conjunction with -k
option.

MFC after: 14 days

11 years agoClarify that the ' flag is an apostrophe.
Greg Lehey [Thu, 8 Nov 2012 02:01:04 +0000 (02:01 +0000)]
Clarify that the ' flag is an apostrophe.

MFC after: 2 weeks

11 years agoAdd DTrace to 32-bit PowerPC GENERIC now.
Justin Hibbits [Thu, 8 Nov 2012 01:51:23 +0000 (01:51 +0000)]
Add DTrace to 32-bit PowerPC GENERIC now.

MFC after: 1 month

11 years ago - Change ULE to use dynamic slice sizes for the timeshare queue in order
Jeff Roberson [Thu, 8 Nov 2012 01:46:47 +0000 (01:46 +0000)]
 - Change ULE to use dynamic slice sizes for the timeshare queue in order
   to further reduce latency for threads in this queue.  This should help
   as threads transition from realtime to timeshare.  The latency is
   bound to a max of sched_slice until we have more than sched_slice / 6
   threads runnable.  Then the min slice is allotted to all threads and
   latency becomes (nthreads - 1) * min_slice.

Discussed with: mav

11 years ago - Implement BIO_FLUSH support around journal entries. This will not 100%
Jeff Roberson [Thu, 8 Nov 2012 01:41:04 +0000 (01:41 +0000)]
 - Implement BIO_FLUSH support around journal entries.  This will not 100%
   solve power loss problems with dishonest write caches.  However, it
   should improve the situation and force a full fsck when it is unable
   to resolve with the journal.
 - Resolve a case where the journal could wrap in an unsafe way causing
   us to prematurely lose journal entries in very specific scenarios.

Discussed with: mckusick
MFC after: 1 month

11 years agoUse .PATH instead of VPATH.
Kevin Lo [Thu, 8 Nov 2012 01:35:02 +0000 (01:35 +0000)]
Use .PATH instead of VPATH.

Reviewed by: gnn,rwatson

11 years agoICMPV6_FILTER should read ICMP6_FILTER.
Xin LI [Thu, 8 Nov 2012 00:54:43 +0000 (00:54 +0000)]
ICMPV6_FILTER should read ICMP6_FILTER.

Submitted by: Frédéric Perrin <frederic.perrin resel.fr>
MFC after: 2 weeks

11 years ago- Current caching mode is completely broken because it simply relies
Attilio Rao [Thu, 8 Nov 2012 00:32:49 +0000 (00:32 +0000)]
- Current caching mode is completely broken because it simply relies
  on timing of the operations and not real lookup, bringing too many
  false positives. Remove the whole mechanism. If it needs to be
  implemented, next time it should really be done in the proper way.
- Fix VOP_GETATTR() in order to cope with userland bugs that would
  change the type of file and not panic. Instead it gets the entry as
  if it is not existing.

Reported and tested by: flo
MFC after: 2 months
X-MFC: 241519, 242536,242616

11 years agoAdd support for SCSI pass through devices to be attached and
Doug Ambrisko [Thu, 8 Nov 2012 00:32:36 +0000 (00:32 +0000)]
Add support for SCSI pass through devices to be attached and
detached.

PR: 172864
Submitted by: rstone@

11 years agoAdd y flag and environment variable LS_SAMESORT to specify the same
Greg Lehey [Thu, 8 Nov 2012 00:24:26 +0000 (00:24 +0000)]
Add y flag and environment variable LS_SAMESORT to specify the same
sorting order for time and name with the -t option.  IEEE Std 1003.2
(POSIX.2) mandates that the -t option sort in descending order, and
that if two files have the same timestamp, they should be sorted in
ascending order of their names.  The -r flag reverses both of these
sort orders, so they're never the same.  This creates significant
problems for sequentially named files stored on FAT file systems,
where it can be impossible to list them in the order in which they
were created.

Add , (comma) option to print file sizes grouped and separated by
thousands using the non-monetary separator returned by localeconv(3),
typically a comma or period.

MFC after:  14 days

11 years agoUpdate AP96 to directly attach an arswitch.
Adrian Chadd [Wed, 7 Nov 2012 23:50:28 +0000 (23:50 +0000)]
Update AP96 to directly attach an arswitch.

11 years agoImplement DTrace for PowerPC. This includes both 32-bit and 64-bit.
Justin Hibbits [Wed, 7 Nov 2012 23:45:09 +0000 (23:45 +0000)]
Implement DTrace for PowerPC.  This includes both 32-bit and 64-bit.

There is one known issue:  Some probes will display an error message along the
lines of:  "Invalid address (0)"

I tested this with both a simple dtrace probe and dtruss on a few different
binaries on 32-bit.  I only compiled 64-bit, did not run it, but I don't expect
problems without the modules loaded.  Volunteers are welcome.

MFC after: 1 month

11 years agoSort option parsing as far as practical.
Greg Lehey [Wed, 7 Nov 2012 23:37:24 +0000 (23:37 +0000)]
Sort option parsing as far as practical.

11 years agosh: Test that a redefined alias works.
Jilles Tjoelker [Wed, 7 Nov 2012 23:15:36 +0000 (23:15 +0000)]
sh: Test that a redefined alias works.

11 years agoUse information about suported diagnostic pages to avoid reading optional
Alexander Motin [Wed, 7 Nov 2012 23:12:53 +0000 (23:12 +0000)]
Use information about suported diagnostic pages to avoid reading optional
Element Descriptor page if it is not supported.  This removes one error
message from verbose logs during boot on systems with some enclosures.

Sponsored by: iXsystems, Inc.

11 years agoAnnounce diagnostic page 7 (Element Descriptor) support.
Alexander Motin [Wed, 7 Nov 2012 22:53:46 +0000 (22:53 +0000)]
Announce diagnostic page 7 (Element Descriptor) support.

11 years agoHint miibus to attach arswitch on AP91, AP93 and RSPRO boards.
Aleksandr Rybalko [Wed, 7 Nov 2012 22:46:30 +0000 (22:46 +0000)]
Hint miibus to attach arswitch on AP91, AP93 and RSPRO boards.

Submitted by: Luiz Otavio O Souza
Approved by: adrian (menthor)

11 years agoFor kernel builds with PROFLEVEL >= 2, such as LINT, don't attempt to
Dimitry Andric [Wed, 7 Nov 2012 22:45:34 +0000 (22:45 +0000)]
For kernel builds with PROFLEVEL >= 2, such as LINT, don't attempt to
use the -mprofiler-epilogue option if the compiler is clang, as the flag
is not supported.  While here, fix up the value indentations.

MFC after: 1 week

11 years agoDisable automatic attachment of arswitch. It can't be auto-detected (like PHYs
Aleksandr Rybalko [Wed, 7 Nov 2012 22:43:09 +0000 (22:43 +0000)]
Disable automatic attachment of arswitch. It can't be auto-detected (like PHYs
do) and cause a problems trying to attach another instance to child mdio.

Submitted by: Luiz Otavio O Souza
Approved by: adrian (menthor)

11 years agoFor kernel builds with PROFLEVEL >= 1, such as LINT, don't attempt to
Dimitry Andric [Wed, 7 Nov 2012 22:15:28 +0000 (22:15 +0000)]
For kernel builds with PROFLEVEL >= 1, such as LINT, don't attempt to
use the -falign-functions option if the compiler is clang, as the flag
is not supported.

MFC after: 1 week

11 years agoAdd per outgoing stream accounting for chunks in the send
Michael Tuexen [Wed, 7 Nov 2012 22:11:38 +0000 (22:11 +0000)]
Add per outgoing stream accounting for chunks in the send
and sent queue. This provides no functional change, but is
a preparation for an upcoming stream reset improvement.
Done with rrs@.

MFC after: 1 week

11 years agoSimple unit-tests for libcrypt, to show how easy it is.
Simon J. Gerraty [Wed, 7 Nov 2012 22:03:59 +0000 (22:03 +0000)]
Simple unit-tests for libcrypt, to show how easy it is.

Approved by: marcel (mentor)

11 years agoAdd ATF and reformat to ease reviews
Simon J. Gerraty [Wed, 7 Nov 2012 22:02:53 +0000 (22:02 +0000)]
Add ATF and reformat to ease reviews

Approved by: marcel (mentor)

11 years agoEnable ATF testing.
Simon J. Gerraty [Wed, 7 Nov 2012 22:02:02 +0000 (22:02 +0000)]
Enable ATF testing.

Submitted by: Garrett Cooper
Approved by: marcel (mentor)

11 years agoLatest progs.mk from crufty.net for ATF
Simon J. Gerraty [Wed, 7 Nov 2012 21:44:04 +0000 (21:44 +0000)]
Latest progs.mk from crufty.net for ATF

Approved by: marcel (mentor)

11 years agoAdd some missing changes missed in the last commit.
Michael Tuexen [Wed, 7 Nov 2012 21:25:32 +0000 (21:25 +0000)]
Add some missing changes missed in the last commit.

MFC after: 1 week
X-MFC with: 242708

11 years agoImprove PR-SCTP if used in combination with NR-SACK.
Michael Tuexen [Wed, 7 Nov 2012 20:59:00 +0000 (20:59 +0000)]
Improve PR-SCTP if used in combination with NR-SACK.
Based on work done by Mohammad Rajiullah.

MFC after: 1 week

11 years agoBelatedly add links from /usr/bin/clang to /usr/bin/CC, like it has been
Dimitry Andric [Wed, 7 Nov 2012 20:03:45 +0000 (20:03 +0000)]
Belatedly add links from /usr/bin/clang to /usr/bin/CC, like it has been
done for g++.

MFC after: 3 days

11 years agoPut in a band-aid to get the pc98 bootstraps building, now clang is the
Dimitry Andric [Wed, 7 Nov 2012 19:51:53 +0000 (19:51 +0000)]
Put in a band-aid to get the pc98 bootstraps building, now clang is the
default compiler.  This has two parts:
- Make sys/boot/pc98/boot2 always build with gcc for now, until we can
  figure out a way to shrink it enough when building with clang.
- Since sys/boot/p98/cdboot uses .code16 directives, which are not yet
  supported by clang's integrated assembler, use -no-integrated-as,
  similar to sys/boot/i386/cdboot.

Reviewed by: nyan
MFC after: 1 week

11 years agoActually change "silent" to "silence" this time (reviewed by adri@).
Warren Block [Wed, 7 Nov 2012 19:32:21 +0000 (19:32 +0000)]
Actually change "silent" to "silence" this time (reviewed by adri@).

MFC after: 1 week

11 years agoRemove fifteen-year-old notes on media selection (suggested by simon@).
Warren Block [Wed, 7 Nov 2012 19:26:32 +0000 (19:26 +0000)]
Remove fifteen-year-old notes on media selection (suggested by simon@).
Add commas after "e.g." and "i.e.".  Change "silent" to "silence" in
wireless create section (reviewed by adri@).

MFC after: 1 week

11 years agoAdd lock asserts instead of "auto-locking".
Hans Petter Selasky [Wed, 7 Nov 2012 18:59:42 +0000 (18:59 +0000)]
Add lock asserts instead of "auto-locking".

MFC after: 1 weeks
Suggested by: ed @

11 years agoThe tty_inwakeup callback appears to be called both locked and unlocked.
Hans Petter Selasky [Wed, 7 Nov 2012 18:44:05 +0000 (18:44 +0000)]
The tty_inwakeup callback appears to be called both locked and unlocked.
Handle the required locking automatically for now.

MFC after: 1 weeks

11 years agoMinor cosmetic changes to bring atmel's initarm and the default
Warner Losh [Wed, 7 Nov 2012 16:59:12 +0000 (16:59 +0000)]
Minor cosmetic changes to bring atmel's initarm and the default
initarm for FDT closer together.  More to follow.

11 years agoDon't compile in my (not yet committed) ath_alq code unless ATH_DEBUG_ALQ
Adrian Chadd [Wed, 7 Nov 2012 16:34:09 +0000 (16:34 +0000)]
Don't compile in my (not yet committed) ath_alq code unless ATH_DEBUG_ALQ
is defined.

This will unbreak ATH_DEBUG builds.

11 years agoAdd devd.conf(5) and devd(8) to SEE ALSO xrefs. Give users a pointer to
Warren Block [Wed, 7 Nov 2012 15:59:24 +0000 (15:59 +0000)]
Add devd.conf(5) and devd(8) to SEE ALSO xrefs.  Give users a pointer to
seemingly mysterious actions that are not done by ifconfig itself, but
by devd triggering on events caused by ifconfig.

PR: docs/173405
Submitted by: Mateusz Kwiatkowski <mateusz.kwiatkowski@atlashost.eu>
MFC after: 1 week

11 years agoDocument all of the options that wpa_supplicant accepts.
Isabell Long [Wed, 7 Nov 2012 15:47:36 +0000 (15:47 +0000)]
Document all of the options that wpa_supplicant accepts.

PR: docs/171755
Reviewed by: gavin
Approved by: gabor (mentor)
MFC after: 5 days

11 years agoPatch to improve USB serial console.
Hans Petter Selasky [Wed, 7 Nov 2012 08:13:56 +0000 (08:13 +0000)]
Patch to improve USB serial console.

MFC after: 1 weeks
Submitted by: Bruce Evans

11 years agoMerge rev. 1.125 from OpenBSD:
Gleb Smirnoff [Wed, 7 Nov 2012 07:35:05 +0000 (07:35 +0000)]
Merge rev. 1.125 from OpenBSD:
  date: 2009/06/12 02:03:51;  author: dlg;  state: Exp;  lines: +59 -69
  rewrite the way states from pfsync are merged into the local state tree
  and the conditions on which pfsync will notify its peers on a stale update.

  each side (ie, the sending and receiving side) of the state update is
  compared separately. any side that is further along than the local state
  tree is merged. if any side is further along in the local state table, an
  update is sent out telling the peers about it.

11 years agoIt may happen that pfsync holds the last reference on a state. In this
Gleb Smirnoff [Wed, 7 Nov 2012 07:30:40 +0000 (07:30 +0000)]
It may happen that pfsync holds the last reference on a state. In this
case keys had already been freed. If encountering such state, then
just release last reference.

Not sure this can happen as a runtime race, but can be reproduced by
the following scenario:

- enable pfsync
- disable pfsync
- wait some time
- enable pfsync

11 years agoFix typo; s/ouput/output
Kevin Lo [Wed, 7 Nov 2012 07:00:59 +0000 (07:00 +0000)]
Fix typo; s/ouput/output

11 years agoNm ipsec
Kevin Lo [Wed, 7 Nov 2012 06:53:44 +0000 (06:53 +0000)]
Nm ipsec

11 years agoDisable my software queue TIM and PS handling for now.
Adrian Chadd [Wed, 7 Nov 2012 06:29:45 +0000 (06:29 +0000)]
Disable my software queue TIM and PS handling for now.

ps-poll is totally broken in its current form.

This should unbreak things enough to let people use PS-POLL devices,
but leave it in place for me to finish PS-POLL handling.

11 years agoAdd new HAL configuration features for the updated AR9300 HAL.
Adrian Chadd [Wed, 7 Nov 2012 06:23:23 +0000 (06:23 +0000)]
Add new HAL configuration features for the updated AR9300 HAL.

11 years agoHook in new files menusets.4th and manual.
Devin Teske [Wed, 7 Nov 2012 02:14:03 +0000 (02:14 +0000)]
Hook in new files menusets.4th and manual.

Approved by: adrian (co-mentor) (implicit)

11 years agoRemove -L<path> from LDADD, it doesn't belong there.
Marcel Moolenaar [Wed, 7 Nov 2012 00:23:51 +0000 (00:23 +0000)]
Remove -L<path> from LDADD, it doesn't belong there.
Add it to LDFLAGS instead.

Submitted by:   Garrett Cooper <yanegomi@gmail.com>

11 years agoThe first line must contain "Content-Type:". Move the $FreeBSD$
Marcel Moolenaar [Wed, 7 Nov 2012 00:19:30 +0000 (00:19 +0000)]
The first line must contain "Content-Type:". Move the $FreeBSD$
keyword line to the comment block underneath.

Submitted by: Garrett Cooper <yanegomi@gmail.com>

11 years ago- Extend the prior commit to use the generic SCSI command building
Doug Ambrisko [Tue, 6 Nov 2012 23:25:06 +0000 (23:25 +0000)]
- Extend the prior commit to use the generic SCSI command building
  function use that for JBOD and Thunderbolt disk write command.  Now
  we only have one implementation in mfi.
- Fix dumping on Thunderbolt cards.  Polled IO commands do not seem to
  be normally acknowledged by changing cmd_status to MFI_STAT_OK.
  In order to get acknowledgement of the IO is complete, the Thunderbolt
  command queue needs to be run through.  I added a flag MFI_CMD_SCSI
  to indicate this command is being polled and to complete the
  Thunderbolt wrapper and indicate the result.  This flag needs to be
  set in the JBOD case in case if that us using Thunderbolt card.
  When in the polling loop check for completed commands.
- Remove mfi_tbolt_is_ldio and just do the check when needed.
- Fix an issue when attaching of disk device happens when a device is
  already scheduled to be attached but hasn't attached.
- add a tunable to allow raw disk attachment to CAM via:
        hw.mfi.allow_cam_disk_passthrough=1
- fixup aborting of commands (AEN and LD state change).  Use a generic
  abort function and only wait the command being aborted not both.
  Thunderbolt cards don't seem to abort commands so the abort times
  out.

11 years agoFix possible spurious sbunlock in sctp_sorecvmsg.
Mateusz Guzik [Tue, 6 Nov 2012 23:04:23 +0000 (23:04 +0000)]
Fix possible spurious sbunlock in sctp_sorecvmsg.

Reviewed by: tuexen
Approved by: trasz (mentor)
MFC after: 3 days

11 years agoWork around a race in bpfread() by validating the hold buffer pointer
Guy Helmer [Tue, 6 Nov 2012 21:07:04 +0000 (21:07 +0000)]
Work around a race in bpfread() by validating the hold buffer pointer
before freeing it. Otherwise, we can lose a buffer and cause a panic
in catchpacket().

11 years agoMake sure the inp hasn't been dropped before trying to access its socket
Navdeep Parhar [Tue, 6 Nov 2012 20:22:39 +0000 (20:22 +0000)]
Make sure the inp hasn't been dropped before trying to access its socket
and tcpcb.

MFC after: 3 days

11 years agoFix funny comment.
Devin Teske [Tue, 6 Nov 2012 19:51:54 +0000 (19:51 +0000)]
Fix funny comment.

Approved by: adrian (co-mentor) (implicit)

11 years agoFix c/p error in comment.
Devin Teske [Tue, 6 Nov 2012 19:50:45 +0000 (19:50 +0000)]
Fix c/p error in comment.

Approved by: adrian (co-mentor) (implicit)

11 years agoAdd ontop of my existing boot loader Forth code, including support for
Devin Teske [Tue, 6 Nov 2012 19:26:36 +0000 (19:26 +0000)]
Add ontop of my existing boot loader Forth code, including support for
submenus. See menusets.4th(8) for additional details including examples.

Discussed on arch and recommended for inclusion at the devsummit.

This change does not alter the appearance or user experience, only enhances
possibilities.

Reviewed by: adrian (co-mentor)
Approved by: adrian (co-mentor)

11 years agoRemove the tid from the software table (and bump down the in-use
Navdeep Parhar [Tue, 6 Nov 2012 18:58:57 +0000 (18:58 +0000)]
Remove the tid from the software table (and bump down the in-use
counter) when the syncache doesn't want the driver to reply to an
incoming SYN.  This fixes a harmless bug where tids_in_use would
go out of sync with the hardware counter.

MFC after: 3 days

11 years agoFix typo in bsd.compiler.mk.
Dimitry Andric [Tue, 6 Nov 2012 07:51:20 +0000 (07:51 +0000)]
Fix typo in bsd.compiler.mk.

11 years agoConvert the aggregate descriptor path over to use the same API as
Adrian Chadd [Tue, 6 Nov 2012 06:19:11 +0000 (06:19 +0000)]
Convert the aggregate descriptor path over to use the same API as
the non-aggregate path.

I "cheated" by using some TX setup code in our HAL that isn't present
in the atheros HAL (or Linux ath9k.)

The old path for forming aggregates was:

* setup the rate control in the first descriptor;
* call chaintxdesc() on all the frames;
* call setupfirsttxdesc() on the first descrpitor in the first
  frame;
* call setuplasttxdesc() on the last descriptor in the last frame.

The new path for forming aggregates looks like the non-aggregate path:

* call setuptxdesc() on the first descriptor in the first frame;
* setup the rate control in the first descriptor;
* call filltxdesc() on each descriptor in the frame;
* if it's an aggregate - call set11n_aggr_{first, middle, last} as
  appropriate (see the code for a description of what is "appropriate".)

Now, this is done primarily for the AR9300 HAL - it doesn't implement
the first set of aggregate functions.  It just has the older methods
and the "first/middle/last" aggregate methods.  So, let's convert the
code to use these.

Note: the AR5416 HAL in FreeBSD had that code (from me, a while ago)
and a previous commit brought it up to behave the same as the AR9300
HAL routines.

There's some further tidyups to be done - specifically, avoid doing
multiple calls to the 11n descriptor functions. I shouldn't call
clr11n_aggr(), then set11n_aggr_middle(), then also set11n_aggr_first().
On (at least MIPS) the TX descriptors are in non-cachable memory and
this will cause multiple slow writes.

I'll debug/tidy that up in a future commit.

Tested:

* AR9280, STA
* AR9280/AR9160, AP
* AR9380, STA (using a local, closed source HAL, sorry!)

11 years agoexport VM_MIN_KERNEL_ADDRESS and VM_MAX_KERNEL_ADDRESS via sysctl.
Alfred Perlstein [Tue, 6 Nov 2012 04:10:32 +0000 (04:10 +0000)]
export VM_MIN_KERNEL_ADDRESS and VM_MAX_KERNEL_ADDRESS via sysctl.

On several platforms the are determined by too many nested #defines to be
easily discernible.  This will aid in development of auto-tuning.

11 years agoDecode common state bits in getencstat output.
Alexander Motin [Tue, 6 Nov 2012 01:29:26 +0000 (01:29 +0000)]
Decode common state bits in getencstat output.

11 years agoAdd myself as a new src committer
Bryan Venteicher [Tue, 6 Nov 2012 00:41:59 +0000 (00:41 +0000)]
Add myself as a new src committer

Approved by: grehan (mentor)

11 years agoAdd -c option to sesd to make it clear enclosure status after reading it
Alexander Motin [Tue, 6 Nov 2012 00:22:33 +0000 (00:22 +0000)]
Add -c option to sesd to make it clear enclosure status after reading it
in case if it is not permanent and was fixed.

11 years agoRise priority of the informational messages from LOG_INFO to LOG_NOTICE,
Alexander Motin [Mon, 5 Nov 2012 23:20:48 +0000 (23:20 +0000)]
Rise priority of the informational messages from LOG_INFO to LOG_NOTICE,
same as used for OK status. Otherwise it looks strange when OK status is
reported, while informational is not.

11 years agoAllow CC to be gcc46 or similar by matching gcc*.
Brooks Davis [Mon, 5 Nov 2012 23:05:14 +0000 (23:05 +0000)]
Allow CC to be gcc46 or similar by matching gcc*.

Don't test the value of the :M matches, either the string matches or does
not.

11 years agoAdd assertion to enforce 'nat global' locking requierements changed by r241908.
Alexander V. Chernikov [Mon, 5 Nov 2012 22:54:00 +0000 (22:54 +0000)]
Add assertion to enforce 'nat global' locking requierements changed by r241908.

Suggested by: adrian, glebius
MFC after: 3 days