]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
11 years agoMFC: r237657, r237658, r237666
jkim [Mon, 2 Jul 2012 16:00:38 +0000 (16:00 +0000)]
MFC: r237657, r237658, r237666

Merge OpenSSL 0.9.8x and regen manual pages.

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

11 years agoMerge r237736 from HEAD:
bms [Mon, 2 Jul 2012 11:46:47 +0000 (11:46 +0000)]
Merge r237736 from HEAD:
  Kick the current-state report timer when a V1 group report would
  be triggered.

Submitted by: rpaulo@

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

11 years agoMFC: r236623: RAID is an acronym
obrien [Mon, 2 Jul 2012 10:16:14 +0000 (10:16 +0000)]
MFC: r236623: RAID is an acronym

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

11 years ago* Avoid race conditions with 'make -j<N>'.
obrien [Mon, 2 Jul 2012 10:14:12 +0000 (10:14 +0000)]
* Avoid race conditions with 'make -j<N>'.
  (partially MFC r236337 (in spirit))

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

11 years agoMerge r237735 from HEAD:
bms [Mon, 2 Jul 2012 10:07:32 +0000 (10:07 +0000)]
Merge r237735 from HEAD:
  Fix a typo in MLD query exponent processing.

Submitted by: rpaulo@

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

11 years agoRevert r223540 - it broke the simple 'make -C kerberos5' build.
obrien [Mon, 2 Jul 2012 10:06:13 +0000 (10:06 +0000)]
Revert r223540 - it broke the simple 'make -C kerberos5' build.

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

11 years agoMerge r237734 from HEAD:
bms [Mon, 2 Jul 2012 10:06:00 +0000 (10:06 +0000)]
Merge r237734 from HEAD:
  In MLDv2 general query processing, do not enforce the strict check
  on query origins.

Submitted by: Gu Yong

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

11 years agoMFC: r235939: consitently use "__LP64__"
obrien [Mon, 2 Jul 2012 10:00:28 +0000 (10:00 +0000)]
MFC: r235939: consitently use "__LP64__"

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

11 years agoMFC: r235879: style.Makefile(5)
obrien [Mon, 2 Jul 2012 09:47:38 +0000 (09:47 +0000)]
MFC: r235879: style.Makefile(5)

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

11 years agoMFC: r228114 r228116 r234690: install a readline/tilde.h
obrien [Mon, 2 Jul 2012 09:35:28 +0000 (09:35 +0000)]
MFC: r228114 r228116 r234690: install a readline/tilde.h

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

11 years agoAllow building on FreeBSD 7.
obrien [Mon, 2 Jul 2012 09:25:08 +0000 (09:25 +0000)]
Allow building on FreeBSD 7.

Note that "HAVE_GETLINE" should be #undef'ed in config.h as were not using
the libc interface -- however that leads to redundant redeclaration compiler
warnings between the internal file.h and <stdio.h>.

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

11 years agoMFC: r234449: update file(1) to version 5.11.
obrien [Mon, 2 Jul 2012 08:48:58 +0000 (08:48 +0000)]
MFC: r234449: update file(1) to version 5.11.

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

11 years agoMFC: r232274: Document fetch(1)'s 'URL' argument.
obrien [Mon, 2 Jul 2012 08:28:16 +0000 (08:28 +0000)]
MFC: r232274: Document fetch(1)'s 'URL' argument.

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

11 years agoMFC: r228475 & r228487: Disallow various debug.kdb sysctl's when securelevel
obrien [Mon, 2 Jul 2012 08:21:15 +0000 (08:21 +0000)]
MFC: r228475 & r228487: Disallow various debug.kdb sysctl's when securelevel
is raised.

PR: 161350

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

11 years agoMFC r237748: dtrace instruction decoder: add 0x0f 0x1f NOP opcode support
avg [Mon, 2 Jul 2012 08:08:29 +0000 (08:08 +0000)]
MFC r237748: dtrace instruction decoder: add 0x0f 0x1f NOP opcode support

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

11 years agoMFC: r228199: Split sentences at period boundaries.
obrien [Mon, 2 Jul 2012 07:39:33 +0000 (07:39 +0000)]
MFC: r228199: Split sentences at period boundaries.

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

11 years agoMFC: r228193: tweak the r137233 fix to r136283 -- Code was making two send()
obrien [Mon, 2 Jul 2012 07:37:06 +0000 (07:37 +0000)]
MFC: r228193: tweak the r137233 fix to r136283 -- Code was making two send()
attempts vs. the comment documented "If we are working with a privileged
socket, then take only one attempt".  Make the code match.

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

11 years agoRecord that r228191 (ensure kldxref is run first) was MFC'ed [r231373].
obrien [Mon, 2 Jul 2012 07:22:22 +0000 (07:22 +0000)]
Record that r228191 (ensure kldxref is run first) was MFC'ed [r231373].

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

11 years agoMFC: r227526: KNF
obrien [Mon, 2 Jul 2012 07:18:27 +0000 (07:18 +0000)]
MFC: r227526: KNF

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

11 years agoMFC: r227524: improve the grep-ability output strings.
obrien [Mon, 2 Jul 2012 07:14:21 +0000 (07:14 +0000)]
MFC: r227524: improve the grep-ability output strings.

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

11 years agoMFC: r237279: install filemon.h into /usr/include for userland consumption.
obrien [Mon, 2 Jul 2012 07:11:43 +0000 (07:11 +0000)]
MFC: r237279: install filemon.h into /usr/include for userland consumption.

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

11 years agoMFC: r227518: reformat comment to be more readable in standard Xterm.
obrien [Mon, 2 Jul 2012 07:10:33 +0000 (07:10 +0000)]
MFC: r227518: reformat comment to be more readable in standard Xterm.

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

11 years agoMFC r235695, r236158, r236190, r236494
alc [Mon, 2 Jul 2012 07:01:41 +0000 (07:01 +0000)]
MFC r235695, r236158, r236190, r236494
  Replace all uses of the vm page queues lock by a r/w lock that is
  private to this pmap.c.

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

11 years agoMFC r237958:
dougb [Mon, 2 Jul 2012 06:51:49 +0000 (06:51 +0000)]
MFC r237958:

For the ports modules building code, clean WRKDIR before building. This is
important for those that use -DNO_CLEAN routinely, since it will prevent
installing stale stuff, and even more important when the port is upgraded
to a newer version. When the user doesn't use -DNO_CLEAN, this will create
an infinitesimal amount of extra work, but won't hurt anything.

This is necessary because the ports tree has flags that prevent the ususal
'update the build if newer source files exist' logic from doing what it
would do in the base.

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

11 years agoMFC: r237836
brueffer [Mon, 2 Jul 2012 06:40:11 +0000 (06:40 +0000)]
MFC: r237836

mps(4) is endian safe as of r237876.

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

11 years agoMFC r236247 (pjd):
mm [Mon, 2 Jul 2012 06:39:06 +0000 (06:39 +0000)]
MFC r236247 (pjd):
Remove unused sysctl.

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

11 years agoRecord that r226343 r226347 r226348 r226349 r226353 r226388 was MFC'ed.
obrien [Mon, 2 Jul 2012 06:02:56 +0000 (06:02 +0000)]
Record that r226343 r226347 r226348 r226349 r226353 r226388 was MFC'ed.

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

11 years agoMFC r235912
alc [Mon, 2 Jul 2012 05:57:44 +0000 (05:57 +0000)]
MFC r235912
  There is no need for pmap_protect() to acquire the page queues lock
  unless it is going to access the pv lists or PMAP1/PADDR1.

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

11 years agoMFC: r229809: Don't include <sys/timeb.h>.
obrien [Mon, 2 Jul 2012 05:57:01 +0000 (05:57 +0000)]
MFC: r229809: Don't include <sys/timeb.h>.
The purpose of not including <sys/timeb.h> is to avoid the compiler
warning we put in <sys/timeb.h>.  So this change will cause CVS to
provide its own definition of 'struct timeb'.  This is only OK
because the code never calls the libc ftime(3) interface.  CVS only
uses 'struct timeb' as a convenience structure -- thus it doesn't
matter how its supplied definition does or does not match the
ftime(3) ABI.

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

11 years agoMFC r233290, r235598, r235973, r236045, r236240, r236291, r236378
alc [Mon, 2 Jul 2012 05:35:55 +0000 (05:35 +0000)]
MFC r233290, r235598, r235973, r236045, r236240, r236291, r236378
  Change pv_entry_count to a long on amd64.

  Rename pmap_collect() to pmap_pv_reclaim() and rewrite it such that it
  no longer uses the active and inactive paging queues.

  Eliminate some purely stylistic differences among the amd64, i386
  native, and i386 xen PV entry allocators.

  Eliminate code duplication in free_pv_entry() and pmap_remove_pages()
  by introducing free_pv_chunk().

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

11 years agoMFC r226843
alc [Mon, 2 Jul 2012 03:49:52 +0000 (03:49 +0000)]
MFC r226843
  Eliminate vestiges of page coloring in VM_ALLOC_NOOBJ calls to
  vm_page_alloc().  While I'm here, for the sake of consistency, always
  specify the allocation class, such as VM_ALLOC_NORMAL, as the first of
  the flags.

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

11 years agoMFC 237800:
ken [Mon, 2 Jul 2012 02:56:01 +0000 (02:56 +0000)]
MFC 237800:

  r237800 | ken | 2012-06-29 11:00:52 -0600 (Fri, 29 Jun 2012) | 7 lines

  Change the mps(4) driver to only scan a target if that is what is
  needed instead of scanning the full bus every time.

Submitted by: mav
Discussed with: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>

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

11 years agoMFC r237571:
delphij [Mon, 2 Jul 2012 02:50:10 +0000 (02:50 +0000)]
MFC r237571:

Fix a LOR acquiring the if_afdata lock while holding an rtentry lock.
Possibly do some entra work in case we would not get into the
ifa0 != NULL paths later as we already do for the mltaddr before.

XXX We should possibly error in case in6_setscope fails.

Reference: http://lists.freebsd.org/pipermail/freebsd-net/2011-September/029829.html

Submitted by: bz

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

11 years agoMFC 237730:
ken [Mon, 2 Jul 2012 02:44:00 +0000 (02:44 +0000)]
MFC 237730:

  r237730 | ken | 2012-06-28 14:48:24 -0600 (Thu, 28 Jun 2012) | 5 lines

  Now that the mps(4) driver is endian-safe, add it to the powerpc and
  sparc64 GENERIC config files.

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

11 years agoMFC 237726:
ken [Mon, 2 Jul 2012 02:36:05 +0000 (02:36 +0000)]
MFC 237726:

  r237726 | ken | 2012-06-28 13:39:30 -0600 (Thu, 28 Jun 2012) | 5 lines

  Add a loader tunable, kern.cam.ctl.disable, that will disable
  loading CTL.  This may be useful in very low memory installations.

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

11 years agoMFC r237568:
delphij [Mon, 2 Jul 2012 02:26:52 +0000 (02:26 +0000)]
MFC r237568:

Fetch both ECDSA and RSA keys by default in ssh-keyscan(1).

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

11 years agoMFC symbol exports for libsupcc++ and libcxxrt that correctly export new and
theraven [Sun, 1 Jul 2012 21:51:57 +0000 (21:51 +0000)]
MFC symbol exports for libsupcc++ and libcxxrt that correctly export new and
delete operators.

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

11 years agoMFC r233954, r236930
alc [Sun, 1 Jul 2012 18:27:13 +0000 (18:27 +0000)]
MFC r233954, r236930
  Micro-optimize free_pv_entry() for the expected case.

  Avoid unnecessary atomic operations for clearing PGA_WRITEABLE in
  pmap_remove_pages().

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

11 years agoMFC r237832, r237436, r237439, r237463, r237512, r237587, r237799,
np [Sun, 1 Jul 2012 13:43:30 +0000 (13:43 +0000)]
MFC r237832, r237436, r237439, r237463, r237512, r237587, r237799,
r237819, r237831.

r237832:
cxgb(4): IPv6 rx/tx hw checksum, IPv6 TSO and LRO too.

r237436:
cxgbe(4): update to firmware interface 1.5.2.0; updates to shared code.

r237439:
Do not read registers with read side effects while performing a register
dump for cxgbetool.

r237463:
Do not allocate extra vectors when adapter is not TOE
capable (or toecaps have been disallowed by the user).

r237512:
Better way to determine the status page length and rx pad boundary.

r237587:
Allow cxgbe(4) running within a VM to attach to its devices that have been
exported via PCI passthrough.

r237799:
cxgbe(4): support for IPv6 hardware checksumming (rx and tx).

r237819:
cxgbe(4): support for IPv6 TSO and LRO.

r237831:
- Assign (don't OR) the CSUM_XXX bits to csum_flags in the rx checksum code.
- Fix TSO/TSO4 mixup.
- Add IFCAP_LINKSTATE to the available/enabled capabilities.

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

11 years agoBackport just the sys/{dev,modules}/cxgb{,e}/ parts of r237263, and then
np [Sun, 1 Jul 2012 12:00:36 +0000 (12:00 +0000)]
Backport just the sys/{dev,modules}/cxgb{,e}/ parts of r237263, and then
disable the TOE and iWARP modules in the Makefiles (they won't compile
without the rest of r237263).

This reduces diffs between the cxgb/cxgbe drivers in head and 9 and
makes it easy to MFC other fixes to 9.

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

11 years agoPartial MFC of r236311 (uqs@):
np [Sun, 1 Jul 2012 09:35:15 +0000 (09:35 +0000)]
Partial MFC of r236311 (uqs@):

Unbreak make depend.

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

11 years agoMFC BA/DELBA fixes:
bschmidt [Sun, 1 Jul 2012 09:30:37 +0000 (09:30 +0000)]
MFC BA/DELBA fixes:
- r234321:
  Use the M_AMPDU_MPDU flag to determine when to manually set the seqno and
  use a BA queue.
- r235686:
  Discard frames after a DELBA which where queued during an active BA
  session.
- r235687:
  remove unused vap variable
- r237647:
  Fix a TX aggregation issue, if after the last compressed BA notification
  the TX queue is empty, there won't be a TX done notification, effectly
  resulting in an mbuf leak. The correct way to handle this is to free
  up mbufs on both BA and TX done notifications up to the last sent seqno.
- r237649 (1):
  We need to defer passing the DELBA request to the firmware until the aggr
  queue is empty or the firmware will go nuts.

PR: kern/167806 (1)

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

11 years agoMFC r231317, r235963 (bz@), r234831, r234833.
np [Sun, 1 Jul 2012 09:17:55 +0000 (09:17 +0000)]
MFC r231317, r235963 (bz@), r234831, r234833.

r231317
Add IPv6 TSO (including TSO+VLAN) support to cxgb(4).

r235963 (bz@)
Allow LRO to work on IPv6 as well.
Fix the module Makefile to at least properly inlcude opt_inet6.h
and allow builds without INET or INET6.

r234831
Make sure that the firmware version is available in
dev.t4nex.X.firmware_version even if the driver fails to attach
properly.  At least it'll be easy to tell what we're dealing with.

r234833:
Change the default to not use packet counters to generate rx interrupts.
Rely solely on the timer based mechanism.

Update man page to reflect this change.

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

11 years agoMFC r237392:
tuexen [Sun, 1 Jul 2012 09:03:37 +0000 (09:03 +0000)]
MFC r237392:
Remove redundant #ifdef. Reported by gnn@.

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

11 years agoMFC r237230:
tuexen [Sun, 1 Jul 2012 09:00:29 +0000 (09:00 +0000)]
MFC r237230:
Add rate limitation for SCTP OOTB responses.

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

11 years agoMFC r237229:
tuexen [Sun, 1 Jul 2012 08:57:28 +0000 (08:57 +0000)]
MFC r237229:
Cleanup the UDP decapsulation code.

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

11 years agoMFC r236961:
tuexen [Sun, 1 Jul 2012 08:53:55 +0000 (08:53 +0000)]
MFC r236961:
Add a cmsg of type IP_TOS for UDP/IPv4 sockets to specify the TOS byte.

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

11 years agoMFC r236959:
tuexen [Sun, 1 Jul 2012 08:47:15 +0000 (08:47 +0000)]
MFC r236959:
Add a IP_RECVTOS socket option to receive for received UDP/IPv4
packets a cmsg of type IP_RECVTOS which contains the TOS byte.
Much like IP_RECVTTL does for TTL. This allows to implement a
protocol on top of UDP and implementing ECN.

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

11 years agoMFC r236958:
tuexen [Sun, 1 Jul 2012 08:32:48 +0000 (08:32 +0000)]
MFC r236958:
Deliver IPV6_TCLASS, IPV6_HOPLIMIT and IPV6_PKTINFO cmsgs (if
requested) on IPV6 sockets, which have been marked to be not IPV6_V6ONLY,
for each received IPV4 packet.

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

11 years agoMFC r236949:
tuexen [Sun, 1 Jul 2012 08:27:02 +0000 (08:27 +0000)]
MFC r236949:
Small cleanup.

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

11 years agoMFC r236640:
tuexen [Sun, 1 Jul 2012 08:23:16 +0000 (08:23 +0000)]
MFC r236640:
The cmsg_len field includes the cmsg header. So use CMSG_LEN().

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

11 years agoMFC r236522:
tuexen [Sun, 1 Jul 2012 08:21:08 +0000 (08:21 +0000)]
MFC r236522:
Remove code which is not needed.

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

11 years agoMFC r236515:
tuexen [Sun, 1 Jul 2012 08:18:40 +0000 (08:18 +0000)]
MFC r236515:
Use an existing function to get the source address.

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

11 years agoMFC r236493:
tuexen [Sun, 1 Jul 2012 08:13:20 +0000 (08:13 +0000)]
MFC r236493:
Honor sysctl for TTL.

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

11 years agoMFC r236492:
tuexen [Sun, 1 Jul 2012 08:11:15 +0000 (08:11 +0000)]
MFC r236492:
Don't request data from the IPv6 layer, which is not used.

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

11 years agoMFC r236450:
tuexen [Sun, 1 Jul 2012 08:09:05 +0000 (08:09 +0000)]
MFC r236450:
Remove an unused parameter.

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

11 years agoMFC r236391:
tuexen [Sun, 1 Jul 2012 08:06:43 +0000 (08:06 +0000)]
MFC r236391:
Small cleanups. No functional change.

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

11 years agoMFC r235990:
tuexen [Sun, 1 Jul 2012 08:04:10 +0000 (08:04 +0000)]
MFC r235990:
Undefine SCTP_PACKED before including sctp_uio.h, which doesn't
use it. Spotted by Irene Ruengeler.

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

11 years agoMFC r235903:
tuexen [Sun, 1 Jul 2012 08:01:42 +0000 (08:01 +0000)]
MFC r235903:
Add sn_send_failed_event to sctp_notification.

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

11 years agoMFC r235828:
tuexen [Sun, 1 Jul 2012 07:59:00 +0000 (07:59 +0000)]
MFC r235828:
Use consistent text at the begining of the files.

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

11 years agoMFC r235827:
tuexen [Sun, 1 Jul 2012 07:55:42 +0000 (07:55 +0000)]
MFC r235827:
Update copyright date.

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

11 years agoMFC r235557:
tuexen [Sun, 1 Jul 2012 07:53:54 +0000 (07:53 +0000)]
MFC r235557:
Use a default for max_burst of 4 and l2var of 2.
This was discussed with rrs@.

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

11 years agoMFC r235554:
tuexen [Sun, 1 Jul 2012 07:51:32 +0000 (07:51 +0000)]
MFC r235554:
Support SCTP_EOF also for 1-to-1 style sockets.

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

11 years agoMFC r235418:
tuexen [Sun, 1 Jul 2012 07:49:14 +0000 (07:49 +0000)]
MFC r235418:
Support SCTP_REMOTE_ERROR notification.

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

11 years agoMFC r235416:
tuexen [Sun, 1 Jul 2012 07:42:59 +0000 (07:42 +0000)]
MFC r235416:
Provide in the SCTP_SEND_FAILED and SCTP_SEND_FAILED_EVENT notifications
the correct ssf_error or ssfe_error as required by RFC 6458.

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

11 years agoMFC r235414,r235415:
tuexen [Sun, 1 Jul 2012 07:39:37 +0000 (07:39 +0000)]
MFC r235414,r235415:
Provide the error code in SCTP_PEER_ADDR_CHANGE notifications as
specified in RFC 6458.

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

11 years agoMFC r235412:
tuexen [Sun, 1 Jul 2012 07:36:33 +0000 (07:36 +0000)]
MFC r235412:
Remove unused constants.

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

11 years agoMFC r235403:
tuexen [Sun, 1 Jul 2012 07:34:07 +0000 (07:34 +0000)]
MFC r235403:
Use ECONNABORTED in cases where the ABORT was sent to the peer.

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

11 years agoMFC r235402:
tuexen [Sun, 1 Jul 2012 07:31:25 +0000 (07:31 +0000)]
MFC r235402:
Ensure the user can read COMM_LOST notifications on 1-to-1 style sockets.

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

11 years agoMFC r235360:
tuexen [Sun, 1 Jul 2012 07:28:15 +0000 (07:28 +0000)]
MFC r235360:
Provide in the association change notification the received ABORT chunk
if case of SCTP_COMM_LOST or SCTP_CANT_STR_ASSOC as required by RFC 6458.

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

11 years agoMFC r237718:
mav [Sun, 1 Jul 2012 06:41:39 +0000 (06:41 +0000)]
MFC r237718:
Fix millisecond to ticks conversion in drm_msleep().

On systems with HZ=100 it caused Intel eDP video output initialization
(and Xorg startup) to take several minutes instead of several seconds.

Reviewed by: kib

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

11 years agoMFC 237682:
ken [Sun, 1 Jul 2012 05:39:49 +0000 (05:39 +0000)]
MFC 237682:

  r237682 | ken | 2012-06-27 21:36:13 -0600 (Wed, 27 Jun 2012) | 6 lines

  Fix a typo in a panic() call.

PR: kern/169497
Submitted by: Steven Hartland <steven.hartland@multiplay.co.uk>

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

11 years agoMFC 237683:
ken [Sun, 1 Jul 2012 05:22:45 +0000 (05:22 +0000)]
MFC 237683:

  r237683 | ken | 2012-06-27 21:48:54 -0600 (Wed, 27 Jun 2012) | 129 lines

  Bring in LSI's latest mps(4) 6Gb SAS and WarpDrive driver, version
  14.00.00.01-fbsd.

  Their description of the changes is as follows:

  1. Copyright contents has been changed in all respective .c
   and .h files

  2. Support for WRITE12 and READ12 for direct-io (warpdrive only)
   has been added.

  3.      Driver has added checks to see if Drive has READ_CAP_16
   support before sending it down to the device.
   If SPC3_SID_PROTECT flag is set in the inquiry data, the
   device supports protection information, and must support
   the 16 byte read capacity command, otherwise continue without
   sending read cap 16. This will optimize driver performance,
   since it will not send READ_CAP_16 to the drive which does
   not have support of READ_CAP_16.

  4.      With new approach, "MPTIOCTL_RESET_ADAPTER" IOCTL will not
   use DELAY() which is busy loop implementation.
   It will use <msleep> (Better way to sleep without busy
   loop). Also from the HBA reset code path and some other
   places, DELAY() is replaced with msleep() or "pause()",
   which is based on sleep/wakeup style calls.  Driver use
   msleep()/pause() instead of DELAY based on CAN_SLEEP/NO_SLEEP
   flags to avoid busy loop which is not required all the
   time.e.a

   a. While driver is getting loaded, driver calls most of the
      commands with NO_SLEEP.
   b. When Driver is functional and it needs Reinit of HBA,
      CAN_SLEEP flag is used.

  5. <mpslsi> driver is not Endian safe. It will not work on Big
   Endian machines like Sparc and PowerPC platforms because it
   assumes it is running on a Little Endian machine.

   Driver code is modified such way that it does not assume CPU
   arch is Little Endian.
   a. All places where Driver interacts from HBA to Host, it
      converts Little Endian format to CPU format.
   b. All places where Driver interacts from Host to HBA, it
      converts CPU format to Little Endian.

  6. Findout memory leaks in FreeBSD Driver and resolve those,
   such as memory leak in targ's luns creation/deletion.
   Also added additional checks to see memory allocation
   success/fail.

  7. Add loginfo prints as debug message, i.e. When FW sends any
   loginfo, Driver should print those as debug message.
   This will help for debugging purpose.

  8. There is possibility to get config request timeout. Current
   driver is able to detect config request timetout, but it does
   not do anything on config_request timeout.  Driver should
   call mps_reinit() if any request_poll (which is called as
   part of config_request) is time out.

  9. cdb length check is required for 32 byte CDB. Add correct mpi
   control value for 32 bit CDB as below while submitting SCSI IO
   Request to controller.
   mpi_control |= 4 << MPI2_SCSIIO_CONTROL_ADDCDBLEN_SHIFT;

  10. Check the actual status of Message unit reset
   (mps_message_unit_reset).Previously FreeBSD Driver just writes
   MPI2_FUNCTION_IOC_MESSAGE_UNIT_RESET and never check the ack
   (it just wait for 50 millisecond).  So, Driver now check the
   status of "MPI2_FUNCTION_IOC_MESSAGE_UNIT_RESET" after writing
   it to the FW.

   Now it also checking for whether doorbell ack uses msleep with
   proper sleep flags, instead of <DELAY>.

  11. Previously CAM does not detect Multi-Lun Devices. In order to
   detect Multi-Lun Devices by CAM the driver needs following change
   set:
   a. There is "max_lun" field which Driver need to set based on
      hw/fw support. Currently LSI released driver does not set
      this field.
   b. Default of "max_lun" should not be 0 in OS, but it is
      currently set to 0 in CAM layer.
   c. Export max_lun capacity to 255

  12. Driver will not reset target info after port enable complete and
   also do Device removal when Device remove from FW.  The detail
   description is as follows
   a. When Driver receive WD PD add events, it will add all
      information in driver local data structure.
   b. Only for WD, we have below checks after port enable
      completes, where driver clear off all information retrieved
      at #1.
   if ((sc->WD_available &&
               (sc->WD_hide_expose == MPS_WD_HIDE_ALWAYS)) ||
               (sc->WD_valid_config && (sc->WD_hide_expose ==
                              MPS_WD_HIDE_IF_VOLUME)) {
     // clear off target data structure.
   }
   It is mainly not to attach PDs to OS.

   FreeBSD does bus rescan as older Parallel scsi style. So Driver
   needs to handle which Drive is visible to OS.  That is a reason
   we have to clear off targ information for PDs.

   Again, above logic was implemented long time ago. Similar concept
   we have for non-wd also. For that, LSI have introduced different
   logic to hide PDs.

   Eventually, because of above gap, when Phy goes offline, we
   observe below failure. That is what Driver is not doing complete
   removal of device with FW. (which was pointed by Scott)
   Apr  5 02:39:24 Freebsd7 kernel: mpslsi0: mpssas_prepare_remove
   Apr  5 02:39:24 Freebsd7 kernel: mpssas_prepare_remove 497 : invalid handle 0xe

   Now Driver will not reset target info after port enable complete
   and also will do Device removal when Device remove from FW.

  13. Returning "CAM_SEL_TIMEOUT" instead of "CAM_TID_INVALID"
   error code on request to the Target IDs that have no devices
   conected at that moment.  As if "CAM_TID_INVALID" error code
   is returned to the CAM Layaer then it results in a huge chain
   of errors in verbose kernel messages on boot and every
   hot-plug event.

Submitted by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>

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

11 years agoMFC 237518, 237545, 237648:
ken [Sun, 1 Jul 2012 05:13:50 +0000 (05:13 +0000)]
MFC 237518, 237545, 237648:

  r237518 | ken | 2012-06-23 22:29:03 -0600 (Sat, 23 Jun 2012) | 72 lines

  Fix a bug which causes a panic in daopen(). The panic is caused by
  a da(4) instance going away while GEOM is still probing it.

  In this case, the GEOM disk class instance has been created by
  disk_create(), and the taste of the disk is queued in the GEOM
  event queue.

  While that event is queued, the da(4) instance goes away.  When the
  open call comes into the da(4) driver, it dereferences the freed
  (but non-NULL) peripheral pointer provided by GEOM, which results
  in a panic.

  The solution is to add a callback to the GEOM disk code that is
  called when all of its resources are cleaned up.  This is
  implemented inside GEOM by adding an optional callback that is
  called when all consumers have detached from a provider, and the
  provider is about to be deleted.

  scsi_cd.c,
  scsi_da.c: In the register routine for the cd(4) and da(4)
   routines, acquire a reference to the CAM peripheral
   instance just before we call disk_create().

   Use the new GEOM disk d_gone() callback to register
   a callback (dadiskgonecb()/cddiskgonecb()) that
   decrements the peripheral reference count once GEOM
   has finished cleaning up its resources.

   In the cd(4) driver, clean up open and close
   behavior slightly.  GEOM makes sure we only get one
   open() and one close call, so there is no need to
   set an open flag and decrement the reference count
   if we are not the first open.

   In the cd(4) driver, use cam_periph_release_locked()
   in a couple of error scenarios to avoid extra mutex
   calls.

  geom.h: Add a new, optional, providergone callback that
   is called when a provider is about to be deleted.

  geom_disk.h: Add a new d_gone() callback to the GEOM disk
   interface.

   Bump the DISK_VERSION to version 2.  This probably
   should have been done after a couple of previous
   changes, especially the addition of the d_getattr()
   callback.

  geom_disk.c: Add a providergone callback for the disk class,
   g_disk_providergone(), that calls the user's
   d_gone() callback if it exists.

   Bump the DISK_VERSION to 2.

  geom_subr.c: In g_destroy_provider(), call the providergone
   callback if it has been provided.

   In g_new_geomf(), propagate the class's
   providergone callback to the new geom instance.

  blkfront.c: Callers of disk_create() are supposed to pass in
   DISK_VERSION, not an explicit disk API version
   number.  Update the blkfront driver to do that.

  disk.9: Update the disk(9) man page to include information
   on the new d_gone() callback, as well as the
   previously added d_getattr() callback, d_descr
   field, and HBA PCI ID fields.

  r237545 | ken | 2012-06-24 22:26:10 -0600 (Sun, 24 Jun 2012) | 7 lines

  Consume spare fields for the providergone pointers added to the g_class and
  g_geom structures in change 237518.  The original change would have broken
  the ABI.

  Suggested by: ae

  r237648 | ken | 2012-06-27 10:05:09 -0600 (Wed, 27 Jun 2012) | 6 lines

  In g_disk_providergone(), don't continue if the softc is NULL.  This may be
  the case if we've already gone through g_disk_destroy().

  Reported by: Michael Butler <imb@protected-networks.net>

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

11 years agoMFC r237624, r237714, r237716, r237860:
pfg [Sun, 1 Jul 2012 04:15:14 +0000 (04:15 +0000)]
MFC r237624, r237714, r237716, r237860:

Bring llquantize support into Dtrace.

Bryan Cantrill implemented the equivalent of semi-log graph
paper for Dtrace so llquantize will use one logarithmic and
one linear scale.

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

11 years agoMFC r237178:
eadler [Sun, 1 Jul 2012 00:40:09 +0000 (00:40 +0000)]
MFC r237178:
attach_generic causes missing devices in /dev when the driver interacts with some non-highpoint controollers. Change attach_generic to be off by default.

PR: kern/168910
Approved by: cperciva (implicit)

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

11 years agoMerge r237645 from head:
gavin [Sat, 30 Jun 2012 20:22:20 +0000 (20:22 +0000)]
Merge r237645 from head:

  The -S option, to specify the sector size, has been usable on all types
  of memory disks since r135340.  Update the man page to reflect this.

Noticed by: avg

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

11 years agoMFC r237674
thompsa [Sat, 30 Jun 2012 18:57:55 +0000 (18:57 +0000)]
MFC r237674

 Update the usage with the new jail option.

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

11 years agoMFC r236503: free wdog_kern_pat calls in post-panic paths from under
avg [Sat, 30 Jun 2012 14:17:59 +0000 (14:17 +0000)]
MFC r236503: free wdog_kern_pat calls in post-panic paths from under
SW_WATCHDOG

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

11 years agoMFC r236504: cpucontrol: use CPUCTL_UPDATE ioctl on correct file
avg [Sat, 30 Jun 2012 14:05:35 +0000 (14:05 +0000)]
MFC r236504: cpucontrol: use CPUCTL_UPDATE ioctl on correct file
descriptor (in amd case)

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

11 years agoMFC r237452:
ken [Fri, 29 Jun 2012 22:33:48 +0000 (22:33 +0000)]
MFC r237452:

  r237452 | ken | 2012-06-22 12:57:06 -0600 (Fri, 22 Jun 2012) | 25 lines

  Change 'camcontrol defects' to first probe a drive to find out how much
  defect information it has before grabbing the full defect list.

  This works around a bug with some Hitachi drives that generate data overrun
  errors when they are asked for more defect data than they have.

  The change is done in a spec-compliant way, so it should have no negative
  impact on drives that don't have this issue.

  This is based on work originally done at Sandvine.

  scsi_da.h: Add a define for the maximum amount of data that can be
   contained in a defect list.

  camcontrol.c: Update the readdefects() function to issue an initial
   command to determine the length of the defect list, and
   then use that length in the request for the full defect
   list.

  camcontrol.8: Add a note that some drives will report 0 defects available
   if you don't request either the PLIST or GLIST.

  Submitted by: Mark Johnston <markjdb@gmail.com> (original version)

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

11 years agoMFC r237328, except for the scsi_enc.c changes:
ken [Fri, 29 Jun 2012 22:28:31 +0000 (22:28 +0000)]
MFC r237328, except for the scsi_enc.c changes:

  r237328 | ken | 2012-06-20 11:08:00 -0600 (Wed, 20 Jun 2012) | 69 lines

  Fix several reference counting and object lifetime issues between
  the pass(4) and enc(4) drivers and devfs.

  The pass(4) driver uses the destroy_dev_sched() routine to
  schedule its device node for destruction in a separate thread
  context.  It does this because the passcleanup() routine can get
  called indirectly from the passclose() routine, and that would
  cause a deadlock if the close routine tried to destroy its own
  device node.

  In any case, once a particular passthrough driver number, e.g.
  pass3, is destroyed, CAM considers that unit number (3 in this
  case) available for reuse.

  The problem is that devfs may not be done cleaning up the previous
  instance of pass3, and will panic if isn't done cleaning up the
  previous instance.

  The solution is to get a callback from devfs when the device node
  is removed, and make sure we hold a reference to the peripheral
  until that happens.

  Testing exposed some other cases where we have reference counting
  issues, and those were also fixed in the pass(4) driver.

  cam_periph.c: In camperiphfree(), reorder some of the operations.

   The peripheral destructor needs to be called before
   the peripheral is removed from the peripheral is
   removed from the list.  This is because once we
   remove the peripheral from the list, and drop the
   topology lock, the peripheral number may be reused.
   But if the destructor hasn't been called yet, there
   may still be resources hanging around (like devfs
   nodes) that haven't been fully cleaned up.

  cam_xpt.c: Add an argument to xpt_remove_periph() to indicate
   whether the topology lock is already held.

  scsi_enc.c: Acquire an extra reference to the peripheral during
   registration, and release it once we get a callback
   from devfs indicating that the device node is gone.

   Call destroy_dev_sched_cb() in enc_oninvalidate()
   instead of calling destroy_dev() in the cleanup
   routine.

  scsi_pass.c: Add reference counting to handle peripheral and
   devfs object lifetime issues.

   Add a reference to the peripheral and the devfs
   node in the peripheral registration.

   Don't attempt to add a physical path alias if the
   peripheral has been marked invalid.

   Release the devfs reference once the initial
   physical path alias taskqueue run has completed.

   Schedule devfs node destruction in the
   passoninvalidate(), and release our peripheral
   reference in a new routine, passdevgonecb() once
   the devfs node is gone.  This allows the peripheral
   to fully go away, and the peripheral destructor,
   passcleanup(), will get called.

  Sponsored by: Spectra Logic

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

11 years agoMFC r236138, with the exception of scsi_enc.c:
ken [Fri, 29 Jun 2012 22:00:30 +0000 (22:00 +0000)]
MFC r236138, with the exception of scsi_enc.c:

  r236138 | ken | 2012-05-27 00:11:09 -0600 (Sun, 27 May 2012) | 64 lines

  Work around a race condition in devfs by changing the way closes
  are handled in most CAM peripheral drivers that are not handled by
  GEOM's disk class.

  The usual character driver open and close semantics are that the
  driver gets N open calls, but only one close, when the last caller
  closes the device.

  CAM peripheral drivers expect that behavior to be honored to the
  letter, and the CAM peripheral driver code (specifically
  cam_periph_release_locked_busses()) panics if it is done incorrectly.

  Since devfs has to drop its locks while it calls a driver's close
  routine, and it does not have a way to delay or prevent open calls
  while it is calling the close routine, there is a race.

  The sequence of events, simplified a bit, is:

  - devfs acquires a lock
  - devfs checks the reference count, and if it is 1, continues to close.
  - devfs releases the lock

  - 2nd process open call on the device happens here

  - devfs calls the driver's close routine

  - devfs acquires a lock
  - devfs decrements the reference count
  - devfs releases the lock

  - 2nd process close call on the device happens here

  At the second close, we get a panic in
  cam_periph_release_locked_busses(), complaining that peripheral
  has been released when the reference count is already 0.  This is
  because we have gotten two closes in a row, which should not
  happen.

  The fix is to add the D_TRACKCLOSE flag to the driver's cdevsw, so
  that we get a close() call for each open().  That does happen
  reliably, so we can make sure that our reference counts are
  correct.

  Note that the sa(4) and pt(4) drivers only allow one context
  through the open routine.  So these drivers aren't exposed to the
  same race condition.

  scsi_ch.c,
  scsi_enc.c,
  scsi_enc_internal.h,
  scsi_pass.c,
  scsi_sg.c:
   For these drivers, change the open() routine to
   increment the reference count for every open, and
   just decrement the reference count in the close.

   Call cam_periph_release_locked() in some scenarios
   to avoid additional lock and unlock calls.

  scsi_pt.c: Call cam_periph_release_locked() in some scenarios
   to avoid additional lock and unlock calls.

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

11 years agoMFC r237601:
ken [Fri, 29 Jun 2012 21:33:36 +0000 (21:33 +0000)]
MFC r237601:
  r237601 | ken | 2012-06-26 08:51:35 -0600 (Tue, 26 Jun 2012) | 38 lines

  Fix an issue that caused the kernel to panic inside CTL when trying
  to attach to target capable HBAs that implement the old immediate
  notify (XPT_IMMED_NOTIFY) and notify acknowledge (XPT_NOTIFY_ACK)
  CCBs.  The new API has been in place since SVN change 196008 in
  2009.

  The solution is two-fold:  fix CTL to handle the responses from the
  HBAs, and convert the HBA drivers in question to use the new API.

  These drivers have not been tested with CTL, so how well they will
  interoperate with CTL is unknown.

  scsi_target.c:Update the userland target example code to use the
   new immediate notify API.

  scsi_ctl.c: Detect when an immediate notify CCB is returned
   with CAM_REQ_INVALID or CAM_PROVIDE_FAIL status,
   and just free it.

   Fix a duplicate assignment.

  aic79xx.c,
  aic79xx_osm.c:Update the aic79xx driver to use the new API.
     Target mode is not enabled on for this driver, so
   the changes will have no practical effect.

  aic7xxx.c,
  aic7xxx_osm.c:Update the aic7xxx driver to use the new API.

  sbp_targ.c: Update the firewire target code to work with the
   new API.

  mpt_cam.c: Update the mpt(4) driver to work with the new API.
   Target mode is only enabled for Fibre Channel
   mpt(4) devices.

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

11 years agoMFC r233963:
ken [Fri, 29 Jun 2012 21:27:37 +0000 (21:27 +0000)]
MFC r233963:
  r233963 | ken | 2012-04-06 16:23:13 -0600 (Fri, 06 Apr 2012) | 27 lines

  Change the SCSI INQUIRY peripheral qualifier that CTL reports for LUNs
  that don't exist.

  Anecdotal evidence indicates that it is better to return 011b (bad LUN)
  than 001b (LUN offline).  However, this change also gives the user a
  sysctl/tunable, kern.cam.ctl.inquiry_pq_no_lun, to override the change
  and return to the previous behavior.  (The previous behavior was to
  return 001b, or LUN offline.)

  ctl.c: Change the default inquiry peripheral qualifier to 011b,
   and add a sysctl and tunable to allow the user to change
   it back to 001b if needed.

   Don't insert a Copan copyright statement in the inquiry
   data.  The copyright statements on the files are
   sufficient.

  ctl_private.h:Add sysctl variable context to the CTL softc.

  ctl_cmd_table.c,
  ctl_frontend_internal.c,
  ctl_frontend.c,
  ctl_backend.c,
  ctl_error.c: Include sys/sysctl.h.

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

11 years agoMFC 235024,235029,235556,235834,235845:
jhb [Fri, 29 Jun 2012 21:24:56 +0000 (21:24 +0000)]
MFC 235024,235029,235556,235834,235845:
Use MADT to match ACPI Processor objects to CPUs.  MADT and DSDT/SSDTs may
list CPUs in different orders, especially for disabled logical cores.  Now
we match ACPI IDs from the MADT with Processor objects, strictly order CPUs
accordingly, and ignore disabled cores.  This prevents us from executing
methods for other CPUs, e. g., _PSS for disabled logical core, which may not
exist.  Unfortunately, it is known that there are a few systems with buggy
BIOSes that do not have unique ACPI IDs for MADT and Processor objects.  To
work around these problems, 'debug.acpi.cpu_unordered' tunable is added.
Set this to a non-zero value to restore the old behavior.

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

11 years agoMFC r232604:
ken [Fri, 29 Jun 2012 21:19:24 +0000 (21:19 +0000)]
MFC r232604:
  r232604 | trasz | 2012-03-06 06:43:57 -0700 (Tue, 06 Mar 2012) | 6 lines

  Add LUN resizing to CTL.  Also make it possible to explicitly set
  size when creating file-backed or device-backed LUN.

  Reviewed by:    ken (earlier version)
  Sponsored by:   The FreeBSD Foundation

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

11 years agoMFC: r236581
marius [Fri, 29 Jun 2012 18:39:22 +0000 (18:39 +0000)]
MFC: r236581

The loaddev environment variable is not modifiable once set, so it is not
update for ZFS. It seems that this does not really affect anything except
the help command. Nevertheless, rearrange things so loaddev is set only
once in all cases in order to get it right.
Pointed out by: avg

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

11 years agoMFC r236810:
dim [Fri, 29 Jun 2012 18:18:51 +0000 (18:18 +0000)]
MFC r236810:

Amend r227797 by also passing ${STATIC_CXXFLAGS} for the other supported
C++ file extensions.

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

11 years agoMFC r235281:
dim [Fri, 29 Jun 2012 18:09:39 +0000 (18:09 +0000)]
MFC r235281:

Fix sys/boot/i386/cdboot/cdboot.S compilation with clang after r235219.
This file uses .code16 directives, which are not yet supported by
clang's integrated assembler.

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

11 years agoMFC 237337:
jhb [Fri, 29 Jun 2012 17:28:48 +0000 (17:28 +0000)]
MFC 237337:
Only output a list of file systems that need to be dumped if the system
has a non-empty dumpdates file.

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

11 years agoMFC 233191:
jhb [Fri, 29 Jun 2012 17:21:19 +0000 (17:21 +0000)]
MFC 233191:
Fix madvise(MADV_WILLNEED) to properly handle individual mappings larger
than 4GB.  Specifically, the inlined version of 'ptoa' of the the 'int'
count of pages overflowed on 64-bit platforms.  While here, change
vm_object_madvise() to accept two vm_pindex_t parameters (start and end)
rather than a (start, count) tuple to match other VM APIs as suggested
by alc@.

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

11 years agoMFC 237334:
jhb [Fri, 29 Jun 2012 17:12:03 +0000 (17:12 +0000)]
MFC 237334:
Move the per-thread deferred user map entries list into a private list
in vm_map_process_deferred() which is then iterated to release map entries.
This avoids having a nested vm map unlock operation called from the loop
body attempt to recuse into vm_map_process_deferred().  This can happen if
the vm_map_remove() triggers the OOM killer.

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

11 years agoMFC 237008,237271,237272,237673:
jhb [Fri, 29 Jun 2012 16:29:38 +0000 (16:29 +0000)]
MFC 237008,237271,237272,237673:
- Fix a couple of bugs that prevented windows in PCI-PCI bridges from
  growing "downward" (moving the start address down).  First, an off by
  one error caused the end address to be moved down an extra alignment
  chunk unnecessarily.  Second, when aligning the new candidate starting
  address, the wrong bits were masked off.
- Add a 'wmask' variable to hold the expression '(1ul << w->step) - 1' in
  pcib_grow_window().
- For subtractively decoding bridges, don't try to grow windows but pass
  the request up the tree in order to be on the safe side. Growing windows
  in this case would mean to switch resources to positive decoding and
  it's unclear how to correctly handle this. At least with ALi/ULi M5249
  PCI-PCI bridges, this also just doesn't work out of the box.

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

11 years agoMFC: r236592 r236593 r236594 r236620 r236621 r236622 r236637 r237794: filemon(4)
obrien [Fri, 29 Jun 2012 15:57:25 +0000 (15:57 +0000)]
MFC: r236592 r236593 r236594 r236620 r236621 r236622 r236637 r237794: filemon(4)

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

11 years agoMFC 236717:
jhb [Fri, 29 Jun 2012 15:30:14 +0000 (15:30 +0000)]
MFC 236717:
Teach procstat_get_shm_info_kvm() how to fetch the pathname of a SHM file
descriptor from a core and set it in fts->fs_path.

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

11 years agoMFC 236577:
jhb [Fri, 29 Jun 2012 15:24:46 +0000 (15:24 +0000)]
MFC 236577:
Allow the -p argument to kdump to accept either a PID or a thread ID.

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

11 years agoMFC: r237268
bapt [Fri, 29 Jun 2012 13:00:28 +0000 (13:00 +0000)]
MFC: r237268

early MFC to get this important bugfix into 9.1

Revert user comparison back to user names as some user can share uids (root/toor
for example)

get the username information from old_pw structures to still allow renaming of a
user.

Reported by: Claude Buisson <clbuisson@orange.fr>
Approved by: des (mentor)

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

11 years agoMerge r236364 from head by eri@:
glebius [Fri, 29 Jun 2012 12:11:31 +0000 (12:11 +0000)]
Merge r236364 from head by eri@:
  Correct table counter functionality to not panic.
  This was caused by not proper initialization of necessary parameters.

  PR: 168200
  Reviewed by: bz@, glebius@
  MFC after: 1 week

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

11 years agoMFC: r237219
pho [Fri, 29 Jun 2012 12:08:26 +0000 (12:08 +0000)]
MFC: r237219

In tty_makedev() the following construction:

dev = make_dev_cred();
dev->si_drv1 = tp;

leaves a small window where the newly created device may be opened
and si_drv1 is NULL.

As this is a vary rare situation, using a lock to close the window
seems overkill. Instead just wait for the assignment of si_drv1.

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