]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
13 years agoMFC r198454: sh: Exempt $@ and $* from set -u
jilles [Tue, 9 Nov 2010 22:32:11 +0000 (22:32 +0000)]
MFC r198454: sh: Exempt $@ and $* from set -u

This seems more useful and will likely be in the next POSIX standard.

Also document more precisely in the man page what set -u does (note that
$@, $* and $! are the only special parameters that can ever be unset, all
the others are always set, although they may be empty).

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

13 years agoMFC r209154:
mav [Tue, 9 Nov 2010 22:18:20 +0000 (22:18 +0000)]
MFC r209154:
Virtualize pci_remap_msi_irq() call from general MSI code. It allows MSI
(FSB interrupts) to be used by non-PCI devices, such as HPET.

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

13 years agoMFC r214280,214853: New tests that also work with stable/8 sh.
jilles [Tue, 9 Nov 2010 22:17:53 +0000 (22:17 +0000)]
MFC r214280,214853: New tests that also work with stable/8 sh.

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

13 years agoMFC r208922 by jhb:
mav [Tue, 9 Nov 2010 22:03:39 +0000 (22:03 +0000)]
MFC r208922 by jhb:
Move the MD support for PCI message signalled interrupts to the x86 tree
as it is identical for i386 and amd64.

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

13 years agoMFC r214446, r214516:
attilio [Tue, 9 Nov 2010 21:18:32 +0000 (21:18 +0000)]
MFC r214446, r214516:
Move mptable support to x86/ subtree.

Sponsored by: Sandvine Incorporated

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

13 years agoMFC r214373, r214380, r214386:
attilio [Tue, 9 Nov 2010 21:06:26 +0000 (21:06 +0000)]
MFC r214373, r214380, r214386:
Move dump_machdep.c into x86/ for amd64, i386 and pc98.

Sponsored by: Sandvine Incorporated

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

13 years agoMFC: r214873
marius [Tue, 9 Nov 2010 21:00:24 +0000 (21:00 +0000)]
MFC: r214873

- Move Sun Fire V240 to the list of known working machines.
- For the parallel stable/7 and stable/8 branches mention both releases that
  first supported a particular sparc64 machine and update the sparc64 hardware
  list regarding machines that will be supported beginning with 7.4-RELEASE.

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

13 years agoMFC r214893:
dumbbell [Tue, 9 Nov 2010 20:44:55 +0000 (20:44 +0000)]
MFC r214893:
Fix a segmentation fault in argument processing.

The crash was caused by a command line such as this one:
# fold -b1

PR: bin/151592
Reporter by: Marcus Reid <marcus@blazingdot.com>
Tested by: Marcus Reid <marcus@blazingdot.com>

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

13 years agoMFC 210939:
jhb [Tue, 9 Nov 2010 20:00:23 +0000 (20:00 +0000)]
MFC 210939:
Add a new ipi_cpu() function to the MI IPI API that can be used to send an
IPI to a specific CPU by its cpuid.  Replace calls to ipi_selected() that
constructed a mask for a single CPU with calls to ipi_cpu() instead.

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

13 years agoMFC r214378:
mm [Tue, 9 Nov 2010 19:43:45 +0000 (19:43 +0000)]
MFC r214378:

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)

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

13 years agoMFC r208452, r208479:
mav [Tue, 9 Nov 2010 19:29:29 +0000 (19:29 +0000)]
MFC r208452, r208479:
Unify local_apic.c for x86 archs,

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

13 years agoMFC 214682:
jhb [Tue, 9 Nov 2010 18:46:09 +0000 (18:46 +0000)]
MFC 214682:
Tweak the waitchannel messages for the dead lock detection kthread.  Use
a shorter message (userland generally only sees the first 6 to 8
characters) when waiting for the allproc lock.  Use "-" when idle to match
the behavior of other kthreads.

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

13 years agoMFC 214346:
jhb [Tue, 9 Nov 2010 18:43:59 +0000 (18:43 +0000)]
MFC 214346:
Use intr_disable() and intr_restore() instead of frobbing the flags register
directly to disable interrupts.

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

13 years agoMFC r208921 by jhb:
attilio [Tue, 9 Nov 2010 18:42:35 +0000 (18:42 +0000)]
MFC r208921 by jhb:
Move mca.c under x86.

Sponsored by: Sandvine Incorporated
Approved by: jhb

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

13 years agoMFC r208436, r208438:
mav [Tue, 9 Nov 2010 15:14:10 +0000 (15:14 +0000)]
MFC r208436, r208438:
Make table-based HPET identification more clever. Before creating fake
device, make sure we have no real HPET device entry with same ID.
As side effect, it potentially allows several HPETs to be attached.
Use first of them for timecounting, rest (if ever present) could later
be used as event sources.

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

13 years agoMFC r206900,r206901,r206922,r206993 by rpaulo:
mav [Tue, 9 Nov 2010 14:53:49 +0000 (14:53 +0000)]
MFC r206900,r206901,r206922,r206993 by rpaulo:
Rename the cyclic global variable lapic_cyclic_clock_func to just
cyclic_clock_func.

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

13 years agoMFC 211201
nork [Tue, 9 Nov 2010 13:39:17 +0000 (13:39 +0000)]
MFC 211201
Add tpm(4) driver for Trusted Platform Module.
You may want to look at http://bsssd.sourceforge.net/ .
Submitted by: Hans-Joerg Hoexer <Hans-Joerg_Hoexer@genua.de>

MFC 211204
Fix copyright information.

MFC 211270
Cosmetic change for splitting bus frontend file and core file.

MFC 211271
Hook tpm.4 manual to hook.

MFC 212861
Add support 'device tpm' for amd64.
Add tpm(4)'s default setting to /boot/defaults/loader.conf.
Add 'device tpm' to NOTES for amd64 and i386.

Reviewed by: takawata
Discussed with: takawata
Approved by: imp (mentor)

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

13 years agoMFC r205999:
mav [Tue, 9 Nov 2010 10:28:02 +0000 (10:28 +0000)]
MFC r205999:
ng_gif depends on gif.

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

13 years agoMFC r204309, r204313 and r204319 by nyan:
attilio [Tue, 9 Nov 2010 01:57:56 +0000 (01:57 +0000)]
MFC r204309, r204313 and r204319 by nyan:
Introduce the x86 subtree for code shared between amd64, i386 and pc98.

Differently from the HEAD version, the headers are not moved around,
in order to avoid breaking the KPI but it can be eventually done once the
core mechanism of r214629 is MFCed.

MFCing this patch does allow for simpler MFCs handling on i386/amd64
specific code.

Sponsored by:   Sandvine Incorporated

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

13 years agoMFC: r213755
jkim [Mon, 8 Nov 2010 20:25:19 +0000 (20:25 +0000)]
MFC: r213755

Use AcpiReset() from ACPICA instead of rolling our own, which is actually
incomplete.  If FADT says the register is available, enable the capability
by default.  Remove the previous default value from acpi(4).

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

13 years agoMFC r173289,174783,175454,191681,191698,191834,195044,197304,198210,199858-199859...
uqs [Mon, 8 Nov 2010 20:21:24 +0000 (20:21 +0000)]
MFC r173289,174783,175454,191681,191698,191834,195044,197304,198210,199858-199859,201348,205578,208327,208336,210871,214628:

Sync bsd-family-tree with head.

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

13 years agoMFC r214542:
yongari [Mon, 8 Nov 2010 20:14:38 +0000 (20:14 +0000)]
MFC r214542:
  Don't bother to enable ASPM L1 to save more power. Even though I am
  not able to trigger the issue with sample boards, some users seems
  to suffer from freeze/lockup when system is booted without UTP cable
  plugged in. I'm not sure whether this is BIOS issue or controller
  bug. This change fixes AR8132 lockup issue seen on EEE PC.

  Reported by: kmoore
  Tested by: kmoore

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

13 years agoMFC r214428:
yongari [Mon, 8 Nov 2010 19:36:00 +0000 (19:36 +0000)]
MFC r214428:
  Add initial BCM5718 family support. The BCM5718 family includes
  the dual port BCM5717 and BCM5718 devices which are intended for
  mainstream workstation and entry-level server designs and
  represents the twelfth generation of NetXtreme Ethernet controllers.
  This family is the successor to the BCM5714/BCM5715 family and
  supports IPv4/IPv6 checksum offloading, TSO, VLAN hardware tagging,
  jumbo frames, MSI/MSIX, IOV, RSS and TSS.

  This change set supports all hardware features except IOV and
  RSS/TSS. Unlike its predecessors, only extended RX buffer
  descriptors can be posted to the jumbo producer ring. Single RX
  buffer descriptors for jumbo frame are not supported. RSS requires
  a more substantial set of changes and will apply to a larger set
  of NetXtreme devices so RSS/TSS multi-queue support will be
  implemented in a future releases.

  Special thanks to Broadcom who kindly sent a sample board to me
  and to davidch who gave provided the initial support code.

  Submitted by: davidch (initial version)
  HW donated by: Broadcom

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

13 years agoMFC r213486:
yongari [Mon, 8 Nov 2010 19:31:41 +0000 (19:31 +0000)]
MFC r213486:
  Remove bge_tx_buf_ratio, unused member of softc.

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

13 years agoMFC r214427:
yongari [Mon, 8 Nov 2010 19:22:36 +0000 (19:22 +0000)]
MFC r214427:
  Add BCM5717C 10/100/1000TX PHY id.

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

13 years agoMFC r214321:
mav [Mon, 8 Nov 2010 19:12:19 +0000 (19:12 +0000)]
MFC r214321:
Do some whitespace and `identify` output cleanup.

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

13 years agoDon't use basename_r().
rpaulo [Mon, 8 Nov 2010 13:31:44 +0000 (13:31 +0000)]
Don't use basename_r().

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

13 years agoMFC r210688 r210689 r210694 r211184 r212831 r210682 r210683 r210690 r209539
rpaulo [Mon, 8 Nov 2010 12:54:55 +0000 (12:54 +0000)]
MFC r210688 r210689 r210694 r211184 r212831 r210682 r210683 r210690 r209539
    r210199 r210237 r210692 r210695 r210767 r210775 r210776 r211545 r211554
    r211562 r212092 r212358 r212414 r212462 r212495 r210693 r211547 r211550
    r211554 r211561 r211577 r210691 r210697 r211563 r211564 r211841 r211842
    r211562 r212649 r211187 r211555:

Userland DTrace MFC. This only includes the userland side of userland DTrace.

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

13 years agoMFC r210682, r210683, r210690:
rpaulo [Mon, 8 Nov 2010 11:22:55 +0000 (11:22 +0000)]
MFC r210682, r210683, r210690:
 Build librtld_db.
 Simplify the Makefile. The i386 and amd64 sections are equal.
 libproc is going to be i386/amd64 only with the next update.

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

13 years agoMFC r210678, r210769:
rpaulo [Mon, 8 Nov 2010 10:39:02 +0000 (10:39 +0000)]
MFC r210678, r210769:
  librtld_db is an rtld debugging helper library used by userland
  DTrace.

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

13 years agoMFC r214026:
kib [Mon, 8 Nov 2010 10:23:39 +0000 (10:23 +0000)]
MFC r214026:
Do not synchronously start the nfsiod threads at all. The r212506
fixed the issues with file descriptor locks, but the same problems are
present for vnode lock/user map lock.

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

13 years agoMFC r214851:
kib [Mon, 8 Nov 2010 10:18:01 +0000 (10:18 +0000)]
MFC r214851:
Fix a bug in r214049. The nvp == vp case shall be handled specially
only for !usevget case. If VFS_VGET is working, the vnode shared lock
is obtained recursively and vput() shall be done, not vunref().

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

13 years agoMFC r214352 adapted to stable/8:
ae [Mon, 8 Nov 2010 10:08:30 +0000 (10:08 +0000)]
MFC r214352 adapted to stable/8:
  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.

Approved by: kib (mentor)

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

13 years agoMFC r212886 (by marcel): Unbreak the build on strong-aligned
brian [Sun, 7 Nov 2010 22:33:55 +0000 (22:33 +0000)]
MFC r212886 (by marcel): Unbreak the build on strong-aligned
architectures.

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

13 years agoMFC r198236 for now.
brian [Sun, 7 Nov 2010 22:28:55 +0000 (22:28 +0000)]
MFC r198236 for now.

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

13 years agoMFC r197763 and r212839: Handle extending a filesystem into unzeroed storage.
brian [Sun, 7 Nov 2010 22:24:17 +0000 (22:24 +0000)]
MFC r197763 and r212839: Handle extending a filesystem into unzeroed storage.

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

13 years agoMFC r214609: sh(1): Correct synopsis and make precise how $0 is set.
jilles [Sun, 7 Nov 2010 20:29:39 +0000 (20:29 +0000)]
MFC r214609: sh(1): Correct synopsis and make precise how $0 is set.

In particular, the extra argument to set $0 with -c was not documented.

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

13 years agoMFC r214564
alc [Sun, 7 Nov 2010 19:51:51 +0000 (19:51 +0000)]
MFC r214564
  Correct some format strings used by sysctls.

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

13 years agoFollowup to r214936: zfs_getpages: account for differences from head
avg [Sun, 7 Nov 2010 19:32:03 +0000 (19:32 +0000)]
Followup to r214936: zfs_getpages: account for differences from head
in page locking

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

13 years agoMFC r214774: x86 topo_probe: do not probe smp topology if only one cpu
avg [Sun, 7 Nov 2010 18:25:42 +0000 (18:25 +0000)]
MFC r214774: x86 topo_probe: do not probe smp topology if only one cpu
is visible

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

13 years agoMFC r213937: zfs: add vop_getpages method implementation
avg [Sun, 7 Nov 2010 18:21:42 +0000 (18:21 +0000)]
MFC r213937: zfs: add vop_getpages method implementation

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

13 years agoMFC: r214606
marius [Sun, 7 Nov 2010 17:54:41 +0000 (17:54 +0000)]
MFC: r214606

Try to make the style consistent (including regarding NetBSD bits not yet
merged) and adhere style(9).

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

13 years agoMFC: r214528
marius [Sun, 7 Nov 2010 17:50:54 +0000 (17:50 +0000)]
MFC: r214528

- When resetting pm_active and pm_context of a pmap in pmap_pinit() we
  need locking as otherwise we may race against the other parts of the
  MD code which expects a consistent state of these. While at it move
  the resetting of the pmap before entering it in the TSB.
- Spell a 0 as TLB_CTX_KERNEL.

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

13 years agoMFC: r214264
marius [Sun, 7 Nov 2010 17:48:07 +0000 (17:48 +0000)]
MFC: r214264

- 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.

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

13 years agoMFC: r214263
marius [Sun, 7 Nov 2010 17:40:58 +0000 (17:40 +0000)]
MFC: r214263

Take advantage of mii_phy_add_media()/mii_phy_setmedia().

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

13 years agoMFC: r214262
marius [Sun, 7 Nov 2010 17:35:42 +0000 (17:35 +0000)]
MFC: r214262

- 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().

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

13 years agoMFC: r213894, r213896, r214913
marius [Sun, 7 Nov 2010 16:56:29 +0000 (16:56 +0000)]
MFC: r213894, r213896, r214913

Converted the remainder of the NIC drivers to use the mii_attach()
introduced in r213878 (MFC'ed to stable/8 in r214685) instead of
mii_phy_probe(). Unlike r213893 (MFC'ed to stable/8 in r214909) these
are only straight forward conversions though.

Reviewed by: yongari

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

13 years agoRedo r214897:
delphij [Sun, 7 Nov 2010 11:51:57 +0000 (11:51 +0000)]
Redo r214897:

MFC r211141 (gabor)

- Fixes to the chkportsum script to handle better some special cases,
  like spaces in filename

Submitted by:   Alex Kozlov <spam@rm-rf.kiev.ua>

MFC r210254 (gabor)

- Add a periodic script, which can be used to find installed ports' files with
  mismatched checksum

PR:             conf/124641
Submitted by:   Alex Kozlov <spam@rm-rf.kiev.ua>

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

13 years agoRevert r214897 in order to finish the merge properly without stopping
delphij [Sun, 7 Nov 2010 11:39:48 +0000 (11:39 +0000)]
Revert r214897 in order to finish the merge properly without stopping
svn2cvs.

Pointy hat to: delphij

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

13 years agoMFC: r213893, r213908, r214566, r214605, r214846
marius [Sun, 7 Nov 2010 11:12:29 +0000 (11:12 +0000)]
MFC: r213893, r213908, r214566, r214605, r214846

Convert the PHY drivers to honor the mii_flags passed down and convert
the NIC drivers as well as the PHY drivers to take advantage of the
mii_attach() introduced in r213878 (MFC'ed to stable/8 in r214684) to
get rid of certain hacks. For the most part these were:
- Artificially limiting miibus_{read,write}reg methods to certain PHY
  addresses; we now let mii_attach() only probe the PHY at the desired
  address(es) instead.
- PHY drivers setting MIIF_* flags based on the NIC driver they hang
  off from, partly even based on grabbing and using the softc of the
  parent; we now pass these flags down from the NIC to the PHY drivers
  via mii_attach(). This got us rid of all such hacks except those of
  brgphy() in combination with bce(4) and bge(4), which is way beyond
  what can be expressed with simple flags.

While at it, I took the opportunity to change the NIC drivers to pass
up the error returned by mii_attach() (previously by mii_phy_probe())
and unify the error message used in this case where and as appropriate
as mii_attach() actually can fail for a number of reasons, not just
because of no PHY(s) being present at the expected address(es).

Reviewed by: jhb, yongari

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

13 years agoMFC r210254:
gabor [Sat, 6 Nov 2010 21:04:01 +0000 (21:04 +0000)]
MFC r210254:

  - Add a periodic script, which can be used to find installed ports' files with
    mismatched checksum

MFC r211141

  - Fixes to the chkportsum script to handle better some special cases,
    like spaces in filename

Approved by: delphij (mentor)

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

13 years agoMFC 213381:
marcel [Sat, 6 Nov 2010 16:09:25 +0000 (16:09 +0000)]
MFC 213381:
Replace an obsolete flag -L in an mkisofs(1) command line with
-allow-leading-dots to fix "make release" for FreeBSD/powerpc.

Author: hrs

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

13 years agoMFC r214250:
bz [Sat, 6 Nov 2010 14:46:24 +0000 (14:46 +0000)]
MFC r214250:

  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

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

13 years agoMFC r213913:
lstewart [Sat, 6 Nov 2010 10:31:52 +0000 (10:31 +0000)]
MFC r213913:

Retire the system-wide, per-reassembly queue segment limit. The mechanism is far
too coarse grained to be useful and the default value significantly degrades TCP
performance on moderate to high bandwidth-delay product paths with non-zero loss
(e.g. 5+Mbps connections across the public Internet often suffer).

Replace the outgoing mechanism with an individual per-queue limit based on the
number of MSS segments that fit into the socket's receive buffer.  This should
strike a good balance between performance and the potential for resource
exhaustion when FreeBSD is acting as a TCP receiver. With socket buffer
autotuning (which is enabled by default), the reassembly queue tracks the socket
buffer and benefits too.

As the XXX comment suggests, my testing uncovered some unexpected behaviour
which requires further investigation. By using so->so_rcv.sb_hiwat instead of
sbspace(&so->so_rcv), we allow more segments to be held across both the socket
receive buffer and reassembly queue than we probably should. The tradeoff is
better performance in at least one common scenario, versus a devious sender's
ability to consume more resources on a FreeBSD receiver.

Sponsored by: FreeBSD Foundation
Reviewed by: andre, gnn, rpaulo

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

13 years agoMFC r213912:
lstewart [Sat, 6 Nov 2010 10:26:49 +0000 (10:26 +0000)]
MFC r213912:

- Switch the "net.inet.tcp.reass.cursegments" and
  "net.inet.tcp.reass.maxsegments" sysctl variables to be based on UMA zone
  stats. The value returned by the cursegments sysctl is approximate owing to
  the way in which uma_zone_get_cur is implemented.

- Discontinue use of V_tcp_reass_qsize as a global reassembly segment count
  variable in the reassembly implementation. The variable was used without
  proper synchronisation and was duplicating accounting done by UMA already. The
  lack of synchronisation was particularly problematic on SMP systems
  terminating many TCP sessions, resulting in poor TCP performance for
  connections with non-zero packet loss.

Sponsored by: FreeBSD Foundation
Reviewed by: andre, gnn, rpaulo (as part of a larger patch)

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

13 years agoMFC r213162:
lstewart [Sat, 6 Nov 2010 10:21:46 +0000 (10:21 +0000)]
MFC r213162:

Log the number of segments currently in the reassembly queue.

Sponsored by: FreeBSD Foundation

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

13 years agoMFC r210203:
lstewart [Sat, 6 Nov 2010 10:17:43 +0000 (10:17 +0000)]
MFC r210203:

- Move common code from the hook functions that fills in a packet node struct to
  a separate inline function. This further reduces duplicate code that didn't
  have a good reason to stay as it was.

- Reorder the malloc of a pkt_node struct in the hook functions such that it
  only occurs if we managed to find a usable tcpcb associated with the packet.

- Make the inp_locally_locked variable's type consistent with the prototype of
  siftr_siftdata().

Sponsored by: FreeBSD Foundation

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

13 years agoMFC r213910:
lstewart [Sat, 6 Nov 2010 10:06:58 +0000 (10:06 +0000)]
MFC r213910:

- Simplify implementation of uma_zone_get_max.
- Add uma_zone_get_cur which returns the current approximate occupancy of a
  zone. This is useful for providing stats via sysctl amongst other things.

Sponsored by: FreeBSD Foundation
Reviewed by: gnn, jhb

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

13 years agoMFC r211396 (originally committed by andre):
lstewart [Sat, 6 Nov 2010 09:56:14 +0000 (09:56 +0000)]
MFC r211396 (originally committed by andre):

Add uma_zone_get_max() to obtain the effective limit after a call
to uma_zone_set_max().

The UMA zone limit is not exactly set to the value supplied but rounded up to
completely fill the backing store increment (a page normally).  This can lead to
surprising situations where the number of elements allocated from UMA is higher
than the supplied limit value.  The new get function reads back the effective
value so that the supplied limit value can be adjusted to the real limit.

Reviewed by: jeffr

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

13 years agoMFC r213158:
lstewart [Sat, 6 Nov 2010 09:42:41 +0000 (09:42 +0000)]
MFC r213158:

Internalise reassembly queue related functionality and variables which should
not be used outside of the reassembly queue implementation. Provide a new
function to flush all segments from a reassembly queue and call it from the
appropriate places instead of manipulating the queue directly.

Sponsored by: FreeBSD Foundation
Reviewed by: andre, gnn, rpaulo

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

13 years agoMFC r209662,209665:
lstewart [Sat, 6 Nov 2010 09:34:51 +0000 (09:34 +0000)]
MFC r209662,209665:

Import the Statistical Information For TCP Research (SIFTR) kernel module into
FreeBSD. SIFTR logs a range of statistics on active TCP connections to a log
file, providing the ability to make highly granular measurements of TCP
connection state. The tool is aimed at system administrators, developers and
researchers alike. Please take it for a spin and test it out - the man page
should have all the information required to get you going.

Many thanks go to the Cisco University Research Program Fund at Community
Foundation Silicon Valley and the FreeBSD Foundation. Their support of our work
at the Centre for Advanced Internet Architectures, Swinburne University of
Technology is greatly appreciated.

r209980:

Catch up with the rename of DPCPU_SUM to DPCPU_VARSUM.

r209982:

The SIFTR DPCPU statistics struct was not being zeroed between enable/disable
cycles so the values would accumulate rather than reset for each cycle.

Sponsored by: Cisco URP (r209662), FreeBSD Foundation
Reviewed by: dwmalone, gnn, rpaulo (r209662)
Tested by: Many on freebsd-current@ and elsewhere over the years

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

13 years agoMFC r209050 (originally committed by jhb):
lstewart [Sat, 6 Nov 2010 09:23:49 +0000 (09:23 +0000)]
MFC r209050 (originally committed by jhb):

Add helper macros to iterate over available CPUs in the system.
CPU_FOREACH(i) iterates over the CPU IDs of all available CPUs.  The
CPU_FIRST() and CPU_NEXT(i) macros can also be used to iterate over
available CPU IDs.  CPU_NEXT(i) wraps around to CPU_FIRST() rather than
returning some sort of terminator.

Requested by: rwatson
Reviewed by: attilio

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

13 years agoFix an instance missed in r212892:
marius [Sat, 6 Nov 2010 01:09:00 +0000 (01:09 +0000)]
Fix an instance missed in r212892:

MFC r212413: bus_add_child: change type of order parameter to u_int

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

13 years agoMFC r212505:
jh [Fri, 5 Nov 2010 16:04:10 +0000 (16:04 +0000)]
MFC r212505:

In backup_kernel(), support backing up subdirectories and handle files
with spaces correctly.

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

13 years agoMFC 214673: Fix a few typos and style nits in the example code.
jhb [Fri, 5 Nov 2010 13:45:13 +0000 (13:45 +0000)]
MFC 214673: Fix a few typos and style nits in the example code.

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

13 years agoMFC: r214513
rmacklem [Fri, 5 Nov 2010 02:45:13 +0000 (02:45 +0000)]
MFC: r214513
Modify nfs_open() in the experimental NFS client to be compatible
with the regular NFS client. Also, fix a couple of mutex lock issues.

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

13 years agoMFC: r214511
rmacklem [Fri, 5 Nov 2010 02:33:27 +0000 (02:33 +0000)]
MFC: r214511
Add a call for nfsrpc_close() to ncl_reclaim() in the experimental
NFSv4 client, since the call in ncl_inactive() might be missed
because VOP_INACTIVE() is not guaranteed to be called before
VOP_RECLAIM().

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

13 years agoMFC: r214406
rmacklem [Fri, 5 Nov 2010 02:12:18 +0000 (02:12 +0000)]
MFC: r214406
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.

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

13 years agoUpdate to 9.6-ESV-R2, the latest from ISC.
dougb [Thu, 4 Nov 2010 21:48:39 +0000 (21:48 +0000)]
Update to 9.6-ESV-R2, the latest from ISC.

This version contains bug fixes that are relevant to any
caching/resolving name server; as well as DNSSEC-related
fixes.

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

13 years agoMFC 214585:
dougb [Thu, 4 Nov 2010 21:47:28 +0000 (21:47 +0000)]
MFC 214585:

Prep for the 9.6-ESV-R2 update

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

13 years agoMFC 214625: Correct the abbreviations for general I/O and signal traces.
jhb [Thu, 4 Nov 2010 17:25:31 +0000 (17:25 +0000)]
MFC 214625: Correct the abbreviations for general I/O and signal traces.

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

13 years agoMFC 214449:
jhb [Thu, 4 Nov 2010 17:22:49 +0000 (17:22 +0000)]
MFC 214449:
Set bootverbose directly in mi_startup() rather than via a SYSINIT.  This
ensures 'bootverbose' is in a valid state for all SYSINITs.

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

13 years agoMFC 214448:
jhb [Thu, 4 Nov 2010 17:19:16 +0000 (17:19 +0000)]
MFC 214448:
Use 'PCPU_GET(apic_id)' to determine the BSP's APIC ID on a UP machine
when routing interrupts instead of cpu_apic_ids[0] since cpu_apic_ids[]
is only populated for multiple-CPU machines.  This also matches what the
code does when SMP is not enabled.

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

13 years agoMFC 214203:
jhb [Thu, 4 Nov 2010 17:12:29 +0000 (17:12 +0000)]
MFC 214203:
- 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.

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

13 years agoMFC 211820,211821,212292:
jhb [Thu, 4 Nov 2010 17:06:54 +0000 (17:06 +0000)]
MFC 211820,211821,212292:
Intel QPI chipsets actually provide extra "non-core" PCI buses that
provide PCI devices for various hardware such as memory controllers,
etc.  for each socket.  These PCI buses are not enumerated via ACPI
however.  Add qpi(4) psuedo bus and Host-PCI bridge drivers to
enumerate these buses.  Currently the driver uses the CPU ID to
determine the bridges' presence.

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

13 years agoMFC r208028,214491: Sync manpages to -CURRENT
uqs [Thu, 4 Nov 2010 12:33:07 +0000 (12:33 +0000)]
MFC r208028,214491: Sync manpages to -CURRENT

r208028:
mdoc: move remaining sections into consistent order

r214491:
Fix another "string" typo.

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

13 years agoMFC r200626,201289,213764,214272, syncing yacc and flex to -CURRENT
uqs [Thu, 4 Nov 2010 10:53:50 +0000 (10:53 +0000)]
MFC r200626,201289,213764,214272, syncing yacc and flex to -CURRENT

r200626:
remove external reference to not (or at least no longer) existing variable 'myname'

r201289:
Let both yacc and lex generate code that passes -Wold-style-definition.

Both these tools emit code where several functions have no `void'
keyword placed in the arugment list when the function has no arguments.

r213764:
Don't define the input() function ifdef YY_NO_INPUT.
This was previously done for the input() function.

r214272:
flex: add missing ifdef magic to create/hide prototypes
This unbreaks build for some software with higher WARNS flags.

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

13 years agoMFC: r214255
rmacklem [Wed, 3 Nov 2010 22:17:42 +0000 (22:17 +0000)]
MFC: r214255
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.

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

13 years agoBump __FreeBSD_version for struct sysentvec changes in r214755.
kib [Wed, 3 Nov 2010 21:51:05 +0000 (21:51 +0000)]
Bump __FreeBSD_version for struct sysentvec changes in r214755.

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

13 years agoMFC r209690:
kib [Wed, 3 Nov 2010 21:40:57 +0000 (21:40 +0000)]
MFC r209690:
For "thread signal" command, print some information from siginfo when
available.

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

13 years agoMFC r209689:
kib [Wed, 3 Nov 2010 21:39:11 +0000 (21:39 +0000)]
MFC r209689:
Extend the td_thrinfo_t to include siginfo for the signal that stopped
the target.

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

13 years agoMFC r209873:
kib [Wed, 3 Nov 2010 21:32:31 +0000 (21:32 +0000)]
MFC r209873:
Document pl_siginfo and PT_FLAG_SI for PT_LWPINFO.

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

13 years agoMFC r208513:
kib [Wed, 3 Nov 2010 21:31:03 +0000 (21:31 +0000)]
MFC r208513:
Improve the documentation for PT_LWPINFO. Note that some features are
not implemented on MIPS and ARM.

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

13 years agoMFC r209688:
kib [Wed, 3 Nov 2010 21:24:21 +0000 (21:24 +0000)]
MFC r209688:
Extend ptrace(PT_LWPINFO) to report siginfo for the signal that caused
debugee stop.

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

13 years agoMFC r208453:
kib [Wed, 3 Nov 2010 21:21:12 +0000 (21:21 +0000)]
MFC r208453:
Reorganize syscall entry and leave handling.
Implement ptrace_lwpinfo pl_flags PL_FLAG_SCE, PL_FLAG_SCX and
PL_FLAG_EXEC.

The i386, amd64, sparc64, sun4v, powerpc and ia64 syscall()s are
changed to use syscallenter()/syscallret(). MIPS and arm are not
converted and use the mostly unchanged syscall() implementation.

MFC r208514:
Change ia64' struct syscall_args definition so that args is a pointer to
the arguments array instead of array itself.

MFC r208566:
Allow to use syscallname(9) outside subr_trap.c.

MFC r209258 (by rpaulo):
Make DTrace syscall provider work again by including opt_kdtrace.h here.

MFC r209313:
Only enable kdtrace hook in the LINT on the architectures that implement it.

MFC r209697:
Obey sv_syscallnames bounds in syscallname().

NOTE: The KBI of the struct sysentvec is changed, new required members
sv_set_syscall_retval, sv_fetch_syscall_args and sv_syscallnames are
added. The sv_prepsyscall field is now ignored. Third-party modules
using the struct sysentvec must be modified and recompiled, we believe
that only ABI emulators are affected. No such out-of-tree modules are
known. In-tree modules that are affected by the change were converted
to depend on exact version of the kernel, see r214421.

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

13 years agoMFC 214434:
jamie [Wed, 3 Nov 2010 15:54:50 +0000 (15:54 +0000)]
MFC 214434:

  Find a jail's type as part of jailparam_init rather than waiting until
  it's absolutely necessary.

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

13 years agoMFC r214349:
nwhitehorn [Wed, 3 Nov 2010 15:31:37 +0000 (15:31 +0000)]
MFC r214349:
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.

Requested by: marius

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

13 years agoTrim unneeded mergeinfo from a file.
jhb [Wed, 3 Nov 2010 15:31:10 +0000 (15:31 +0000)]
Trim unneeded mergeinfo from a file.

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

13 years agoMFC 213672,213674,214396:
jhb [Wed, 3 Nov 2010 15:25:30 +0000 (15:25 +0000)]
MFC 213672,213674,214396:
- Report subcommand handler errors in mfiutil so that tools that
  invoke the utilities can robustly report errors.
- Fix compile with -DDEBUG by using the correct mfi_pd_ref union definition
  in mfireg.h.
- 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.

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

13 years agoMFC r214601:
nwhitehorn [Wed, 3 Nov 2010 15:24:25 +0000 (15:24 +0000)]
MFC r214601:
Add some missing parentheses so that moea_bat_mapped() actually works.

Submitted by: alc

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

13 years agoMFC r214105:
ed [Wed, 3 Nov 2010 10:23:06 +0000 (10:23 +0000)]
MFC r214105:

  Remove setpgid() call before executing child process.

  Using a separate process group here is bad, since (for example) job
  control in the TTY layer prevents interaction with the TTY, causing the
  child process to hang.

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

13 years agoMFC of r214002, r214010
edwin [Wed, 3 Nov 2010 10:10:34 +0000 (10:10 +0000)]
MFC of r214002, r214010

- Stylify of uudecode(1)
  Part of PR bin/124739.

- "b64decode -r" did not handle arbitary breaks in base64 encoded
  data. White space should be accepted anywhere in a base64 encoded
  stream, not just after every chunk (4 characters).

  Test-scenario:

  VmVsb2NpdHkgUmV3YXJkcw==

  and

  VmVsb2NpdHkgUmV3YXJkcw
  ==

  should both produce "Velocity Rewards"

PR: bin/124739
Submitted by: Mark Andrews <marka@isc.org>

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

13 years agoMFC r214049:
kib [Wed, 3 Nov 2010 08:34:00 +0000 (08:34 +0000)]
MFC r214049:
When readdirplus() is handled on the exported filesystem that does
not support VFS_VGET, like msdosfs, do not call VOP_LOOKUP() for
dotdot on the root directory. Our filesystems expect that VFS handles
dotdot lookups on root on its own.

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

13 years agoMFC of r214722, tzdata2010o:
edwin [Wed, 3 Nov 2010 01:32:39 +0000 (01:32 +0000)]
MFC of r214722, tzdata2010o:

- Fiji goes into DST three weeks earlier in 2011.

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

13 years agoMFC r214432:
yongari [Wed, 3 Nov 2010 01:28:09 +0000 (01:28 +0000)]
MFC r214432:
  Use shorten model name and add RTL8168, RTL8111 to the list of
  supported device. re(4) had been supported all variants of RTL8168,
  RTL8111 and RTL810x. I think this change will cover all controllers
  supported by re(4).

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

13 years agoMFC r214302:
yongari [Wed, 3 Nov 2010 01:24:33 +0000 (01:24 +0000)]
MFC r214302:
  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 >

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

13 years agoMFC r214087,214219,214251,214292:
yongari [Wed, 3 Nov 2010 00:03:26 +0000 (00:03 +0000)]
MFC r214087,214219,214251,214292:
r214087:
  Add workaround for BCM5906 controller silicon bug. If device
  receive two back-to-back send BDs with less than or equal to 8
  total bytes then the device may hang. The two back-to-back send
  BDs must be in the same frame for this failure to occur.
  Thanks to davidch for detailed errata information.

  Reviewed by: davidch

r214219:
  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.

r214251:
  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 >

r214292:
  Use bge_chipid to compare controller ids. r214251 incorrectly used
  bge_chiprev.

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

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

13 years agoMFC r213747,213808,214216:
yongari [Tue, 2 Nov 2010 23:54:59 +0000 (23:54 +0000)]
MFC r213747,213808,214216:
r213747:
  Protect bge(4) from accessing invalid NIC internal memory regions
  on BCM5906.

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

r213808:
  Add more checks for resolved link speed in bge_miibus_statchg().
  Link UP state could be reported first before actual completion of
  auto-negotiation. This change makes bge(4) reprogram BGE_MAC_MODE,
  BGE_TX_MODE and BGE_RX_MODE register only after controller got a
  valid link.

r214216:
  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.

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

13 years agoMFC r213522,213587,213711:
yongari [Tue, 2 Nov 2010 23:48:08 +0000 (23:48 +0000)]
MFC r213522,213587,213711:
r213522:
  Fix a long standing bug which regarded some revisions of controller
  as 5788. This caused BGE_MISC_LOCAL_CTL register is used to
  generate link state change interrupt for non-5788 controllers. The
  interrupt handler may or may not detect link state attention as
  status block wouldn't be updated when an interrupt was generated
  with BGE_MISC_LOCAL_CTL register. All controllers except 5700 and
  5788 should use host coalescing mode register to trigger an
  interrupt.

r213587:
  Do not blindly UP the interface when interface's MTU is changed. If
  driver is not running there is no need to up the interface. While
  I'm here hold driver lock before modifying MTU as it is referenced
  in RX handler.

r213711:
  The IFF_DRV_RUNNING flag is set at the end of bge_init_locked. But
  before setting the flag, interrupt was already enabled such that
  interrupt handler could be run before setting IFF_DRV_RUNNING flag.
  This can lose initial link state change interrupt which in turn
  make bge(4) think that it still does not have valid link. Fix this
  race by protecting the taskqueue with a driver lock.
  While I'm here move reenabling interrupt code after handling of link
  state chage.

  Reviewed by: davidch

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

13 years agoMFC r213495,213742:
yongari [Tue, 2 Nov 2010 23:41:43 +0000 (23:41 +0000)]
MFC r213495,213742:
r213495:
  Add more comments to rings supported by the controller. Different
  versions of controller support different number of ring control
  blocks such that adjust code a bit to access known number of
  send/receive ring control blocks. Previously bge(4) blindly
  accessed 16 send/receive RCBs. Also move initializing standard
  receive producer ring producer index, jumbo receive producer ring
  producer index and mini receive producer ring producer index to
  the end of each receive producer ring initialization.

  Do not assume mini receive producer ring is available only when
  controller has jumbo frame capability, instead explicitly check
  ASIC version BCM5700 to disable mini receive producer ring.

  Additionally always enable send ring 0 regardless of controller
  versions. Previously bge(4) didn't enable send ring 0 if controller
  is BGE_IS_5705_PLUS. Becase bge(4) need 1 send ring to send frames
  at least, I have no idea how it would have worked so far.

  Submitted by: davidch

r213742:
  Fix a regression introduced in r213495. r213495 disabled mini
  receive producer ring only for BCM5700. It was believed that
  BCM5700 with external SSRAM is the only controller that supports
  mini ring but it seems all BCM570[0-4] requires to disable mini
  receive producer ring. Otherwise, it caused unexpected RX DMA
  error or watchdog timeouts.

  Reported by: marius, Steve Kargl <sgk <> troutmask dot apl dot washington dot edu>
  Tested by: marius, Steve Kargl <sgk <> troutmask dot apl dot washington dot edu>

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