]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
13 years agoMFC r215034:
brucec [Sat, 20 Nov 2010 20:34:13 +0000 (20:34 +0000)]
MFC r215034:

Fix typos.

PR: bin/148894
Submitted by: olgeni

git-svn-id: svn://svn.freebsd.org/base/stable/8@215588 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r215211: echo(1): Clarify portability and mention literal "--" handling.
jilles [Sat, 20 Nov 2010 19:39:12 +0000 (19:39 +0000)]
MFC r215211: echo(1): Clarify portability and mention literal "--" handling.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215586 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r215035:
tuexen [Sat, 20 Nov 2010 19:39:02 +0000 (19:39 +0000)]
MFC r215035:
Fix a bug which resulted in kevent() reporting an event twice on
1-to-1 style sockets when an ABORT was received.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215585 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r215184: sh: Remove unused man page for echo builtin.
jilles [Sat, 20 Nov 2010 19:37:33 +0000 (19:37 +0000)]
MFC r215184: sh: Remove unused man page for echo builtin.

The information in sh(1) about the echo builtin is equivalent, though less
extensive.

The echo(1) man page (bin/echo/echo.1) is different.

Unfortunately, sh's echo builtin and /bin/echo have gone out of sync and
this probably cannot be fixed any more.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215584 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r214939:
tuexen [Sat, 20 Nov 2010 19:37:00 +0000 (19:37 +0000)]
MFC r214939:
Do not have the MTU table twice in the code. Therefore move the
function from the timer code to util, rename it appropriately and
also fix a bug in sctp_get_prev_mtu(), where calling it with a
value existing in the MTU table did not return a smaller one.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215583 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r214933:
tuexen [Sat, 20 Nov 2010 19:35:13 +0000 (19:35 +0000)]
MFC r214933:
Remove two functions which are not used.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215582 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r214928:
tuexen [Sat, 20 Nov 2010 19:33:42 +0000 (19:33 +0000)]
MFC r214928:
 * Use exponential backoff for retransmission of SHUTDOWN and
   SHUTDOWN-ACK chunks.
 * While there, do some cleanups.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215581 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r214918:
tuexen [Sat, 20 Nov 2010 19:31:31 +0000 (19:31 +0000)]
MFC r214918:
Not only stop all timers when entering the SHUTDOWN_SENT state,
but also when entering the SHUTDOWN_ACK_SENT state.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215580 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r214877:
tuexen [Sat, 20 Nov 2010 19:29:18 +0000 (19:29 +0000)]
MFC r214877:

Do not resend DATA chunks without delay when dropped by the peer and
the CRC was correct.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215579 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r214876
tuexen [Sat, 20 Nov 2010 19:26:35 +0000 (19:26 +0000)]
MFC r214876
 * Fix an accounting bug regarding SACK/NR-SACK chunks.
 * Fix the generation of the SACK/NR-SACK gap lists.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215578 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoAdd a second fix-up for the PC98 case.
attilio [Sat, 20 Nov 2010 18:24:09 +0000 (18:24 +0000)]
Add a second fix-up for the PC98 case.
PC98 cases might be explicit in presence of a difference with i386
because both are defined, leading to mishandling of code in
circumstances like this.

Reported by: nyan

git-svn-id: svn://svn.freebsd.org/base/stable/8@215575 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r215183: Make POLL_ERR and POLL_HUP different.
jilles [Sat, 20 Nov 2010 16:46:16 +0000 (16:46 +0000)]
MFC r215183: Make POLL_ERR and POLL_HUP different.

The kernel currently does not generate any of the POLL_* constants, but
some applications use them and break if they are not all distinct.

PR: kern/126076

git-svn-id: svn://svn.freebsd.org/base/stable/8@215572 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agofix a mismerge in r215521: MFC imports of ACPICA revisions 20100428
avg [Sat, 20 Nov 2010 16:42:19 +0000 (16:42 +0000)]
fix a mismerge in r215521: MFC imports of ACPICA revisions 20100428
through 20101013

The mismerge resulted in ia64 build breakage.
This is a direct commit.

Pointyhat to: avg

git-svn-id: svn://svn.freebsd.org/base/stable/8@215571 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r201793:
bschmidt [Sat, 20 Nov 2010 13:28:32 +0000 (13:28 +0000)]
MFC r201793:
Fix #ifdefs so that GCC 4.4 doesn't complain about it.

Committed by: trasz

git-svn-id: svn://svn.freebsd.org/base/stable/8@215565 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213321:
bschmidt [Sat, 20 Nov 2010 13:26:09 +0000 (13:26 +0000)]
MFC r213321:
Fix background roaming to actually work in AUTO roaming mode.

IEEE80211_F_BGSCAN is a vap flag, not a channel flag. So although bgscan
occured, sta_roam_check() would never be called.

Committed by: adrian

git-svn-id: svn://svn.freebsd.org/base/stable/8@215564 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209092:
bschmidt [Sat, 20 Nov 2010 13:24:05 +0000 (13:24 +0000)]
MFC r209092:
Remove GNU-style struct initialization.

Committed by: ed

git-svn-id: svn://svn.freebsd.org/base/stable/8@215563 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212853-212855:
bschmidt [Sat, 20 Nov 2010 13:12:59 +0000 (13:12 +0000)]
MFC r212853-212855:
Rewrite parts of the calibration code which is run while bringing up
the device:
- Group functions used for initial calibration.
- Unobscure some of the code by moving it into its own functions.
- Get rid of some magic numbers.
- Create similar structure as the reference driver has, this should
  make further syncs easier.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215562 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r199018 & r199037:
bschmidt [Sat, 20 Nov 2010 12:59:01 +0000 (12:59 +0000)]
MFC r199018 & r199037:
Turn off debug output by default.

Committed by: dougb

git-svn-id: svn://svn.freebsd.org/base/stable/8@215561 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r215289:
bschmidt [Sat, 20 Nov 2010 12:28:24 +0000 (12:28 +0000)]
MFC r215289:
The ni_rctls checks are used to verify that a ratectl algo has set up
its internal data. This has been used to bypass missing calls in drivers
which do not use the ratectl framework correctly. Issue is, not all algos
use that variable, or even have internal data, therefore valid calls are
not done. Fix this by removing the checks, all driver issues should be
resolved.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215560 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r215244:
bschmidt [Sat, 20 Nov 2010 12:26:31 +0000 (12:26 +0000)]
MFC r215244:
Some device drivers calculate various timing related things based on
the currently selected rate. The calculations of course need a valid
rate. To make that possible before any call to node_rate() is done,
initialize ni_txrate on none_node_init() calls.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215558 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r214894:
bschmidt [Sat, 20 Nov 2010 12:24:26 +0000 (12:24 +0000)]
MFC r214894:
Instead of using the AMRR ratectl algo as default for drivers which have
the IEEE80211_C_RATECTL flag set, default to NONE for all drivers. Only if
a driver calls ieee80211_ratectl_init() check if the NONE algo is still
selected and try to use AMRR in that case. Drivers are still free to use
any other algo by calling ieee80211_ratectl_set() prior to the
ieee80211_ratectl_init() call.

After this change it is now safe to assume that a ratectl algo is always
available and selected, which renders the IEEE80211_C_RATECTL flag pretty
much useless. Therefore revert r211314 and 211546.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215557 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r207323:
bschmidt [Sat, 20 Nov 2010 12:22:02 +0000 (12:22 +0000)]
MFC r207323:
When in the RUN -> AUTH -> RUN FSM transition happens, we'll call the
ratectl_node_init() functions and since ni_rtctls was already malloc'ed()
we will panic. Fix this by using the already malloc'ed pointer.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215556 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r215248:
kib [Sat, 20 Nov 2010 11:14:06 +0000 (11:14 +0000)]
MFC r215248:
In printfile(), exit the process instead of only printing the warning.
Adjust style.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215555 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r215260:
mm [Sat, 20 Nov 2010 10:12:20 +0000 (10:12 +0000)]
MFC r215260:

Disable VFS_HOLD placed on mnt_vnodecovered during the mount of a snapshot
and VFS_RELE on a non-existing hold on snapshot parent's z_vfs.

This disables the changes from OpenSolaris onnv-revision 9234:bffdc4fc05c4
(bug IDs: 67921396794830) - not applicable to FreeBSD.

This fixes the process hang if umounting a manually mounted snapshot.

Reported by: Alexander Zagrebin <alexz@visp.ru>
Approved by: delphij (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@215554 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212281 and 212282
rstone [Sat, 20 Nov 2010 04:54:58 +0000 (04:54 +0000)]
MFC r212281 and 212282

In munmap() downgrade the vm_map_lock to a read lock before taking a read
lock on the pmc-sx lock.  This prevents a deadlock with
pmc_log_process_mappings, which has an exclusive lock on pmc-sx and tries
to get a read lock on a vm_map.  Downgrading the vm_map_lock in munmap
allows pmc_log_process_mappings to continue, preventing the deadlock.

Without this change I could cause a deadlock on a multicore 8.1-RELEASE
system by having one thread constantly mmap'ing and then munmap'ing a
PROT_EXEC mapping in a loop while I repeatedly invoked and stopped pmcstat
in system-wide sampling mode.

Approved by: emaste (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@215551 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213853
thompsa [Fri, 19 Nov 2010 21:04:18 +0000 (21:04 +0000)]
MFC r213853

 - Add missing LibUSB API functions:
   * libusb_strerror()
   * libusb_get_driver[_np]()
   * libusb_detach_kernel_driver[_np]()
 - Factor out setting of non-blocking flag inside libusb.
 - Add missing NULL check after libusb_get_device() call.
 - Correct some wrong error codes due to copy and paste error.

 PR: usb/150546
 Submitted by: Robert Jenssen, Alexander Leidinger

git-svn-id: svn://svn.freebsd.org/base/stable/8@215546 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoFix-up r215539 by specifying correctly the ISA headers are they are not
attilio [Fri, 19 Nov 2010 20:23:01 +0000 (20:23 +0000)]
Fix-up r215539 by specifying correctly the ISA headers are they are not
shared on STABLE_8.

Reported by: kib

git-svn-id: svn://svn.freebsd.org/base/stable/8@215545 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r214457,214515,214584,214676,214681,214686 by jhb, nyan and me:
attilio [Fri, 19 Nov 2010 17:49:16 +0000 (17:49 +0000)]
MFC r214457,214515,214584,214676,214681,214686 by jhb, nyan and me:
Move nexus in x86 and cleaning it up.

Sponsored by: Sandvine Incorporated

git-svn-id: svn://svn.freebsd.org/base/stable/8@215539 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r200874
marius [Fri, 19 Nov 2010 17:11:12 +0000 (17:11 +0000)]
MFC: r200874

Convert drivers somehow missed in r200874 (merged to stable/8 in r202225)
to multipass probing.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215536 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 204352, 208028, 209266, 209399, 210723, 213672, 215046:
jhb [Fri, 19 Nov 2010 17:08:15 +0000 (17:08 +0000)]
MFC 204352, 208028, 209266, 209399, 210723, 213672, 215046:
- Fixed static linkage.
- Document that mptutil/mpt do not support RAID volumes in excess of 2TB.
- Report subcommand handler errors so that tools that invoke mptutil can
  robustly report errors.
- Save errno values before calling warn(3) so that errors are correctly
  reported.
- Check for malloc() failures.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215534 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r215300
marius [Fri, 19 Nov 2010 17:07:32 +0000 (17:07 +0000)]
MFC: r215300

Remove redundant cases and a style(9) bug.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215532 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r214879
marius [Fri, 19 Nov 2010 17:04:55 +0000 (17:04 +0000)]
MFC: r214879

Implement pmap_is_prefaultable().

Reviewed by: alc (with bugfix)

git-svn-id: svn://svn.freebsd.org/base/stable/8@215530 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 214782:
jhb [Fri, 19 Nov 2010 16:52:18 +0000 (16:52 +0000)]
MFC 214782:
Update startup_alloc() to support multi-page allocations and allow internal
zones whose objects are larger than a page to use startup_alloc().  This
allows allocation of zone objects during early boot on machines with a large
number of CPUs since the resulting zone objects are larger than a page.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215529 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 215001:
jhb [Fri, 19 Nov 2010 16:24:12 +0000 (16:24 +0000)]
MFC 215001:
Only dump the values of the PMC and CMCI local vector table entries on a
local APIC if those LVT entries are valid.  This quiets spurious illegal
register local APIC errors during boot on a CPU that doesn't support those
vectors.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215527 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC imports of ACPICA revisions 20100428 through 20101013
avg [Fri, 19 Nov 2010 14:26:45 +0000 (14:26 +0000)]
MFC imports of ACPICA revisions 20100428 through 20101013

Plus related changes and ehancements.

Full list of revisions:

o-----------------------------------------------------------------------
r207344 | jkim | 2010-04-29 01:25:27 +0300 (Thu, 29 Apr 2010) | 2 lines
Merge ACPICA 20100428.
o-----------------------------------------------------------------------
r209065 | jkim | 2010-06-11 22:58:41 +0300 (Fri, 11 Jun 2010) | 2 lines
Simplify a function for getting brightness levels.
o-----------------------------------------------------------------------
r209746 | jkim | 2010-07-06 23:57:28 +0300 (Tue, 06 Jul 2010) | 2 lines
Merge ACPICA 20100702.
o-----------------------------------------------------------------------
r209747 | jkim | 2010-07-07 00:41:08 +0300 (Wed, 07 Jul 2010) | 2 lines
Fix mis-merges in the previous commit.
o-----------------------------------------------------------------------
r210150 | jkim | 2010-07-16 02:24:06 +0300 (Fri, 16 Jul 2010) | 3 lines
If there is any pending sleep request, disallow entering S5 state.
Otherwise, bad things may happen. ;-)
o-----------------------------------------------------------------------
r210976 | jkim | 2010-08-07 02:11:19 +0300 (Sat, 07 Aug 2010) | 2 lines
Merge ACPICA 20100806.
o-----------------------------------------------------------------------
r211763 | mav | 2010-08-24 21:07:59 +0300 (Tue, 24 Aug 2010) | 4 lines
When ACPI reports current battery consumption rate in mAmps, print it also
in mWatts. Values in mAmps are not always suitable, because they depend on
battery voltage, which depends on battery type and charge level.
o-----------------------------------------------------------------------
r212761 | jkim | 2010-09-16 23:08:00 +0300 (Thu, 16 Sep 2010) | 2 lines
Merge ACPICA 20100915.
o-----------------------------------------------------------------------
r213772 | rpaulo | 2010-10-13 14:38:24 +0300 (Wed, 13 Oct 2010) | 3 lines
Mark acpi_bus_number() as __unused. This allows clang to this file
without any warnings.
o-----------------------------------------------------------------------
r213783 | jkim | 2010-10-13 19:30:41 +0300 (Wed, 13 Oct 2010) | 4 lines
Remove acpi_bus_number() completely.  It had to be removed in r212761.
Pointed out by: jhb
o-----------------------------------------------------------------------
r213787 | jkim | 2010-10-13 20:06:25 +0300 (Wed, 13 Oct 2010) | 2 lines
Clean up unused headers.
o-----------------------------------------------------------------------
r213806 | jkim | 2010-10-14 00:37:02 +0300 (Thu, 14 Oct 2010) | 2 lines
Merge ACPICA 20101013.
o-----------------------------------------------------------------------
r214390 | jkim | 2010-10-26 21:59:50 +0300 (Tue, 26 Oct 2010) | 18 lines
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"
o-----------------------------------------------------------------------
r214401 | jkim | 2010-10-27 00:22:55 +0300 (Wed, 27 Oct 2010) | 3 lines
Document newly added loader tunables "hw.acpi.install_interface" and
"hw.acpi.remove_interface".
o-----------------------------------------------------------------------
r214765 | jkim | 2010-11-04 01:16:35 +0200 (Thu, 04 Nov 2010) | 4 lines
Adjust a comment to clarify why \_SB_ and \_TZ_ are defined as device type
in ACPICA.  Reshuffle the code a bit to make sure this kludge only applies
to these two specical cases and to make it cleaner.
o-----------------------------------------------------------------------
r214848 | jkim | 2010-11-05 21:50:09 +0200 (Fri, 05 Nov 2010) | 13 lines
Fix a use-after-free bug for extended IRQ resource[1].  When _PRS buffer is
copied as a template for _SRS, a string pointer for descriptor name is also
copied and it becomes stale as soon as it gets de-allocated[2].  Now _CRS is
used as a template for _SRS as ACPI specification suggests if it is usable.
The template from _PRS is still utilized but only when _CRS is not available
or broken.  To avoid use-after-free the problem in this case, however, only
mandatory fields are copied, optional data is removed, and structure length
is adjusted accordingly.
Reported by: hps[1]
Analyzed by: avg[2]
Tested by: hps
o-----------------------------------------------------------------------
r214849 | jkim | 2010-11-05 22:24:26 +0200 (Fri, 05 Nov 2010) | 2 lines
Add a forgotten change from the previous commit.
o-----------------------------------------------------------------------
r214998 | jkim | 2010-11-08 21:52:14 +0200 (Mon, 08 Nov 2010) | 2 lines
Consistently use padding `_' in the comment.
o-----------------------------------------------------------------------

Reviewed by: jkim
Tested by: Alexandre "Sunny" Kovalenko <gaijin.k@ovi.com>
On behalf of: jkim

git-svn-id: svn://svn.freebsd.org/base/stable/8@215521 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209686,r209702:
kib [Fri, 19 Nov 2010 10:14:07 +0000 (10:14 +0000)]
MFC r209686,r209702:
Reimplement vm_object_page_clean(), using the fact that vm object memq
is ordered by page index.

Reviewed by: alc

git-svn-id: svn://svn.freebsd.org/base/stable/8@215517 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r215397: fix misspelling in a comment
avg [Fri, 19 Nov 2010 10:01:30 +0000 (10:01 +0000)]
MFC r215397: fix misspelling in a comment

git-svn-id: svn://svn.freebsd.org/base/stable/8@215516 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMerge the kern_fpu_enter/kern_fpu_leave KPI and followup fixes for the
kib [Fri, 19 Nov 2010 09:49:14 +0000 (09:49 +0000)]
Merge the kern_fpu_enter/kern_fpu_leave KPI and followup fixes for the
amd64 suspend/resume support.

Tested by: Mike Tancsa
Also tested by: Dewayne Geraghty <dewayne.geraghty heuristicsystems com au>,
     Daryl Richards <daryl isletech net>

Below is the svn log of the merged revisions.
------------------------------------------------------------------------
r197455 | emaste | 2009-09-24 17:26:42 +0300 (Thu, 24 Sep 2009) | 5 lines

Add a backtrace to the "fpudna in kernel mode!" case, to help track down
where this comes from.

Reviewed by: bde

------------------------------------------------------------------------
r197863 | jkim | 2009-10-08 20:41:53 +0300 (Thu, 08 Oct 2009) | 8 lines

Clean up amd64 suspend/resume code.

- Allocate memory for wakeup code after ACPI bus is attached.  The early
memory allocation hack was inherited from i386 but amd64 does not need it.
- Exclude real mode IVT and BDA explicitly.  Improve comments about memory
allocation and reason for the exclusions.  It is a no-op in reality, though.
- Remove an unnecessary CLD from wakeup code and re-align.

------------------------------------------------------------------------
r198931 | jkim | 2009-11-05 00:39:18 +0200 (Thu, 05 Nov 2009) | 2 lines

Tweak memory allocation for amd64 suspend/resume CPU context.

------------------------------------------------------------------------
r200280 | jkim | 2009-12-09 00:38:42 +0200 (Wed, 09 Dec 2009) | 2 lines

Simplify a macro not to generate unncessary symbols.

------------------------------------------------------------------------
r205444 | emaste | 2010-03-22 13:52:53 +0200 (Mon, 22 Mar 2010) | 7 lines

Merge r197455 from amd64:

  Add a backtrace to the "fpudna in kernel mode!" case, to help track down
  where this comes from.

  Reviewed by: bde

------------------------------------------------------------------------
r208833 | kib | 2010-06-05 18:59:59 +0300 (Sat, 05 Jun 2010) | 15 lines

Introduce the x86 kernel interfaces to allow kernel code to use
FPU/SSE hardware. Caller should provide a save area that is chained
into the stack of the areas; pcb save_area for usermode FPU state is
on top. The pcb now contains a pointer to the current FPU saved area,
used during FPUDNA handling and context switches.  There is also a
facility to allow the kernel thread to use pcb save_area.

Change the dreaded warnings "npxdna in kernel mode!" into the panics
when FPU usage is not registered.

KPI discussed with: fabient
Tested by:    pho, fabient
Hardware provided by: Sentex Communications
MFC after:    1 month

------------------------------------------------------------------------
r208834 | kib | 2010-06-05 19:00:53 +0300 (Sat, 05 Jun 2010) | 13 lines

Use the fpu_kern_enter() interface to properly separate usermode FPU
context from in-kernel execution of padlock instructions and to handle
spurious FPUDNA exceptions that sometime are raised when doing padlock
calculations.

Globally mark crypto(9) kthread as using FPU.

Reviewed by: pjd
Hardware provided by: Sentex Communications
Tested by:   pho
PR:    amd64/135014
MFC after:    1 month

------------------------------------------------------------------------
r208877 | kib | 2010-06-06 19:13:50 +0300 (Sun, 06 Jun 2010) | 5 lines

Style-compilant order of declarations.

Noted by: bde
MFC after: 1 month

------------------------------------------------------------------------
r209174 | jkim | 2010-06-14 23:08:26 +0300 (Mon, 14 Jun 2010) | 3 lines

Fix ACPI suspend/resume on amd64, which was broken since r208833.
We need actual storage for FPU state to save and restore.

------------------------------------------------------------------------
r209198 | kib | 2010-06-15 12:19:33 +0300 (Tue, 15 Jun 2010) | 10 lines

Use critical sections instead of disabling local interrupts to ensure
the consistency between PCPU fpcurthread and the state of the FPU.

Explicitely assert that the calling conventions for fpudrop() are
adhered too. In cpu_thread_exit(), add missed critical section entrance.

Reviewed by: bde
Tested by: pho
MFC after: 1 month

------------------------------------------------------------------------
r209204 | kib | 2010-06-15 17:59:35 +0300 (Tue, 15 Jun 2010) | 5 lines

Rename CRITSECT_ASSERT to CRITICAL_ASSERT.

Suggested by: jhb
MFC after: 1 month

------------------------------------------------------------------------
r209208 | kib | 2010-06-15 21:16:04 +0300 (Tue, 15 Jun 2010) | 4 lines

Remove two obsoleted comments, add a note about 32bit compatibility.

MFC after: 1 month

------------------------------------------------------------------------
r209252 | kib | 2010-06-17 15:35:17 +0300 (Thu, 17 Jun 2010) | 6 lines

In the ia32_{get,set}_fpcontext(), use fpu{get,set}userregs instead
of fpu{get,set}regs.

Noted by: bde
MFC after: 1 month

------------------------------------------------------------------------
r209460 | kib | 2010-06-23 13:40:28 +0300 (Wed, 23 Jun 2010) | 8 lines

Remove unused i586 optimized bcopy/bzero/etc implementations that utilize
FPU registers for copying. Remove the switch table and jumps from
bcopy/bzero/... to the actual implementation.
As a side-effect, i486-optimized bzero is removed.

Reviewed by: bde
Tested by: pho (previous version)

------------------------------------------------------------------------
r209461 | kib | 2010-06-23 14:12:58 +0300 (Wed, 23 Jun 2010) | 8 lines

Remove the support for int13 FPU exception reporting on i386. It is
believed that all 486-class CPUs FreeBSD is capable to run on, either
have no FPU and cannot use external coprocessor, or have FPU on the
package and can use #MF.

Reviewed by: bde
Tested by: pho (previous version)

------------------------------------------------------------------------
r209462 | kib | 2010-06-23 14:21:19 +0300 (Wed, 23 Jun 2010) | 8 lines

After the FPU use requires #MF working due to INT13 FPU exception handling
removal, MFi386 r209198:
    Use critical sections instead of disabling local interrupts to ensure
    the consistency between PCPU fpcurthread and the state of FPU.

Reviewed by: bde
Tested by: pho

------------------------------------------------------------------------
r210514 | jkim | 2010-07-26 22:53:09 +0300 (Mon, 26 Jul 2010) | 6 lines

Re-implement FPU suspend/resume for amd64.  This removes superfluous uses
of critical_enter(9) and critical_exit(9) by fpugetregs() and fpusetregs().
Also, we do not touch PCB flags any more.

MFC after: 1 month

------------------------------------------------------------------------
r210517 | jkim | 2010-07-27 00:24:52 +0300 (Tue, 27 Jul 2010) | 4 lines

FNSTSW instruction can use AX register as an operand.

Obtained from: fenv.h

------------------------------------------------------------------------
r210518 | jkim | 2010-07-27 01:16:36 +0300 (Tue, 27 Jul 2010) | 5 lines

Reduce diff against fenv.h:

Mark all inline asms as volatile for safety.  No object file change after
this commit (verified with md5).

------------------------------------------------------------------------
r210519 | jkim | 2010-07-27 01:55:14 +0300 (Tue, 27 Jul 2010) | 2 lines

Remove an unused macro since r189418.

------------------------------------------------------------------------
r210520 | jkim | 2010-07-27 02:02:18 +0300 (Tue, 27 Jul 2010) | 2 lines

Add missing ldmxcsr() prototype for lint case.

------------------------------------------------------------------------
r210521 | jkim | 2010-07-27 02:20:55 +0300 (Tue, 27 Jul 2010) | 3 lines

Simplify fldcw() macro.  There is no reason to use pointer here.  No object
file change after this commit (verified with md5).

------------------------------------------------------------------------
r210614 | jkim | 2010-07-29 19:41:21 +0300 (Thu, 29 Jul 2010) | 2 lines

Rename PCB_USER_FPU to PCB_USERFPU not to clash with a macro from fpu.h.

------------------------------------------------------------------------
r210615 | jkim | 2010-07-29 19:49:20 +0300 (Thu, 29 Jul 2010) | 5 lines

Fix another fallout from r208833.  savectx() is used to save CPU context
for crash dump (dumppcb) and kdb (stoppcbs).  For both cases, there cannot
have a valid pointer in pcb_save.  This should restore the previous
behaviour.

------------------------------------------------------------------------
r210777 | jkim | 2010-08-02 20:35:00 +0300 (Mon, 02 Aug 2010) | 13 lines

- Merge savectx2() with savectx() and struct xpcb with struct pcb. [1]
savectx() is only used for panic dump (dumppcb) and kdb (stoppcbs).  Thus,
saving additional information does not hurt and it may be even beneficial.
Unfortunately, struct pcb has grown larger to accommodate more data.
Move 512-byte long pcb_user_save to the end of struct pcb while I am here.
- savectx() now saves FPU state unconditionally and copy it to the PCB of
FPU thread if necessary.  This gives panic dump and kdb a chance to take
a look at the current FPU state even if the FPU is "supposedly" not used.
- Resuming CPU now unconditionally reinitializes FPU.  If the saved FPU
state was irrelevant, it could be in an unknown state.

Suggested by: bde [1]

------------------------------------------------------------------------
r210804 | jkim | 2010-08-03 18:32:08 +0300 (Tue, 03 Aug 2010) | 6 lines

savectx() has not been used for fork(2) for about 15 years. [1]
Do not clobber FPU thread's PCB as it is more harmful.  When we resume CPU,
unconditionally reload FPU state.

Pointed out by: bde [1]

------------------------------------------------------------------------
r212026 | jkim | 2010-08-31 00:19:42 +0300 (Tue, 31 Aug 2010) | 3 lines

Save MSR_FSBASE, MSR_GSBASE and MSR_KGSBASE directly to PCB as we do not use
these values in the function.

------------------------------------------------------------------------
r214347 | jhb | 2010-10-25 18:31:13 +0300 (Mon, 25 Oct 2010) | 5 lines

Use 'saveintr' instead of 'savecrit' or 'eflags' to hold the state returned
by intr_disable().

Requested by: bde

------------------------------------------------------------------------

git-svn-id: svn://svn.freebsd.org/base/stable/8@215513 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r214672:
mav [Fri, 19 Nov 2010 09:26:39 +0000 (09:26 +0000)]
MFC r214672:
Remove stale line, accidentally slipped into r214016.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215512 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209683 by imp:
mav [Fri, 19 Nov 2010 09:25:12 +0000 (09:25 +0000)]
MFC r209683 by imp:
Add a safety-belt.  If the identified disk has 0 blocks, don't attach
it.  This can happen in some cases when plugging in SD/SmartCard PC
Cards with empty slots.  It is better to detect this bogosity, and
refuse to attach rather than panic with a division by zero (in one of
many places) down stream.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215511 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209682 by imp:
mav [Fri, 19 Nov 2010 09:21:53 +0000 (09:21 +0000)]
MFC r209682 by imp:
Minor formatting nits.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215510 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r214988:
mav [Fri, 19 Nov 2010 09:14:53 +0000 (09:14 +0000)]
MFC r214988:
Teach ahci(4), siis(4) and ATA_CAM ata(4) wrapper report to CAM residual
I/O length on underruns, that often happens for some SCSI commands.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215509 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r207768
thompsa [Fri, 19 Nov 2010 01:58:11 +0000 (01:58 +0000)]
MFC r207768

 Add dummy function for ic_update_mcast (a la if_urtw) to avoid console
 spam.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215506 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r215330
thompsa [Fri, 19 Nov 2010 01:52:34 +0000 (01:52 +0000)]
MFC r215330

 Add the Sierra MC8700.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215505 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r215326
thompsa [Fri, 19 Nov 2010 01:51:51 +0000 (01:51 +0000)]
MFC r215326

 Add a special INIT product ID used by some models of the HUAWEI
 K3765 datacard. After ejecting this device, it reappears using
 the normal K3765 ID. It does not switch automatically

git-svn-id: svn://svn.freebsd.org/base/stable/8@215504 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212830
thompsa [Fri, 19 Nov 2010 01:50:56 +0000 (01:50 +0000)]
MFC r212830

 Cleanup white space and typos.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215503 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212136
thompsa [Fri, 19 Nov 2010 01:50:22 +0000 (01:50 +0000)]
MFC r212136

 Reduce the need to accesss struct usb_device by providing functions to access
 the product, manufacturer and serial strings.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215502 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212135
thompsa [Fri, 19 Nov 2010 01:49:22 +0000 (01:49 +0000)]
MFC r212135

 Add support for power mode filtering as some USB hardware does not support
 power saving.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215501 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212134
thompsa [Fri, 19 Nov 2010 01:48:47 +0000 (01:48 +0000)]
MFC r212134

 Change argument for usbd_get_dma_delay() from USB bus to USB device, some
 embedded hardware needs to know exactly which device is in question before it
 exactly can decide the required delay.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215500 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212133
thompsa [Fri, 19 Nov 2010 01:47:46 +0000 (01:47 +0000)]
MFC r212133

 Fix setting of the rx_max and tx_max variables. If the expected buffer size is
 greater than 65535 bytes then the CDC driver might not work as expected, which
 is not likely with the existing USB speeds.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215499 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212132
thompsa [Fri, 19 Nov 2010 01:47:09 +0000 (01:47 +0000)]
MFC r212132

 Fix UMS_BUTTON_MAX define name

git-svn-id: svn://svn.freebsd.org/base/stable/8@215498 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212131
thompsa [Fri, 19 Nov 2010 01:46:33 +0000 (01:46 +0000)]
MFC r212131

 Fix build breakage from r212127

git-svn-id: svn://svn.freebsd.org/base/stable/8@215497 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212130
thompsa [Fri, 19 Nov 2010 01:45:34 +0000 (01:45 +0000)]
MFC r212130

 Add GPIO programming for more PHY hardware.

Submitted by: yongari

git-svn-id: svn://svn.freebsd.org/base/stable/8@215496 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212129
thompsa [Fri, 19 Nov 2010 01:44:13 +0000 (01:44 +0000)]
MFC r212129

 Add support for extra buttons on the Kensington Slimblade Trackball.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215495 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212128
thompsa [Fri, 19 Nov 2010 01:43:08 +0000 (01:43 +0000)]
MFC r212128

 Silence debug error by default.

PR: usb/141212

git-svn-id: svn://svn.freebsd.org/base/stable/8@215494 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212127
thompsa [Fri, 19 Nov 2010 01:42:13 +0000 (01:42 +0000)]
MFC r212127

 We need to grab a node reference count to vap->iv_bss before using it as it is
 possible for the node to be replaced and freed at any time by
 ieee80211_sta_join1().

git-svn-id: svn://svn.freebsd.org/base/stable/8@215493 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212122
thompsa [Fri, 19 Nov 2010 01:41:28 +0000 (01:41 +0000)]
MFC r212122

 Add missing MODULE_VERSION() definitions, this resolves problems around
 duplicate module loads.

PR: usb/125736
Submitted by: danger, mm

git-svn-id: svn://svn.freebsd.org/base/stable/8@215492 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r211104
thompsa [Fri, 19 Nov 2010 01:40:34 +0000 (01:40 +0000)]
MFC r211104

 Add entries for some devices I have locally.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215491 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r211021
thompsa [Fri, 19 Nov 2010 01:39:29 +0000 (01:39 +0000)]
MFC r211021

 Sort this file a little better: the vendors are supposed to be sorted by
 vendor ID in the vendor section, and by symbolic name in the product
 section.  Products are sorted by product ID.  While here, get rid of a
 duplicate Microsoft Mouse entry, revealed by sorting.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215490 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r210553
thompsa [Fri, 19 Nov 2010 01:36:40 +0000 (01:36 +0000)]
MFC r210553

 Fix the entry for the Option ICON452 where an underscore was used instead of
 whitespace.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215489 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r210469
thompsa [Fri, 19 Nov 2010 01:35:57 +0000 (01:35 +0000)]
MFC r210469

 Give a name to the HTC Wizard Smartphone

PR: usb/135575

git-svn-id: svn://svn.freebsd.org/base/stable/8@215488 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r210018
thompsa [Fri, 19 Nov 2010 01:35:14 +0000 (01:35 +0000)]
MFC r210018

 Add a 4 and 7 port USB hub from NEC.

PR: 148189

git-svn-id: svn://svn.freebsd.org/base/stable/8@215487 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209918
thompsa [Fri, 19 Nov 2010 01:34:18 +0000 (01:34 +0000)]
MFC r209918

 Use more compact deviceid table.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215486 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209917
thompsa [Fri, 19 Nov 2010 01:32:23 +0000 (01:32 +0000)]
MFC r209917

 Update for style(9).

Submitted by: Akinori Furukoshi (author)

git-svn-id: svn://svn.freebsd.org/base/stable/8@215485 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209452
thompsa [Fri, 19 Nov 2010 01:30:59 +0000 (01:30 +0000)]
MFC r209452

 - fix for USB audio devices which use the 7-byte endpoint descriptor instead of
   the 9-byte one.
 - remove sync-endpoint code, which is currently unused.

Reported by: Antun Matanovi
Submitted by: Hans Petter Selasky

git-svn-id: svn://svn.freebsd.org/base/stable/8@215484 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209450
thompsa [Fri, 19 Nov 2010 01:30:23 +0000 (01:30 +0000)]
MFC r209450

 Reduce MIDI input buffer size to one USB packet, hence some USB devices don't
 properly short terminate their transfers. This fixes a problem where input
 appears several seconds late.

Reported by: Alexander Yerenkow
Submitted by: Hans Petter Selasky

git-svn-id: svn://svn.freebsd.org/base/stable/8@215483 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209443
thompsa [Fri, 19 Nov 2010 01:29:20 +0000 (01:29 +0000)]
MFC r209443

 Add support for LOW speed BULK transfers.  This mode is not recommended by the
 USB 2.0 standard, though some USB devices use it anyway.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215482 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209144
thompsa [Fri, 19 Nov 2010 01:28:22 +0000 (01:28 +0000)]
MFC r209144

 - Because hostapd calls iv_key_set() before if_init(), make sure key_set
   callback function will be executed, and that the key won't be deleted during
   the init process.
 - txmic and rxmic are written into the chip the same place regardless of
   opmode.
 - Make the hardware generate 802.11 sequence numbers.

Submitted by: Akinori Furukoshi

git-svn-id: svn://svn.freebsd.org/base/stable/8@215481 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r206369
thompsa [Fri, 19 Nov 2010 01:27:21 +0000 (01:27 +0000)]
MFC r206369

 Remove debugging code that snuck in.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215480 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212980
thompsa [Fri, 19 Nov 2010 01:24:36 +0000 (01:24 +0000)]
MFC r212980

 Add new device ids.
  Buffalo (Melco Inc.) LUA3-U2-AGT
  Logitec LAN-GTJ/U2A(usb/119981)

PR: usb/119981

git-svn-id: svn://svn.freebsd.org/base/stable/8@215479 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r210275
thompsa [Fri, 19 Nov 2010 01:23:09 +0000 (01:23 +0000)]
MFC r210275

 - Support for Globetrotter iCON 452.
 - Fixed the interface probe routine to only attach to USB interfaces the driver
   actually supports.  This allows other drivers to attach to things like
   MicroSD slots etc.
 - Fixed network interface enumeration to be globally sequential instead of
   relying on the USB interface numbers.  This make sure the first network
   interface always is at uhso0 and the second at usho1 and so on.
 - Added a radio kill switch; exposed through sysctl.
 - Updated the manual page to be verbose about the number of serial ports and
   include iCON 452 in the set of tested hardware.

Submitted by: Fredrik Lindberg

git-svn-id: svn://svn.freebsd.org/base/stable/8@215478 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r203815
thompsa [Fri, 19 Nov 2010 01:20:53 +0000 (01:20 +0000)]
MFC r203815

 Resort includes to match style(9) a bit more. No functional change
 is expected after this commit.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215477 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r203775
thompsa [Fri, 19 Nov 2010 01:18:52 +0000 (01:18 +0000)]
MFC r203775

 Remove redundand headers and use more standard ones where necessary.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215476 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r203774
thompsa [Fri, 19 Nov 2010 01:17:49 +0000 (01:17 +0000)]
MFC r203774

 Use more standard way for setting nonblocking flag for a filedescriptor.
 This makes libusb porting a bit easier.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215475 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r215235:
jh [Thu, 18 Nov 2010 19:06:56 +0000 (19:06 +0000)]
MFC r215235:

Set FD_CLOEXEC for the output file only when the file has been specified
with the -o option. Setting the flag for stderr (the default) could
cause the traced process to redirect stderr to a random file.

PR: bin/152151

git-svn-id: svn://svn.freebsd.org/base/stable/8@215466 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r215348
marius [Thu, 18 Nov 2010 18:03:52 +0000 (18:03 +0000)]
MFC: r215348

Return from mii_attach() after calling bus_generic_attach(9) on the device_t
of the MAC driver in order to attach miibus(4) on the first pass instead of
falling through to also calling it on the device_t of miibus(4). The latter
code flow was intended to attach the PHY drivers the same way regardless of
whether it's the first or a repeated pass, modulo the bus_generic_attach()
call in miibus_attach() which shouldn't be there. However, it turned out
that these variants cause miibus(4) to be attached twice under certain
conditions when using MAC drivers as modules.

Submitted by: yongari

git-svn-id: svn://svn.freebsd.org/base/stable/8@215460 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r215132,215194:
yongari [Thu, 18 Nov 2010 17:44:02 +0000 (17:44 +0000)]
MFC r215132,215194:
r215132:
  Add basic WOL support for MCP ethernet controllers. It seems the
  controller does not perform automatic switching from 1000Mbps link
  to 10/100Mbps link when WOL is activated. Implement establishing
  10/100Mps link with auto-negotiation in driver. Link status change
  handler was modified to remove taskqueue based approach since driver
  now needs synchronous handling for link establishment.

  Submitted by: Yamagi Burmeister (lists <> yamagi.org ) (initial version)
  Tested by: Yamagi Burmeister (lists <> yamagi.org )

r215194:
  Fix regression introduced in r215132. Caller always holds a driver
  lock before accessing mii, so locking is not needed here.

  Reported by: Rob Farmer (rfarmer <> predatorlabs dot net)

git-svn-id: svn://svn.freebsd.org/base/stable/8@215456 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC through r214047: nc from OpenBSD 4.8.
delphij [Thu, 18 Nov 2010 01:14:18 +0000 (01:14 +0000)]
MFC through r214047: nc from OpenBSD 4.8.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215445 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r215022: test: Move tests to tools/regression/bin/test.
jilles [Wed, 17 Nov 2010 23:13:02 +0000 (23:13 +0000)]
MFC r215022: test: Move tests to tools/regression/bin/test.
Convert the tests to the perl prove format.
Remove obsolete TEST.README (results of an old TEST.sh for some old Unices)
and TEST.csh (old tests without correct values, far less complete than
TEST.sh).

git-svn-id: svn://svn.freebsd.org/base/stable/8@215444 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209407, r209648, r209650
alc [Wed, 17 Nov 2010 17:29:22 +0000 (17:29 +0000)]
MFC r209407, r209648, r209650
  Introduce and use vm_page_next() and vm_page_prev().  They provide both
  a simpler and faster interface for iterating over the pages of an object.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215430 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: Add /bin/rmail symlink to mailwrapper if sendmail is not being built
markm [Wed, 17 Nov 2010 17:12:41 +0000 (17:12 +0000)]
MFC: Add /bin/rmail symlink to mailwrapper if sendmail is not being built
and mailwrapper is being built. Ensure that it is not removed by
"make delete-old". Add Exim example to man page.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215429 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r215186:
pluknet [Wed, 17 Nov 2010 09:48:18 +0000 (09:48 +0000)]
MFC r215186:

Add 'jid' as a possible sort order to the help screen.

PR: bin/150992
Submitted by: Frederic Culot <frederic at culot dot org>
Approved by: avg (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@215421 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r215018-215020:
yongari [Tue, 16 Nov 2010 20:36:52 +0000 (20:36 +0000)]
MFC r215018-215020:
r215018:
  Consistently use tab character instead of using space character.
  No functional changes.

r215019:
  Remove trailing white spaces.

r215020:
  Remove standard PCI configuration space register definitions.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215407 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r215017,215025:
yongari [Tue, 16 Nov 2010 20:32:09 +0000 (20:32 +0000)]
MFC r215017,215025:
  Follow the lead of vendor's interrupt moderation mechanism.
  It seems RTL8169/RTL8168/RTL810xE has a kind of interrupt
  moderation mechanism but it is not documented at all. The magic
  value dramatically reduced number of interrupts without noticeable
  performance drops so apply it to all RTL8169/RTL8169 controllers.
  Vendor's FreeBSD driver also applies it to RTL810xE controllers but
  their Linux driver explicitly cleared the register, so do not
  enable interrupt moderation for RTL810xE controllers.

  While I'm here sort 8169 specific registers.

  Obtained from: RealTek FreeBSD driver

MFC r215025:
  Only moderate TX completion interrupts. Relying on taskqueue to
  suppress RX interrupts seems to give better RX performance than
  RX interrupt moderation.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215405 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r214992:
yongari [Tue, 16 Nov 2010 20:21:53 +0000 (20:21 +0000)]
MFC r214992:
  Reduce spin wait time consumed in GMII register access routine.
  There were a couple of attempts in the past to reduce it since it
  took more than 1ms. Because mii_tick() periodically polls link
  status, waiting more than 1ms for each GMII register access was
  overkill. Unfortunately all previous attempts were failed with
  various ways on different controllers.
  This time, add additional 20us dealy at the end of GMII register
  access which seems to requirement of all RealTek controllers to
  issue next GMII register access request. This is the same way what
  Linux does.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215403 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agosync with the version in HEAD -- use ${BINMAKE} built
luigi [Tue, 16 Nov 2010 17:44:09 +0000 (17:44 +0000)]
sync with the version in HEAD -- use ${BINMAKE} built
by the toolchain and not the hosts's make

git-svn-id: svn://svn.freebsd.org/base/stable/8@215402 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r206081:
netchild [Tue, 16 Nov 2010 09:01:19 +0000 (09:01 +0000)]
MFC r206081:
Fix some bogus values in linprocfs.

Submitted by: Petr Salinger <Petr.Salinger@seznam.cz>
Verified on: GNU/kFreeBSD debian 8.0-1-686 (by submitter)
PR: 144584

Reviewed by / discussed with: kib, des, jhb, submitter

Requested by: emaste
Tested by: olli

git-svn-id: svn://svn.freebsd.org/base/stable/8@215394 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r215136:
brucec [Tue, 16 Nov 2010 07:55:36 +0000 (07:55 +0000)]
MFC r215136:

Bump .Dd due to additions in r214279.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215390 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r214395:
brucec [Tue, 16 Nov 2010 07:53:14 +0000 (07:53 +0000)]
MFC r214395:

Fix formatting.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215389 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r214073:
brucec [Tue, 16 Nov 2010 07:51:35 +0000 (07:51 +0000)]
MFC r214073:

Stop disallowing device nodes to be passed to camcontrol(8) since libcam
already allows both device names and nodes to be specified.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215388 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r214022:
brucec [Tue, 16 Nov 2010 07:47:43 +0000 (07:47 +0000)]
MFC r214022:

Remove extra word, which looks like a left-over from a deleted sentence.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215387 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r214021:
brucec [Tue, 16 Nov 2010 07:38:26 +0000 (07:38 +0000)]
MFC r214021:

Fix grammar.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215385 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213763:
brucec [Tue, 16 Nov 2010 07:33:53 +0000 (07:33 +0000)]
MFC r213763:

Use the RFC2606 domain example.com in examples.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215383 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r214381:
brucec [Tue, 16 Nov 2010 07:30:51 +0000 (07:30 +0000)]
MFC r214381:

Add information about the values and default setting of the
kern.cam.ada.spindown_shutdown sysctl.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215382 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r215239:
brucec [Tue, 16 Nov 2010 07:24:17 +0000 (07:24 +0000)]
MFC r215239:

Memory stats are reported in bytes, not pages.

PR: docs/151283
Submitted by: Bas Smeelen <b.smeelen at ose.nl>

git-svn-id: svn://svn.freebsd.org/base/stable/8@215380 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r215263:
brucec [Tue, 16 Nov 2010 07:16:40 +0000 (07:16 +0000)]
MFC r215263:

Add ftp4.se.freebsd.org to the set of mirrors.

PR: bin/150552
Submitted by: Niclas Zeising <zeising at lysator.liu.se>

git-svn-id: svn://svn.freebsd.org/base/stable/8@215378 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213455
alc [Tue, 16 Nov 2010 05:46:35 +0000 (05:46 +0000)]
MFC r213455
  Initialize KPTmap in locore so that vm86.c can call vtophys() (or really
  pmap_kextract()) before pmap_bootstrap() is called.

  Document the set of pmap functions that may be called before
  pmap_bootstrap() is called.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215373 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r214938
alc [Tue, 16 Nov 2010 05:06:20 +0000 (05:06 +0000)]
MFC r214938
  Eliminate a possible race between pmap_pinit() and pmap_kenter_pde() on
  superpage promotion or demotion.

  Micro-optimize pmap_kenter_pde().

git-svn-id: svn://svn.freebsd.org/base/stable/8@215372 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r214953
alc [Tue, 16 Nov 2010 04:40:27 +0000 (04:40 +0000)]
MFC r214953
  In case the stack size reaches its limit and its growth must be
  restricted, ensure that grow_amount is a multiple of the page size.
  Otherwise, the kernel may crash in swap_reserve_by_uid() on HEAD and
  FreeBSD 8.x, and produce a core file with a missing stack on FreeBSD
  7.x.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215369 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r214968:
yongari [Tue, 16 Nov 2010 00:32:17 +0000 (00:32 +0000)]
MFC r214968:
  Use shorten model name instead of showing all controller model
  numbers. bge(4) supports too many models such that it's
  unreasonable to list all these controllers in one line description
  of name. While I'm here mention that BCM590x/BCM5779x is Fast
  Ethernet controller.
  bge(4) still lacks support for some controllers but supporting
  these controllers should be easy now and adding new controllers
  do not require touching .Nd any more.

  Obtained from: OpenBSD

git-svn-id: svn://svn.freebsd.org/base/stable/8@215362 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f