]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
12 years agoMFC r226971
pho [Wed, 9 Nov 2011 18:51:41 +0000 (18:51 +0000)]
MFC r226971
Added missing cache purge of from argument.

Approved by: re (kensmith)

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

12 years agoMFC 226748:
jhb [Wed, 9 Nov 2011 18:26:19 +0000 (18:26 +0000)]
MFC 226748:
- Add a new header for the x86 boot code that defines various structures
  and constants related to the BIOS Enhanced Disk Drive Specification.
- Use this header instead of magic numbers and various duplicate structure
  definitions for doing I/O.
- Use an actual structure for the request to fetch drive parameters in
  drvsize() rather than a gross hack of a char array with some magic
  size.  While here, change drvsize() to only pass the 1.1 version of
  the structure and not request device path information.  If we want
  device path information you have to set the length of the device
  path information as an input (along with probably checking the actual
  EDD version to see which size one should use as the device path
  information is variable-length).  This fixes data smashing problems
  from passing an EDD 3 structure to BIOSes supporting EDD 4.

Approved by: re (kib)

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

12 years agoMFC 226302:
jhb [Wed, 9 Nov 2011 18:12:42 +0000 (18:12 +0000)]
MFC 226302:
If an allocation for a specific resource range fails because it is not in
a decoded range for an ACPI Host-PCI bridge, try to allocate it from the
ACPI system resource range.  If that works, permit the resource allocation
regardless.

Approved by: re (kib)

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

12 years agoStart up 9.0-RC2.
kensmith [Tue, 8 Nov 2011 14:24:33 +0000 (14:24 +0000)]
Start up 9.0-RC2.

Approved by: re (implicit)

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

12 years agoMFC: r227006, r227281, r227282
marius [Mon, 7 Nov 2011 13:40:54 +0000 (13:40 +0000)]
MFC: r227006, r227281, r227282

Add a PCI front-end to esp(4) allowing it to support AMD Am53C974 and
replace amd(4) with the former in the amd64, i386 and pc98 GENERIC kernel
configuration files. Besides duplicating functionality, amd(4), which
previously also supported the AMD Am53C974, unlike esp(4) is no longer
maintained and has accumulated enough bit rot over time to always cause
a panic during boot as long as at least one target is attached to it
(see PR 124667).

PR: 124667
Approved by: re (kib)
Obtained from: NetBSD (based on)

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

12 years agoMFC: r226947, r226949, r227284
marius [Mon, 7 Nov 2011 13:16:51 +0000 (13:16 +0000)]
MFC: r226947, r226949, r227284

- Use device_t rather than the NetBSDish struct device.
- Move esp_devclass to ncr53c9x.c in order to allow different bus front-ends
  to use it.
- Use KOBJMETHOD_END.
- Remove the gl_clear_latched_intr hook as it's not needed for any of the
  chips nor the front-ends supported in FreeBSD and likely never will be.
- Correct the DMA constraints and only limit the tag used for the transfer
  buffers to 32-bit DMA as that address is written into a 32-bit register.
- The ESP200 also only supports up to 64k transfers.
- Don't let the DMA and SBus front-end supply a maximum transfer size larger
  than MAXPHYS as that's the maximum the upper layers use and we otherwise
  just waste resources unnecessarily.
- Initialize the ECB callout and don't zero the handle when returning ECBs
  to the free list so that ncr53c9x_callout() actually is called with the
  driver lock held.
- On detach the driver lock should be held across cam_sim_free() according
  to isp(4) and a panic received.
- Check the return value of NCRDMA_SETUP(), i.e. bus_dmamap_load(9), and try
  to handle failures gracefully.
- In ncr53c9x_action() replace N calls to xpt_done() in a switch with just
  one at the end.
- On XPT_PATH_INQ report "NCR" rather than "Sun" as the vendor as the former
  is somewhat more correct as well as the maximum supported transfer size via
  maxio in order to take advantage of controllers that that can handle more
  than DFLTPHYS.
- Freeze the device queue if a request didn't complete without error and
  isn't already frozen.
- Print the number of MESSAGE (EXTENDED) rejected.
- Fix the path encoded in the multiple inclusion protection of ncr53c9xvar.h.
- Correct the DMA constraints used in the LSI64854 core to not exceed the
  maximum supported transfer size and include the boundary so we don't need
  to check on every setup of a DMA transfer.
- Let the bus DMA map callbacks do nothing in case of an error.
- Correctly handle > 64k transfers for FAS366 in the LSI64854. A new feature
  flag NCR_F_LARGEXFER was introduced so we just need to check for this one
  and not for individual controllers supporting large transfers in several
  places.
- Let the LSI64854 core load transfer buffers using BUS_DMA_NOWAIT as the
  NCR53C9x core can't handle EINPROGRESS. Due to lack of bounce buffers
  support, sparc64 doesn't actually use EINPROGRESS and likely never will,
  as an example for writing additional front-ends for the NCR53C9x core it
  makes sense to set BUS_DMA_NOWAIT anyway though.
- Some minor cleanup.

Approved by: re (kib)

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

12 years agoMFC: r226995, r227042
marius [Sun, 6 Nov 2011 21:09:10 +0000 (21:09 +0000)]
MFC: r226995, r227042

- Import the common MII bitbang'ing code from NetBSD and convert drivers to
  take advantage of it instead of duplicating it. This reduces the size of
  the i386 GENERIC kernel by about 8k. The only potential in-tree users left
  unconverted are ed(4) and xe(4). Xe(4) generally should be changed to use
  miibus(4) instead of implementing PHY handling on its own, as otherwise it
  makes not much sense to add a dependency on miibus(4)/mii_bitbang(4) to it
  just for the MII bitbang'ing code. Ed(4) has some chip specific things
  interwinded with the MII bitbang'ing code and it's unclear whether it can
  be converted to common code, at least not without thorough testing of all
  the various chips supported by ed(4).
  The common MII bitbang'ing code also is useful in the embedded space for
  using GPIO pins to implement MII access.
- Based on lessons learnt with dc(4) (see r185750), add bus barriers to the
  MII bitbang read and write functions of the other drivers converted in
  order to ensure the intended ordering. Given that register access via an
  index register as well as register bank/window switching is subject to the
  same problem, also add bus barriers to the respective functions of smc(4),
  tl(4) and xl(4).
- Sprinkle some const.

Thanks to the following testers:
Andrew Bliznak (nge(4)), nwhitehorn@ (bm(4)), yongari@ (sis(4) and ste(4))
Thanks to Hans-Joerg Sirtl for supplying hardware to test stge(4).

Reviewed by: yongari (subset of drivers)
Approved by: re (kib)
Obtained from: NetBSD (partially)

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

12 years agoMFC r227064:
bz [Sun, 6 Nov 2011 20:29:18 +0000 (20:29 +0000)]
MFC r227064:

  Add QLogic 10 Gigabit Ethernet & CNA Adapter Driver version 1.30
  for 3200 and 8200 series cards.

  Submitted by: David C Somayajulu (david.somayajulu@qlogic.com),
                Qlogic Corporation

Approved by: re (kib)

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

12 years agoMFC r227085:
bz [Sun, 6 Nov 2011 17:31:57 +0000 (17:31 +0000)]
MFC r227085:

  Always use the opt_*.h options for ipfw.ko, not just when
  compiled into the kernel.
  Do not try to build the module in case of no INET support but
  keep #error calls for now in case we would compile it into the
  kernel.

  This should fix an issue where the module would fail to enable
  IPv6 support from the rc framework, but also other INET and INET6
  parts being silently compiled out without giving a warning in the
  module case.

  While here garbage collect unneeded opt_*.h includes.
  opt_ipdn.h is not used anywhere but we need to leave the DUMMYNET
  entry in options for conditional inclusion in kernel so keep the
  file with the same name.

  Reported by:  pluknet
  Reviewed by:  plunket, jhb

Approved by: re (kib)

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

12 years agoMFC: r227001
marius [Sun, 6 Nov 2011 17:25:22 +0000 (17:25 +0000)]
MFC: r227001

Increase the IOC port initialization timeouts by ten times to what the
corresponding Linux driver uses. This allows mpt(4) to still recognize
all good SATA devices in presence of a defective one, which takes about
45 seconds.
In the long term we probably should implement the logic used by mpt2sas(4)
allowing IOC port initialization to complete at a later time.

Submitted by: Andrew Boyer
Approved by: re (kib)

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

12 years agoMFC: r226154, r226165
marius [Sun, 6 Nov 2011 17:23:49 +0000 (17:23 +0000)]
MFC: r226154, r226165

- Follow the lead of dcphy(4) and pnphy(4) and move the reminder of the PHY
  drivers that only ever attach to a particular MAC driver, i.e. inphy(4),
  ruephy(4) and xlphy(4), to the directory where the respective MAC driver
  lives and only compile it into the kernel when the latter is also there,
  also removing it from miibus.ko and moving it into the module of the
  respective MAC driver.
- While at it, rename exphy.c, which comes from NetBSD where the MAC driver
  it corresponds to also is named ex(4) instead of xl(4) but that in FreeBSD
  actually identifies itself as xlphy(4), and its function names accordingly
  for consistency.
- Additionally while at it, fix some minor style issues like whitespace
  in the register headers and add multi-inclusion protection to inphyreg.h.

Approved by: re (kib)

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

12 years agoMFC r226985:
mav [Sun, 6 Nov 2011 16:54:23 +0000 (16:54 +0000)]
MFC r226985:
Workaround the problem introduced by combination of r162200 and r215687.
r162200 delays provider orphanization until all running requests complete,
to workaround broken orphan() method implementation in some classes.
r215687 removes persistent periodic (10Hz) event thread wake ups.
Together these changes can indefinitely delay orphanization until some
other event wake up the event thread. One consequence of this is inability
of CAM to destroy device disconnected when busy and, as consequence, create
new one after reconnection.

While the best solution would be to revert r162200, it is not easy, as
some classes still broken in that way. Instead conditionally wake up event
thread if there are some providers waiting for orphanization.

Approved by: re (kib)

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

12 years agoMFC r226666,226739,226741:
nwhitehorn [Sun, 6 Nov 2011 16:37:50 +0000 (16:37 +0000)]
MFC r226666,226739,226741:
Avoid showing the user some spurious error messages from GEOM [1] and do
provide error messages instead of silent failure if there are no disks
or no network interfaces in the system [2].

PR: bin/161926 [1], bin/161926 [2]
Approved by: re (kib)

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

12 years agoMFC r226439:
nwhitehorn [Sun, 6 Nov 2011 16:36:54 +0000 (16:36 +0000)]
MFC r226439:
Place quotes around the output of kbdmap(1), designed to be pasted into
/etc/rc.conf.

PR: bin/161711
Submitted by: manolis
Approved by: re (kib)

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

12 years agoMFC 227118:
jpaetzel [Sun, 6 Nov 2011 15:58:56 +0000 (15:58 +0000)]
MFC 227118:

Roll up several patches used by PC-BSD.

- Fix an issue with gmirror.
- Allow IPv4 DHCP and IPv6 SLAAC concurrently.
- Fix zpool options using the wrong device name.

Approved by: re
Obtained from: kris@pcbsd.org

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

12 years agoMFC r227075:
hselasky [Sun, 6 Nov 2011 15:06:04 +0000 (15:06 +0000)]
MFC r227075:
Fix for panic at USB controller attach failure during cold boot.

Approved by: re (kib)

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

12 years agoMFC r227062:
kib [Sun, 6 Nov 2011 13:06:31 +0000 (13:06 +0000)]
MFC r227062:
Fix kernel panic when d_fdopen csw method is called for NULL fp.
This may happen when kernel consumer calls VOP_OPEN().

Approved by: re (kensmith)

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

12 years agoMFC: r226937
brueffer [Sun, 6 Nov 2011 12:37:44 +0000 (12:37 +0000)]
MFC: r226937

Fix a misplaced parenthesis.

Approved by: re (kib)

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

12 years agoLast revision should have said:
dougb [Sun, 6 Nov 2011 07:50:25 +0000 (07:50 +0000)]
Last revision should have said:

MFC r226927:
Add birth date for Ken Thompson
Add birth and death dates for Steve Jobs
Update birth and add death date for Dennis Ritchie

MFC r226942:
Fix typo from r226927

Approved by: re (kensmith)

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

12 years agoMFC r227013:
dougb [Sun, 6 Nov 2011 07:47:38 +0000 (07:47 +0000)]
MFC r227013:

1. Add a new option, --run-updates, to always or never run the newalises,
   pwd_mkdb, etc. updates at the end of the comparison.

2. Add an update to the end to handle /etc/localtime, if it exists.
   If /var/db/zoneinfo exists, automatically update /etc/localtime,
   which should (hopefully) be safe to do. If not, prompt the user
   to run tzsetup.

3. Update run_it_now(), the function that handles input for the updates,
   to make sure that we got a valid answer, and to handle the --run-updates
   option if supplied.

Approved by: re (kensmith)

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

12 years agoMFC r227011:
dougb [Sun, 6 Nov 2011 07:35:08 +0000 (07:35 +0000)]
MFC r227011:

If the user is moving from any other time zone to UTC we need
to delete any old /var/db/zoneinfo file that may exist so that
tzsetup -r does the right thing.

Approved by: re (kensmith)

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

12 years agoApproved by: re (kensmith)
dougb [Sun, 6 Nov 2011 07:29:51 +0000 (07:29 +0000)]
Approved by: re (kensmith)

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

12 years agoMFC r226909:
dougb [Sun, 6 Nov 2011 07:18:19 +0000 (07:18 +0000)]
MFC r226909:

Add a reminder about quarterly status report due dates

Approved by: re (kensmith)

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

12 years agoMFC r226898:
dougb [Sun, 6 Nov 2011 07:02:13 +0000 (07:02 +0000)]
MFC r226898:

Fix the text and attribution of the poem "Youth" by Samuel Ullman.

Our copy was a bastardization of the "older" (probably original?) and
shorter version of the poem; and the "newer" version that is better
known, and arguably more popular. Standardize on the latter.

Cf. http://www.bartleby.com/73/2099.html

Approved by: re (kensmith)

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

12 years agoMFC: r226702
obrien [Sun, 6 Nov 2011 02:10:40 +0000 (02:10 +0000)]
MFC: r226702
   * Don't give the impression that this compiler is GPLv3.
     (It is "well known" that GCC 4.2.2 is GPLv3.)
   * Don't give the impression that this compiler isn't "trustable".
   * Fix dependency nit.

Approved by: re (kib)

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

12 years agoMFC r226896:
kib [Sat, 5 Nov 2011 18:27:47 +0000 (18:27 +0000)]
MFC r226896:
Fix an implicit dependency between the MFI driver and CAM that had grown due
to an API change in CAM.  It's once again possible to link a static kernel
with 'mfi' without requiring 'scbus' as well.  Ditto for KLD loading.

Approved by: re (bz)

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

12 years agoMFC r226889,226895:
ache [Fri, 4 Nov 2011 11:14:04 +0000 (11:14 +0000)]
MFC r226889,226895:

"or" word in '}' description gives false impression that newline can be
replaced by space. Reflect reality and POSIX.

PR:             96236
Submitted by:   dougb
Approved by:    re (kib)

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

12 years agoMFC r226880:
ae [Fri, 4 Nov 2011 06:14:18 +0000 (06:14 +0000)]
MFC r226880:
  Our geom withering function could take some time before geom with its
  providers and consumers will be destroyed.  Before take some actions
  with a geom, check that it is not destroyed at the moment.

  Tested by: nwhitehorn

Approved by: re (kib)

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

12 years agoMFC r226951:
dim [Wed, 2 Nov 2011 18:55:26 +0000 (18:55 +0000)]
MFC r226951:

Pull in r143305 and r143312 from upstream clang trunk, so using "clang
-march=native" on AMD K10 family processors no longer errors out with
"unknown target CPU 'amdfam10'".  This also enables use of SSE4A.

Reported by: David Marec <david.marec@davenulle.org>
Approved by: re (kib)

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

12 years agoMerge r226860 from head:
gavin [Wed, 2 Nov 2011 13:51:29 +0000 (13:51 +0000)]
Merge r226860 from head:
  Update the example rules in devfs.conf to reflect the changes since
  ATA_CAM.  While here, add another example rule, as many applications
  these days expect to find /dev/dvd instead.

Approved by: re (kib)

_M   etc
M    etc/devfs.conf

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

12 years agoMFC r226836:
pluknet [Wed, 2 Nov 2011 08:23:40 +0000 (08:23 +0000)]
MFC r226836:
Fix the manual section number for a cross-reference to open(2) and sort it.

Approved by: re (kib)

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

12 years agoMFC 226710
qingli [Tue, 1 Nov 2011 22:22:46 +0000 (22:22 +0000)]
MFC 226710

The host-id/interface-id can have a specific value and is properly
masked out when adding a prefix route through the "route" command.
However, when deleting the route, simply changing the command keyword
from "add" to "delete" does not work. The failoure is observed in
both IPv4 and IPv6 route insertion. The patch makes the route command
behavior consistent between the "add" and the "delete" operation.

Approved by: re (kib)

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

12 years agoMFC r226903, r225777, r226221 and r226534:
hselasky [Tue, 1 Nov 2011 22:00:49 +0000 (22:00 +0000)]
MFC r226903, r225777, r226221 and r226534:
Add some new USB device IDs and some USB device quirks.
Improve the USB mass storage auto quirk detection.

PR: usb/161798, usb/160911
Approved by: re (kib)

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

12 years agoMFC 226451
qingli [Tue, 1 Nov 2011 21:21:36 +0000 (21:21 +0000)]
MFC 226451

The IPv6 code was influx at the time of r196865 due to the L2/L3
separation rewrite changes. r196865 was committed to fix a scope
violation problem in the following test scenario:

  box-1# ifconfig em0 inet6 2001:db8:1:: prefixlen 64 anycast
  box-1# ifconfig em1 inet6 2001:db8:2::1 prefixlen 64

  box-2# ifconfig re0 inet6 2001:db8:1::6 prefixlen 64

  em0 and re0 are on the same link.

  box-2# ping6 2001:db8:1::
  PING6(56=40+8+8 bytes) 2001:db8:1::6 --> 2001:db8:1::

the ICMPv6 response should have a source address of em1, which
is 2001:db8:2::1, not the link-local address of em0.

That code is no longer necessary and breaks the IPv6-Ready logo
testing, so revert it now.

Reviewed by: hrs
Approved by: re (kib)

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

12 years agoMFC 226713
qingli [Tue, 1 Nov 2011 18:29:06 +0000 (18:29 +0000)]
MFC 226713

Exclude host routes when checking for prefix coverage on multiple
interfaces. A host route has a NULL mask so check for that condition.
I have also been told by developers who customize the packet output
path with direct manipulation of the route entry (or the outgoing
interface to be specific). This patch checks for the route mask
explicitly to make sure custom code will not panic.

PR: kern/161805
Approved by: re (kib)

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

12 years agoMFC r226790:
pluknet [Tue, 1 Nov 2011 16:11:44 +0000 (16:11 +0000)]
MFC r226790:
Fix typo in timer_getoverrun cross-reference.

Approved by: re (kib)

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

12 years agoMFC r226688:
kib [Tue, 1 Nov 2011 15:41:55 +0000 (15:41 +0000)]
MFC r226688:
The use of VOP_ISLOCKED() without a check for the return values can cause
false positives. Replace the #ifdef block with the proper
ASSERT_VOP_UNLOCKED() assert.

Approved by: re (bz)

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

12 years agoMFC r226687:
kib [Tue, 1 Nov 2011 15:38:41 +0000 (15:38 +0000)]
MFC r226687:
The only possible error return from null_nodeget() is due to insmntque1
failure (the getnewvnode cannot return an error). In this case, the
null_insmntque_dtr() already unlocked the reclaimed vnode, so VOP_UNLOCK()
in the nullfs_mount() after null_nodeget() failure is wrong.

Approved by: re (bz)

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

12 years agoMFC r226686:
kib [Tue, 1 Nov 2011 15:34:52 +0000 (15:34 +0000)]
MFC r226686:
The covered vnode must be reloced if it was unlocked. Remove VOP_ISLOCKED
test because of this and also because it can lead to false positives.

Approved by: re (bz)

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

12 years agoMFC r226887:
delphij [Mon, 31 Oct 2011 20:02:11 +0000 (20:02 +0000)]
MFC r226887:

Don't expose a constant array into global namespace.

Reported by: Ruslan Yakovlev <quazi bk ru> via yongari
Approved by: re (kib)

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

12 years agoMFC 226869:
tuexen [Mon, 31 Oct 2011 09:27:10 +0000 (09:27 +0000)]
MFC 226869:
When adding a new remote address using sctp_add_remote_addr(),
return the correct net if requested.

Approved by: re@

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

12 years agoMFC r226681:
pho [Mon, 31 Oct 2011 09:18:01 +0000 (09:18 +0000)]
MFC r226681:
Only unlock if the lock is exclusive.

Approved by: re (kib)
PR: kern/161956

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

12 years agoMFC 226868:
tuexen [Mon, 31 Oct 2011 08:48:27 +0000 (08:48 +0000)]
MFC 226868:
Send out control chunks which have no specific destination.

Approved by: re@

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

12 years agoMFC r226647:
marcel [Mon, 31 Oct 2011 03:47:23 +0000 (03:47 +0000)]
MFC r226647:
Add support for Boot Camp. The support is defined as follows:
o   Detect when Boot Camp is enabled (i.e. the MBR mirrors the GPT).
o   When Boot Camp is enabled, update the MBR whenever we write the GPT.
o   Creation of a Boot Camp enabled GPT is not supported.
o   Automatically disable Boot Camp when the GPT has been changed so that
    there's either no EFI partition or no HFS+ partition.
o   The first 4 partitions (by index) get mirrored in the MBR.

Requested by, discussed with and tested by: kris@pcbsd.org
Approved by: re (bz@, kib@)

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

12 years agoMFC r226512:
mm [Sun, 30 Oct 2011 20:58:53 +0000 (20:58 +0000)]
MFC r226512:

Import fix for Illumos bug #1475 to reduce diff against upstream.

Panic caused by this bug was already partially fixed by pjd@
in p4 CH 185940 and 185942.

Reference:
1475 zfs spill block hold can access invalid spill blkptr
https://www.illumos.org/issues/1475

Reviewed by: delphij
Obtained from: Illumos (issue 1475, changeset 13469:b8e89e5c4167)
Approved by: re (kib)

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

12 years agoMFC r226724, r226732:
mm [Sun, 30 Oct 2011 20:56:54 +0000 (20:56 +0000)]
MFC r226724, r226732:

MFC r226724:
Update copyright information in several ZFS files, as the clause 3.3
of the CDDL licence explicitly requires every Contributor to add
a copyright notice.

This also reflects the copyright notices for the changes recently
added by Illumos.

MFC r226732: [1]
Fix typo in copyright notice introduced in r226724
(missing character in e-mail adress)

Reported by: pjd [1]
Approved by: re (kib)

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

12 years agoMFC: r226522
marius [Sun, 30 Oct 2011 12:23:00 +0000 (12:23 +0000)]
MFC: r226522

Allow to dump on Solaris swap partitions.

PR: 161764
Submitted by: Peter Jeremy
Approved by: re (kib)

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

12 years agoMFC r226828:
trociny [Sun, 30 Oct 2011 08:35:19 +0000 (08:35 +0000)]
MFC r226828:

Fix a memory leak in tzload().

PR: bin/161425
Reviewed by: kib
Approved by: re (kib)

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

12 years agoMFC: r226381
marius [Sat, 29 Oct 2011 23:53:53 +0000 (23:53 +0000)]
MFC: r226381

Merge from NetBSD:
- Remove clause 3 and 4 from TNF licenses.
- Fix memset usage.
- Various cleanup.
- Kill caddr_t.

Approved by: re (kib)

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

12 years agoMerge from r225950:
marius [Sat, 29 Oct 2011 22:06:53 +0000 (22:06 +0000)]
Merge from r225950:

Set the sense residual properly.

Reviewed by: ken
Approved by: re (kib)

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

12 years agoMFC r226673:
marcel [Sat, 29 Oct 2011 16:38:04 +0000 (16:38 +0000)]
MFC r226673:
Don't terminate the interactive root mount prompt on mount failure.
This restores the previous behaviour. While here, match '?' and '.'
inputs exactly and improve the error message.

Requested by: avg@
Derived from a patch by: Arnaud Lacombe <lacombar@gmail.com>
Approved by: re (kib@)

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

12 years agoMFC r226803:
hselasky [Sat, 29 Oct 2011 12:39:05 +0000 (12:39 +0000)]
MFC r226803:
Fix suspend and resume of non-super-speed USB devices
in the generic XHCI driver. There appears to be some minor
logic missing for this feature to work.

Approved by: re (kib)

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

12 years agoInclude a missing opt_vm.h which doesn't let VM_NRESERVLEVEL switching
attilio [Sat, 29 Oct 2011 06:13:44 +0000 (06:13 +0000)]
Include a missing opt_vm.h which doesn't let VM_NRESERVLEVEL switching
correct utilization.

Approved by: re (kib)

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

12 years agoMFC r226633:
dim [Fri, 28 Oct 2011 21:08:39 +0000 (21:08 +0000)]
MFC r226633:

Upgrade our copy of llvm/clang to r142614, from upstream's release_30
branch.  This brings us very close to the 3.0 release, which is expected
November 16, 2011.

Approved by: re (kib)

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

12 years agoMFC r226714:
ae [Thu, 27 Oct 2011 20:23:03 +0000 (20:23 +0000)]
MFC r226714:
  Fix argument name. This fixes EINVAL when boot0cfg uses GEOM_PART'
  control interface.

Approved by: re (kib)

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

12 years agoMFC r226664:
gabor [Thu, 27 Oct 2011 19:18:54 +0000 (19:18 +0000)]
MFC r226664:
- Install BSD grep properly, based on the value of WITH_BSD_GREP

Approved by: re (kib)

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

12 years agoMFC r225979:
kib [Thu, 27 Oct 2011 12:26:16 +0000 (12:26 +0000)]
MFC r225979:
Update the comment.

MFC r225980:
Handle the situation where fixups_close() has been called but more fixups
are still available on the queue.

Approved by: re (kensmith)

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

12 years agoMFC r226695-226696:
yongari [Thu, 27 Oct 2011 02:36:13 +0000 (02:36 +0000)]
MFC r226695-226696:
r226695:
  Fix a regression introduced in r218832. For TX status check, driver
  should use a TX list DMA tag.

r226696:
  Add missing bus_dmamap_sync() in setup frame transmit.

Approved by: re (kensmith)

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

12 years agoFix whitespace nit. "options<space><tab>", not "options<tab><tab>".
kensmith [Wed, 26 Oct 2011 23:05:59 +0000 (23:05 +0000)]
Fix whitespace nit.  "options<space><tab>", not "options<tab><tab>".

Submitted by: Matthew Fleming <mdf at freebsd dot org>
Pointy hat: me
Approved by: re (implicit)

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

12 years agoMFC r226650: Make freebsd-update work with FreeBSD 9.0.
cperciva [Wed, 26 Oct 2011 20:01:43 +0000 (20:01 +0000)]
MFC r226650: Make freebsd-update work with FreeBSD 9.0.

Approved by: re (kib)

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

12 years agoI forgot we now leave KDB and KDB_TRACE options in stable kernel config
kensmith [Wed, 26 Oct 2011 19:59:06 +0000 (19:59 +0000)]
I forgot we now leave KDB and KDB_TRACE options in stable kernel config
files to help provide stack traces during a panic.

Submitted by: Sergey Kandaurov <pluknet at freebsd dot org>
Approved by: re (implicit)

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

12 years agoMFC r226510,r226547:
kensmith [Wed, 26 Oct 2011 19:45:20 +0000 (19:45 +0000)]
MFC r226510,r226547:
Comment out sbp(4) because it appears to cause boot failure on some
systems.  Add comment explaining why sbp(4) is commented out.

It was a mistake on my part to omit powerpc's GENERIC for r226510.
But when I noticed the mistake I checked with the powerpc maintainer
to see if I should correct the mistake Marcel said he'd prefer it be
left as-is.

Approved by: re (kib)

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

12 years agoSync pf(4) and pfsync(4) with head, merging lots of important bugfixes
glebius [Wed, 26 Oct 2011 17:09:09 +0000 (17:09 +0000)]
Sync pf(4) and pfsync(4) with head, merging lots of important bugfixes
required for normal operation of pfsync(4). Revisions merged:

  r226531 | bz | 2011-10-19 13:34:40 +0400 (ср, 19 окт 2011) | 4 lines

  Fix an obvious locking bug where we would lock again rather than unlock.

  r226532 | bz | 2011-10-19 14:04:24 +0400 (ср, 19 окт 2011) | 12 lines

  Pseudo interfaces should go at SI_SUB_PSEUDO.  However at least
  pfsync also depends on pf to be initialized already so pf goes at
  FIRST and the interfaces go at ANY.
  Then the (VNET_)SYSINIT startups for pf stays at SI_SUB_PROTO_BEGIN
  and for pfsync we move to the later SI_SUB_PROTO_IF.

  This is not ideal either but at least an order that should work for
  the moment and can be re-fined with the VIMAGE merge, once this will
  actually work with more than one network stack.

  r226533 | bz | 2011-10-19 14:08:58 +0400 (ср, 19 окт 2011) | 4 lines

  In the non-FreeBSD case we do not expect PF_LOCK and friends to do anything.

  r226535 | bz | 2011-10-19 14:16:42 +0400 (ср, 19 окт 2011) | 5 lines

  Adjust the PF_ASSERT() macro to what we usually use in the network stack:
  PF_LOCK_ASSERT() and PF_UNLOCK_ASSERT().

  r226536 | bz | 2011-10-19 15:04:49 +0400 (ср, 19 окт 2011) | 8 lines

  De-virtualize the pf_task_mtx lock.  At the current state of pf locking
  and virtualization it is not helpful but complicates things.

  Current state of art is to not virtualize these kinds of locks -
  inp_group/hash/info/.. are all not virtualized either.

  r226544 | bz | 2011-10-19 17:13:56 +0400 (ср, 19 окт 2011) | 12 lines

  Fix recursive pf locking leading to panics.  Splatter PF_LOCK_ASSERT()s
  to document where we are expecting to be called with a lock held to
  more easily catch unnoticed code paths.
  This does not neccessarily improve locking in pfsync, it just tries
  to avoid the panics reported.

  PR: kern/159390, kern/158873
  Submitted by: pluknet (at least something that partly resembles
   my patch ignoring other cleanup, which I only saw
   too late on the 2nd PR)

  r226609 | glebius | 2011-10-21 15:11:18 +0400 (пт, 21 окт 2011) | 4 lines

  In FreeBSD ip_output() expects ip_len and ip_off in host byte order

  PR: kern/159029

  r226623 | glebius | 2011-10-22 02:28:15 +0400 (сб, 22 окт 2011) | 5 lines

  Fix a race: we should update sc_len before dropping the pf lock, otherwise a
  number of packets can be queued on sc, while we are in ip_output(), and then
  we wipe the accumulated sc_len. On next pfsync_sendout() that would lead to
  writing beyond our mbuf cluster.

  r226655 | glebius | 2011-10-23 14:05:25 +0400 (вс, 23 окт 2011) | 5 lines

  Correct flag for uma_zalloc() is M_WAITOK. M_WAIT is an old and
  deprecated flag from historical mbuf(9) allocator.

  This is style only change.

  r226656 | glebius | 2011-10-23 14:13:20 +0400 (вс, 23 окт 2011) | 5 lines

  Absense of M_WAITOK in malloc flags for UMA doesn't
  equals presense of M_NOWAIT. Specify M_NOWAIT explicitly.

  This fixes sleeping with PF_LOCK().

  r226660 | glebius | 2011-10-23 18:59:54 +0400 (вс, 23 окт 2011) | 22 lines

  Fix from r226623 is not sufficient to close all races in pfsync(4).

  The root of problem is re-locking at the end of pfsync_sendout().
  Several functions are calling pfsync_sendout() holding pointers
  to pf data on stack, and these functions expect this data to be
  consistent.

  To fix this, the following approach was taken:

  - The pfsync_sendout() doesn't call ip_output() directly, but
    enqueues the mbuf on sc->sc_ifp's interfaces queue, that
    is currently unused. Then pfsync netisr is scheduled. PF_LOCK
    isn't dropped in pfsync_sendout().
  - The netisr runs through queue and ip_output()s packets
    on it.

  Apart from fixing race, this also decouples stack, fixing
  potential issues, that may happen, when sending pfsync(4)
  packets on input path.

  Reviewed by: eri (a quick review)

  r226661 | glebius | 2011-10-23 19:08:18 +0400 (вс, 23 окт 2011) | 13 lines

  - Fix a bad typo (FreeBSD specific) in pfsync_bulk_update(). Instead
    of scheduling next run pfsync_bulk_update(), pfsync_bulk_fail()
    was scheduled.
    This lead to instant 100% state leak after first bulk update
    request.
  - After above fix, it appeared that pfsync_bulk_update() lacks
    locking. To fix this, sc_bulk_tmo callout was converted to an
    mtx one. Eventually, all pf/pfsync callouts should be converted
    to mtx version, since it isn't possible to stop or drain a
    non-mtx callout without risk of race.
  - Add comment that callout_stop() in pfsync_clone_destroy() lacks
    locking. Since pfsync0 can't be destroyed (yet), let it be here.

  r226662 | glebius | 2011-10-23 19:10:15 +0400 (вс, 23 окт 2011) | 2 lines

  Fix indentation, no code changed.

  r226663 | glebius | 2011-10-23 19:15:17 +0400 (вс, 23 окт 2011) | 4 lines

  Merge several fixes to bulk update processing from OpenBSD. Merged
  revisions: 1.148, 1.149, 1.150. This makes number of states on
  master/slave to be of a sane value.

Approved by: re (kib)

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

12 years agoAdd a "kern.features.ata_cam" sysctl in the kernel when the ATA_CAM kernel
rodrigc [Wed, 26 Oct 2011 17:04:26 +0000 (17:04 +0000)]
Add a "kern.features.ata_cam" sysctl in the kernel when the ATA_CAM kernel
option is defined.  This sysctl can be queried by feature_present(3).

Query for this feature in /sbin/atacontrol and /usr/sbin/burncd.
If these utilities detect that ATA_CAM is enabled, then these utilities
will error out.  These utilities are compatible with the old ATA
driver, but are incomptible with the new ATA_CAM driver.  By erroring out,
we give end-users an idea as to what remedies to use, and reduce the need for them
to file PR's.  For atacontrol, camcontrol must be used instead,
and for burncd, alternative utilties from the ports collection must be used
such as sysutils/cdrtools.

In future, maybe someone can re-write burncd to work with ATA_CAM,
but at least for now, we give a somewhat useful error message to end users.

PR: 160979
Reviewed by: jh, Arnaud Lacombe <lacombar at gmail dot com>
Approved by: re (kib)
Reported by: Joe Barbish <fbsd8 at a1poweruser dot com>

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

12 years agoMFC r226527:
bz [Wed, 26 Oct 2011 15:36:48 +0000 (15:36 +0000)]
MFC r226527:

  Fix indentation in a loop and a tiny maze of #ifdefs for just the
  __FreeBSD__ parts that had it wrong.

MFC r226530:

  Fix a bug when NPFSYNC > 0 that on FreeBSD we would always return
  and never remove state.

  This fixes the problem some people are seeing that state is removed when pf
  is loaded as a module but not in situations when compiled into the kernel.

Approved by: re (kib)

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

12 years agoMFC r226654, r226657, r226658:
mm [Wed, 26 Oct 2011 08:34:00 +0000 (08:34 +0000)]
MFC r226654, r226657, r226658:

MFC r226654 [1]:
Add etc/rc.d/static_ndp, analogous to etc/rc.d/static_arp.
Make sure that static ARP and NDP bindings are set before NETWORKING.

As static_ndp is based on static_arp, pass copyright to the project with
permission of the original author (delphij@).

MFC r226657 [2]:
Correctly reassign copyright of etc/rc.d/static_ndp back to delphij@
as the project itself is no legal entity

MFC r226658 [3]:
Add information about static_ndp_pairs to rc.conf(5) manual page

Reviewed by: Xin Li <delphij@FreeBSD.org> [1]
Reported by: Joe Dahl <joel@vnode.se> [2]
Submitted by: Sergey Kandaurov <pluknet@FreeBSD.org> [3]
Approved by: re (kib)

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

12 years agoMFC of r226752, r226771, tzdata2011m
edwin [Wed, 26 Oct 2011 06:50:40 +0000 (06:50 +0000)]
MFC of r226752, r226771, tzdata2011m

Europe:
- Pridnestrovian Moldavian Republic (PMR, also known as
  "Pridnestrovie") has abolished seasonal clock change (no transition
  to the Winter Time).
- The recent change to the Ukranian time zone (Europe/Kiev) to
  introduce permanent daylight saving time (similar to Russia) was
  reverted.

South America:
- Bahia: The President signed a decree that includes Bahia in summer
  time.

zone.tab:
- Add Europe/Tiraspol Pridnestrovie

Obtained from:  ftp://ftp.iana.org/tz/releases/
Approved by: re (Kostik Belousov)

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

12 years agoMFC: r226406
brueffer [Sun, 23 Oct 2011 18:31:24 +0000 (18:31 +0000)]
MFC: r226406

Properly free resources in case of an error.

Approved by: re (kib)

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

12 years agoMFC: r226398, r226442
brueffer [Sun, 23 Oct 2011 18:20:51 +0000 (18:20 +0000)]
MFC: r226398, r226442

Move the allocation of usrbufs down a few lines to avoid leaking it
in case of an error.

Approved by: re (kib)

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

12 years agoMFC: r226247, r226253
brueffer [Sat, 22 Oct 2011 18:20:12 +0000 (18:20 +0000)]
MFC: r226247, r226253

Properly free linux_gidset in case of an error.

Approved by: re (kib)

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

12 years agoMFC: r226185
brueffer [Sat, 22 Oct 2011 17:51:45 +0000 (17:51 +0000)]
MFC: r226185

Add missing break statement to make sure all 3DES etypes really are treated
the same.

Approved by: re (kib)

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

12 years agoFix bmiss notifications, events should be sent when NOT scanning.
bschmidt [Sat, 22 Oct 2011 09:29:44 +0000 (09:29 +0000)]
Fix bmiss notifications, events should be sent when NOT scanning.

Approved by: re (kib)

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

12 years agoMFC: 226265
mckusick [Fri, 21 Oct 2011 22:12:24 +0000 (22:12 +0000)]
MFC: 226265

When unmounting a filesystem always wait for the vfs_busy lock to clear
so that if no vnodes in the filesystem are actively in use the unmount
will succeed rather than failing with EBUSY.

Reported by: Garrett Cooper
Reviewed by: Attilio Rao and Kostik Belousov
Tested by:   Garrett Cooper
Approved by: re (kib)
PR:          kern/161016

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

12 years agoMFC 226266:
mckusick [Fri, 21 Oct 2011 22:07:52 +0000 (22:07 +0000)]
MFC 226266:
After creating a filesystem using newfs -j the time stamps are all
zero and thus report as having been made in January 1970. Apart
from looking a bit silly, it also triggers alarms from scripts
that detect weird time stamps. This update sets all 4 (or 3, in
the case of UFS1) time stamps to the current time when enabling
journaling during newfs or later when enabling it with tunefs.

Reported by: Hans Ottevanger <hans@beastielabs.net>
Approved by: re (kib)

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

12 years agoMFC r226403:
trociny [Fri, 21 Oct 2011 05:37:40 +0000 (05:37 +0000)]
MFC r226403:

In r225809 the intention was to send VEOF only once if STDIN was not a
terminal. Unfortunately the fix was incorrect and for flushtime > 0 it
keept sending VEOF.

Sent VEOF generates ^D\b\b echoed by the terminal, which was reported
in bin/161526. Note, we still send VEOF at least once. Otherwise
commands like below would hang forever:

  echo 1 |script /tmp/script.out cat

PR: bin/161526
Reported by: Adrian Wontroba <aw1@stade.co.uk>, Stefan Bethke <stb@lassitu.de>
Tested by: Stefan Bethke <stb@lassitu.de>
Approved by: re (kib)

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

12 years agoMFC r226476:
delphij [Thu, 20 Oct 2011 20:33:31 +0000 (20:33 +0000)]
MFC r226476:

Return BUS_PROBE_DEFAULT instead of 0 (BUS_PROBE_SPECIFIC), allowing
vendor provided driver to override in kernel driver.

Approved by: re (kib)

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

12 years agoMFC r226483:
delphij [Thu, 20 Oct 2011 20:31:09 +0000 (20:31 +0000)]
MFC r226483:

Fix a bug in sa_find_sizes() which could lead to panic:
When calculating space needed for SA_BONUS buffers,
hdrsize is always rounded up to next 8-aligned boundary.
However, in two places the round up was done against
sum of 'total' plus hdrsize.  On the other hand,
hdrsize increments by 4 each time, which means in
certain conditions, we would end up returning with
will_spill == 0 and (total + hdrsize) larger than
full_space, leading to a failed assertion because
it's invalid for dmu_set_bonus.

Sponsored by: iXsystems, Inc.
Reviewed by: mm
Approved by: re (kib)

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

12 years agoMFC r226042:
kib [Thu, 20 Oct 2011 18:54:05 +0000 (18:54 +0000)]
MFC r226042:
Supply unique (st_dev, st_ino) value pair for the fstat(2) done on the pipes.

Approved by: re (bz)

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

12 years agoMFC r226041:
kib [Thu, 20 Oct 2011 18:47:58 +0000 (18:47 +0000)]
MFC r226041:
Export devfs inode number allocator for the kernel consumers.

Approved by: re (bz)

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

12 years agoMFC r226208:
kib [Thu, 20 Oct 2011 18:39:01 +0000 (18:39 +0000)]
MFC r226208:
Do not ignore block offsets.

PR: kern/160943
Approved by: re (bz)

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

12 years agoUpdate gcc's __FreeBSD__ and __FreeBSD_cc_version macros for FreeBSD 9.
dim [Thu, 20 Oct 2011 17:33:22 +0000 (17:33 +0000)]
Update gcc's __FreeBSD__ and __FreeBSD_cc_version macros for FreeBSD 9.

This is a direct commit to stable/9, since the macro values are
different in head.

Approved by: re (kib)

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

12 years agoMFC r226318:
np [Thu, 20 Oct 2011 17:09:53 +0000 (17:09 +0000)]
MFC r226318:

Make sure the inp wasn't dropped when rexmt let go of the inp and
pcbinfo locks.

Approved by: re (kib)

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

12 years agoMFC r226432, r226273:
gabor [Thu, 20 Oct 2011 16:08:11 +0000 (16:08 +0000)]
MFC r226432, r226273:
  - Use getprogname() instead of __progname
  - Allow disabling bzip2 support with WITHOUT_BZIP2
  - Fix handling patterns that start with a dot
  - Remove superfluous semicolon
  - Fix counting of match limit (-m)

Approved by: re (kib), delphij (mentor, implicit)

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

12 years agoMFhead 226401,226402:
glebius [Thu, 20 Oct 2011 15:58:05 +0000 (15:58 +0000)]
MFhead 226401,226402:

  Remove last remnants of classful addressing:

  - Remove ia_net, ia_netmask, ia_netbroadcast from struct in_ifaddr.
  - Remove net.inet.ip.subnetsarelocal, I bet no one need it in 2011.
  - fix bug when we were not forwarding to a host which matches classful
    net address. For example router having 192.168.x.y/16 network attached,
    would not forward traffic to 192.168.*.0, which are legal IPs in
    CIDR world.
  - For compatibility, leave autoguessing of mask based on class.

  Reviewed by:  andre, bz, rwatson

  Add support for IPv4 /31 prefixes, as described in RFC3021.

  To run a /31 network, participating hosts MUST drop support
  for directed broadcasts, and treat the first and last addresses
  on subnet as unicast. The broadcast address for the prefix
  should be the link local broadcast address, INADDR_BROADCAST.

Approved by: re (kib)

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

12 years agoMFhead r226367:
glebius [Thu, 20 Oct 2011 15:55:01 +0000 (15:55 +0000)]
MFhead r226367:

  Never switch directly from INIT to MASTER, since this produces
  nasty status flaps.

  PR:           kern/161123
  Submitted by: Damien Fleuriot <dam my.gd>
  OpenBSD:      ip_carp.c, rev. 1.115

Approved by: re (kib)

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

12 years agoMFhead r226338:
glebius [Thu, 20 Oct 2011 15:53:26 +0000 (15:53 +0000)]
MFhead r226338:

  Restore functions in6_ifaddloop() and in6_ifremloop() that were
  inlined by Qing Li in his big new-ARP commit. I am going to utilize
  them in my newcarp work, and also these functions left declared
  in in6_var.h for all the time they were absent.

  Reviewed by:  bz

Approved by: re (kib)

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

12 years agoMFC r226410:
nwhitehorn [Thu, 20 Oct 2011 15:34:17 +0000 (15:34 +0000)]
MFC r226410:
Enforce a memory barrier in stream operations, as is done on other
bus_space calls. This makes ath(4) work correctly on PowerPC.

Submitted by: adrian
Tested by: andreast
Approved by: re (kib)

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

12 years agoMFC r226474:
hselasky [Thu, 20 Oct 2011 14:45:16 +0000 (14:45 +0000)]
MFC r226474:
Make the usbdump utility work again by using the correct BPF structures.

Approved by: re (kib)

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

12 years agoRemove the last of the debugging support (INVARIANT*) from the ia64
kensmith [Wed, 19 Oct 2011 23:02:57 +0000 (23:02 +0000)]
Remove the last of the debugging support (INVARIANT*) from the ia64
GENERIC config file, the ia64 kernel runs OK without it.

Reviewed by: marcel
Approved by: re (implicit)

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

12 years agoMFC r226507:
kensmith [Tue, 18 Oct 2011 13:48:31 +0000 (13:48 +0000)]
MFC r226507:
> Escape the newline so we get a proper line continuation.  Without this
> the text of the menu selections doesn't get displayed properly and it
> makes the installer appear to lock up for no obvious reason.
>
> Reviewed by: nwhitehorn

Insta-MFC being done because 9.0-RC1 builds are being held for this.

Approved by:    re (kib, bz)

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

12 years agoMFC 226453
qingli [Mon, 17 Oct 2011 03:35:24 +0000 (03:35 +0000)]
MFC 226453

The code change made in r226040 was incomplete and resulted in
routes such as fe80::1%lo0 no being installed. This patch completes
the original intended fix.

Reviewed by: hrs. bz
Approved by: re (ken)

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

12 years agoReady for RC1.
kensmith [Sun, 16 Oct 2011 15:55:23 +0000 (15:55 +0000)]
Ready for RC1.

Approved by: re (implicit)

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

12 years agoMFC r226311:
dim [Sat, 15 Oct 2011 23:13:24 +0000 (23:13 +0000)]
MFC r226311:

Add link from clang to clang-cpp, so you can use CPP=clang-cpp in
Makefiles.  Also add a manpage symlink for it.

Approved by: re (kib)

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

12 years agoMFC r226310:
dim [Sat, 15 Oct 2011 23:09:21 +0000 (23:09 +0000)]
MFC r226310:

Add manpage symlink for clang++(1).

PR: docs/149051
Approved by: re (kib)

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

12 years agoMerge r226301 from head to stable/9:
rwatson [Sat, 15 Oct 2011 22:27:59 +0000 (22:27 +0000)]
Merge r226301 from head to stable/9:

  Correct a bug in export of capability-related information from the sysctls
  supporting procstat -f: properly provide capability rights information to
  userspace.  The bug resulted from a merge-o during upstreaming (or rather,
  a failure to properly merge FreeBSD-side changed downstream).

  Spotted by:     des, kibab

Approved by: re (kib)

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

12 years agoRemove extra debuggin gsupport that is turned on for head but turned off
kensmith [Sat, 15 Oct 2011 21:23:04 +0000 (21:23 +0000)]
Remove extra debuggin gsupport that is turned on for head but turned off
for stable branches:

- shift to MALLOC_PRODUCTION
- turn off automatic crash dumps
- remove kernel debuggers, INVARIANT*[1], WITNESS* from GENERIC
  kernel config files

[1] INVARIANT* left on for ia64 at least temporarily, marcel@ will test
    to see if they are still required as they had been for stable/8.

Approved by: re (implicit)

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

12 years agoMFC: r226149
brueffer [Sat, 15 Oct 2011 12:35:58 +0000 (12:35 +0000)]
MFC: r226149

Fix an infinite loop in siba_bwn_suspend().

Approved by: re (kib)

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

12 years agoMFC: r226146
brueffer [Sat, 15 Oct 2011 12:33:24 +0000 (12:33 +0000)]
MFC: r226146

Remove dead code, "error" doesn't change between this check and the
previous one.

Approved by: re (kib)

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

12 years agoMFC: r226117
brueffer [Sat, 15 Oct 2011 12:10:34 +0000 (12:10 +0000)]
MFC: r226117

Add missing va_end() in an error case to clean up after va_start()
(already done in the non-error case).

Approved by: re (kib)

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

12 years agoMFC: r226116
brueffer [Sat, 15 Oct 2011 12:08:21 +0000 (12:08 +0000)]
MFC: r226116

Add missing va_end() to clean up after va_start().

Approved by: re (kib)

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