]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoAdd information about the values and default setting of the
Rebecca Cran [Tue, 26 Oct 2010 16:49:18 +0000 (16:49 +0000)]
Add information about the values and default setting of the
kern.cam.ada.spindown_shutdown sysctl.

MFC after: 3 weeks

13 years agoRemove usage of PRI* macro for style compliancy.
Attilio Rao [Tue, 26 Oct 2010 16:16:15 +0000 (16:16 +0000)]
Remove usage of PRI* macro for style compliancy.

Requested by: bde, jhb
Sponsored by: Sandvine Incorporated

13 years agoBugfix merge from OpenSolaris:
Martin Matuska [Tue, 26 Oct 2010 15:48:03 +0000 (15:48 +0000)]
Bugfix merge from OpenSolaris:

OpenSolaris onnv-revision: 10209:91f47f0e7728
6830541 zfs_get_data_trips on a verify
6696242 multiple zfs_fillpage() zfs: accessing past end of object panics
6785914 zfs fails to drop dn_struct_rwlock in recovery code path

Approved by: delphij (mentor)
Obtained from: OpenSolaris (Bug ID 683054166962426785914)
MFC after: 2 weeks

13 years agoMinor grammar fix.
Glen Barber [Tue, 26 Oct 2010 13:07:01 +0000 (13:07 +0000)]
Minor grammar fix.

Submitted by: arundel (via email)
Approved by: jkois (mentor)
Patch by: arundel
MFC after: 5 days

13 years agoMerge dump_machdep.c i386/amd64 under the x86 subtree.
Attilio Rao [Tue, 26 Oct 2010 12:46:26 +0000 (12:46 +0000)]
Merge dump_machdep.c i386/amd64 under the x86 subtree.

Sponsored by: Sandvine Incorporated
Tested by: gianni

13 years agoBug fix delta to the em driver:
Jack F Vogel [Tue, 26 Oct 2010 00:07:58 +0000 (00:07 +0000)]
Bug fix delta to the em driver:
- Chasin down bogus watchdogs has led to an improved
  design to this handling, the hang decision takes
  place in the tx cleanup, with only a simple report
  check in local_timer. Our tests have shown no false
  watchdogs with this code.
- VLAN fixes from jhb, the shadow vfta should be per
  interface, but as global it was not. Thanks John.
- Bug fixes in the support for new PCH2 hardware.
- Thanks for all the help and feedback on the driver,
  changes to lem with be coming shortly as well.

13 years agoBring vfs.ufs.dirhash_maxmem into the age of the fruitbat and make it
Ivan Voras [Mon, 25 Oct 2010 21:46:23 +0000 (21:46 +0000)]
Bring vfs.ufs.dirhash_maxmem into the age of the fruitbat and make it
autotuned. It is only an upper bound (the memory is not always allocated)
and the system contains a vm_lowmem handler so nothing will crash and burn
if it's tuned too high.

Reviewed by: mckusick

13 years ago- Given that in one-shot mode tick_et_start() also is called frequently
Marius Strobl [Mon, 25 Oct 2010 20:52:33 +0000 (20:52 +0000)]
- Given that in one-shot mode tick_et_start() also is called frequently
  introduce function pointers once set up to the respective implementation
  for reading the (S)TICK and writing the (S)STICK_COMPARE registers as a
  compromise between duplicating code and selecting between different
  implementations during execution over and over again, similar to what is
  done elsewhere in the MD in order to support different CPU models that
  won't ever change at runtime.
- In the remaining tick interrupt handler further push down disabling of
  interrupts to the periodic case as it isn't necessary here in one-shot
  mode at all.

13 years agoReimplemented "gpart destroy -F". Now it does all work in kernel.
Andrey V. Elsukov [Mon, 25 Oct 2010 16:23:35 +0000 (16:23 +0000)]
Reimplemented "gpart destroy -F". Now it does all work in kernel.
This was needed for recover implementation.

Implement the recover command for GPT. Now GPT will marked as
corrupt when any of three types of corruption will be detected:
1. Damaged primary GPT header or table
2. Damaged secondary GPT header or table
3. Secondary header is not located in the last LBA
Marked GPT becomes read-only. Any changes with corrupt table
are prohibited. Only "destroy" and "recover" commands are allowed.

Discussed with: geom@ (mostly silence)
Tested by: Ilya A. Arhipov
Approved by: mav (mentor)
MFC after: 2 weeks

13 years agoFix typo in comment.
Thomas Quinot [Mon, 25 Oct 2010 16:11:37 +0000 (16:11 +0000)]
Fix typo in comment.

13 years agoThe EHCI_CAPLENGTH and EHCI_HCIVERSION registers are actually sub-registers
Nathan Whitehorn [Mon, 25 Oct 2010 15:51:43 +0000 (15:51 +0000)]
The EHCI_CAPLENGTH and EHCI_HCIVERSION registers are actually sub-registers
within the first 4 bytes of the EHCI memory space. For controllers that
use big-endian MMIO, reading them with 1- and 2-byte reads would then
return the wrong values. Instead, read the combined register with a 4-byte
read and mask out the interesting quantities.

13 years agoDon't create spurious /dev entries.
Nathan Whitehorn [Mon, 25 Oct 2010 15:41:12 +0000 (15:41 +0000)]
Don't create spurious /dev entries.

Submitted by: andreast

13 years agoUse 'saveintr' instead of 'savecrit' or 'eflags' to hold the state returned
John Baldwin [Mon, 25 Oct 2010 15:31:13 +0000 (15:31 +0000)]
Use 'saveintr' instead of 'savecrit' or 'eflags' to hold the state returned
by intr_disable().

Requested by: bde

13 years agoUse intr_disable() and intr_restore() instead of frobbing the flags register
John Baldwin [Mon, 25 Oct 2010 15:28:03 +0000 (15:28 +0000)]
Use intr_disable() and intr_restore() instead of frobbing the flags register
directly to disable interrupts.

Reviewed by: bde (earlier version)
MFC after: 2 weeks

13 years agoReduce the difference between hirunningspace and lorunningspace,
Ivan Voras [Mon, 25 Oct 2010 14:05:25 +0000 (14:05 +0000)]
Reduce the difference between hirunningspace and lorunningspace,
it should help interactivity in edge cases.

13 years agoUse function tdfind() to find a thread.
David Xu [Mon, 25 Oct 2010 13:13:16 +0000 (13:13 +0000)]
Use function tdfind() to find a thread.

13 years agoFix typo.
David Xu [Mon, 25 Oct 2010 11:16:50 +0000 (11:16 +0000)]
Fix typo.

13 years agoGet cpuset in pthread_attr_get_np() and free it in pthread_attr_destroy().
David Xu [Mon, 25 Oct 2010 09:16:04 +0000 (09:16 +0000)]
Get cpuset in pthread_attr_get_np() and free it in pthread_attr_destroy().

MFC after: 7 days

13 years agoFactor out DDB commands from r204145, r204279 into if_debug.c for further
Bjoern A. Zeeb [Mon, 25 Oct 2010 08:30:19 +0000 (08:30 +0000)]
Factor out DDB commands from r204145, r204279 into if_debug.c for further
enhancements (1).  Switch to a standard 2-clause BSD license for this (2).

Unfortunately we have to un-static the ifindex_table for this but do not
publicly export it.

Suggested by: rwatson (1) a while back.
Approved by: thompsa (2) for the change from r204279.
MFC after: 6 days

13 years agoMake hw.snd.vpc_0db to be also a loader tunable.
Alexander Motin [Mon, 25 Oct 2010 08:25:44 +0000 (08:25 +0000)]
Make hw.snd.vpc_0db to be also a loader tunable.

13 years agoAdd missing mtx_destroy() on channel attach failure.
Alexander Motin [Mon, 25 Oct 2010 07:41:21 +0000 (07:41 +0000)]
Add missing mtx_destroy() on channel attach failure.

13 years agoadd dates along with revision numbers in UPDATING entry for 20100915
Andriy Gapon [Mon, 25 Oct 2010 07:39:05 +0000 (07:39 +0000)]
add dates along with revision numbers in UPDATING entry for 20100915

13 years agoDo some whitespace and `identify` output cleanup.
Alexander Motin [Mon, 25 Oct 2010 07:17:07 +0000 (07:17 +0000)]
Do some whitespace and `identify` output cleanup.

Submitted by: arundel
MFC after: 2 weeks

13 years agoAdd Makefile entry to install two new example files.
Julian Elischer [Sun, 24 Oct 2010 23:25:14 +0000 (23:25 +0000)]
Add Makefile entry to install two new example files.

MFC after: 2 weeks

13 years agoAdd a jails directory in the examples section
Julian Elischer [Sun, 24 Oct 2010 23:19:11 +0000 (23:19 +0000)]
Add a jails directory in the examples section

MFC after: 2 weeks

13 years agoAdd two scripts that demonstrate how to make and
Julian Elischer [Sun, 24 Oct 2010 22:59:38 +0000 (22:59 +0000)]
Add two scripts that demonstrate how to make and
hook together jails using teh vortual networking feature.

Submitted by: Yavuz Gokirmak
MFC after: 2 weeks

13 years agosh: Ignore double-quotes in arithmetic rather than treating them as quotes.
Jilles Tjoelker [Sun, 24 Oct 2010 22:25:38 +0000 (22:25 +0000)]
sh: Ignore double-quotes in arithmetic rather than treating them as quotes.

This provides similar behaviour, but allows a simpler parser.

This changes r206473.

Exp-run done by: pav (with some other sh(1) changes)

13 years agosh: Do not allow overriding a special builtin with a function.
Jilles Tjoelker [Sun, 24 Oct 2010 22:03:21 +0000 (22:03 +0000)]
sh: Do not allow overriding a special builtin with a function.
This is a syntax error.

POSIX does not say explicitly whether defining a function with the same name
as a special builtin is allowed, but it does say that it is impossible to
call such a function.

A special builtin can still be overridden with an alias.

This commit is part of a set of changes that will ensure that when
something looks like a special builtin to the parser, it is one. (Not the
other way around, as it remains possible to call a special builtin named
by a variable or other substitution.)

Exp-run done by: pav (with some other sh(1) changes)

13 years agoAdd initial inet DDB support for show in_ifaddr and show sin commands which
Bjoern A. Zeeb [Sun, 24 Oct 2010 22:02:36 +0000 (22:02 +0000)]
Add initial inet DDB support for show in_ifaddr and show sin commands which
proved to be useful while debugging address list problems.

MFC after: 6 days

13 years agoAdd TSO support over VLAN for i82550/i82551. Controller requires
Pyun YongHyeon [Sun, 24 Oct 2010 21:59:51 +0000 (21:59 +0000)]
Add TSO support over VLAN for i82550/i82551. Controller requires
VLAN hardware tagging to make TSO work over VLAN. So if VLAN
hardware tagging is disabled explicitly clear TSO over VLAN. While
I'm here allow disabling VLAN TX checksum offloading.

Tested by: Liudas < liudasb <> centras dot lt >
MFC after: 10 days

13 years agoUse bge_chipid to compare controller ids. r214251 incorrectly used
Pyun YongHyeon [Sun, 24 Oct 2010 20:54:46 +0000 (20:54 +0000)]
Use bge_chipid to compare controller ids. r214251 incorrectly used
bge_chiprev.

Reported by: Buganini <buganini <> gmail dot com >

13 years agosh: Make sure defined functions can actually be called.
Jilles Tjoelker [Sun, 24 Oct 2010 20:45:13 +0000 (20:45 +0000)]
sh: Make sure defined functions can actually be called.

Add some conservative checks on function names:
- Disallow expansions or quoting characters; these can only be called via
  strange control characters
- Disallow '/'; these functions cannot be called anyway, as exec.c assumes
  they are pathnames
- Make the CTL* bytes work properly in function names.

These are syntax errors.

POSIX does not require us to support more than names (letters, digits and
underscores, not starting with a digit), but I do not want to restrict it
that much at this time.

Exp-run done by: pav (with some other sh(1) changes)

13 years agosh: Check whether dup2 was successful for >&FD and <&FD.
Jilles Tjoelker [Sun, 24 Oct 2010 20:09:49 +0000 (20:09 +0000)]
sh: Check whether dup2 was successful for >&FD and <&FD.

A failure (usually caused by FD not being open) is a redirection error.

Exp-run done by: pav (with some other sh(1) changes)

13 years agosh: Add a test trying to close a descriptor that is not open.
Jilles Tjoelker [Sun, 24 Oct 2010 19:56:34 +0000 (19:56 +0000)]
sh: Add a test trying to close a descriptor that is not open.

In stable/8 and older, this fails. Some of the redirection changes in head
have fixed it.

13 years agoMake da driver to handle some probably broken Android devices, returning
Alexander Motin [Sun, 24 Oct 2010 18:53:16 +0000 (18:53 +0000)]
Make da driver to handle some probably broken Android devices, returning
zero media and sector size instead of "Medium not present" error,
until some confirmation button is tapped on device.

13 years agoBefore this change on first connect between primary and secondary we
Pawel Jakub Dawidek [Sun, 24 Oct 2010 17:28:25 +0000 (17:28 +0000)]
Before this change on first connect between primary and secondary we
initialize all the data. This is huge waste of time and resources if
there were no writes yet, as there is no real data to synchronize.

Optimize this by sending "virgin" argument to secondary, which gives it a hint
that synchronization is not needed.

In the common case (where noth nodes are configured at the same time) instead
of synchronizing everything, we don't synchronize at all.

MFC after: 1 week

13 years agoImplement nv_exists() function that returns true if argument of the given
Pawel Jakub Dawidek [Sun, 24 Oct 2010 17:24:08 +0000 (17:24 +0000)]
Implement nv_exists() function that returns true if argument of the given
name exists.

MFC after: 3 days

13 years agoMove all NV defines into nv.c, they are not used externally thus there is
Pawel Jakub Dawidek [Sun, 24 Oct 2010 17:22:34 +0000 (17:22 +0000)]
Move all NV defines into nv.c, they are not used externally thus there is
no need to make then visible from outside.

MFC after: 3 days

13 years agosh: Change ! within a pipeline to start a new pipeline instead.
Jilles Tjoelker [Sun, 24 Oct 2010 17:06:49 +0000 (17:06 +0000)]
sh: Change ! within a pipeline to start a new pipeline instead.

This is how ksh93 treats ! within a pipeline and makes the ! in
  a | ! b | c
negate the exit status of the pipeline, as if it were
  a | { ! b | c; }

Side effect: something like
  f() ! a
is now a syntax error, because a function definition takes a command,
not a pipeline.

Exp-run done by: pav (with some other sh(1) changes)

13 years agosh: Add some testcases for alias expansion.
Jilles Tjoelker [Sun, 24 Oct 2010 16:55:17 +0000 (16:55 +0000)]
sh: Add some testcases for alias expansion.

13 years agoMostly revert r203420, and add similar functionality into ada(4) since the
Rebecca Cran [Sun, 24 Oct 2010 16:31:57 +0000 (16:31 +0000)]
Mostly revert r203420, and add similar functionality into ada(4) since the
existing code caused problems with some SCSI controllers.

A new sysctl kern.cam.ada.spindown_shutdown has been added that controls
whether or not to spin-down disks when shutting down.
Spinning down the disks unloads/parks the heads - this is
much better than removing power when the disk is still
spinning because otherwise an Emergency Unload occurs which may cause damage
to the actuator.

PR: kern/140752
Submitted by:   olli
Reviewed by: arundel
Discussed with: mav
MFC after: 2 weeks

13 years agoUse .Dv with NULL.
Jaakko Heinonen [Sun, 24 Oct 2010 16:10:32 +0000 (16:10 +0000)]
Use .Dv with NULL.

13 years agoDocument make_dev_p(9).
Jaakko Heinonen [Sun, 24 Oct 2010 15:56:21 +0000 (15:56 +0000)]
Document make_dev_p(9).

Reviewed by: brueffer, kib

13 years agoSimplify code a bit.
Pawel Jakub Dawidek [Sun, 24 Oct 2010 15:44:23 +0000 (15:44 +0000)]
Simplify code a bit.

MFC after: 3 days

13 years agoPlug memory leak.
Pawel Jakub Dawidek [Sun, 24 Oct 2010 15:42:16 +0000 (15:42 +0000)]
Plug memory leak.

MFC after: 3 days

13 years agoPlug memory leaks.
Pawel Jakub Dawidek [Sun, 24 Oct 2010 15:41:23 +0000 (15:41 +0000)]
Plug memory leaks.

Found with: valgrind
MFC after: 3 days

13 years agoLoad geom_gate.ko module after parsing arguments.
Pawel Jakub Dawidek [Sun, 24 Oct 2010 15:38:58 +0000 (15:38 +0000)]
Load geom_gate.ko module after parsing arguments.

MFC after: 3 days

13 years agoflex: add missing ifdef magic to create/hide prototypes
Ulrich Spörlein [Sun, 24 Oct 2010 15:31:41 +0000 (15:31 +0000)]
flex: add missing ifdef magic to create/hide prototypes

This unbreaks build for some software with higher WARNS flags.

Reviewed by: rpaulo
PR: bin/139319 (parts already committed in previous revision)

13 years agoRemove stray semicolon.
Hans Petter Selasky [Sun, 24 Oct 2010 13:48:11 +0000 (13:48 +0000)]
Remove stray semicolon.

Submitted by: arundel

13 years ago- Given that as of r214264 all PHY drivers using mii(4) finally have been
Marius Strobl [Sun, 24 Oct 2010 12:59:43 +0000 (12:59 +0000)]
- Given that as of r214264 all PHY drivers using mii(4) finally have been
  converted to use the mii_phy_add_media()/mii_phy_setmedia() pair instead
  of mii_add_media()/mii_anar() remove the latter.
- Declare mii_media mii_media_table static as it shouldn't be used outside
  of mii_physubr.c.

MFC after: never

13 years ago- Add IFM_10_2 and IFM_10_5 media via tlphy(4) only in case the respective
Marius Strobl [Sun, 24 Oct 2010 12:51:02 +0000 (12:51 +0000)]
- Add IFM_10_2 and IFM_10_5 media via tlphy(4) only in case the respective
  interface also has such connectors.
- In tl_attach() unify three different ways of obtaining the device and
  vendor IDs and remove the now obsolete tl_dinfo from tl_softc.
- Given that tlphy(4) only handles the integrated PHYs of NICs driven by
  tl(4) make it only probe on the latter.
- Switch mlphy(4) and tlphy(4) to use mii_phy_add_media()/mii_phy_setmedia().
- Simplify looking for the respective companion PHY in mlphy(4) and tlphy(4)
  by ignoring the native one by just comparing the device_t's directly rather
  than the device name.

13 years agoTake advantage of mii_phy_add_media()/mii_phy_setmedia().
Marius Strobl [Sun, 24 Oct 2010 11:38:25 +0000 (11:38 +0000)]
Take advantage of mii_phy_add_media()/mii_phy_setmedia().

13 years ago- Take advantage of mii_phy_dev_probe().
Marius Strobl [Sun, 24 Oct 2010 11:37:01 +0000 (11:37 +0000)]
- Take advantage of mii_phy_dev_probe().
- Use mii_phy_add_media() instead of mii_add_media(). I'm not sure how
  this driver actually managed to work before as mii_add_media() is
  intended to be used to gether with mii_anar() while mii_phy_add_media()
  is intended to be used with mii_phy_setmedia(), however this driver
  mii_add_media() along with mii_phy_setmedia().

13 years agoAdd microbenchmark for create/unlink of a zero-byte file.
Robert Watson [Sun, 24 Oct 2010 09:14:21 +0000 (09:14 +0000)]
Add microbenchmark for create/unlink of a zero-byte file.

Sponsored by: Google, Inc.
MFC after: 2 weeks

13 years agoFix PIC_RETURN when abicalls are not defined.
Jayachandran C. [Sun, 24 Oct 2010 05:22:07 +0000 (05:22 +0000)]
Fix PIC_RETURN when abicalls are not defined.

Submitted by: Artem Belevich (artemb at gmail dot com)

13 years agoMFi386: the part of revision 213226.
Yoshihiro Takahashi [Sun, 24 Oct 2010 03:20:54 +0000 (03:20 +0000)]
MFi386: the part of revision 213226.

  Rewrite the i386 memory probe:
  - Move the base memory setup into a new basemem_setup() routine.

MFC after: 1 week

13 years agoMFi386: revision 214210
Yoshihiro Takahashi [Sun, 24 Oct 2010 02:59:02 +0000 (02:59 +0000)]
MFi386: revision 214210

  Avoid using memcpy() for copying 32bit chunks. This shrinks
  the resulting code a little.

13 years agoMove variable declarations into the conditional block where they are
Ed Maste [Sun, 24 Oct 2010 01:05:10 +0000 (01:05 +0000)]
Move variable declarations into the conditional block where they are
used, to fix warning if WITH_SSL is not set.

Submitted by: Sean Bruno
MFC after: 1 week

13 years agoModify the experimental NFSv4 server's file handle hash function
Rick Macklem [Sat, 23 Oct 2010 22:28:29 +0000 (22:28 +0000)]
Modify the experimental NFSv4 server's file handle hash function
to use the generic hash32_buf() function. Although adding the
bytes seemed sufficient for UFS and ZFS, since most of the bytes
are the same for file handles on the same volume, this might not
be sufficient for other file systems. Use of a generic function
also seems preferable to one specific to NFSv4.

Suggested by: gleb.kurtsou at gmail.com
MFC after: 10 days

13 years agoApply the same workaround for SDI flow control used on BCM5906 A1
Pyun YongHyeon [Sat, 23 Oct 2010 21:25:50 +0000 (21:25 +0000)]
Apply the same workaround for SDI flow control used on BCM5906 A1
to BCM6906 A0/A2. This should fix a long standing BCM5906 A2 lockup
issues. Data sheet explicitly mentions BCM5906 A0, A1 and A2 use
de-pipelined mode on these revisions.
Special thanks to Buganini who tried all combinations of
experimental patches for more than 10 days.

Tested by: Buganini <buganini <> gmail dot com >

13 years agoMake the IPsec SADB embedded route cache a union to be able to hold both the
Bjoern A. Zeeb [Sat, 23 Oct 2010 20:35:40 +0000 (20:35 +0000)]
Make the IPsec SADB embedded route cache a union to be able to hold both the
legacy and IPv6 route destination address.
Previously in case of IPv6, there was a memory overwrite due to not enough
space for the IPv6 address.

PR: kern/122565
MFC After: 2 weeks

13 years agoAdd missing DTrace probe invocation to mac_vnode_check_open; the probe
Robert Watson [Sat, 23 Oct 2010 16:59:39 +0000 (16:59 +0000)]
Add missing DTrace probe invocation to mac_vnode_check_open; the probe
was declared, but never used.

MFC after: 3 days
Sponsored by: Google, Inc.

13 years agoRemove workaround for ZFS bug; fix was committed to the //depot/user/pjd/zfs/...
Edward Tomasz Napierala [Sat, 23 Oct 2010 14:22:50 +0000 (14:22 +0000)]
Remove workaround for ZFS bug; fix was committed to the //depot/user/pjd/zfs/...
branch some time ago.

MFC after: two weeks

13 years agoIn thr_exit() and kthread_exit(), only remove thread from
David Xu [Sat, 23 Oct 2010 13:16:39 +0000 (13:16 +0000)]
In thr_exit() and kthread_exit(), only remove thread from
hash if it can directly exit, otherwise let exit1() do it.
The change should be in r213950, but for unknown reason,
it was lost.

13 years agoRemove mention of non-existant -o flag for debugging options.
Ulrich Spörlein [Sat, 23 Oct 2010 12:27:39 +0000 (12:27 +0000)]
Remove mention of non-existant -o flag for debugging options.

MFC after: 3 days

13 years agoThe firmware does pad notifications to an even number of bytes (at least
Bernhard Schmidt [Sat, 23 Oct 2010 11:26:22 +0000 (11:26 +0000)]
The firmware does pad notifications to an even number of bytes (at least
the association notification), the included information though always
contains an elem block with an odd number of bytes. We handle the last
byte as if it might contain a whole elem block, this of course is not
true as one byte is not enough to hold a block, we therefore discard the
complete frame. The solution here is to subtract one from the actual
notification length, this is also what the Linux driver does. With this
change the frames ends exactly where the last elem block ends.

This commit also reverts r214160 which is no longer required and now even
wrong.

MFC after: 1 week

13 years ago- Improve error messages, so instead of 'Not fully done', the user will get
Pawel Jakub Dawidek [Fri, 22 Oct 2010 22:58:00 +0000 (22:58 +0000)]
- Improve error messages, so instead of 'Not fully done', the user will get
  information that device is already suspended or that device is using
  one-time key and suspend is not supported.
- 'geli suspend -a' silently skips devices that use one-time key, this is fine,
  but because we log which device were suspended on the console, log also which
  devices were skipped.

13 years agoClose a race between checking if device is already suspended and suspending it.
Pawel Jakub Dawidek [Fri, 22 Oct 2010 22:54:26 +0000 (22:54 +0000)]
Close a race between checking if device is already suspended and suspending it.

13 years agoAdd State tag, so 'geli status' will report active/suspended status, eg:
Pawel Jakub Dawidek [Fri, 22 Oct 2010 22:45:26 +0000 (22:45 +0000)]
Add State tag, so 'geli status' will report active/suspended status, eg:

# geli status
   Name     Status  Components
da0.eli  SUSPENDED  da0
da1.eli     ACTIVE  da1

13 years agoEncryption keys array might be NULL if device is suspended. Check for this, so
Pawel Jakub Dawidek [Fri, 22 Oct 2010 22:44:09 +0000 (22:44 +0000)]
Encryption keys array might be NULL if device is suspended. Check for this, so
we don't panic when we detach suspended device.

13 years agoMove sc_akeyctx and sc_ivctx initialization to the g_eli_mkey_propagate()
Pawel Jakub Dawidek [Fri, 22 Oct 2010 22:13:11 +0000 (22:13 +0000)]
Move sc_akeyctx and sc_ivctx initialization to the g_eli_mkey_propagate()
function which eliminates code duplication and will ensure proper order
of operation.

13 years agoModify the file handle hash function in the experimental NFS
Rick Macklem [Fri, 22 Oct 2010 21:38:56 +0000 (21:38 +0000)]
Modify the file handle hash function in the experimental NFS
server so that it will work better for non-UFS file systems.
The new function simply sums the bytes of the fh_fid field
of fhandle_t.

MFC after: 10 days

13 years agoAdd possibility to generate devctl notifications regardless of UGEN presence.
Hans Petter Selasky [Fri, 22 Oct 2010 20:13:45 +0000 (20:13 +0000)]
Add possibility to generate devctl notifications regardless of UGEN presence.

Submitted by:  Nick Hibma
Approved by:    thompsa (mentor)

13 years agoAdd workaround for BCM5906 A1 controller silicon bug. When
Pyun YongHyeon [Fri, 22 Oct 2010 19:30:56 +0000 (19:30 +0000)]
Add workaround for BCM5906 A1 controller silicon bug. When
auto-negotiation results in half-duplex operation, excess collision
on the ethernet link may cause internal chip delays that may result
in subsequent valid frames being dropped due to insufficient
receive buffer resources. The workaround is to choose de-pipeline
method as a flow control decision for SDI. De-pipeline method
allows only 1 data in TxMbuf at a time such that a request to RDMA
from SDI is made only when TxMbuf is empty. Thanks for david for
providing detailed errata information.

13 years agoEnable TX MAC state machine lockup fix for both BCM5755 or higher
Pyun YongHyeon [Fri, 22 Oct 2010 18:31:44 +0000 (18:31 +0000)]
Enable TX MAC state machine lockup fix for both BCM5755 or higher
and BCM5906. Publicly available data sheet just says it may happen
due to corrupted TxMbuf.

13 years agoAvoid using memcpy() for copying 32bit chunks. This shrinks
Roman Divacky [Fri, 22 Oct 2010 18:07:21 +0000 (18:07 +0000)]
Avoid using memcpy() for copying 32bit chunks. This shrinks
the resulting code a little.

Approved by:    rpaulo (mentor)
Reviewed by:    jhb

13 years ago- Add a new PCI quirk to whitelist an old chipset that doesn't support
John Baldwin [Fri, 22 Oct 2010 11:42:02 +0000 (11:42 +0000)]
- Add a new PCI quirk to whitelist an old chipset that doesn't support
  PCI-express or PCI-X capabilities if we are running in a virtual machine.
- Whitelist the Intel 82440 chipset used by QEMU.

Tested by: jfv
MFC after: 1 week

13 years agoValidate syscall_timing test names before starting to provide earlier
Robert Watson [Fri, 22 Oct 2010 11:22:19 +0000 (11:22 +0000)]
Validate syscall_timing test names before starting to provide earlier
feedback regarding user error.

Provide default loop and timing settings.

Add a new test that just times pread() without the open()/close().

Mark tests requiring a path argument so we can provide better feedback
to the user than EFAULT on (null).

Sponsored by: Google, Inc.
MFC after: 2 weeks

13 years agoRevert to r214147, errno is not clobbered as originally
Benedict Reuschling [Fri, 22 Oct 2010 08:51:49 +0000 (08:51 +0000)]
Revert to r214147, errno is not clobbered as originally
thought.

13 years agoUnbreak ia64.
Marcel Moolenaar [Fri, 22 Oct 2010 04:43:04 +0000 (04:43 +0000)]
Unbreak ia64.

With r169630 I disabled symbol versioning because it broke rtld.  With
r211706 rtld got broken for ia64 & powerpc64.  It was fixed for powerpc64
with r212497.  In between, r211749 removed the exports table because the
version script handled the exports.  But wait, symbol versioning was
disabled on ia64.

With exports controlled by the version script and symbol versioning
disabled, all symbols are exported and too many symbols bind to the
definition in rtld. Let's just say that waird things happen.

So, enable symbol versioning on ia64 and apply a work-around for the
SIGSEGV that triggered r169630 to begin with: when rtld relocates
itself, it comes across r_debug_state and for some reason can't find the
definition. This causes a failure, relocation aborts and null pointers
galore. The work-around is to ignore the missing definition when rtld
is relocating itself and keep going.

Maybe with the next binutils this will all go away. Maybe not, in
which case I still need to figure out why r_debug_state cannot be found.

BTW: r_debug_state is in the symbol map -- I don't think any other rtld
symbols that rtld references are in the symbol map...

13 years agoMore simplifications
Warner Losh [Fri, 22 Oct 2010 00:11:55 +0000 (00:11 +0000)]
More simplifications

Submitted by:  Alex Kozlov

13 years agoRemove unnecessary variable.
Warner Losh [Fri, 22 Oct 2010 00:10:48 +0000 (00:10 +0000)]
Remove unnecessary variable.

Submitted by:  Alex Kozlov

13 years agoFix two typos
Warner Losh [Thu, 21 Oct 2010 23:08:42 +0000 (23:08 +0000)]
Fix two typos

Submitted by: Benedict Reuschling

13 years agoMore support for IMAGE installations
Warner Losh [Thu, 21 Oct 2010 22:46:10 +0000 (22:46 +0000)]
More support for IMAGE installations

13 years agoMinor tweaks in compression support:
Warner Losh [Thu, 21 Oct 2010 22:33:50 +0000 (22:33 +0000)]
Minor tweaks in compression support:
o We need an eval here to get the right expansion of the command
o bs=128k doesn't work in some cases, so eliminate it and cope with the
  minor performance hit.

Submitted by: john hixson

13 years agoUniversally use uintmax_t in syscall_timing; rearrange arithmetic to
Robert Watson [Thu, 21 Oct 2010 21:08:12 +0000 (21:08 +0000)]
Universally use uintmax_t in syscall_timing; rearrange arithmetic to
suffer fewer rounding errors with smaller numbers; fix argc validation
so multiple tests run on a single command line.

Sponsored by: Google, Inc.
MFC after: 2 weeks

13 years agoCall chainevh callback when we are invoked with neither MOD_LOAD nor
Xin LI [Thu, 21 Oct 2010 20:31:50 +0000 (20:31 +0000)]
Call chainevh callback when we are invoked with neither MOD_LOAD nor
MOD_UNLOAD.  This makes it possible to add custom hooks for other module
events.

Return EOPNOTSUPP when there is no callback available.

Pointed out by: jhb
Reviewed by: jhb
MFC after: 1 month

13 years agoFix typo in last commit.
Gleb Smirnoff [Thu, 21 Oct 2010 20:22:00 +0000 (20:22 +0000)]
Fix typo in last commit.

Submitted by: bcr

13 years agoFree opencrypto sessions on suspend, as they also might keep encryption keys.
Pawel Jakub Dawidek [Thu, 21 Oct 2010 19:44:28 +0000 (19:44 +0000)]
Free opencrypto sessions on suspend, as they also might keep encryption keys.

13 years agoThe firmware always sets bit 14 and 15, to get the real associd we need
Bernhard Schmidt [Thu, 21 Oct 2010 19:30:55 +0000 (19:30 +0000)]
The firmware always sets bit 14 and 15, to get the real associd we need
to clear those bits.

MFC after: 1 week

13 years agoInstead of calling return when reaching the end of the assoc notification
Bernhard Schmidt [Thu, 21 Oct 2010 19:28:52 +0000 (19:28 +0000)]
Instead of calling return when reaching the end of the assoc notification
break the loop instead. We want to run the code after the while loop
to set an associd and capinfo. If we don't do this net80211 will drop
frames because it assumes the node has not yet been associated.

MFC after: 1 week

13 years ago- When disabling ktracing on a process, free any pending requests that
John Baldwin [Thu, 21 Oct 2010 19:17:40 +0000 (19:17 +0000)]
- When disabling ktracing on a process, free any pending requests that
  may be left.  This fixes a memory leak that can occur when tracing is
  disabled on a process via disabling tracing of a specific file (or if
  an I/O error occurs with the tracefile) if the process's next system
  call is exit().  The trace disabling code clears p_traceflag, so exit1()
  doesn't do any KTRACE-related cleanup leading to the leak.  I chose to
  make the free'ing of pending records synchronous rather than patching
  exit1().
- Move KTRACE-specific logic out of kern_(exec|exit|fork).c and into
  kern_ktrace.c instead.  Make ktrace_mtx private to kern_ktrace.c as a
  result.

MFC after: 1 month

13 years agoAdd Cambridge/Google tag since the copyright has been updated.
Robert Watson [Thu, 21 Oct 2010 19:03:24 +0000 (19:03 +0000)]
Add Cambridge/Google tag since the copyright has been updated.

MFC after: 2 weeks

13 years agoFurther syscall_timing improvements: allow an arbitrary "path" string
Robert Watson [Thu, 21 Oct 2010 19:01:59 +0000 (19:01 +0000)]
Further syscall_timing improvements: allow an arbitrary "path" string
argument to be passed on the command line, allowing file-related tests
to be pointed at wherever desired.

Sponsored by: Google, Inc.
MFC after: 2 weeks

13 years agoModify the experimental NFS server in a manner analagous to
Rick Macklem [Thu, 21 Oct 2010 18:49:12 +0000 (18:49 +0000)]
Modify the experimental NFS server in a manner analagous to
r214049 for the regular NFS server, so that it will not do
a VOP_LOOKUP() of ".." when at the root of a file system
when performing a ReaddirPlus RPC.

MFC after: 10 days

13 years agoDocument strtonum()s behavior of setting errno to 0 when no error is found.
Benedict Reuschling [Thu, 21 Oct 2010 18:30:48 +0000 (18:30 +0000)]
Document strtonum()s behavior of setting errno to 0 when no error is found.

PR:             docs/143330
Submitted by:   Efstratios Karatzas (gpf dot kira at gmail dot com)
Discussed with: ru@
MFC after:      7 days

13 years agoSync with OpenBSD rev. 1.13:
Benedict Reuschling [Thu, 21 Oct 2010 18:21:19 +0000 (18:21 +0000)]
Sync with OpenBSD rev. 1.13:
strtonum does not require limits.h

Obtained from:  OpenBSD
Discussed with: ru@
MFC after:      5 days

13 years agoClarify a misleading comment. The test in pci_reserve_map() was meant to
John Baldwin [Thu, 21 Oct 2010 17:46:23 +0000 (17:46 +0000)]
Clarify a misleading comment.  The test in pci_reserve_map() was meant to
ignore BARs that are invalid due to having a size of zero, not to ignore
BARs with an existing base of zero.  While here, reorganize the code
slightly to make the intent clearer.

Reported by: avg
MFC after: 1 week

13 years agoFix bug in recent syscall_timing change: measure the number of iterations
Robert Watson [Thu, 21 Oct 2010 17:35:08 +0000 (17:35 +0000)]
Fix bug in recent syscall_timing change: measure the number of iterations
each loop, rather than once up front.  The distinction is unimportant
when doing a fix iteration count, but when using a timer, it should vary.

Sponsored by: Google, Inc.
MFC after: 2 weeks

13 years ago- Make 'vm_refcnt' volatile so that compilers won't be tempted to treat
John Baldwin [Thu, 21 Oct 2010 17:29:32 +0000 (17:29 +0000)]
- Make 'vm_refcnt' volatile so that compilers won't be tempted to treat
  its value as a loop invariant.  Currently this is a no-op because
  'atomic_cmpset_int()' clobbers all memory on current architectures.
- Use atomic_fetchadd_int() instead of an atomic_cmpset_int() loop to drop
  a reference in vmspace_free().

Reviewed by: alc
MFC after: 1 month