]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoCorrect a typo.
jh [Wed, 27 Oct 2010 14:11:11 +0000 (14:11 +0000)]
Correct a typo.

PR: 151321
Submitted by: Simon Walton
MFC after: 3 days

13 years agoAdd missing "readahead" to the nfs_opts list.
jh [Wed, 27 Oct 2010 14:08:37 +0000 (14:08 +0000)]
Add missing "readahead" to the nfs_opts list.

PR: 151321
Tested by: Simon Walton
MFC after: 2 weeks

13 years agoAdd attachement to my mentors
bapt [Wed, 27 Oct 2010 12:51:36 +0000 (12:51 +0000)]
Add attachement to my mentors

Reporter by: wxs (on irc)

13 years agoCheck small set and reject it, this is how kernel did. Always use the
davidxu [Wed, 27 Oct 2010 09:59:43 +0000 (09:59 +0000)]
Check small set and reject it, this is how kernel did. Always use the
size kernel is using.

13 years ago- Revert r214409.
davidxu [Wed, 27 Oct 2010 09:29:03 +0000 (09:29 +0000)]
- Revert r214409.
- Use long word to figure out sizeof kernel cpuset, hope it works.

13 years agoSync code with tzcode2010m
edwin [Wed, 27 Oct 2010 07:14:46 +0000 (07:14 +0000)]
Sync code with tzcode2010m

asctime.c:
* Set errno to EINVAL and return "??? ??? ?? ??:??:?? ????\n" if
  asctime_r is called with a NULL struct tm pointer.  (Note that
  asctime_r is called by ctime_r and asctime; asctime is called by
  ctime.)

localtime.c:
* Set errno to EINVAL and return WRONG if time1 is called with a
  NULL struct tm pointer; avoid dereference if a NULL struct tm
  pointer is passed to timelocal, timegm, or timeoff.  (Note that
  time1 is called by mktime, timegm, and timeoff; mktime is called
  by timelocal.)
* more core-avoidance work
* Change to set timezone and altzone based on time types with
  greatest transition times (for the benefit of Asia/Seoul).

zic.8:
* Warning about case-sensitivity of names, but not of abbrevations

zic.c:
* Conditionally output extra types with most-recently-use offsets
  last (for use by systems with pre-2011 versions of localtime.c,
  helping to ensure that globals "altzone and "timezone" get set
  correctly).

The code has been running for nearly four weeks on my laptop running
FreeBSD 8.1 without a problem.

MFC after: 1 month

13 years agoRemove locking and unlock in pthread_mutex_destroy, because
davidxu [Wed, 27 Oct 2010 04:19:07 +0000 (04:19 +0000)]
Remove locking and unlock in pthread_mutex_destroy, because
it can not fix race condition in application code, as a result,
the problem described in PR threads/151767 is avoided.

13 years agoIf input parameter cpusetsize is zero, give userland size of cpuset mask
davidxu [Wed, 27 Oct 2010 02:32:54 +0000 (02:32 +0000)]
If input parameter cpusetsize is zero, give userland size of cpuset mask
kernel is using.

13 years agoAdd a flag to the experimental NFSv4 client to indicate when
rmacklem [Tue, 26 Oct 2010 23:18:37 +0000 (23:18 +0000)]
Add a flag to the experimental NFSv4 client to indicate when
delegations are being returned for reasons other than a Recall.
Also, re-organize nfscl_recalldeleg() slightly, so that it leaves
clearing NMODIFIED to the ncl_flush() call and invalidates the
attribute cache after flushing. It is hoped that these changes
might fix the problem others have seen when using the NFSv4
client with delegations enabled, since I can't reliably reproduce
the problem. These changes only affect the client when doing NFSv4
mounts with delegations enabled.

MFC after: 10 days

13 years agoUse fprintf(stderr) instead of gctl_error() to print a warning about too
pjd [Tue, 26 Oct 2010 22:46:15 +0000 (22:46 +0000)]
Use fprintf(stderr) instead of gctl_error() to print a warning about too
big sector size. When gctl error is set gctl_has_param() always returns
'false', which prevents geli(8) from finding some arguments and also masks
an error, which is generates in such case.

MFC after: 3 days

13 years agoDocument newly added loader tunables "hw.acpi.install_interface" and
jkim [Tue, 26 Oct 2010 21:22:55 +0000 (21:22 +0000)]
Document newly added loader tunables "hw.acpi.install_interface" and
"hw.acpi.remove_interface".

13 years ago- Save errno values before calling warn(3) so that errors are correctly
jhb [Tue, 26 Oct 2010 19:11:09 +0000 (19:11 +0000)]
- Save errno values before calling warn(3) so that errors are correctly
  reported.
- Use powerof2() from <sys/param.h> rather than a copy and paste version.

Submitted by: gcooper
MFC after: 1 week

13 years agoFix formatting.
brucec [Tue, 26 Oct 2010 19:10:59 +0000 (19:10 +0000)]
Fix formatting.

Reported by: yongari

13 years agoAdd two new loader tunables 'hw.acpi.install_interface' and
jkim [Tue, 26 Oct 2010 18:59:50 +0000 (18:59 +0000)]
Add two new loader tunables 'hw.acpi.install_interface' and
'hw.acpi.remove_interface'.  hw.acpi.install_interface lets you install new
interfaces.  Conversely, hw.acpi.remove_interface lets you remove OS
interfaces from the pre-defined list in ACPICA.  For example,

hw.acpi.install_interface="FreeBSD"

lets _OSI("FreeBSD") method to return 0xffffffff (or success) and

hw.acpi.remove_interface="Windows 2009"

lets _OSI("Windows 2009") method to return zero (or failure).  Both are
comma-separated lists and leading white spaces are ignored.  For example,
the following examples are valid:

hw.acpi.install_interface="Linux, FreeBSD"
hw.acpi.remove_interface="Windows 2006, Windows 2006.1"

13 years agoAdd some missing documentation to the man page:
bcr [Tue, 26 Oct 2010 18:32:51 +0000 (18:32 +0000)]
Add some missing documentation to the man page:

- FILES section ref: ~/nsmb.conf
- use of password in examples section
- use of simple encryption for password in examples section

PR:                 docs/132311
Submitted by:       David Horn (dhorn2000 at gmail dot com)
Patch corrected by: trhodes
Approved by:        trhodes
MFC after:          5 days

13 years agoStyle fix.
attilio [Tue, 26 Oct 2010 18:01:28 +0000 (18:01 +0000)]
Style fix.

Reported by: bde, dim

13 years agoAdd information about the values and default setting of the
brucec [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 [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:
mm [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.
gjb [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 [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:
jfv [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
ivoras [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 [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.
ae [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 [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
nwhitehorn [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.
nwhitehorn [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
jhb [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
jhb [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,
ivoras [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.
davidxu [Mon, 25 Oct 2010 13:13:16 +0000 (13:13 +0000)]
Use function tdfind() to find a thread.

13 years agoFix typo.
davidxu [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().
davidxu [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
bz [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.
mav [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.
mav [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
avg [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.
mav [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 [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 [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 [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 [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 [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
bz [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
yongari [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
yongari [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 [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 [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 [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
mav [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
pjd [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
pjd [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
pjd [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 [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 [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
brucec [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.
jh [Sun, 24 Oct 2010 16:10:32 +0000 (16:10 +0000)]
Use .Dv with NULL.

13 years agoDocument make_dev_p(9).
jh [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.
pjd [Sun, 24 Oct 2010 15:44:23 +0000 (15:44 +0000)]
Simplify code a bit.

MFC after: 3 days

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

MFC after: 3 days

13 years agoPlug memory leaks.
pjd [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.
pjd [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
uqs [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.
hselasky [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 [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 [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 [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 [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.
rwatson [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.
jchandra [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.
nyan [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
nyan [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
emaste [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
rmacklem [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
yongari [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
bz [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
rwatson [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/...
trasz [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
davidxu [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.
uqs [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
bschmidt [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
pjd [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.
pjd [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:
pjd [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
pjd [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()
pjd [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
rmacklem [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.
hselasky [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
yongari [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
yongari [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
rdivacky [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
jhb [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
rwatson [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
bcr [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 [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
imp [Fri, 22 Oct 2010 00:11:55 +0000 (00:11 +0000)]
More simplifications

Submitted by:  Alex Kozlov

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

Submitted by:  Alex Kozlov

13 years agoFix two typos
imp [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
imp [Thu, 21 Oct 2010 22:46:10 +0000 (22:46 +0000)]
More support for IMAGE installations