]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
12 years agoMFH r226502,r226503: factor out the common code and fix two display bugs
bapt [Thu, 9 Feb 2012 09:20:34 +0000 (09:20 +0000)]
MFH r226502,r226503: factor out the common code and fix two display bugs

Approved by: des (mentor)

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

12 years agoMFC r230921:
mav [Thu, 9 Feb 2012 07:43:38 +0000 (07:43 +0000)]
MFC r230921:
Insert ordered command every 1/4 of the current command timeout, not 1/4
of the default one.

Without this change setting kern.cam.ada.default_timeout to 1 instead of 30
allowed me to trigger several false positive command timeouts under heavy
ZFS load on a SiI3132 siis(4) controller with 5 HDDs on a port multiplier.

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

12 years agoMFC r230912:
mav [Thu, 9 Feb 2012 07:38:56 +0000 (07:38 +0000)]
MFC r230912:
Make CAM ATA honor old hw.ata.ata_dma and hw.ata.atapi_dma tunables.

Even having more specific hint.ata.X.mode controls, global ones are
still could be useful from some points, including compatibility.

PR: kern/164651

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

12 years agoMFH r230307: fix SIGINFO-related data corruption bug
bapt [Thu, 9 Feb 2012 06:48:04 +0000 (06:48 +0000)]
MFH r230307: fix SIGINFO-related data corruption bug

Approved by: des (mentor)

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

12 years agoMerge from head to stable/9:
scf [Thu, 9 Feb 2012 01:18:35 +0000 (01:18 +0000)]
Merge from head to stable/9:

r230656:
msdos was renamed to msdosfs in 2001 by r77577.

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

12 years agoMerge from head to stable/9:
scf [Wed, 8 Feb 2012 23:14:26 +0000 (23:14 +0000)]
Merge from head to stable/9:

r230655:
Since April 2, 2006, Indiana has observed DST.

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

12 years agoMFC r228641:
bz [Wed, 8 Feb 2012 18:51:10 +0000 (18:51 +0000)]
MFC r228641:

 Allow toggling of IFCAP_VLAN_HWCSUM for hardware that supports checksum
 offloading on vlans and document the new option.

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

12 years agoMFC r230866:
kib [Wed, 8 Feb 2012 14:21:20 +0000 (14:21 +0000)]
MFC r230866:
Add kqueue support to /dev/klog.

PR: kern/156423

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

12 years agoMFC r230553:
kib [Wed, 8 Feb 2012 14:09:08 +0000 (14:09 +0000)]
MFC r230553:
When doing vflush(WRITECLOSE), clean vnode pages.

Unmounts do vfs_msync() before calling VFS_UNMOUNT(), but there is
still a race allowing a process to dirty pages after msync
finished. Remounts rw->ro just left dirty pages in system.

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

12 years agoMFC 230877:
mav [Wed, 8 Feb 2012 07:30:48 +0000 (07:30 +0000)]
MFC 230877:
Fix NULL dereference panic on attempt to turn off (on system shutdown)
disconnected swap device.

This is quick and imperfect solution, as swap device will still be opened
and GEOM will not be able to destroy it. Proper solution would be to
automatically turn off and close disconnected swap device, but with existing
code it will cause panic if there is at least one page on device, even if
it is unimportant page of the user-level process. It needs some work.

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

12 years agoMFC r231177:
marcel [Wed, 8 Feb 2012 04:40:14 +0000 (04:40 +0000)]
MFC r231177:
Rev. 228360 moved the call to cpu_set_upcall() to happen before
td_proc gets initialized in td (=newtd). Use td0 instead.

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

12 years agoMFC 229465: Use correct locking when traversing interface address list.
jhb [Tue, 7 Feb 2012 22:13:38 +0000 (22:13 +0000)]
MFC 229465: Use correct locking when traversing interface address list.

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

12 years agoMFC r226274,r226416:
delphij [Tue, 7 Feb 2012 22:13:33 +0000 (22:13 +0000)]
MFC r226274,r226416:

Fix the error message when setgid() failed.

PR: bin/161509
Submitted by: Jeremy Huddleston <jeremyhu apple com>

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

12 years agoMFC r227454:
delphij [Tue, 7 Feb 2012 21:56:58 +0000 (21:56 +0000)]
MFC r227454:

Use __packed to prevent alignment from taking place, which otherwise may
change the on-disk format in an incompatible way. Without this change,
msdosfs created on FreeBSD/arm would not be mountable.

PR: bin/162486
Submitted by: Ian Lepore <freebsd damnhippie dyndns org>
Reported by: Mattia Rossi <mrossi at swin.edu.au>

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

12 years agoMFC 229614:
jhb [Tue, 7 Feb 2012 19:55:58 +0000 (19:55 +0000)]
MFC 229614:
Add new variants of the IF_ADDR_*LOCK*() macros used for protecting
interface address lists that distinguish read locks from write locks.
To preserve the KPI, the previous operations are mapped to the write
lock macros.  The lock is still kept as a mutex for now.

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

12 years agoMFC 229613:
jhb [Tue, 7 Feb 2012 19:53:02 +0000 (19:53 +0000)]
MFC 229613:
Update recently added drivers to use the if_*addr_r*lock() wrapper
functions instead of using the IF_ADDR_LOCK directly.  The wrapper
functions are the supported interface for device drivers.

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

12 years agoMFC 229598:
jhb [Tue, 7 Feb 2012 19:40:52 +0000 (19:40 +0000)]
MFC 229598:
Remove use of explicit bus space tags and handles and use methods that
operate on resource objects instead.

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

12 years agoHoist mergeinfo for modules/sound/driver/* up to sys/.
jhb [Tue, 7 Feb 2012 19:32:20 +0000 (19:32 +0000)]
Hoist mergeinfo for modules/sound/driver/* up to sys/.

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

12 years agoMFC 228962:
jhb [Tue, 7 Feb 2012 19:23:08 +0000 (19:23 +0000)]
MFC 228962:
Use curthread rather than PCPU_GET(curthread).  'curthread' uses
special-case optimizations on several platforms and is preferred.

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

12 years agoRegen.
jhb [Tue, 7 Feb 2012 19:13:34 +0000 (19:13 +0000)]
Regen.

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

12 years agoMFC 228957:
jhb [Tue, 7 Feb 2012 19:11:54 +0000 (19:11 +0000)]
MFC 228957:
Implement linux_fadvise64() and linux_fadvise64_64() using
kern_posix_fadvise().

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

12 years agoMFC r230620:
bschmidt [Tue, 7 Feb 2012 18:05:10 +0000 (18:05 +0000)]
MFC r230620:
On state changes from RUN to anything else the AGGR sessions are
cleared/dropped leading to qid2tap[n] being NULL as there no longer
is a tap. Now, if there have been lots of frames queued the firmware
processes and returns those after the tap is gone.

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

12 years agoMFC r230514:
mm [Tue, 7 Feb 2012 17:57:33 +0000 (17:57 +0000)]
MFC r230514:
Merge illumos revisions 13572, 13573, 13574:

Rev. 13572:
disk sync write perf regression when slog is used post oi_148 [1]

Rev. 13573:
crash during reguid causes stale config [2]
allow and unallow missing from zpool history since removal of pyzfs [5]

Rev. 13574:
leaking a vdev when removing an l2cache device [3]
memory leak when adding a file-based l2arc device [4]
leak in ZFS from metaslab_group_create and zfs_ereport_checksum [6]

References:
https://www.illumos.org/issues/1909 [1]
https://www.illumos.org/issues/1949 [2]
https://www.illumos.org/issues/1951 [3]
https://www.illumos.org/issues/1952 [4]
https://www.illumos.org/issues/1953 [5]
https://www.illumos.org/issues/1954 [6]

Obtained from: illumos (issues #1909, #1949, #1951, #1952, #1953, #1954)

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

12 years agoMFC r227755:
tuexen [Tue, 7 Feb 2012 17:52:32 +0000 (17:52 +0000)]
MFC r227755:
Add support for the SCTP_REMOTE_UDP_ENCAPS_PORT socket option.
Retire the the now unused sctp_udp_tunneling_for_client_enable
sysctl variable.

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

12 years agoMFC r230495:
mm [Tue, 7 Feb 2012 17:46:02 +0000 (17:46 +0000)]
MFC r230495:
Try resolving jail path with realpath(3).

jail(8) does a chdir(2) to the given path argument. Kernel evaluates the
jail path from the new cwd and not from the original cwd, which leads to
undesired behavior if given a relative path.

Reviewed by: jamie

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

12 years agoMFC r230141 (eadler):
gabor [Tue, 7 Feb 2012 17:42:10 +0000 (17:42 +0000)]
MFC r230141 (eadler):
- Remove duplicate line from usage()

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

12 years agoMFC r226441 and r226443
cognet [Tue, 7 Feb 2012 16:07:29 +0000 (16:07 +0000)]
MFC r226441 and r226443
r226441:
Explicitely set ARM_RAS_START and ARM_RAS_END once the cacheline or the
page has been allocated, or we could end up using random values, and bad things
could happen.

 PR: arm/161492
 Submitted by: Ian Lepore <freebsd AT damnhippie dot dyndns DOT org>

r226443:
Fix 2 bugs :

- A race condition could happen if two threads were using RAS at the same time
  as the code didn't reset RAS_END, the RAS code could believe we were not in
   a RAS, when we were in fact.
- Using signed value logic to compare addresses wasn't such a good idea.

Many thanks to Ian to investigate on these issues.

  Pointy hat to:  cognet
  PR: arm/161498
  Submitted by: Ian Lepore <freebsd At damnhippie DOT dyndns dot org

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

12 years agoMFC r230978:
kib [Tue, 7 Feb 2012 09:37:30 +0000 (09:37 +0000)]
MFC r230978:
Be as explicit as possible when describing relation between the -m mask
argument and slices. Adjust example for the same reason.

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

12 years agoMFC r227893 and r228119:
emaste [Tue, 7 Feb 2012 04:03:39 +0000 (04:03 +0000)]
MFC r227893 and r228119:

  Avoid double free creating a new RAID with invalid command line
  arguments.

  In build_volume(), check if arrays is allocated before traversing its
  items.  While parsing the arrays input, it's possible that we reach the
  error path before initializing the 'arrays' pointer, which in turn leads
  to a NULL deference.

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

12 years agoMFC r226697 and r226708:
emaste [Tue, 7 Feb 2012 03:34:57 +0000 (03:34 +0000)]
MFC r226697 and r226708:

  Avoid printing // for packages that install to /

  I have some packages that install to / (for whatever reason).  Right now we
  print entries of the form //path/to/file when listing files (pkg_info -L,
  pkg_info -g etc.)  This change avoids printing the redundant / .

  Staticify elide_root() for now to fix build.

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

12 years agoMFC r228825:
np [Tue, 7 Feb 2012 02:21:17 +0000 (02:21 +0000)]
MFC r228825:
Fix return value of function.

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

12 years agoMFC r229714
np [Mon, 6 Feb 2012 18:46:49 +0000 (18:46 +0000)]
MFC r229714

Always release the inp lock before returning from tcp_detach.

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

12 years agoMFC r228491, r228561, r228594.
np [Mon, 6 Feb 2012 18:11:01 +0000 (18:11 +0000)]
MFC r228491, r228561, r228594.

r228491:
Do not clobber the ingress queue's congestion setting.

r228561:
Many updates to cxgbe(4)

- Device configuration via plain text config file.  Also able to operate
  when not attached to the chip as the master driver.

- Generic "work request" queue that serves as the base for both ctrl and
  ofld tx queues.

- Generic interrupt handler routine that can process any event on any
  kind of ingress queue (via a dispatch table).

- A couple of new driver ioctls.  cxgbetool can now install a firmware
  to the card ("loadfw" command) and can read the card's memory
  ("memdump" and "tcb" commands).

- Lots of assorted information within dev.t4nex.X.misc.*  This is
  primarily for debugging and won't show up in sysctl -a.

- Code to manage the L2 tables on the chip.

- Updates to cxgbe(4) man page to go with the tunables that have changed.

- Updates to the shared code in common/

- Updates to the driver-firmware interface (now at fw 1.4.16.0)

r228594:
Catch up with new driver ioctls in cxgbe.

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

12 years agoMFC r230212:
dumbbell [Mon, 6 Feb 2012 13:29:50 +0000 (13:29 +0000)]
MFC r230212:
sh: Fix execution of multiple statements in a trap when evalskip is set

Before this fix, only the first statement of the trap was executed if
evalskip was set. This is for example the case when:
    o  "-e" is set for this shell
    o  a trap is set on EXIT
    o  a function returns 1 and causes the script to abort

Reviewed by: jilles
Sponsored by: Yakaz (http://www.yakaz.com)

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

12 years agoMFC r230211:
dumbbell [Mon, 6 Feb 2012 13:14:26 +0000 (13:14 +0000)]
MFC r230211:
sh: Test EXIT trap with multiple statements in it

Reviewed by: jilles

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

12 years agoMFC: r230787
brueffer [Mon, 6 Feb 2012 13:12:30 +0000 (13:12 +0000)]
MFC: r230787

Manpages for the buf_ring and drbr interfaces.

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

12 years agoMFC r227931:
tuexen [Mon, 6 Feb 2012 10:38:20 +0000 (10:38 +0000)]
MFC r227931:
Move up the address to the top of the sctp_udencaps structure
like in all other structures. This avoids alignment problems.

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

12 years agoMFC r227755:
tuexen [Mon, 6 Feb 2012 10:22:50 +0000 (10:22 +0000)]
MFC r227755:
Add support for the SCTP_REMOTE_UDP_ENCAPS_PORT socket option.
Retire the the now unused sctp_udp_tunneling_for_client_enable
sysctl variable.

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

12 years agoMFC r227655:
tuexen [Mon, 6 Feb 2012 10:19:18 +0000 (10:19 +0000)]
MFC r227655:
Cleanup comparison of interface names.

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

12 years agoMFC r230785:
kib [Mon, 6 Feb 2012 10:14:07 +0000 (10:14 +0000)]
MFC r230785:
A debugger which requested PT_FOLLOW_FORK should get the notification
about new child not only when doing PT_TO_SCX, but also for PT_CONTINUE.
If TDB_FORK flag is set, always issue a stop, the same as is done for
TDB_EXEC.

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

12 years agoMFC r230555:
tuexen [Sun, 5 Feb 2012 20:53:06 +0000 (20:53 +0000)]
MFC r230555:
Don't print a warning when using netstat to print
SCTP statistics when there is not SCTP in the kernel.
This problem was reported by Sean Mahood.

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

12 years agoMFC r230379:
tuexen [Sun, 5 Feb 2012 20:50:56 +0000 (20:50 +0000)]
MFC r230379:
Fix a problem when using the CBAPI.
While there, remove an old comment which does not apply anymore.

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

12 years agoMFC r230138:
tuexen [Sun, 5 Feb 2012 20:49:03 +0000 (20:49 +0000)]
MFC r230138:
Small cleanup, no functional change.

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

12 years agoMFC r230136:
tuexen [Sun, 5 Feb 2012 20:47:26 +0000 (20:47 +0000)]
MFC r230136:
Two cleanups. No functional change.

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

12 years agoMFC r230104:
tuexen [Sun, 5 Feb 2012 20:45:32 +0000 (20:45 +0000)]
MFC r230104:
Fix two bugs, which result in a panic when calling getsockopt()
using SCTP_RECVINFO or SCTP_NXTINFO.
Reported by Clement Lecigne and forwarded to us by zi@.

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

12 years agoMFC: r230897
pfg [Sun, 5 Feb 2012 20:09:50 +0000 (20:09 +0000)]
MFC: r230897

Use new OSS-based BSD-licensed header for cs sound driver.

The cs driver requires a table with firmware values. An
alternative firmware is available in a similar Open Sound
System driver. This is actually a partial revert of
Revision 77504.

The csa driver is now free of the GPL.

Tested by: joel
Approved by: jhb (mentor)

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

12 years agoMFC r229805:
tuexen [Sun, 5 Feb 2012 20:06:43 +0000 (20:06 +0000)]
MFC r229805:
Add an SCTP sysctl "blackhole", similar to the one for TCP.
If set to 1, no ABORT is sent back in response to an incoming
INIT. If set to 2, no ABORT is sent back in response to
an out of the blue packet. If set to 0 (the default), ABORTs
are sent.
Discussed with rrs@.

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

12 years agoMFC 229775:
tuexen [Sun, 5 Feb 2012 20:04:21 +0000 (20:04 +0000)]
MFC 229775:
Retire the SCTP sysctl "strict_init". We always perform the validation
and there is no reason to make is configuarable.
Discussed with rrs@.

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

12 years agoMFC r229774:
tuexen [Sun, 5 Feb 2012 19:59:01 +0000 (19:59 +0000)]
MFC r229774:
Improve the handling of received INITs. Send an ABORT when
not accepting the connection. Also fix a crash, which
could happen when the user closed the socket.

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

12 years agoMFC r229729:
tuexen [Sun, 5 Feb 2012 19:56:07 +0000 (19:56 +0000)]
MFC r229729:
Use NULL instead of 0.

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

12 years agoMFC 228907:
tuexen [Sun, 5 Feb 2012 19:52:55 +0000 (19:52 +0000)]
MFC 228907:
Address issues found by clang. While there, fix also some style
issues.

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

12 years agoMFC 228653:
tuexen [Sun, 5 Feb 2012 19:49:34 +0000 (19:49 +0000)]
MFC 228653:
Fix unused parameter warnings.
While there, fix some whitespace issues.

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

12 years agoMFC r228630:
tuexen [Sun, 5 Feb 2012 19:33:53 +0000 (19:33 +0000)]
MFC r228630:
Address warnings found by clang.

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

12 years agoMFC r230325
sbruno [Sun, 5 Feb 2012 19:30:18 +0000 (19:30 +0000)]
MFC r230325

Wrap changes from svn r212126 inside LOADER_NFS_SUPPORT

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

12 years agoMFC 228531:
tuexen [Sun, 5 Feb 2012 19:29:14 +0000 (19:29 +0000)]
MFC 228531:
Fix a bug where sctp_sendmdg() uses uninitialized memory.

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

12 years agoMFC r230313, r230316, r230323, r230588
sbruno [Sun, 5 Feb 2012 18:39:11 +0000 (18:39 +0000)]
MFC r230313, r230316, r230323, r230588

Support new raid controllers

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

12 years agoMFC r228391:
tuexen [Sun, 5 Feb 2012 18:21:03 +0000 (18:21 +0000)]
MFC r228391:
 Fix a bug reported by Irene Ruengeler which resulted in not sending
 out HEARTBEATs when requested by the user. The HEARTBEATs were only
 queued, but not actually sent out.

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

12 years agoMFC r228102:
tuexen [Sun, 5 Feb 2012 18:16:38 +0000 (18:16 +0000)]
MFC r228102:
Remove debug code.

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

12 years agoMFC r230247:
nwhitehorn [Sun, 5 Feb 2012 16:23:55 +0000 (16:23 +0000)]
MFC r230247:

Revert r212360 now that PowerPC can handle large sparse arguments to
pmap_remove() (changed in r228412).

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

12 years agoPick a constant high IRQ value for the PS3 IPI, which lets PS3 devices be
nwhitehorn [Sun, 5 Feb 2012 16:17:14 +0000 (16:17 +0000)]
Pick a constant high IRQ value for the PS3 IPI, which lets PS3 devices be
usefully loaded and unloaded as modules.

Submitted by: geoffrey dot levand at mail dot ru

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

12 years agoMFC r230398:
nwhitehorn [Sun, 5 Feb 2012 16:14:23 +0000 (16:14 +0000)]
MFC r230398:

Prevent an error resulting from signed/unsigned comparison on systems
that do not comply with the OF spec.

Submitted by: Anders Gavare

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

12 years agoMFC r230309:
nwhitehorn [Sun, 5 Feb 2012 16:08:45 +0000 (16:08 +0000)]
MFC r230309:

Warn if trying to install over an existing partition, which usually fails
anyway due to libarchive not being able to overwrite schg flags.

PR: bin/164278

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

12 years agoMFC r229699, r229744, r229778, r229944, r229945, r229946, r230092, r230395,
trociny [Sun, 5 Feb 2012 15:51:19 +0000 (15:51 +0000)]
MFC r229699, r229744, r229778, r229944, r229945, r229946, r230092, r230395,
  r230396, r230436, r230457, r230515, r230976:

r229744 (pjd):

fork(2) returns -1 on failure, not some random negative number.

r229699 (pjd):

Constify argument.

r229778 (uqs):

Spelling fixes for sbin/

r229944 (pjd):

Don't touch pidfiles when running in foreground. Before that change we
would create an empty pidfile on start and check if it changed on SIGHUP.

r229945 (pjd):

For functions that return -1 on failure check exactly for -1 and not for
any negative number.

r229946 (pjd):

- Fix a bug where pidfile was removed in SIGHUP when it hasn't changed in
  configuration file.
- Log the fact that pidfile has changed.

r230092 (pjd):

Style cleanups.

r230395 (pjd):

Remove unused token 'port'.

r230396 (pjd):

Remove another unused token.

r230436 (pjd):

Fix minor memory leak.

r230457 (pjd):

Free memory that won't be used in child.

r230515 (pjd):

- Fix documentation to note that /etc/hast.conf is the default configuration
  file for hastd(8) and hastctl(8) and not hast.conf.
- In copyright statement correct that this file is documentation, not software.
- Bump date.

r230976 (pjd):

Fix typo in comment.

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

12 years agoMFC: r230401, r230898
pfg [Sat, 4 Feb 2012 17:13:34 +0000 (17:13 +0000)]
MFC: r230401, r230898

Replace GPLd headers from the Maestro3 driver with BSD licensed
versions derived from /usr/ports/audio/oss.

The particular headers used were taken from the
attic/drv/oss_allegro directory and are mostly identical
to the previous files.

The Maestro3 driver is now free from the GPL.

NOTE: due to lack of testers this driver is being
considered for deprecation and removal, however the MFC
still makes sense instead of distribution a GPL'd
firmware without source code.

PR: kern/153920
Approved by: jhb (mentor)

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

12 years agoMFC r230611:
mav [Sat, 4 Feb 2012 15:42:07 +0000 (15:42 +0000)]
MFC r230611:
Return proper error message if recording device is not specified.

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

12 years agoMFC: r229415, r229516
pfg [Sat, 4 Feb 2012 04:31:28 +0000 (04:31 +0000)]
MFC: r229415, r229516

Integrate the line drawing algorithm from the book "Graphic Gems 1".

http://www.graphicsgems.org/

At the time it claimed to be 3-4 times faster than the traditional
algorithm.

Make sure this doesn't give problems to clang.

PR: 18769
Approved by: jhb (mentor)

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

12 years agoMFC r230622:
dim [Fri, 3 Feb 2012 23:36:08 +0000 (23:36 +0000)]
MFC r230622:

When the buildkernel stage 2.3 (build tools) runs, the PATH is still set
to the default from the top-level Makefile.  Therefore, invocations of
lex and yacc (used during building of aicasm) will use the executables
in /usr/bin, not those optionally built during the previous buildworld
or kernel-toolchain.  This makes kernel builds from older FreeBSD
releases more difficult than necessary.

Fix this by setting PATH to ${BPATH}:${PATH} in stage 2.3, so the
bootstrap tools directories are searched before the regular ones.

Silence from: svn-src-{all,head}

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

12 years agoMFC r230393:
dim [Fri, 3 Feb 2012 23:32:22 +0000 (23:32 +0000)]
MFC r230393:

Pull in r148240 from upstream llvm trunk:

  Make sure the non-SSE lowering for fences correctly clobbers EFLAGS.
  PR11768.

In particular, this fixes segfaults during the build of devel/icu on
i386.  The __sync_synchronize() builtin used for implementing icu's
internal barrier could lead to incorrect behaviour.

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

12 years agoMFC r229753:
dim [Fri, 3 Feb 2012 23:07:26 +0000 (23:07 +0000)]
MFC r229753:

In sys/contrib/rdma/ib_addr.h, bump MAX_ADDR_LEN to 20 bytes (the same
value used in sys/ofed/include/linux/netdevice.h), so there will be no
buffer overruns in the rest of the inline functions in this file.

Reviewed by: kmacy

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

12 years agoMFC: r229981, r230898
pfg [Fri, 3 Feb 2012 22:39:04 +0000 (22:39 +0000)]
MFC:  r229981, r230898

Replace a GPL'd header in the emu10kx snd driver code.

This uses the emuxkireg.h already used in the emu10k1
snd driver. Special thanks go to Alexander Motin as
he was able to find some errors and reverse engineer
some wrong values in the emuxkireg header.

While here also merge some cleanups to the module Makefile.

PR: 153901
Obtained from: NetBSD
Approved by: core (mentor implicit)

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

12 years agoMFC: r229430, r229980
pfg [Fri, 3 Feb 2012 22:06:27 +0000 (22:06 +0000)]
MFC:  r229430, r229980

Replace a GPL'd header in the emu10k1 snd driver code.

This brings in the emuxkireg.h from NetBSD (dev/pci) which
is used for the same purpose but is smaller. The emu10k1
is now free from the GPL.

While here also merge some cleanups to the module Makefile.

PR: 153901
Obtained from: NetBSD
Approved by: core (mentor implicit)

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

12 years agoMFC: r230027
pfg [Fri, 3 Feb 2012 21:38:23 +0000 (21:38 +0000)]
MFC: r230027

Style cleanups for printf.

PR: bin/152934
Approved by: jhb (mentor)
Obtained from: Illumos

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

12 years agoMFC r228512: Add test for r228510 (MFC'ed as r230955).
jilles [Fri, 3 Feb 2012 20:27:14 +0000 (20:27 +0000)]
MFC r228512: Add test for r228510 (MFC'ed as r230955).

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

12 years agoMFC r228510: Fix select/poll/kqueue for write on reverse direction before
jilles [Fri, 3 Feb 2012 20:24:18 +0000 (20:24 +0000)]
MFC r228510: Fix select/poll/kqueue for write on reverse direction before
first write.

The reverse direction of a pipe is lazily allocated on the first write in
that direction (because pipes are usually used in one direction only).  A
special case is needed to ensure the pipe appears writable before the first
write because there are 0 bytes of pending data in 0 bytes of buffer space
at that point, leaving 0 bytes of data that can be written with the normal
code.

Note that the first write returns [ENOMEM] if kern.ipc.maxpipekva is
exceeded and does not block or return [EAGAIN], so selecting true for write
is correct even in that case.

PR: kern/93685

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

12 years agoMFC r226610:
ed [Fri, 3 Feb 2012 18:48:40 +0000 (18:48 +0000)]
MFC r226610:

  Add missing #includes.

  According to POSIX, these two header files should be able to be included
  by themselves, not depending on other headers. The <net/if.h> header
  uses struct sockaddr when __BSD_VISIBLE=1, while <netinet/tcp.h> uses
  integer datatypes (u_int32_t, u_short, etc).

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

12 years agoMFC r227314:
ed [Fri, 3 Feb 2012 17:50:39 +0000 (17:50 +0000)]
MFC r227314:

  Ensure pam_lastlog removes the /dev/ component of the TTY name.

  Some consumers of PAM remove the /dev/ component (i.e. login), while
  others don't (i.e. su). We must ensure that the /dev/ component is
  removed to ensure that the utmpx entries properly work with tools such
  as w(1).

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

12 years agoMFC r226785:
ed [Fri, 3 Feb 2012 17:36:32 +0000 (17:36 +0000)]
MFC r226785:

  Attempt to fix build logic for gensnmptree.

  There are two problems with the existing logic. It builds gensnmptree
  on <700018, even if WITHOUT_BSNMP is set, but more importantly, we must
  not forget to build gensnmptree on systems that have originally been
  built without. This causes a buildworld on those systems to fail.

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

12 years agoMFC: r230345
rmacklem [Fri, 3 Feb 2012 03:05:41 +0000 (03:05 +0000)]
MFC: r230345
Martin Cracauer reported a problem to freebsd-current@ under the
subject "Data corruption over NFS in -current". During investigation
of this, I came across an ugly bogusity in the new NFS client where
it replaced the cr_uid with the one used for the mount. This was
done so that "system operations" like the NFSv4 Renew would be
performed as the user that did the mount. However, if any other
thread shares the credential with the one doing this operation,
it could do an RPC (or just about anything else) as the wrong cr_uid.
This patch fixes the above, by using the mount credentials instead of
the one provided as an argument for this case. It appears
to have fixed Martin's problem.
This patch is needed for NFSv4 mounts and NFSv3 mounts against
some non-FreeBSD servers that do not put post operation attributes
in the NFSv3 Statfs RPC reply.

Tested by: cracauer at cons.org, dim

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

12 years agoMFC 230592:
ken [Thu, 2 Feb 2012 19:01:41 +0000 (19:01 +0000)]
MFC 230592:

Bring in the LSI-supported version of the mps(4) driver.

This involves significant changes to the mps(4) driver, but is not a
complete rewrite.

Some of the changes in this version of the driver:
 - Integrated RAID (IR) support.
 - Support for WarpDrive controllers.
 - Support for SCSI protection information (EEDP).
 - Support for TLR (Transport Level Retries), needed for tape drives.
 - Improved error recovery code.
 - ioctl interface compatible with LSI utilities.

mps.4: Update the mps(4) driver man page somewhat for the driver
changes.  The list of supported hardware still needs to be
updated to reflect the full list of supported cards.

conf/files: Add the new driver files.

mps/mpi/*: Updated version of the MPI header files, with a BSD style
copyright.

mps/*: See above for a description of the new driver features.

modules/mps/Makefile:
Add the new mps(4) driver files.

Submitted by: Kashyap Desai <Kashyap.Desai@lsi.com>
Sponsored by: LSI, Spectra Logic
Reviewed by: ken

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

12 years agoMFC r230549:
trociny [Thu, 2 Feb 2012 18:25:12 +0000 (18:25 +0000)]
MFC r230549:

Add -P option to allow get and set limits for other processes.

Submitted by: Andrey Zonov <andrey at zonov.org>

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

12 years agoMFC r227956, r228090, r228446, r230471, r230548:
trociny [Thu, 2 Feb 2012 18:22:25 +0000 (18:22 +0000)]
MFC r227956, r228090, r228446, r230471, r230548:

r227956:

Add -l flag to display resource limits.

PR: bin/161257
Reviewed by: kib

r228090:

Update SYNOPSIS to include the flags added recently.

Spotted by: jhb

r228446:

Make procstat -l output similar to the output of limits(1).

Suggested by: jhb

r230471, r230548:

Make procstat -l to work with the new version of kern.proc.rlimit.

Submitted by: Andrey Zonov <andrey at zonov.org>

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

12 years agoMFC r227838, r227873, r228025, r228049, r228289, r228447, r230753:
trociny [Thu, 2 Feb 2012 18:17:49 +0000 (18:17 +0000)]
MFC r227838, r227873, r228025, r228049, r228289, r228447, r230753:

r227838, r227873:

Add new options, -e and -x, to display process environment variables
and ELF auxiliary vectors.

r228025, r228049:

Make proctstat -x output more readable.

This also fixes the issue, spotted by mdf, with values that were
printed as decimal and had hex prefixes.

Discussed with: kib, rwatson

r228289:

Don't output a warning if kern.proc.auxv sysctl has returned EPERM.
After r228288 this is rather a normal situation.

r228447:

Make 64-bit procstat output ELF auxiliary vectors for 32-bit processes.

Reviewed by: kib

r230753:

Always return 0 if the sysctl failed.

This fixes the bug: when procstat -xa was run and the sysctl for a
process returned ESRCH or EPERM, for this process procstat output the
result collected for the previous successful process.

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

12 years agoMFC r230783:
kib [Thu, 2 Feb 2012 06:18:41 +0000 (06:18 +0000)]
MFC r230783:
Add definition for PT_GNU_RELRO.

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

12 years agoMFC: r227980
marius [Wed, 1 Feb 2012 21:31:46 +0000 (21:31 +0000)]
MFC: r227980

Move to SCHED_ULE by default. Since r226057 SCHED_ULE and sparc64 are
compatible with each other and since r227539 the last issue seen when
using SCHED_ULE is fixed (MFC'ed to stable/9 in r230691 and r227714
respectively). At least on UP and 2-way machines SCHED_4BSD still
performs better than SCHED_ULE, however, the optimizations done in
r225889 (MFC'ed to stable/9 in r230673) pretty much compensate that so
there's at least no net regression.
Thanks go to Peter Jeremy for extensive testing.

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

12 years agoMFC: r230664
marius [Wed, 1 Feb 2012 21:28:13 +0000 (21:28 +0000)]
MFC: r230664

As it turns out r227960 (MFC'ed to stable/9 in r228126) may still be
insufficient with PREEMPTION so try harder to get the CDMA sync
interrupt delivered and also in a more efficient way:
- wrap the whole process of sending and receiving the CDMA sync
  interrupt in a critical section so we don't get preempted,
- send the CDMA sync interrupt to the CPU that is actually waiting
  for it to happen so we don't take a detour via another CPU,
- instead of waiting for up to 15 seconds for the interrupt to
  trigger try the whole process for up to 15 times using a one
  second timeout (the code was also changed to just ignore belated
  interrupts of a previous tries should they appear).

According to testing done by Peter Jeremy with the debugging also
added as part of this commit the first two changes apparently are
sufficient to now properly get the CDMA sync interrupts delivered
at the first try though.

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

12 years agoMFC: r230662
marius [Wed, 1 Feb 2012 21:24:03 +0000 (21:24 +0000)]
MFC: r230662

Fully disable interrupts while we fiddle with the FP context in the
VIS-based block copy/zero implementations. While with 4BSD it's
sufficient to just disable the tick interrupts, with ULE+PREEMPTION
it's otherwise also possible that these are preempted via IPIs.

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

12 years agoMFC: r230633, r230634
marius [Wed, 1 Feb 2012 21:19:52 +0000 (21:19 +0000)]
MFC: r230633, r230634

Now that we have a working OF_printf() since r230631 and a OF_panic()
helper since r230632 (MFC'ed to stable/9 in r230884 and r230886
respectively), use these for output and panicing during the early
cycles and move cninit() until after the static per-CPU data has
been set up. This solves a couple of issue regarding the non-
availability of the static per-CPU data:
- panic() not working and only making things worse when called,
- having to supply a special DELAY() implementation to the low-level
  console drivers,
- curthread accesses of mutex(9) usage in low-level console drivers
  that aren't conditional due to compiler optimizations (basically,
  this is the problem described in r227537 but in this case for
  keyboards attached via uart(4)). [1]

PR: 164123 [1]

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

12 years agoMFC: r230628
marius [Wed, 1 Feb 2012 21:15:24 +0000 (21:15 +0000)]
MFC: r230628

Mark cpu_{halt,reset}() as __dead2 as appropriate.

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

12 years agoMFC: r230632
marius [Wed, 1 Feb 2012 21:14:04 +0000 (21:14 +0000)]
MFC: r230632

- Now that we have a working OF_printf() since r230631 (MFC'ed to stable/9
  in r230884), use it for implementing a simple OF_panic() that may be used
  during the early cycles when panic() isn't available, yet.
- Mark cpu_{exit,shutdown}() as __dead2 as appropriate.

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

12 years agoMFC: r230631
marius [Wed, 1 Feb 2012 21:11:06 +0000 (21:11 +0000)]
MFC: r230631

Implement OF_printf() using kvprintf() directly, avoiding to use a
buffer and allowing to handle newlines properly.

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

12 years agoMFC: r230630
marius [Wed, 1 Feb 2012 21:09:59 +0000 (21:09 +0000)]
MFC: r230630

For machines where the kernel address space is unrestricted increase
VM_KMEM_SIZE_SCALE to 2, awaiting more insight from alc@. As it turns
out, the VM apparently has problems with machines that have large holes
in the physical address space, causing the kmem_suballoc() call in
kmeminit() to fail with a VM_KMEM_SIZE_SCALE of 1. Using a value of 2
allows these, namely Blade 1500 with 2GB of RAM, to boot.

PR: 164227

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

12 years agoMFC: r230627
marius [Wed, 1 Feb 2012 21:08:33 +0000 (21:08 +0000)]
MFC: r230627

Using ATA_CAM along with ATAPI DMA causes data corruption with ALI_NEW
and CMD controllers for reasons unknown so disable it.

PR: 164226

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

12 years agoMFC r228820, r228851:
mav [Wed, 1 Feb 2012 17:56:38 +0000 (17:56 +0000)]
MFC r228820, r228851:
Merge to da driver quirks hinting 4K physical sector sizes for SATA disks
connected via SAS or USB. Unluckily I've found that SAS (mps) and USB-SATA
I have translate models in different ways, requiring twice more quirks.
Unluckily for Hitachi, their model names are trimmed on SAS, making
impossible to identify 4K sector drives that way.

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

12 years agoMerge some cleanups and bugfixes to pfsync(4) and pf(4) from head. Merged
glebius [Wed, 1 Feb 2012 15:57:49 +0000 (15:57 +0000)]
Merge some cleanups and bugfixes to pfsync(4) and pf(4) from head. Merged
revisions: r229773,229777,229849-229853,229857,229959,229961-229964,229976.

r229777:
  Merge from OpenBSD:
    revision 1.170
    date: 2011/10/30 23:04:38;  author: mikeb;  state: Exp;  lines: +6 -7
    Allow setting big MTU values on the pfsync interface but not larger
    than the syncdev MTU.  Prompted by the discussion with and tested
    by Maxim Bourmistrov;  ok dlg, mpf

  Consistently use sc_ifp->if_mtu in the MTU check throughout the
  module. This backs out r228813.

r229849:
  o Fix panic on module unload, that happened due to mutex being
    destroyed prior to pfsync_uninit(). To do this, move all the
    initialization to the module_t method, instead of SYSINIT(9).
  o Fix another panic after module unload, due to not clearing the
    m_addr_chg_pf_p pointer.
  o Refuse to unload module, unless being unloaded forcibly.
  o Revert the sub argument to MODULE_DECLARE, to the stable/8 value.

r229850:
  Bunch of fixes to pfsync(4) module load/unload:

  o Make the pfsync.ko actually usable. Before this change loading it
    didn't register protosw, so was a nop. However, a module /boot/kernel
    did confused users.
  o Rewrite the way we are joining multicast group:
    - Move multicast initialization/destruction to separate functions.
    - Don't allocate memory if we aren't going to join a multicast group.
    - Use modern API for joining/leaving multicast group.
    - Now the utterly wrong pfsync_ifdetach() isn't needed.
  o Move module initialization from SYSINIT(9) to moduledata_t method.
  o Refuse to unload module, unless asked forcibly.
  o Improve a bit some FreeBSD porting code:
    - Use separate malloc type.
    - Simplify swi sheduling.

r229857:
  Can't pass MSIZE to m_cljget(), an mbuf can't be attached as external storage
  to another mbuf.

r229963:
  Add necessary locking in pfsync_in_ureq().

r229976:
  Redo r226660:
   - Define schednetisr() to swi_sched.
   - In the swi handler check if there is some data prepared,
     and if true, then call pfsync_sendout(), however tell it
     not to schedule swi again.
   - Since now we don't obtain the pfsync lock in the swi handler,
     don't use ifqueue mutex to synchronize queue access.

r229773, r229851, r229959, r229961, r229962, r229964 - minor cleanups.

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

12 years agoMFC r230545: Clarify and improve the boot menu with some small changes.
pluknet [Wed, 1 Feb 2012 15:04:27 +0000 (15:04 +0000)]
MFC r230545: Clarify and improve the boot menu with some small changes.

PR: misc/160818
Submitted by: Warren Block <wblock wonkity com>

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

12 years agoMFC r230293:
emaste [Wed, 1 Feb 2012 03:28:19 +0000 (03:28 +0000)]
MFC r230293:

  Add missing line continuation \.  It did not cause any issue because
  the same path is already being included in ../Makefile.inc.

  PR:           164192
  Submitted by: Devin Teske <dteske vicor com>

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

12 years agoMFC: 230000, 230544
ken [Tue, 31 Jan 2012 23:04:58 +0000 (23:04 +0000)]
MFC: 230000, 230544

Fix a race condition in CAM peripheral free handling, locking
in the CAM XPT bus traversal code, and a number of other periph level
issues.

  r230544 | ken | 2012-01-25 10:58:47 -0700 (Wed, 25 Jan 2012) | 9 lines

  Fix a bug introduced in r230000.  We were eliminating all LUNs on a target
  in response to CAM_DEV_NOT_THERE, instead of just the LUN in question.

  This will now just eliminate the specified LUN in response to
  CAM_DEV_NOT_THERE.

  Reported by: Richard Todd <rmtodd@servalan.servalan.com>

  r230000 | ken | 2012-01-11 17:41:48 -0700 (Wed, 11 Jan 2012) | 72 lines

  Fix a race condition in CAM peripheral free handling, locking
  in the CAM XPT bus traversal code, and a number of other periph level
  issues.

  cam_periph.h,
  cam_periph.c: Modify cam_periph_acquire() to test the CAM_PERIPH_INVALID
   flag prior to allowing a reference count to be gained
   on a peripheral.  Callers of this function will receive
   CAM_REQ_CMP_ERR status in the situation of attempting to
   reference an invalidated periph.  This guarantees that
   a peripheral scheduled for a deferred free will not
   be accessed during its wait for destruction.

   Panic during attempts to drop a reference count on
   a peripheral that already has a zero reference count.

   In cam_periph_list(), use a local sbuf with SBUF_FIXEDLEN
   set so that mallocs do not occur while the xpt topology
   lock is held, regardless of the allocation policy of the
   passed in sbuf.

   Add a new routine, cam_periph_release_locked_buses(),
   that can be called when the caller already holds
   the CAM topology lock.

   Add some extra debugging for duplicate peripheral
   allocations in cam_periph_alloc().

   Treat CAM_DEV_NOT_THERE much the same as a selection
   timeout (AC_LOST_DEVICE is emitted), but forgo retries.

  cam_xpt.c: Revamp the way the EDT traversal code does locking
   and reference counting.  This was broken, since it
   assumed that the EDT would not change during
   traversal, but that assumption is no longer valid.

   So, to prevent devices from going away while we
   traverse the EDT, make sure we properly lock
   everything and hold references on devices that
   we are using.

   The two peripheral driver traversal routines should
   be examined.  xptpdperiphtraverse() holds the
   topology lock for the entire time it runs.
   xptperiphtraverse() is now locked properly, but
   only holds the topology lock while it is traversing
   the list, and not while the traversal function is
   running.

   The bus locking code in xptbustraverse() should
   also be revisited at a later time, since it is
   complex and should probably be simplified.

  scsi_da.c: Pay attention to the return value from cam_periph_acquire().

   Return 0 always from daclose() even if the disk is now gone.

   Add some rudimentary error injection support.

  scsi_sg.c: Fix reference counting in the sg(4) driver.

   The sg driver was calling cam_periph_release() on close,
   but never called cam_periph_acquire() (which increments
   the reference count) on open.

   The periph code correctly complained that the sg(4)
   driver was trying to decrement the refcount when it
   was already 0.

  Sponsored by: Spectra Logic

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

12 years agoMerge 228500:
glebius [Tue, 31 Jan 2012 19:02:33 +0000 (19:02 +0000)]
Merge 228500:
  More MLINKS for rtalloc.9

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

12 years agoMerge r228499:
glebius [Tue, 31 Jan 2012 19:00:01 +0000 (19:00 +0000)]
Merge r228499:
  Update this page to describe modern interfaces.

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

12 years agoMFC r228133:
kib [Tue, 31 Jan 2012 18:42:22 +0000 (18:42 +0000)]
MFC r228133:
Hide the internals of vm_page_lock(9) from the loadable modules.

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