MFC 232360:
Add pci_save_state() and pci_restore_state() wrappers around
pci_cfg_save() and pci_cfg_restore() for device drivers to use when
saving and restoring state (e.g. to handle device-specific resets).


git-svn-id: svn://svn.freebsd.org/base/stable/9@233379 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC 232367:
Properly handle failures in igb_setup_msix() by returning 0 if MSI or MSI-X
allocation fails.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233383 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC 232401:
Similar to the fixes in 226967 and 226987, purge any name cache entries
associated with the previous vnode (if any) associated with the target of
a rename().  Otherwise, a lookup of the target pathname concurrent with a
rename() could re-add a name cache entry after the namei(RENAME) lookup
in kern_renameat() had purged the target pathname.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233385 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC 232403,232667:
- Add a bus_dma tag to each PCI bus that is a child of a Host-PCI bridge.
  The tag enforces a single restriction that all DMA transactions must not
  cross a 4GB boundary.  Note that while this restriction technically only
  applies to PCI-express, this change applies it to all PCI devices as it
  is simpler to implement that way and errs on the side of caution.
- Add a softc structure for PCI bus devices to hold the bus_dma tag and
  a new pci_attach_common() routine that performs actions common to the
  attach phase of all PCI bus drivers.  Right now this only consists of
  a bootverbose printf and the allocate of a bus_dma tag if necessary.
- Adjust all PCI bus drivers to allocate a PCI bus softc and to call
  pci_attach_common() from their attach routines.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233393 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC 232362,232363,232463,232553,232569,232571:
- Sort function prototypes.
- Update the documentation on pci_get/set_powerstate().  These methods are
  not ACPI-specific at all, but deal with PCI power states.  Also,
  pci_set_powerstate() fails with EOPNOTSUPP if a request is made that the
  underlying device does not support rather than falling back to somehow
  setting D0.
- Document the following routines: pci_alloc_msi(), pci_alloc_msix(),
  pci_find_cap(), pci_get_max_read_req(), pci_get_vpd_ident(),
  pci_get_vpd_readonly(), pci_msi_count(), pci_msix_count(),
  pci_pending_msix(), pci_release_msi(),  pci_remap_msix(), and
  pci_set_max_read_req().
- Group the functions into five sub-sections: raw configuration access,
  locating devices, device information, device configuration, and
  message signaled interrupts.
- Discourage use of pci_disable_io() and pci_enable_io() in device drivers.
  The PCI bus driver handles this automatically as resources are activated.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233395 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC 232470:
Use pci_find_cap() instead of pci_find_extcap() to locate PCI
find capabilities as the latter API is deprecated for this purpose.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233398 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r230155:
	Make man page wording more clear

PR:		docs/164078
Approved by:	cperciva (implicit)


git-svn-id: svn://svn.freebsd.org/base/stable/9@233399 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r232834:
In ffs_syncvnode(), pass boolean false as second argument of ffs_update().
Synchronous inode block update is not needed for MNT_LAZY callers (syncer),
and since waitfor values are not zero, code did unneccessary synchronous
update.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233439 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r232836:
Do schedule delayed writes for async mounts.
While there, make some style adjustments, like missed () around
return values.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233440 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC of 226976, tzdata2011n

- Fiji will end DST on 22 January 2012.
- Moldova split into two timezones has been cancelled.
- Cuba will end DST on 13 November 2011


git-svn-id: svn://svn.freebsd.org/base/stable/9@233446 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC of r233445, tzdata2012a

- Updates to various locations in Antarctica.
- Armenia will abolish DST this year.
- Not only Samoa has moved to UTC+14, also Fakaofo did.
- There will be a leap second in 30 June 2012.
- Historical updates of 1918 to Canada, Winn, Regina, Edm, Vanc, Creston.
- Chili stays on DST until 28 April 2012
- The Falkland islands will stay on DST this year.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233447 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r233283:
Load the firmware during init not attach, as a root filesystem might
not yet be available. While here, also print the firmware version.

Submitted by:	PseudoCylon


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

Add snd_hdspe(4) to the hardware notes.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233464 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC: r232754 (remaining part)

Make boot2 build with Clang again.

Submitted by:	dim (bsd.sys.mk)
Reviewed by:	dim, jhb


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

Declare some variables static in order to reduce the object size and
redo r232822 (MFC'ed to stable/9 in r232962) in a less hackish way.
The latter now no longer breaks compiling the x86 boot2 with clang.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233468 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC: r232482
Add support for PWM controlled fans. I found these fans on my PowerMac9,1.
These fans are not located under the same node as the the RPM controlled ones,
So I had to adapt the current source to parse and fill the properties correctly.
To control the fans we can set the PWM ratio via sysctl between 20 and 100%.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233471 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC: r233188
Provide a fix for certain PowerMacs where the U3 i2c lacks the interrupt
info.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233472 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r233130: fts(3): Document cases where FTS_NOCHDIR is set implicitly.

PR:		docs/166091
Submitted by:	Matthew Story


git-svn-id: svn://svn.freebsd.org/base/stable/9@233474 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r233132: fts(3): Mention that FTS_NOCHDIR imposes {PATH_MAX} limits on
the returned pathnames.

With the current API (no *at functions), FTS_NOCHDIR requires that the
fts_accpath start with the original path passed to fts_open(); therefore,
the depth that can be reached is limited by the {PATH_MAX} constraint on
this pathname.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233475 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r233138:
	 draft-ietf-ipv6-scoping-arch-02.txt is now RFC 4007

PR:		phk
Approved by:	cperciva (implicit)


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