]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoMerge ACPICA 20110413.
Jung-uk Kim [Fri, 15 Apr 2011 18:34:27 +0000 (18:34 +0000)]
Merge ACPICA 20110413.

13 years agoSplit out bluetooth coexistence setup.
Bernhard Schmidt [Fri, 15 Apr 2011 17:10:52 +0000 (17:10 +0000)]
Split out bluetooth coexistence setup.

13 years agoFixes for firmware handling:
Bernhard Schmidt [Fri, 15 Apr 2011 16:59:56 +0000 (16:59 +0000)]
Fixes for firmware handling:
- there is a local variable for sc->fw_dma, use that instead
- OpenBSD uses 5*hz to wait for firmware to be loaded
- in case the firmware module contains invalid data, actually release it

13 years agoOnly handle beacon misses while in RUN state and not scanning.
Bernhard Schmidt [Fri, 15 Apr 2011 16:55:45 +0000 (16:55 +0000)]
Only handle beacon misses while in RUN state and not scanning.

13 years agoDon't timeout when stopping DMA channels.
Bernhard Schmidt [Fri, 15 Apr 2011 16:50:37 +0000 (16:50 +0000)]
Don't timeout when stopping DMA channels.

Obtained from: OpenBSD

13 years agoFix build on FreeBSD. This patch was submitted upstream:
Jung-uk Kim [Fri, 15 Apr 2011 16:44:04 +0000 (16:44 +0000)]
Fix build on FreeBSD.  This patch was submitted upstream:

http://lists.acpica.org/pipermail/devel/2011-April/000253.html

Similar fixes will show up in the next ACPICA release.

13 years agoSome changes around hot-plug and interface power-management:
Alexander Motin [Fri, 15 Apr 2011 16:40:31 +0000 (16:40 +0000)]
Some changes around hot-plug and interface power-management:
 - use ATA_SE_EXCHANGED (SError.DIAG.X) bit to detect hot-plug events when
power-management enabled and ATA_SE_PHY_CHANGED (SError.DIAG.N) can't be
trusted;
 - on controllers supporting staggered spin-up (SS) put unused channels
into Listen state instead of Off. It should still save some power, but
allow plug-in events to be detected;
 - on controllers supporting cold presence detection (CPD), when power
management enabled, use CPD events to detect hot-plug in addition to PHY
events.

13 years agosh: Add test for bin/12137.
Jilles Tjoelker [Fri, 15 Apr 2011 15:33:24 +0000 (15:33 +0000)]
sh: Add test for bin/12137.

13 years agosh: Add test for obscure and ambiguous ${#?}.
Jilles Tjoelker [Fri, 15 Apr 2011 15:26:05 +0000 (15:26 +0000)]
sh: Add test for obscure and ambiguous ${#?}.

13 years agosh: Add test for bin/56147.
Jilles Tjoelker [Fri, 15 Apr 2011 15:14:58 +0000 (15:14 +0000)]
sh: Add test for bin/56147.

13 years agoAdd basic support for the Marvell Orion TS-7800.
Philip Paeps [Fri, 15 Apr 2011 13:37:43 +0000 (13:37 +0000)]
Add basic support for the Marvell Orion TS-7800.

Submitted by: Kristof Provost <kristof -at- freebsd.org>

13 years agoRemove an incorrect be16toh() that prevented geom_part_apm from working on
Gavin Atkinson [Fri, 15 Apr 2011 12:32:52 +0000 (12:32 +0000)]
Remove an incorrect be16toh() that prevented geom_part_apm from working on
little-endian machines.

Reviewed by: marcel
MFC after: 2 weeks

13 years agoMake ada(4) driver put ATA disks into sleep state on suspend.
Alexander Motin [Fri, 15 Apr 2011 07:07:29 +0000 (07:07 +0000)]
Make ada(4) driver put ATA disks into sleep state on suspend.

Submitted by: jkim (original version)

13 years agoFix a couple of bad races that can occur when a cxgbe interface is taken
Navdeep Parhar [Fri, 15 Apr 2011 03:09:27 +0000 (03:09 +0000)]
Fix a couple of bad races that can occur when a cxgbe interface is taken
down.  The ingress queue lock was unused and has been removed as part of
these changes.

- An in-flight egress update from the SGE must be handled before the
  queue that requested it is destroyed.  Wait for the update to arrive.

- Interrupt handlers must stop processing rx events for a queue before
  the queue is destroyed.  Events that have not yet been processed
  should be ignored once the queue disappears.

MFC after: 1 week

13 years agoFix the experimental NFSv4 server so that it uses VOP_PATHCONF()
Rick Macklem [Thu, 14 Apr 2011 23:46:15 +0000 (23:46 +0000)]
Fix the experimental NFSv4 server so that it uses VOP_PATHCONF()
to determine if a file system supports NFSv4 ACLs. Since
VOP_PATHCONF() must be called with a locked vnode, the function
is called before nfsvno_fillattr() and the result is passed in
as an extra argument.

MFC after: 2 weeks

13 years agoAdd event handlers for (ACPI) suspend/resume events. Suspend event handlers
Jung-uk Kim [Thu, 14 Apr 2011 22:17:39 +0000 (22:17 +0000)]
Add event handlers for (ACPI) suspend/resume events.  Suspend event handlers
are invoked right before device drivers go into sleep state and resume event
handlers are invoked right after all device drivers are waken up.

13 years agogetfh(2): Add xrefs for fhopen(2), open(2), stat(2).
Jilles Tjoelker [Thu, 14 Apr 2011 22:06:11 +0000 (22:06 +0000)]
getfh(2): Add xrefs for fhopen(2), open(2), stat(2).

MFC after: 1 week

13 years agoModify the experimental NFSv4 server so that it handles
Rick Macklem [Thu, 14 Apr 2011 21:49:52 +0000 (21:49 +0000)]
Modify the experimental NFSv4 server so that it handles
crossing of server mount points properly. The functions
nfsvno_fillattr() and nfsv4_fillattr() were modified to
take the extra arguments that are the mount point, a flag
to indicate that it is a file system root and the mounted
on fileno. The mount point argument needs to be busy when
nfsvno_fillattr() is called, since the vp argument is not
locked.

Reviewed by: kib
MFC after: 2 weeks

13 years agoMake CAM report devices with ATA/SATA transport to devstat(9) as IDE.
Alexander Motin [Thu, 14 Apr 2011 21:25:32 +0000 (21:25 +0000)]
Make CAM report devices with ATA/SATA transport to devstat(9) as IDE.

13 years agoThere is no need to request a tx credit flush if such a request is already
Navdeep Parhar [Thu, 14 Apr 2011 20:06:23 +0000 (20:06 +0000)]
There is no need to request a tx credit flush if such a request is already
pending.

MFC after: 3 days

13 years agoAdjust debugging string to match the actual function.
Andreas Tobler [Thu, 14 Apr 2011 19:37:31 +0000 (19:37 +0000)]
Adjust debugging string to match the actual function.

Approved by: nwhitehorn (mentor)

13 years agoUse newly added rdtsc32() for DELAY(9) as well.
Jung-uk Kim [Thu, 14 Apr 2011 19:11:45 +0000 (19:11 +0000)]
Use newly added rdtsc32() for DELAY(9) as well.

13 years agoAdd manual page for rctl.conf(5).
Edward Tomasz Napierala [Thu, 14 Apr 2011 18:37:27 +0000 (18:37 +0000)]
Add manual page for rctl.conf(5).

13 years agoThe macro MOEA_PVO_CHECK is empty and not used. It is a left over from the
Andreas Tobler [Thu, 14 Apr 2011 18:26:50 +0000 (18:26 +0000)]
The macro MOEA_PVO_CHECK is empty and not used. It is a left over from the
NetBSD import. Remove the definition and all its occurrences.

Approved by: nwhitehorn (mentor)

13 years agoAdd stoppcbs[] arrays on powerpc(64) and have each CPU save its
Andreas Tobler [Thu, 14 Apr 2011 18:14:43 +0000 (18:14 +0000)]
Add stoppcbs[] arrays on powerpc(64) and have each CPU save its
current context in the IPI_STOP handler. Similar as done on other
architectures.

Approved by: nwhitehorn (mentor)

13 years agoWork around an emulator problem where virtual CPU advertises TSC is P-state
Jung-uk Kim [Thu, 14 Apr 2011 17:50:26 +0000 (17:50 +0000)]
Work around an emulator problem where virtual CPU advertises TSC is P-state
invariant and APERF/MPERF MSRs exist but these MSRs never tick.  When we
calculate effective frequency from cpu_est_clockrate(), it caused panic of
division-by-zero.  Now we test whether these MSRs actually increase to avoid
such foot-shooting.

Reported by: dim
Tested by: dim

13 years agoInstead of trying to figure out which rxon.flags to clear, restart
Bernhard Schmidt [Thu, 14 Apr 2011 17:42:21 +0000 (17:42 +0000)]
Instead of trying to figure out which rxon.flags to clear, restart
from scratch. Remove htole16() calls, rxon.chan is an uint8_t,
ieee80211_chan2ieee() does return an ic_ieee as an int, but I heavily
doubt a htole16() will buy us anything here.

13 years agoiwn_cleanup() is just a wrapper around iwn_detach(), call it directly
Bernhard Schmidt [Thu, 14 Apr 2011 17:31:34 +0000 (17:31 +0000)]
iwn_cleanup() is just a wrapper around iwn_detach(), call it directly
instead.

13 years agoReuse net80211 code:
Bernhard Schmidt [Thu, 14 Apr 2011 17:26:13 +0000 (17:26 +0000)]
Reuse net80211 code:
- IWN_TXOP_TO_US is equal to IEEE80211_TXOP_TO_US
- use IEEE80211_DUR_TU
- ieee80211_add_rates/ieee80211_add_xrates are public, use em
- copied ieee80211_add_ssid it is not public

13 years agoRemove IWN_FLAG_HAS_5GHZ and IWN_PCI_BAR0, both unused.
Bernhard Schmidt [Thu, 14 Apr 2011 17:19:33 +0000 (17:19 +0000)]
Remove IWN_FLAG_HAS_5GHZ and IWN_PCI_BAR0, both unused.

13 years agoUse newly added rdtsc32() for the timecounter_get_t method.
Jung-uk Kim [Thu, 14 Apr 2011 17:08:23 +0000 (17:08 +0000)]
Use newly added rdtsc32() for the timecounter_get_t method.

13 years agoAdd a function rdtsc32() to read lower 32 bits from TSC and discard upper
Jung-uk Kim [Thu, 14 Apr 2011 16:53:32 +0000 (16:53 +0000)]
Add a function rdtsc32() to read lower 32 bits from TSC and discard upper
32 bits.  Some times compiler inserts unnecessary instructions to preserve
unused upper 32 bits even when it is casted to a 32-bit value.  It reduces
such compiler mistakes where every cycle counts.

13 years agoIn r219639, SSSE3 instruction set support was backported to our gcc.
Dimitry Andric [Thu, 14 Apr 2011 16:45:16 +0000 (16:45 +0000)]
In r219639, SSSE3 instruction set support was backported to our gcc.

Therefore, we also need to install the new tmmintrin.h header containing
the related intrinsic functions, similar to xmmintrin.h, emmintrin.h,
etc.

Reported by: George Liaskos <geo.liaskos@gmail.com>

13 years agoConsistently use __volatile as the rest of this file.
Jung-uk Kim [Thu, 14 Apr 2011 16:19:41 +0000 (16:19 +0000)]
Consistently use __volatile as the rest of this file.

13 years agoPrefer C99 standard integers to reduce diff from i386 version.
Jung-uk Kim [Thu, 14 Apr 2011 16:14:35 +0000 (16:14 +0000)]
Prefer C99 standard integers to reduce diff from i386 version.

13 years agoConsistently use C99 standard integers as the rest of this file.
Jung-uk Kim [Thu, 14 Apr 2011 16:02:52 +0000 (16:02 +0000)]
Consistently use C99 standard integers as the rest of this file.

13 years agoProvide a (belated) UPDATING note related to the new release-building
Nathan Whitehorn [Thu, 14 Apr 2011 15:44:44 +0000 (15:44 +0000)]
Provide a (belated) UPDATING note related to the new release-building
process so that fewer people will be caught unaware.

Requested by: emaste

13 years agoAdd $FreeBSD$'s.
David E. O'Brien [Thu, 14 Apr 2011 15:42:15 +0000 (15:42 +0000)]
Add $FreeBSD$'s.

13 years agoRevert r194662, since it breaks ng_ksocket(4) and may break
Gleb Smirnoff [Thu, 14 Apr 2011 14:54:22 +0000 (14:54 +0000)]
Revert r194662, since it breaks ng_ksocket(4) and may break
other socket consumers with alternate sb_upcall.

PR: kern/154676
Submitted by: Arnaud Lacombe <lacombar gmail.com>
MFC after: 7 days

13 years agoRemove stale M_ZOMBIE malloc type.
Sergey Kandaurov [Thu, 14 Apr 2011 14:25:47 +0000 (14:25 +0000)]
Remove stale M_ZOMBIE malloc type.
This type is unused since embedding p_ru into struct proc.

MFC after: 1 week

13 years agoRefactor udp_input(), moving calls to u_tun_func() into udp_append().
Edward Tomasz Napierala [Thu, 14 Apr 2011 10:40:57 +0000 (10:40 +0000)]
Refactor udp_input(), moving calls to u_tun_func() into udp_append().

Obtained from: Wheel Systems Sp. z o.o.
Reviewed by: bz@

13 years agoThe mbuf_frag_size always was and is file local and not queried from base
Bjoern A. Zeeb [Thu, 14 Apr 2011 09:47:09 +0000 (09:47 +0000)]
The mbuf_frag_size always was and is file local and not queried from base
user space tools via kvm.  Mark it static.

MFC after: 3 days

13 years agoFix typo in write_cache tunable name and move TUNABLE_INT_FETCH() out of
Alexander Motin [Thu, 14 Apr 2011 09:11:50 +0000 (09:11 +0000)]
Fix typo in write_cache tunable name and move TUNABLE_INT_FETCH() out of
the SIM lock to fix WITNESS warning.

Reported by: jh

13 years agoRemove vestiges of disklabel(5).
Sergey Kandaurov [Thu, 14 Apr 2011 08:53:04 +0000 (08:53 +0000)]
Remove vestiges of disklabel(5).

Reviewed by: uqs
MFC after: 5 days

13 years agoProperly log few more ATA commands used by the kernel.
Alexander Motin [Thu, 14 Apr 2011 08:17:45 +0000 (08:17 +0000)]
Properly log few more ATA commands used by the kernel.

13 years agoRefactor hard-reset implementation in mvs(4).
Alexander Motin [Thu, 14 Apr 2011 07:49:45 +0000 (07:49 +0000)]
Refactor hard-reset implementation in mvs(4).

Instead of spinning in a tight loop for up to 15 seconds, polling for device
readiness while it spins up, return reset completion just after PHY reports
"connect well" or 100ms connection timeout. If device was found, use callout
for checking device readiness with 100ms period up to full 31 second timeout.

This fixes system freeze for 5-10 seconds on drives hot plug-in.

13 years agoFixed firmware revision decoding:
Ruslan Ermilov [Thu, 14 Apr 2011 07:14:22 +0000 (07:14 +0000)]
Fixed firmware revision decoding:
- the major is 7-bit binary encoded
- the minor is BCD encoded

PR: kern/151586
MFC after: 3 days

13 years agoAdd some tunable descriptions about x86 timers.
Jung-uk Kim [Thu, 14 Apr 2011 00:07:08 +0000 (00:07 +0000)]
Add some tunable descriptions about x86 timers.

Requested by: arundel

13 years agoAdd VOP_PATHCONF() support to the experimental NFS client
Rick Macklem [Wed, 13 Apr 2011 22:37:28 +0000 (22:37 +0000)]
Add VOP_PATHCONF() support to the experimental NFS client
so that it can, along with other things, report whether or
not NFS4 ACLs are supported.

MFC after: 2 weeks

13 years agoFix the experimental NFSv4 client so that it recognizes server
Rick Macklem [Wed, 13 Apr 2011 22:16:52 +0000 (22:16 +0000)]
Fix the experimental NFSv4 client so that it recognizes server
mount point crossings correctly. It was testing the wrong flag.
Also, try harder to make sure that the fsid is different than
the one assigned to the client mount point, by hashing the
server's fsid (just to create a different value deterministically)
when it is the same.

MFC after: 2 weeks

13 years agoAdd a new DDB command, "show rmans", which will show the address and brief
Gavin Atkinson [Wed, 13 Apr 2011 19:10:56 +0000 (19:10 +0000)]
Add a new DDB command, "show rmans", which will show the address and brief
details of each rman header, but not the contents of all rman structures
in the system.  This is especially useful on platforms where some rmans
have many thousands of entries in rmans, making scrolling through the
output of "show all rman" impractical.  Individual rmans can then be viewed
including their contents with "show rman 0xaddr" as usual.

Reviewed by: jhb

13 years agoImport ACPICA 20110413.
Jung-uk Kim [Wed, 13 Apr 2011 18:18:52 +0000 (18:18 +0000)]
Import ACPICA 20110413.

13 years agoRemove mii(4) dependency and unneeded headers.
Pyun YongHyeon [Wed, 13 Apr 2011 16:35:43 +0000 (16:35 +0000)]
Remove mii(4) dependency and unneeded headers.

Reviewed by: davidch

13 years agoImprove SATA Asynchronous Notification feature support in CAM:
Alexander Motin [Wed, 13 Apr 2011 16:20:54 +0000 (16:20 +0000)]
Improve SATA Asynchronous Notification feature support in CAM:
 - make SATA SIMs announce capabilities to handle SDB with Notification bit;
 - make PMP driver honor this SIMs capability;
 - make SATA XPT to negotiate and enable this feature for ATAPI devices.

This feature allows supporting SATA ATAPI devices to inform system about
some events happened, that may require attention. In my case this allows
LG GH22LS50 SATA DVR-RW drive to report tray open/close events. Events
reported to CAM in form of AC_SCSI_AEN async. Further they could be used
as a hints for checking device status and reporting media change to upper
layers, for example, via spoiling mechanism of GEOM.

13 years agoAdd in the AR9285 (Kite) diversity to if_ath, enabling TX/RX antenna
Adrian Chadd [Wed, 13 Apr 2011 15:17:23 +0000 (15:17 +0000)]
Add in the AR9285 (Kite) diversity to if_ath, enabling TX/RX antenna
diversity.

This is bit dirty and likely should be revised at a later date,
with an eye to unifying/tidying up the whole diversity setup
and allowing developers to do "tricky stuff" as they desire.
For now, this works.

13 years agoAdd in the last bit of the HAL support for Kite diversity.
Adrian Chadd [Wed, 13 Apr 2011 15:12:48 +0000 (15:12 +0000)]
Add in the last bit of the HAL support for Kite diversity.

* add a new method, specifically for doing per-RX packet
  antenna diversity
* set that HAL method only if it's Kite and a Kite chip that
  does diversity.

13 years agoMore kite diversity related changes.
Adrian Chadd [Wed, 13 Apr 2011 15:08:51 +0000 (15:08 +0000)]
More kite diversity related changes.

* add a diversity flag to the HAL debugging section
* add a check to make sure the kite diversity code doesn't run
  on boards that don't require it, as not all Kite chips will
  implement it.
* add some debug statements when the diversity code makes
  changes to the antenna diversity/combining setup.

13 years agoChange this to be less noisy.
Adrian Chadd [Wed, 13 Apr 2011 14:51:07 +0000 (14:51 +0000)]
Change this to be less noisy.

13 years agoMake sure that extra threads in 32-bit processes stay in 32-bit mode. This
Nathan Whitehorn [Wed, 13 Apr 2011 13:24:27 +0000 (13:24 +0000)]
Make sure that extra threads in 32-bit processes stay in 32-bit mode. This
fixes operation of threaded 32-bit binaries on 64-bit kernels.

13 years agoShow client's access cache statistics.
Ruslan Ermilov [Wed, 13 Apr 2011 13:05:48 +0000 (13:05 +0000)]
Show client's access cache statistics.

13 years ago- Fixed nfs_printf() to use vprintf().
Ruslan Ermilov [Wed, 13 Apr 2011 12:46:25 +0000 (12:46 +0000)]
- Fixed nfs_printf() to use vprintf().
- Fixed vfs.nfs.acdebug sysctl's description.
- Fixed panic when compiled with NFS_ACDEBUG.

MFC after: 3 days

13 years agoRemove the now defunct kern.ipc.nmbufs tunable.
Sergey Kandaurov [Wed, 13 Apr 2011 12:19:03 +0000 (12:19 +0000)]
Remove the now defunct kern.ipc.nmbufs tunable.

PR: kern/132497 (part)
MFC after: 1 week

13 years agoBring over the antenna diversity logic support for Kite.
Adrian Chadd [Wed, 13 Apr 2011 11:32:15 +0000 (11:32 +0000)]
Bring over the antenna diversity logic support for Kite.

Again, this is just the code ported from ath9k and included in the build,
it isn't yet enabled.

13 years agoStaticize malloc types.
Sergey Kandaurov [Wed, 13 Apr 2011 11:28:46 +0000 (11:28 +0000)]
Staticize malloc types.

Approved by: lstewart
MFC after: 1 week

13 years agoAs soon as siis_reset() doesn't waits for device readiness, but only for
Alexander Motin [Wed, 13 Apr 2011 06:36:22 +0000 (06:36 +0000)]
As soon as siis_reset() doesn't waits for device readiness, but only for
controller port readiness (that should set just after PHY ready signal),
reduce wait time from 10s to 1s before trying more aggressive reset method.

This should improve system responsibility in some failure conditions.

13 years agoPort over a TX gain fix from ath9k specific to the AR9285 (Kite) and AR9271.
Adrian Chadd [Wed, 13 Apr 2011 04:40:59 +0000 (04:40 +0000)]
Port over a TX gain fix from ath9k specific to the AR9285 (Kite) and AR9271.
Note: this HAL currently only supports the AR9285.

From Linux ath9k:

The problem is that when the attenuation is increased,
the rate will start to drop from MCS7 -> MCS6, and finally
will see MCS1 -> CCK_11Mbps. When the rate is changed b/w
CCK and OFDM, it will use register desired_scale to calculate
how much tx gain need to change.

The output power with the same tx gain for CCK and OFDM modulated
signals are different. This difference is constant for AR9280
but not AR9285/AR9271. It has different PA architecture
a constant. So it should be calibrated against this PA
characteristic.

The driver has to read the calibrated values from EEPROM and set
the tx power registers accordingly.

13 years agoAdd new fields to the v4k EEPROM modal header.
Adrian Chadd [Wed, 13 Apr 2011 03:05:42 +0000 (03:05 +0000)]
Add new fields to the v4k EEPROM modal header.

13 years agoAdd OS_REG_RMW, which mirrors ath9k's REG_RMW.
Adrian Chadd [Wed, 13 Apr 2011 03:05:15 +0000 (03:05 +0000)]
Add OS_REG_RMW, which mirrors ath9k's REG_RMW.

This macro does a read-modify-write pass with register bits to set and clear.

13 years agoAdd the initial AR9285 PHY glue for supporting antenna diversity.
Adrian Chadd [Wed, 13 Apr 2011 02:40:45 +0000 (02:40 +0000)]
Add the initial AR9285 PHY glue for supporting antenna diversity.
This code isn't currently used anywhere; it's just linked into the build.

13 years ago- Fix the code that matches userids in match_jobspec(). It needs to check
Garance A Drosehn [Wed, 13 Apr 2011 00:36:19 +0000 (00:36 +0000)]
- Fix the code that matches userids in match_jobspec().  It needs to check
  the username-for-accounting field (P), not the username-for-headerpage (L).
  These are usually the same value, except that control files do not have
  the username-for-headerpage field if the user has requested no header page.
- Also rename the cji_username field to cji_headruser, to make it clear that
  the value should only be used for the header page.  (aka banner page)

MFC after: 3 weeks

13 years agoFix a couple of mbuf leaks introduced by r217242. I do
Rick Macklem [Wed, 13 Apr 2011 00:03:49 +0000 (00:03 +0000)]
Fix a couple of mbuf leaks introduced by r217242. I do
not believe that these leaks had a practical impact,
since the situations in which they would have occurred
would have been extremely rare.

MFC after: 2 weeks

13 years agoReduce errors in effective frequency calculation.
Jung-uk Kim [Tue, 12 Apr 2011 23:49:07 +0000 (23:49 +0000)]
Reduce errors in effective frequency calculation.

13 years agoReinstate cpu_est_clockrate() support for P-state invariant TSC if APERF and
Jung-uk Kim [Tue, 12 Apr 2011 23:04:01 +0000 (23:04 +0000)]
Reinstate cpu_est_clockrate() support for P-state invariant TSC if APERF and
MPERF MSRs are available.  It was disabled in r216443.  Remove the earlier
hack to subtract 0.5% from the calibrated frequency as DELAY(9) is little
bit more reliable now.

13 years agoAdd support for IEE/IEC (and now also SI) power of two notions of
Xin LI [Tue, 12 Apr 2011 22:48:03 +0000 (22:48 +0000)]
Add support for IEE/IEC (and now also SI) power of two notions of
prefixes (Ki, Mi, Gi...) for humanize_number(3).

Note that applications has to pass HN_IEC_PREFIXES to use this
feature for backward compatibility reasons.

Reviewed by: arundel
MFC after: 2 weeks

13 years agoDo not use TSC for DELAY(9) if it not P-state invariant to avoid possible
Jung-uk Kim [Tue, 12 Apr 2011 22:41:52 +0000 (22:41 +0000)]
Do not use TSC for DELAY(9) if it not P-state invariant to avoid possible
foot-shooting.  DELAY() becomes unreliable when TSC frequency varies wildly,
especially cpufreq(4) and powerd(8) are used at the same time.

13 years agoAdd forgotten declarations for tsc_perf_stat from the previous commit.
Jung-uk Kim [Tue, 12 Apr 2011 22:22:01 +0000 (22:22 +0000)]
Add forgotten declarations for tsc_perf_stat from the previous commit.

13 years agoProbe capability to find effective frequency. When the TSC is P-state
Jung-uk Kim [Tue, 12 Apr 2011 22:15:46 +0000 (22:15 +0000)]
Probe capability to find effective frequency.  When the TSC is P-state
invariant, APERF/MPERF ratio can be used to find effective frequency.

13 years agoAdd definitions for CPUID instruction 6, ECX information.
Jung-uk Kim [Tue, 12 Apr 2011 22:12:23 +0000 (22:12 +0000)]
Add definitions for CPUID instruction 6, ECX information.

13 years agoAdd a new tunable 'machdep.disable_tsc_calibration' to allow skipping TSC
Jung-uk Kim [Tue, 12 Apr 2011 21:08:34 +0000 (21:08 +0000)]
Add a new tunable 'machdep.disable_tsc_calibration' to allow skipping TSC
frequency calibration.  For Intel processors, if brand string from CPUID
contains its nominal frequency, this frequency is used instead.

13 years agoRefactor hard-reset implementation in ahci(4).
Alexander Motin [Tue, 12 Apr 2011 20:50:57 +0000 (20:50 +0000)]
Refactor hard-reset implementation in ahci(4).

Instead of spinning in a tight loop for up to 15 seconds, polling for device
readiness while it spins up, return reset completion just after PHY reports
"connect well" or 100ms connection timeout. If device was found, use callout
for checking device readiness with 100ms period up to full 31 second timeout.

This fixes system freeze for 5-10 seconds on drives hot plug-in.

13 years agoFix 'zfs list <path>' handling. If the path was found, the 'ret' variable was
Pawel Jakub Dawidek [Tue, 12 Apr 2011 20:31:33 +0000 (20:31 +0000)]
Fix 'zfs list <path>' handling. If the path was found, the 'ret' variable was
uninitialized.

PR: kern/155940
Submitted by: KOIE Hidetaka <koie@suri.co.jp>
MFC after: 1 week

13 years agoGet rid of DSIZ; instead just call the sizing function if provided.
Edward Tomasz Napierala [Tue, 12 Apr 2011 20:10:15 +0000 (20:10 +0000)]
Get rid of DSIZ; instead just call the sizing function if provided.

13 years agoThe replication mode that is currently support is fullsync, not memsync.
Pawel Jakub Dawidek [Tue, 12 Apr 2011 19:13:10 +0000 (19:13 +0000)]
The replication mode that is currently support is fullsync, not memsync.
Correct this and print a warning if different replication mode is
configured.

MFC after: 1 week

13 years agoImplement automatic SCSI sense fetching for mvs(4).
Alexander Motin [Tue, 12 Apr 2011 16:01:27 +0000 (16:01 +0000)]
Implement automatic SCSI sense fetching for mvs(4).

Make few improvements/changes to ATAPI PIO support to pass most of scgcheck
(cdrtools) tests.

13 years agoRestore previous behaviour - always match rule when we doing tagging,
Andrey V. Elsukov [Tue, 12 Apr 2011 15:20:34 +0000 (15:20 +0000)]
Restore previous behaviour - always match rule when we doing tagging,
even when tag is already exists.

Reported by: Vadim Goncharov
MFC after: 1 week

13 years agoUpdate some terminology: floppies are no longer built, and FreeBSD is not
Nathan Whitehorn [Tue, 12 Apr 2011 12:57:46 +0000 (12:57 +0000)]
Update some terminology: floppies are no longer built, and FreeBSD is not
necessarily distributed by CVS any longer.

13 years agoImplement automatic SCSI sense fetching for siis(4).
Alexander Motin [Tue, 12 Apr 2011 11:29:15 +0000 (11:29 +0000)]
Implement automatic SCSI sense fetching for siis(4).

Fix device freeze leak on recovery request (READ LOG, REQUEST SENSE)
failure.

13 years agoImplement automatic SCSI sense fetching for ahci(4).
Alexander Motin [Tue, 12 Apr 2011 11:24:59 +0000 (11:24 +0000)]
Implement automatic SCSI sense fetching for ahci(4).

13 years agoImplement automatic SCSI sense fetching for ata(4) in ATA_CAM mode.
Alexander Motin [Tue, 12 Apr 2011 09:55:24 +0000 (09:55 +0000)]
Implement automatic SCSI sense fetching for ata(4) in ATA_CAM mode.
While it could be successfully done by CAM error recovery code, I was
told by several people that it is also a SIM obligation.

13 years agoUse the full and proper company name for Swinburne University of Technology
Lawrence Stewart [Tue, 12 Apr 2011 08:13:18 +0000 (08:13 +0000)]
Use the full and proper company name for Swinburne University of Technology
throughout the source tree.

Requested by: Grenville Armitage, Director of CAIA at Swinburne University of
Technology
MFC after: 3 days

13 years agoIntroduce geom_map, a GEOM provider designed for use by
Adrian Chadd [Tue, 12 Apr 2011 08:10:25 +0000 (08:10 +0000)]
Introduce geom_map, a GEOM provider designed for use by
embedded flash stores.

Some devices - notably those with uboot - don't have an
explicit partition table (eg like Redboot's FIS.)
geom_map thus provides an easy way to export the hard-coded
flash layout as geom providers for use by filesystems and
other tools.

It also includes a "search" function which allows for
dynamic creation of partition layouts where the device only
has a single hard-coded partition. For example, if
there is a "kernel+rootfs" partition, a single image can
be created which appends the rootfs after the kernel with
an appropriate search string. geom_map can be told to
search for said search string and create a partition
beginning after it.

Submitted by: Aleksandr Rybalko <ray@dlink.ua>

13 years agoWe don't need to call EOWRITE4(sc, EHCI_USBINTR, 0) directly from each EHCI
Hans Petter Selasky [Tue, 12 Apr 2011 07:49:11 +0000 (07:49 +0000)]
We don't need to call EOWRITE4(sc, EHCI_USBINTR, 0) directly from each EHCI
bus driver at detach, hence ehci_detach() does exactly this since r199718.

Submitted by: Luiz Otavio O Souza
MFC after: 7 days
Approved by: thompsa (mentor)

13 years agoIf building (custom) FreeBSD images people tend to patch param.h. In case
Bjoern A. Zeeb [Tue, 12 Apr 2011 02:07:23 +0000 (02:07 +0000)]
If building (custom) FreeBSD images people tend to patch param.h.  In case
this happens just before the build is started (within the same second)
CHECK_TIME actually triggers thinking param.h is in the future (see f_Xtime,
c_Xtime logi in find(1) sources for the details in !F_EXACTTIME case).
Using the -mtime -0s (seconds, rather than no unit) avoids this 1s race.

Submitted by: ed (2009-05-03)
Reviewed by: cperciva (2009-05-03), emaste
Tested by: bz (for almost two years)
MFC after: 4 days

13 years agoEven though this block is not compiled currently, properly assign
Bjoern A. Zeeb [Tue, 12 Apr 2011 01:19:23 +0000 (01:19 +0000)]
Even though this block is not compiled currently, properly assign
CSUM_TSO to if_hwassist rather than if_capabilities to avoid future
errors.

Reviewed by: jeff

13 years agoMFV of r220547, tzdata2011f:
Edwin Groothuis [Mon, 11 Apr 2011 21:57:59 +0000 (21:57 +0000)]
MFV of r220547, tzdata2011f:

- During 2011 the Falkland Islands will remain on Summer time.

Obtained from:  ftp://elsie.nci.nih.gov/pub/

13 years agoVendor import of tzdata2011f:
Edwin Groothuis [Mon, 11 Apr 2011 21:54:09 +0000 (21:54 +0000)]
Vendor import of tzdata2011f:

- During 2011 the Falkland Islands will remain on Summer time.

Obtained from: ftp://elsie.nci.nih.gov/pub/

13 years agoVrele ni_startdir in the experimental NFS server for the case
Rick Macklem [Mon, 11 Apr 2011 20:54:30 +0000 (20:54 +0000)]
Vrele ni_startdir in the experimental NFS server for the case
of NFSv2 getting an error return from VOP_MKNOD(). Without this
patch, the server file system remains busy after an NFSv2
VOP_MKNOD() fails.

MFC after: 2 weeks

13 years agoMerge two similar functions to reduce duplication.
Jung-uk Kim [Mon, 11 Apr 2011 19:27:44 +0000 (19:27 +0000)]
Merge two similar functions to reduce duplication.

13 years agoDon't do make release and make install in one step. Setting DESTDIR for
Nathan Whitehorn [Mon, 11 Apr 2011 15:03:01 +0000 (15:03 +0000)]
Don't do make release and make install in one step. Setting DESTDIR for
make release has deleterious consequences.

13 years agoMake the keymap script continue to work now that stderr is being
Nathan Whitehorn [Mon, 11 Apr 2011 14:46:40 +0000 (14:46 +0000)]
Make the keymap script continue to work now that stderr is being
redirected to the log file.