]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
12 years agoMFC r232008,232010,232080,232089
thompsa [Wed, 29 Feb 2012 00:52:56 +0000 (00:52 +0000)]
MFC r232008,232010,232080,232089

 Using the flowid in the mbuf assumes the network card is giving a good hash for
 the traffic flow, this may not be the case giving poor traffic distribution.
 Add a sysctl which allows us to fall back to our own flow hash code.

PR: kern/164901

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

12 years agoMFC r228924:
delphij [Tue, 28 Feb 2012 23:30:19 +0000 (23:30 +0000)]
MFC r228924:

In POSIX.1-2008:

P_tmpdir [OB XSI]  Default directory prefix for tempnam().

This macro is used in a lot of places in legacy applications,
and is why we see a lot of programs written for e.g. Linux
store volatile temporary files in /var/tmp and not /tmp.

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

12 years agoMFC: r232050
rmacklem [Tue, 28 Feb 2012 15:52:01 +0000 (15:52 +0000)]
MFC: r232050
hrs@ reported a panic to freebsd-stable@ under the subject line
"panic in 8.3-PRERELEASE" on Feb. 22, 2012. This panic was caused
by use of a mix of tsleep() and msleep() calls on the same event
in the new NFS server DRC code. It did "mtx_unlock(); tsleep();"
in two places, which kib@ noted introduced a slight risk that the
wakeup() would occur before the tsleep(), resulting in a 10sec
delay before waking up. This patch fixes the problem by replacing
"mtx_unlock(); tsleep();" with mtx_sleep(..PDROP..). It also
changes a nfsmsleep() call to mtx_sleep() so that the code uses
mtx_sleep() consistently within the file.

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

12 years agoMFC: r231843, r232061, r232063, r232065, r232069
jkim [Mon, 27 Feb 2012 18:28:18 +0000 (18:28 +0000)]
MFC: r231843, r232061, r232063, r232065, r232069

- Set the initial mode for the adapter after executing VESA BIOS POST.
- Probe supported states for save/restore function.
- Defer to VGA methods if no state is supported.

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

12 years agoMFC: r231841, r231842
jkim [Mon, 27 Feb 2012 18:17:03 +0000 (18:17 +0000)]
MFC: r231841, r231842

Properly check VESA video mode number.

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

12 years agoBackout r230934 (MFCed as r231859) which didn't work with unix sockets and
pluknet [Mon, 27 Feb 2012 17:41:23 +0000 (17:41 +0000)]
Backout r230934 (MFCed as r231859) which didn't work with unix sockets and
several filesystem layers mounted at the specified path.

Pointy hat to: pluknet
Reported by: flo via broken tinderbox

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

12 years agoMFC r231860
sbruno [Mon, 27 Feb 2012 17:29:42 +0000 (17:29 +0000)]
MFC r231860

During work to port isci(4) to stable/7 I noted that the maxio portion of
struct ccb_pathinq from sys/cam/cam_ccb.h wasn't added to stable/7 at all
and didn't appear in stable/8 until svn R195534.  Since __FreeBSD_version
did not get bumped until svn R195634, assume that maxio is valid at 800102
or higher.

Obtained from: Yahoo! Inc.

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

12 years agoMFC r232039:
hselasky [Sun, 26 Feb 2012 21:24:02 +0000 (21:24 +0000)]
MFC r232039:
Avoid creating PCM devices for MIDI only adapters.

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

12 years agoMFC r231991:
ae [Sun, 26 Feb 2012 10:20:13 +0000 (10:20 +0000)]
MFC r231991:
  Don't use `m' after m_megapullup.

  PR: kern/165373

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

12 years agoMFC: r232060
brueffer [Sun, 26 Feb 2012 00:54:13 +0000 (00:54 +0000)]
MFC: r232060

Add isci(4) to the hardware notes.

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

12 years agoMFC: r232056
brueffer [Sun, 26 Feb 2012 00:52:10 +0000 (00:52 +0000)]
MFC: r232056

Rename DESCRIPTION section to HARDWARE, so this manpage can be used for
automatic hardware notes generation.

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

12 years agoMFC r232011:
gjb [Sat, 25 Feb 2012 19:20:53 +0000 (19:20 +0000)]
MFC r232011:
  Xref the following in wlan(4):

  - bwn(4)
  - mwl(4)
  - run(4)

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

12 years agoMFC: r231871
brueffer [Sat, 25 Feb 2012 10:10:43 +0000 (10:10 +0000)]
MFC: r231871

Switch the license boilerplates to our standard one.

Advantages:
- Reduces the number of different license versions in the tree
- Eliminates a typo
- Removes some incorrect author attributions due to c/p
- Removes c/p error potential for future pmc manpages

Approved by: jkoshy, gnn, rpaulo, fabient (copyright holders)

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

12 years agoMFC r232002:
kib [Sat, 25 Feb 2012 01:20:53 +0000 (01:20 +0000)]
MFC r232002:
Remove wrong comment.

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

12 years agoMFC: r231985
marius [Sat, 25 Feb 2012 01:18:42 +0000 (01:18 +0000)]
MFC: r231985

Fix memset sizeof

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

12 years agoMFC: r231914
marius [Sat, 25 Feb 2012 00:41:35 +0000 (00:41 +0000)]
MFC: r231914

Probe the National DP83849, which is a dual-port version of the PHYTER.

Obtained from: NetBSD

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

12 years agoMFC: r231913
marius [Sat, 25 Feb 2012 00:35:19 +0000 (00:35 +0000)]
MFC: r231913

- Probe BCM57780.
- In case the parent is bge(4), don't set the Jumbo frame settings unless
  the MAC actually is Jumbo capable as otherwise the PHY might not have the
  corresponding registers implemented. This is also in line with what the
  Linux tg3 driver does.

PR: 165032
Submitted by: Alexander Milanov
Obtained from: OpenBSD

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

12 years agoMFC r231904
alc [Fri, 24 Feb 2012 17:50:23 +0000 (17:50 +0000)]
MFC r231904
  Close a race due to dropping of the map lock between creating a map entry
  for a shared mapping and marking the entry for inheritance.

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

12 years agoMFC: r231880,r231915,r231937
brueffer [Fri, 24 Feb 2012 07:00:29 +0000 (07:00 +0000)]
MFC: r231880,r231915,r231937

Add a manpage for the oce(4) driver.

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

12 years agoMFC: r231621
marius [Fri, 24 Feb 2012 00:47:14 +0000 (00:47 +0000)]
MFC: r231621

- As it turns out, MSI-X is broken for at least LSI SAS1068E when passed
  through by VMware so blacklist their PCI-PCI bridge for MSI/MSI-X here.
  Note that besides currently there not being a quirk type that disables
  MSI-X only and there's no evidence that MSI doesn't work with the VMware
  pass-through, it's really questionable whether MSI generally works in
  that setup as VMware only mention three know working devices [1, p. 4].
  Also not that this quirk entry currently doesn't affect the devices
  emulated by VMware in any way as these don't claim support MSI/MSI-X to
  begin with. [2]
  While at it, make the PCI quirk table const and static.
- Remove some duplicated empty lines.
- Use DEVMETHOD_END.

PR: 163812, http://forums.freebsd.org/showthread.php?t=27899 [2]
Reviewed by: jhb

[1]: http://www.vmware.com/pdf/vsp_4_vmdirectpath_host.pdf

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

12 years agoMFC: r231781
jkim [Thu, 23 Feb 2012 22:34:44 +0000 (22:34 +0000)]
MFC: r231781

Some BIOSes are known for corrupting low 64KB between suspend and resume.
Mask off the first 16 pages unless we appear to be running in a VM.  This
address may be overridden by 'hw.physmem.start' tunable from loader.

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

12 years agoMFC: r231474
jkim [Thu, 23 Feb 2012 22:29:36 +0000 (22:29 +0000)]
MFC: r231474

De-obfuscate acpi_acquire_global_lock().

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

12 years agoMFC: r231161
jkim [Thu, 23 Feb 2012 22:26:14 +0000 (22:26 +0000)]
MFC: r231161

- Give all clocks and timers on acpi0 the equal probing order.
- Increase probing order for ECDT table to match HID-based probing.
- Decrease probing order for HPET table to match HID-based probing.
- Decrease probing order for CPUs and system resources.
- Fix ACPI_DEV_BASE_ORDER to reflect the reality.

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

12 years agoMFC: r231797
jkim [Thu, 23 Feb 2012 22:20:52 +0000 (22:20 +0000)]
MFC: r231797

Clean up RFLAG and CR3 register handling and nearby comments.  For BSP, use
spinlock_enter()/spinlock_exit() to save/restore RFLAGS.  We know interrupt
is disabled when returning from S3.  For AP, we do not have to save/restore
it because IRET will do it for us any way.  Do not save CR3 locally because
savectx() does it and BSP does not have to switch to kernel map for amd64.
Change contigmalloc(9) flag while I am in the neighborhood.

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

12 years agoMFC: r231227
jkim [Thu, 23 Feb 2012 22:15:56 +0000 (22:15 +0000)]
MFC: r231227

Reset clock after atrtc(4) is properly resumed.

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

12 years agoMFC: r231226, r231295
jkim [Thu, 23 Feb 2012 22:10:49 +0000 (22:10 +0000)]
MFC: r231226, r231295

Revert r211288 and move the logic to the acpi_timer itself.

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

12 years agoMFC: r231791, r231840
jkim [Thu, 23 Feb 2012 22:03:20 +0000 (22:03 +0000)]
MFC: r231791, r231840

Set up an event handler to turn off speaker if user requested it.  Speaker
will stop beeping after all device drivers are resumed.  Use proper API to
"acquire" and "release" PIC timer2 for consistency and correctness.

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

12 years agoMFC: r231787
jkim [Thu, 23 Feb 2012 22:00:31 +0000 (22:00 +0000)]
MFC: r231787

Make ACPI resume beeper less cryptic.  Set PIC timer2 mode properly.

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

12 years agoMFC: r231169
jkim [Thu, 23 Feb 2012 21:54:04 +0000 (21:54 +0000)]
MFC: r231169

Do not EOI local APIC too early when suspending APs.  Just do doreti instead
of taking a shortcut.

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

12 years agoMFC: r230958
jkim [Thu, 23 Feb 2012 21:50:13 +0000 (21:50 +0000)]
MFC: r230958

Restore callee saved registers later and micro-optimize.

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

12 years agoMFC: r230957
jkim [Thu, 23 Feb 2012 21:48:39 +0000 (21:48 +0000)]
MFC: r230957

Fix a function prototype to reflect reality.

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

12 years agoMFC: r230830
jkim [Thu, 23 Feb 2012 21:44:44 +0000 (21:44 +0000)]
MFC: r230830

Restore XCR0 before restoring extended FPU states.

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

12 years agoMFC: r230777
jkim [Thu, 23 Feb 2012 21:42:41 +0000 (21:42 +0000)]
MFC: r230777

Naturally align a newly added wakeup_fpusave.

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

12 years agoMFC 230183: Make XENHVM work on i386 by fixing the definition of __ffs.
cperciva [Thu, 23 Feb 2012 19:52:33 +0000 (19:52 +0000)]
MFC 230183: Make XENHVM work on i386 by fixing the definition of __ffs.

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

12 years agoMFC 230184, 230185: Add XENHVM config file to i386.
cperciva [Thu, 23 Feb 2012 19:49:25 +0000 (19:49 +0000)]
MFC 230184, 230185: Add XENHVM config file to i386.

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

12 years agoMFC r230623
kmacy [Thu, 23 Feb 2012 19:20:36 +0000 (19:20 +0000)]
MFC r230623

 exclude kmem_alloc'ed ARC data buffers from kernel minidumps on amd64
 excluding other allocations including UMA now entails the addition of
 a single flag to kmem_alloc or uma zone create

Reviewed by: alc,avg

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

12 years agoMFC r230598
kmacy [Thu, 23 Feb 2012 18:50:19 +0000 (18:50 +0000)]
MFC r230598

 A flowtable entry can continue referencing an llentry indefinitely if the entry is repeatedly
 referenced within its timeout window. This change clears the LLE_VALID flag when an llentry
 is removed from an interface's hash table and adds an extra check to the flowtable code
 for the LLE_VALID flag in llentry to avoid retaining and using a stale reference.

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

12 years agoMFC: r231943
brueffer [Thu, 23 Feb 2012 17:57:08 +0000 (17:57 +0000)]
MFC: r231943

Add oce(4) to the hardware notes.

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

12 years agoMFC r231622:
yongari [Thu, 23 Feb 2012 11:25:30 +0000 (11:25 +0000)]
MFC r231622:
  For RTL8168/8111D controller, make sure to wake PHY from power down
  mode.  Otherwise, PHY access times out under certain conditions.

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

12 years agoMFC r230204 and r230209:
hselasky [Thu, 23 Feb 2012 07:34:53 +0000 (07:34 +0000)]
MFC r230204 and r230209:
Export information about USB serial port unit and port numbers
directly via the sysctl interface.

PR: usb/164090

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

12 years agoMFC r231713:
hselasky [Thu, 23 Feb 2012 07:26:58 +0000 (07:26 +0000)]
MFC r231713:
Add new USB device ID.

PR: usb/165154

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

12 years agoMFC r231835:
hselasky [Thu, 23 Feb 2012 07:23:33 +0000 (07:23 +0000)]
MFC r231835:
Add support for filtering USB traces using the BPF functionality.

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

12 years agoMFC: r231805
rmacklem [Thu, 23 Feb 2012 04:32:41 +0000 (04:32 +0000)]
MFC: r231805
Delete a couple of out of date comments that are no longer true in
the new NFS client.

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

12 years agoMFC: r229887
jkim [Thu, 23 Feb 2012 00:52:27 +0000 (00:52 +0000)]
MFC: r229887

Enable hardware RNG for VIA Nano processors.

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

12 years agoMFC 231906:
davidxu [Wed, 22 Feb 2012 08:30:18 +0000 (08:30 +0000)]
MFC 231906:

Check both seconds and nanoseconds are zero, only checking nanoseconds
is zero may trigger timeout too early. It seems a copy&paste bug.

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

12 years agoMFC r230430:
kib [Tue, 21 Feb 2012 21:21:31 +0000 (21:21 +0000)]
MFC r230430:
Use getcontextx(3) internal API instead of getcontext(2) to provide
the signal handlers with the context information in the deferrred
case.

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

12 years agoMFC r230429:
kib [Tue, 21 Feb 2012 21:18:59 +0000 (21:18 +0000)]
MFC r230429:
Add API for obtaining extended machine context states that cannot be
fit into existing mcontext_t.

On i386 and amd64 do return the extended FPU states using
getcontextx(3). For other architectures, getcontextx(3) returns the
same information as getcontext(2).

MFC r230864:
Make the sys/ucontext.h self-contained by changing the return type
of __getcontextx_size(3) from size_t to int.

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

12 years agoMFC r230427:
kib [Tue, 21 Feb 2012 20:59:49 +0000 (20:59 +0000)]
MFC r230427:
Adopt to new layout of struct pcb.

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

12 years agoMFC r230426:
kib [Tue, 21 Feb 2012 20:56:03 +0000 (20:56 +0000)]
MFC r230426:
Add support for the extended FPU states on amd64, both for native
64bit and 32bit ABIs.  As a side-effect, it enables AVX on capable
CPUs.

MFC r230765:
Synchronize the struct sigcontext definitions on x86 with mcontext_t.

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

12 years agoMFC r230538:
kib [Tue, 21 Feb 2012 20:29:38 +0000 (20:29 +0000)]
MFC r230538:
Order newly added functions alphabetically.

MFC r230766:
Move xrstor/xsave/xsetbv into fpu.c and reorder them.

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

12 years agoClean up mergeinfo.
jh [Tue, 21 Feb 2012 18:29:46 +0000 (18:29 +0000)]
Clean up mergeinfo.

Discussed on: src-committers

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

12 years agoMFC r231632:
delphij [Tue, 21 Feb 2012 04:12:28 +0000 (04:12 +0000)]
MFC r231632:

wctob() returns EOF and not WEOF.

Noticed by: Zhihao Yuan <lichray gmail com>

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

12 years agoMFC r231572 (by mckusick):
kib [Tue, 21 Feb 2012 01:46:41 +0000 (01:46 +0000)]
MFC r231572 (by mckusick):
Missing conditions in checking whether an inode has been written.

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

12 years agoMFC r231313 (by mckusick):
kib [Tue, 21 Feb 2012 01:43:31 +0000 (01:43 +0000)]
MFC r231313 (by mckusick):
First attempt the uiomove() to the newly allocated (and dirty) buffer
and only zeros it if the uiomove() fails. The effect is to eliminate the
gratuitous zeroing of the buffer in the usual case where the uiomove()
successfully fills it.

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

12 years agoMFC r231160 (by mckusick):
kib [Tue, 21 Feb 2012 01:37:27 +0000 (01:37 +0000)]
MFC r231160 (by mckusick):
Do not fsync all resident UFS vnodes from the syncer vnode call
to ffs_sync(). Since all inode metadata updates are translated to
inodeblock updates, the vnodes syncing is handled by syncer dirty buffer
wheel. The only things that shall be synced by ffs_sync() from the
syncer calls are the filesystem metadata proper.

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

12 years agoMFC r231122:
kib [Tue, 21 Feb 2012 01:27:23 +0000 (01:27 +0000)]
MFC r231122:
Sprinkle missed calls to asynchronous UFS_UPDATE() in attempt to
guarantee that all UFS inode metadata changes results in the dirtiness
of the inodeblock.

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

12 years agoMFC r231902:
kib [Tue, 21 Feb 2012 01:19:48 +0000 (01:19 +0000)]
MFC r231902:
Document PL_FLAG_CHILD.

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

12 years agoMFC r230397, r230438:
mm [Mon, 20 Feb 2012 21:10:14 +0000 (21:10 +0000)]
MFC r230397, r230438:

MFC r230397 (pjd):
By default turn off prefetch when listing snapshots.
In my tests it makes listing snapshots 19% faster with cold cache and
47% faster with warm cache.

MFC r230438 (pjd):
Dramatically optimize listing snapshots when user requests only snapshot
names and wants to sort them by name, ie. when executes:

# zfs list -t snapshot -o name -s name

Because only name is needed we don't have to read all snapshot properties.

Below you can find how long does it take to list 34509 snapshots from a single
disk pool before and after this change with cold and warm cache:

before:

# time zfs list -t snapshot -o name -s name > /dev/null
cold cache: 525s
warm cache: 218s

after:

# time zfs list -t snapshot -o name -s name > /dev/null
cold cache: 1.7s
warm cache: 1.1s

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

12 years agoMFC: r230795
jkim [Mon, 20 Feb 2012 18:49:11 +0000 (18:49 +0000)]
MFC: r230795

Allow contents of multiple directories to be merged to the current image.

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

12 years agoMFC r231821:
pluknet [Mon, 20 Feb 2012 17:09:52 +0000 (17:09 +0000)]
MFC r231821:

 delete-old does not have delete-old-libs dependency.
 Reflect this in the comment.

PR: conf/163993
Submitted by: Eugen Konkov <kes-kes at yandex ru>

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

12 years agoMFC r231716
ken [Mon, 20 Feb 2012 16:50:16 +0000 (16:50 +0000)]
MFC r231716

  Set the max_lun field of the path inquiry CCB to 8.

  This allows LUNs greater than 0 to be probed.  It can be increased later if
  need be.

  This brings back SVN rev 224973, which was inadvertently removed with the
  import of the LSI driver.

  Reported by: dwhite

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

12 years agoMFC r231075:
kib [Mon, 20 Feb 2012 11:27:37 +0000 (11:27 +0000)]
MFC r231075:
Instead of removing MNTK_ASYNC from mnt_kern_flag, provide a local
thread flag to disable async i/o for current thread only. Use the
opportunity to move DOINGASYNC() macro into sys/vnode.h and
consistently use it through places which tested for MNTK_ASYNC.

MFC r231204:
Unbreak detection of the async mode for clustered writes after r231075.

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

12 years agoMFC r231862:
dougb [Mon, 20 Feb 2012 10:13:09 +0000 (10:13 +0000)]
MFC r231862:
Increase the default shutdown timer to 90 seconds. This will allow
certain systems that take a long time to shut down, without adversely
affecting things that shut down quickly. It's also 30 seconds less than
the default hard limit of 120 seconds in kern.init_shutdown_timeout.

PR: conf/109272
Submitted by: Radim Kolar SF.NET <hsn@sendmail.cz>

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

12 years agoMFC r231057:
dim [Sun, 19 Feb 2012 23:35:56 +0000 (23:35 +0000)]
MFC r231057:

Add a WITH_CLANG_EXTRAS option for src.conf(5), disabled by default,
that builds the following additional llvm/clang tools:

- bugpoint
- llc
- lli
- llvm-ar
- llvm-as
- llvm-bcanalyzer
- llvm-diff
- llvm-dis
- llvm-extract
- llvm-ld
- llvm-link
- llvm-mc
- llvm-nm
- llvm-objdump
- llvm-prof
- llvm-ranlib
- llvm-rtdyld
- llvm-stub
- macho-dump
- opt

These tools are mainly useful for people that want to manipulate llvm
bitcode (.bc) and llvm assembly language (.ll) files, or want to tinker
with llvm and clang themselves.

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

12 years agoMFC r230391, r230400, 231019:
andreast [Sun, 19 Feb 2012 08:58:31 +0000 (08:58 +0000)]
MFC r230391, r230400, 231019:

This commit adds profiling support for powerpc64. Now we can do application
profiling and kernel profiling. To enable kernel profiling one has to build
kgmon(8). I will enable the build once I managed to build and test powerpc
(32-bit) kernels with profiling support.

- add a powerpc64 PROF_PROLOGUE for _mcount.
- add macros to avoid adding the PROF_PROLOGUE in certain assembly entries.
- apply these macros where needed.
- add size information to the MCOUNT function.

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

12 years agoMFC r230972,r230980,r231559,r231565: Add MK_SOURCELESS build option, and
rmh [Sun, 19 Feb 2012 07:44:38 +0000 (07:44 +0000)]
MFC r230972,r230980,r231559,r231565: Add MK_SOURCELESS build option, and
associated fixes.

Approved by: kib (mentor)

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

12 years agoMFC r231236: Acknowledge that jail_attach and jail_remove can return EPERM.
jamie [Sat, 18 Feb 2012 16:54:01 +0000 (16:54 +0000)]
MFC r231236: Acknowledge that jail_attach and jail_remove can return EPERM.

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

12 years agoMFC r231526:
kib [Sat, 18 Feb 2012 00:49:09 +0000 (00:49 +0000)]
MFC r231526:
Close a race due to dropping of the map lock between creating map entry
for a shared mapping and marking the entry for inheritance.

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

12 years agoMFC r231521:
kib [Sat, 18 Feb 2012 00:45:59 +0000 (00:45 +0000)]
MFC r231521:
The PTRACESTOP() macro is used only once. Inline the only use and remove
the macro.

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

12 years agoMFC 231672:
tuexen [Fri, 17 Feb 2012 10:54:09 +0000 (10:54 +0000)]
MFC 231672:

Fix a bug where the wrong protocol overhead was used. This can lead
to a deadlock of an association when an IPv6 socket was used to
communcate with IPv4 and an ICMPv4 fragmentation needed message
was received.
While there, simplify the code a bit.

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

12 years agoMFC r231443:
kib [Fri, 17 Feb 2012 10:39:28 +0000 (10:39 +0000)]
MFC r231443:
Add a test program for recently added ptrace(2) interfaces.

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

12 years agoMFC r231441:
kib [Fri, 17 Feb 2012 10:37:14 +0000 (10:37 +0000)]
MFC r231441:
In cpu_set_user_tls(), consistently set PCB_FULL_IRET pcb flag for
both 64bit and 32bit binaries, not for 64bit only.

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

12 years agoMFC r231320:
kib [Fri, 17 Feb 2012 10:27:58 +0000 (10:27 +0000)]
MFC r231320:
Mark the automatically attached child with PL_FLAG_CHILD in struct
lwpinfo flags, for PT_FOLLOWFORK auto-attachment.

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

12 years agoMFC r230934:
pluknet [Fri, 17 Feb 2012 06:26:11 +0000 (06:26 +0000)]
MFC r230934:

 Print the owner process for unix domain sockets when restricted to the
 specified files.

PR: bin/143962

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

12 years agoMove mergeinfo from r229831 from share/ to the individual directories
dougb [Fri, 17 Feb 2012 03:39:06 +0000 (03:39 +0000)]
Move mergeinfo from r229831 from share/ to the individual directories
in share/examples/.

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

12 years agoMFC r231743,r231837,r231839: Xen PV block interface enhancements
gibbs [Fri, 17 Feb 2012 01:45:49 +0000 (01:45 +0000)]
MFC r231743,r231837,r231839: Xen PV block interface enhancements

r231743
=======
Enhance documentation, improve interoperability, and fix defects in
FreeBSD's front and back Xen blkif interface drivers.

sys/dev/xen/blkfront/block.h:
sys/dev/xen/blkfront/blkfront.c:
sys/dev/xen/blkback/blkback.c:
Replace FreeBSD specific multi-page ring impelementation with
support for both the Citrix and Amazon/RedHat versions of this
extension.

sys/dev/xen/blkfront/blkfront.c:
o Add a per-instance sysctl tree that exposes all negotiated
  transport parameters (ring pages, max number of requests,
  max request size, max number of segments).
o In blkfront_vdevice_to_unit() add a missing return statement
  so that we properly identify the unit number for high numbered
  xvd devices.

sys/dev/xen/blkback/blkback.c:
o Add static dtrace probes for several events in this driver.
o Defer connection shutdown processing until the front-end
  enters the closed state.  This avoids prematurely tearing
  down the connection when buggy front-ends transition to the
  closing state, even though the device is open and they
  veto the close request from the tool stack.
o Add nodes for maximum request size and the number of active
  ring pages to the exising, per-instance, sysctl tree.
o Miscelaneous style cleanup.

sys/xen/interface/io/blkif.h:
o Add extensive documentation of the XenStore nodes used to
  implement the blkif interface.
o Document the startup sequence between a front and back driver.
o Add structures and documenatation for the "discard" feature
  (AKA Trim).
o Cleanup some definitions related to FreeBSD's request
  number/size/segment-limit extension.

sys/dev/xen/blkfront/blkfront.c:
sys/dev/xen/blkback/blkback.c:
sys/xen/xenbus/xenbusvar.h:
Add the convenience function xenbus_get_otherend_state() and
use it to simplify some logic in both block-front and block-back.

r231837
=======
sys/dev/xen/blkback/blkback.c:
Fix typo in a printf string: "specificed" -> "specified".

r231839
=======
Fix a bug in the calculation of the maximum I/O request size.
The previous code did not limit the I/O request size based on
the maximum number of segments supported by the back-end.  In
current practice, since the only back-end supporting chained
requests is the FreeBSD implementation, this limit was never
exceeded.

sys/dev/xen/blkfront/block.h:
Add two macros, XBF_SEGS_TO_SIZE() and XBF_SIZE_TO_SEGS(),
to centralize the logic of reserving a segment to deal with
non-page-aligned I/Os.

sys/dev/xen/blkfront/blkfront.c:
o When negotiating transfer parameters, limit the
  max_request_size we use and publish, if it is greater
  than the maximum, unaligned, I/O we can support with
  the number of segments advertised by the backend.
o Don't unilaterally reduce the I/O size published to
  the disk layer by a single page.  max_request_size
  is already properly limited in the transfer parameter
  negotiation code.
o Fix typos in printf strings:
"max_requests_segments" -> "max_request_segments"
"specificed" -> "specified"

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

12 years agoMFC r231745:
gibbs [Fri, 17 Feb 2012 01:23:58 +0000 (01:23 +0000)]
MFC r231745:

Limit the ST3146855LW U320 drive to 55 tags to avoid command timeouts
under load.

Submitted by: Gelson Borsoi

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

12 years agoMFC r231299:
eadler [Fri, 17 Feb 2012 00:55:26 +0000 (00:55 +0000)]
MFC r231299:
 - More accurately document what happens on error.

PR: docs/127908
Approved by: cperciva

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

12 years agoMFC r228274:
eadler [Thu, 16 Feb 2012 19:39:49 +0000 (19:39 +0000)]
MFC r228274:
 - Fix some uninitialized variables in pipe regression tests that result in failure.

PR: misc/161175
Approved by: cperciva

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

12 years agoMFC r231582:
kib [Thu, 16 Feb 2012 10:58:15 +0000 (10:58 +0000)]
MFC r231582:
Add missed EOL when die() was converted to use rtld_fdputstr() instead
of errx().

PR: bin/165075

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

12 years agoMFC r22990[45] and r229907-r229919:
eadler [Thu, 16 Feb 2012 05:01:09 +0000 (05:01 +0000)]
MFC r22990[45] and r229907-r229919:

- fix a variety of warnings produced by gcc46 when compiling world

Approved by (cperciva)

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

12 years agoMFC r231573:
emaste [Thu, 16 Feb 2012 00:46:11 +0000 (00:46 +0000)]
MFC r231573:

  Fix panic after "WARNING - ATA_IDENTIFY taskqueue timeout"

  When performing a firmware upgrade via atacontrol[1] the subsequent
  command may time out producing the error message above.  When this
  happens the callout could still be active, and the system would then
  panic due to a destroyed semaphore.

  Instead, ensure that the callout is done first, via callout_drain.

  [1] http://lists.freebsd.org/pipermail/freebsd-current/2012-January/031122.html

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

12 years agoMFC r231667:
dougb [Wed, 15 Feb 2012 23:02:45 +0000 (23:02 +0000)]
MFC r231667:

Add new functionality to the force_depend method.

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

12 years agoMFC r231667:
dougb [Wed, 15 Feb 2012 22:59:15 +0000 (22:59 +0000)]
MFC r231667:

Fix various issues with the NFS and RPC related scripts.
Add new functionality to the force_depend method.

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

12 years agoMFC r229220: sh: Make various functions static.
jilles [Wed, 15 Feb 2012 22:45:57 +0000 (22:45 +0000)]
MFC r229220: sh: Make various functions static.

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

12 years agoMFC r226523: Fix some memory errors in *at() regression tests.
jilles [Wed, 15 Feb 2012 22:07:09 +0000 (22:07 +0000)]
MFC r226523: Fix some memory errors in *at() regression tests.

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

12 years agoMFC r228109: test: Add more testcases.
jilles [Wed, 15 Feb 2012 21:55:48 +0000 (21:55 +0000)]
MFC r228109: test: Add more testcases.

The new testcases pass even on old stable/7, but some other implementations
manage to get them wrong.

Also remove a few duplicate testcases.

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

12 years agoMFC r229219: sh: Remove unused function scopyn().
jilles [Wed, 15 Feb 2012 21:52:14 +0000 (21:52 +0000)]
MFC r229219: sh: Remove unused function scopyn().

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

12 years agoMFC r229742: sh: Avoid possible echo options in a testcase.
jilles [Wed, 15 Feb 2012 21:48:44 +0000 (21:48 +0000)]
MFC r229742: sh: Avoid possible echo options in a testcase.

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

12 years agoMFC r230512: sockstat: Also show sockets not associated with a descriptor.
jilles [Wed, 15 Feb 2012 21:03:26 +0000 (21:03 +0000)]
MFC r230512: sockstat: Also show sockets not associated with a descriptor.

Sockets not associated with a file descriptor include TCP TIME_WAIT states
and sockets created via the socket(9) API such as from rpc.lockd and the NFS
client.

PR: bin/164081

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

12 years agoMFC r229363
alc [Wed, 15 Feb 2012 18:15:26 +0000 (18:15 +0000)]
MFC r229363
  Don't pass VM_ALLOC_ZERO to vm_page_grab() in tmpfs_mappedwrite() and
  tmpfs_nocacheread().  It is both unnecessary and a pessimization.  It
  results in either the page being zeroed twice or zeroed first and then
  overwritten by an I/O operation.

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

12 years agoMFC r231092
ken [Wed, 15 Feb 2012 17:46:16 +0000 (17:46 +0000)]
MFC r231092

  r231092 | emaste | 2012-02-06 11:11:00 -0700 (Mon, 06 Feb 2012) | 4 lines

  Avoid panic from unlocking a not locked mutex (in some error cases).

  Reviewed by: ken@

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

12 years agoMFC r229997, r230033, and r230334
ken [Wed, 15 Feb 2012 17:28:09 +0000 (17:28 +0000)]
MFC r229997, r230033, and r230334

Bring the CAM Target Layer into stable/9.

  r230334 | ken | 2012-01-19 11:42:03 -0700 (Thu, 19 Jan 2012) | 19 lines

  Quiet some clang warnings when compiling CTL.

  ctl_error.c,
  ctl_error.h: Take out the ctl_sense_format enumeration, and use
   scsi_sense_data_type instead.

   Remove ctl_get_sense_format() and switch ctl_build_ua()
   over to using scsi_sense_data_type.

  ctl_backend_ramdisk.c,
  ctl_backend_block.c:
   Use C99 structure initializers instead of GNU initializers.

  ctl.c: Switch over to using the SCSI sense format enumeration
   instead of the CTL-specific enumeration.

  Submitted by: dim (partially)
  MFC after: 1 month

  r230033 | ken | 2012-01-12 15:08:33 -0700 (Thu, 12 Jan 2012) | 5 lines

  Silence some unnecessary verbosity.

  Reported by: mav
  MFC after: 1 month

  r229997 | ken | 2012-01-11 17:34:33 -0700 (Wed, 11 Jan 2012) | 170 lines

  Add the CAM Target Layer (CTL).

  CTL is a disk and processor device emulation subsystem originally written
  for Copan Systems under Linux starting in 2003.  It has been shipping in
  Copan (now SGI) products since 2005.

  It was ported to FreeBSD in 2008, and thanks to an agreement between SGI
  (who acquired Copan's assets in 2010) and Spectra Logic in 2010, CTL is
  available under a BSD-style license.  The intent behind the agreement was
  that Spectra would work to get CTL into the FreeBSD tree.

  Some CTL features:

   - Disk and processor device emulation.
   - Tagged queueing
   - SCSI task attribute support (ordered, head of queue, simple tags)
   - SCSI implicit command ordering support.  (e.g. if a read follows a mode
     select, the read will be blocked until the mode select completes.)
   - Full task management support (abort, LUN reset, target reset, etc.)
   - Support for multiple ports
   - Support for multiple simultaneous initiators
   - Support for multiple simultaneous backing stores
   - Persistent reservation support
   - Mode sense/select support
   - Error injection support
   - High Availability support (1)
   - All I/O handled in-kernel, no userland context switch overhead.

  (1) HA Support is just an API stub, and needs much more to be fully
      functional.

  ctl.c: The core of CTL.  Command handlers and processing,
   character driver, and HA support are here.

  ctl.h: Basic function declarations and data structures.

  ctl_backend.c,
  ctl_backend.h: The basic CTL backend API.

  ctl_backend_block.c,
  ctl_backend_block.h: The block and file backend.  This allows for using
   a disk or a file as the backing store for a LUN.
   Multiple threads are started to do I/O to the
   backing device, primarily because the VFS API
   requires that to get any concurrency.

  ctl_backend_ramdisk.c: A "fake" ramdisk backend.  It only allocates a
   small amount of memory to act as a source and sink
   for reads and writes from an initiator.  Therefore
   it cannot be used for any real data, but it can be
   used to test for throughput.  It can also be used
   to test initiators' support for extremely large LUNs.

  ctl_cmd_table.c: This is a table with all 256 possible SCSI opcodes,
   and command handler functions defined for supported
   opcodes.

  ctl_debug.h: Debugging support.

  ctl_error.c,
  ctl_error.h: CTL-specific wrappers around the CAM sense building
   functions.

  ctl_frontend.c,
  ctl_frontend.h: These files define the basic CTL frontend port API.

  ctl_frontend_cam_sim.c: This is a CTL frontend port that is also a CAM SIM.
   This frontend allows for using CTL without any
   target-capable hardware.  So any LUNs you create in
   CTL are visible in CAM via this port.

  ctl_frontend_internal.c,
  ctl_frontend_internal.h:
   This is a frontend port written for Copan to do
   some system-specific tasks that required sending
   commands into CTL from inside the kernel.  This
   isn't entirely relevant to FreeBSD in general,
   but can perhaps be repurposed.

  ctl_ha.h: This is a stubbed-out High Availability API.  Much
   more is needed for full HA support.  See the
   comments in the header and the description of what
   is needed in the README.ctl.txt file for more
   details.

  ctl_io.h: This defines most of the core CTL I/O structures.
   union ctl_io is conceptually very similar to CAM's
   union ccb.

  ctl_ioctl.h: This defines all ioctls available through the CTL
   character device, and the data structures needed
   for those ioctls.

  ctl_mem_pool.c,
  ctl_mem_pool.h: Generic memory pool implementation used by the
   internal frontend.

  ctl_private.h: Private data structres (e.g. CTL softc) and
   function prototypes.  This also includes the SCSI
   vendor and product names used by CTL.

  ctl_scsi_all.c,
  ctl_scsi_all.h: CTL wrappers around CAM sense printing functions.

  ctl_ser_table.c: Command serialization table.  This defines what
   happens when one type of command is followed by
   another type of command.

  ctl_util.c,
  ctl_util.h: CTL utility functions, primarily designed to be
   used from userland.  See ctladm for the primary
   consumer of these functions.  These include CDB
   building functions.

  scsi_ctl.c: CAM target peripheral driver and CTL frontend port.
   This is the path into CTL for commands from
   target-capable hardware/SIMs.

  README.ctl.txt: CTL code features, roadmap, to-do list.

  usr.sbin/Makefile: Add ctladm.

  ctladm/Makefile,
  ctladm/ctladm.8,
  ctladm/ctladm.c,
  ctladm/ctladm.h,
  ctladm/util.c: ctladm(8) is the CTL management utility.
   It fills a role similar to camcontrol(8).
   It allow configuring LUNs, issuing commands,
   injecting errors and various other control
   functions.

  usr.bin/Makefile: Add ctlstat.

  ctlstat/Makefile
  ctlstat/ctlstat.8,
  ctlstat/ctlstat.c: ctlstat(8) fills a role similar to iostat(8).
   It reports I/O statistics for CTL.

  sys/conf/files: Add CTL files.

  sys/conf/NOTES: Add device ctl.

  sys/cam/scsi_all.h: To conform to more recent specs, the inquiry CDB
   length field is now 2 bytes long.

   Add several mode page definitions for CTL.

  sys/cam/scsi_all.c: Handle the new 2 byte inquiry length.

  sys/dev/ciss/ciss.c,
  sys/dev/ata/atapi-cam.c,
  sys/cam/scsi/scsi_targ_bh.c,
  scsi_target/scsi_cmds.c,
  mlxcontrol/interface.c: Update for 2 byte inquiry length field.

  scsi_da.h: Add versions of the format and rigid disk pages
   that are in a more reasonable format for CTL.

  amd64/conf/GENERIC,
  i386/conf/GENERIC,
  ia64/conf/GENERIC,
  sparc64/conf/GENERIC: Add device ctl.

  i386/conf/PAE: The CTL frontend SIM at least does not compile
   cleanly on PAE.

  Sponsored by: Copan Systems, SGI and Spectra Logic
  MFC after: 1 month

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

12 years agoMFC r231505,231520:
bz [Wed, 15 Feb 2012 16:56:52 +0000 (16:56 +0000)]
MFC r231505,231520:

 Introduce a new NET_RT_IFLISTL API to query the address list.  It works
 on extended and extensible structs if_msghdrl and ifa_msghdrl.  This
 will allow us to extend both the msghdrl structs and eventually if_data
 in the future without breaking the ABI.

 The MFC is just to provide the new API to old stable branches to make
 updating and if needed downgrading a lot easier for updates to 10.

 Bump __FreeBSD_version to allow ports to more easily detect the new API.

Reviewed by: brooks
Tested by: brooks

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

12 years agoMFC r231647:
mav [Wed, 15 Feb 2012 14:30:04 +0000 (14:30 +0000)]
MFC r231647:
Do not handle MOD_SHUTDOWN equally to MOD_UNLOAD in sound kernel module.
MOD_SHUTDOWN is not an end of existence, and there is a life after it.
In particular, code previously called on MOD_SHUTDOWN grabbed lock and
deallocated unit numbering. That caused infinite wait loop if snd_uaudio
tried to destroy its PCM device after that point.

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

12 years agoMFC: r231123
nyan [Wed, 15 Feb 2012 13:40:10 +0000 (13:40 +0000)]
MFC: r231123

  - Set TERM to cons25w on pc98 because we still use old cons25w terminal
    to show Japanese.
  - Add cons25w to terminal lists.

  Reviewed by: nwhitehorn

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

12 years agoMFC: r231273
nyan [Wed, 15 Feb 2012 13:32:56 +0000 (13:32 +0000)]
MFC: r231273

  - Disable the olpt driver.   Because it conflicts with the ppc/lpt driver.
  - Remove obsolete comment.

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

12 years agoMFC: rev. 231543
fjoe [Wed, 15 Feb 2012 10:08:13 +0000 (10:08 +0000)]
MFC: rev. 231543

- Use fixed-width integer types.
- Prefer to use C99 stdint types.

This fixes ng_cisco on 64-bit architectures.

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

12 years agoMFC r231563: start watchdogd before most of other daemons/servers
avg [Wed, 15 Feb 2012 09:52:09 +0000 (09:52 +0000)]
MFC r231563: start watchdogd before most of other daemons/servers

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

12 years agoMFC r231515:
bz [Wed, 15 Feb 2012 09:32:20 +0000 (09:32 +0000)]
MFC r231515:

 Use the correct constant (with same value) for comparying the SA type.

PR: kern/142741
Submitted by: Matthijs Kooiman (matthijs stdin.nl)

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