]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
12 years agoMFC r227497, r228020:
mm [Thu, 5 Jan 2012 08:53:54 +0000 (08:53 +0000)]
MFC r227497, r228020:

MFC r227497 [1]:
Import upstream changesets for the output of the "zpool" command:

952 separate intent logs should be obvious in 'zpool iostat' output
1337 `zpool status -D' should tell if there are no DDT entries

References:
https://www.illumos.org/issues/952
https://www.illumos.org/issues/1337

MFC r228020:
Fix zfs(8) and zpool(8) context help to repport supported flags.

Obtained from: Illumos (issues 952, 1337; changesets 13384, 13432) [1]

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

12 years agoReparent mergeinfo introduced in r229461 on lib/msun/man and lib/libc/gen to more...
eadler [Thu, 5 Jan 2012 04:36:57 +0000 (04:36 +0000)]
Reparent mergeinfo introduced in r229461 on lib/msun/man and lib/libc/gen to more appropriate directories.

This is an intentional direct commit to the stable/9 branch.

Approved by: lstewart

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

12 years agoMFC: r228756
pfg [Thu, 5 Jan 2012 02:36:37 +0000 (02:36 +0000)]
MFC: r228756

Clean an inconsistency with -ffinite-math-only.
Backported from the gcc-4_3-branch, revision (118001)
under the GPLv2.
This issue was also fixed in Apple's gcc.

PR: 157025
Reviewed by: mm
Approved by: jhb (mentor)

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

12 years agoMFC: r228780
pfg [Thu, 5 Jan 2012 01:48:25 +0000 (01:48 +0000)]
MFC: r228780

Update libstdc++ with small changes up to the latest rev. (135556)
from the gcc 4.2 branch.
The libraries in the gcc-4_2-branch remained under the LGPLv2.

Reviewed by: mm
Approved by: jhb (mentor)

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

12 years agoMFC: r228740
pfg [Thu, 5 Jan 2012 01:40:42 +0000 (01:40 +0000)]
MFC: r228740

Many style fixes.
Remove C99 initializers: they don't help in this case.
Set errno to 0 before strtoll() (from NetBSD).

PR: 151850
Suggested by: bde
Approved by: jhb (Mentor)

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

12 years agoMFC: r228507, r228539, r228583
pfg [Thu, 5 Jan 2012 01:35:01 +0000 (01:35 +0000)]
MFC: r228507, r228539, r228583

Merge ext2_readwrite.c into ext2_vnops.c as done in UFS.
Bring in reallocblk to ext2fs: new feature implemented by Zheng Liu as
GSoC 2010.
Many style fixes by jh@.

PR: 159232, 159233 and 162564
Approved by: jhb (mentor)

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

12 years agoMFC: r227743
rmacklem [Thu, 5 Jan 2012 01:25:47 +0000 (01:25 +0000)]
MFC: r227743
Post r223774 the NFSv4 client never uses the linked list with the
head nfsc_defunctlockowner. This patch simply removes the code that
loops through this always empty list, since the code no longer does
anything useful. It should not have any effect on the client's
behaviour.

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

12 years agoMFC r227842:
yongari [Thu, 5 Jan 2012 00:08:16 +0000 (00:08 +0000)]
MFC r227842:
  For IP1001 PHY, do not set multi-port device(MASTER).  Ideally this
  bit should not affect link establishment process of auto-negotiation
  if manual configuration is not used, which is true in auto-negotiation.
  However it seems setting this bit interfere with IP1001 PHY's
  down-shifting feature such that establishing a 10/100Mbps link failed
  when 1000baseT link is not available during auto-negotiation process.

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

12 years agoMFC r227828,227835,227837:
yongari [Wed, 4 Jan 2012 23:58:54 +0000 (23:58 +0000)]
MFC r227828,227835,227837:
r227828:
  Always start MII auto polling before accessing any MII registers.

r227835:
  Rework link establishment and link state detection logic.
   - Remove MIIBUS statchg callback and program VGE_DIAGCTL before
     initiating link establishment.  Previously driver used to
     program VGE_DIAGCTL after getting a link in statchg callback.
     It seems the VGE_DIAGCTL register works like a kind of MII
     register such that it requires setting a 'to be' mode in advance
     rather than relying on resolved speed/duplex of established link.
     This means the statchg callback is not needed in driver.  In
     addition, if there was no link at the time of media change, this
     was not called at all.
   - Introduce vge_ifmedia_upd_locked() to change current media to
     configured one.  Actual media change is performed only after PHY
     reset and VGE_DIAGCTL setup.
   - In WOL configuration, make sure to clear forced mode such that
     controller can rely on auto-negotiation.
   - Unlike most other drivers that use miibus(4), vge(4) used
     controller's auto-polling feature for link state tracking via
     interrupt.  This came from controller's inefficient mechanism to
     access MII registers.  On link state change interrupt, vge(4)
     used to get current link state with series of MII register
     accesses.  Because vge(4) already enabled auto polling, read PHY
     status register to resolved speed/duplex/flow control parameters.

  vge(4) still does not drive MII_TICK to reduce number of MII
  register accesses which in turn means the driver does not know the
  status of auto-negotiation.  This was a one of long standing
  issue of vge(4).  Probably driver may be able to implement a timer
  that keeps track of auto-negotiation state and restart
  auto-negotiation when driver couldn't establish a link within a
  specified period.  However the controller does not provide a
  reliable way to detect auto-negotiation failure so I'm not sure
  whether it's worth to implement it in driver.

  Alternatively driver can completely disable MII auto-polling and
  let miibus(4) poll link state by driving MII_TICK.  This may reduce
  unnecessary overhead of stopping/restarting MII auto-polling of
  controller.  Unfortunately it was known that some variants of
  controller does not work correctly if MII auto-polling is disabled.

r227837:
  Announce flow control capability to underlying PHY driver.
  Pause timer value is initialized to 0xFFFF. Controller allows just
  4 different TX pause thresholds. The lowest possible threshold
  value looks too aggressive so use next available threshold value.

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

12 years agoMFC r227850-227851,227854,227914,227916:
yongari [Wed, 4 Jan 2012 23:29:57 +0000 (23:29 +0000)]
MFC r227850-227851,227854,227914,227916:
r227850:
  Writing access to RL_CFG5 register also requires EEPROM write
  access.
  While I'm here, enable WOL through magic packet but disable waking
  up system via unicast, multicast and broadcast frames.  Otherwise,
  multicast or unicast frame(e.g. ICMP echo request) can wake up
  system which is not probably wanted behavior on most environments.
  This was not known as problem because RL_CFG5 register access had
  not effect until this change.
  The capability to wake up system with unicast/multicast frames
  are still set in driver, default off, so users who need that
  feature can still activate it with ifconfig(8).

r227851:
  Perform media change after setting IFF_DRV_RUNNING flag. Without it,
  driver would ignore the first link state update if controller
  already established a link such that it would have to take
  additional link state handling in re_tick().

r227854:
  Disable accepting frames in re_stop() to put RX MAC into idle state.
  Because there is no reliable way to know whether RX MAC is in
  stopped state, rejecting all frames would be the only way to
  minimize possible races.
  Otherwise it's possible to receive frames while stop command
  execution is in progress and controller can DMA the frame to freed
  RX buffer during that period.
  This was observed on recent PCIe controllers(i.e. RTL8111F).

  While this change may not be required on old controllers it
  wouldn't make negative effects on old controllers.  One side effect
  of this change is disabling receive so driver reprograms RL_RXCFG
  to receive WOL frames when it is put into suspend or shutdown.

  This should address occasional 'memory modified free' errors seen
  on recent RealTek controllers.

r227914:
  Make sure to stop TX MAC before freeing queued TX frames.
  For RTL8111DP, check if the TX MAC is active by reading RL_GTXSTART
  register.  For RTL8402/8168E-VL/8168F/8411, wait until TX queue is
  empty.

r227916:
  To save more power, switch to 10/100Mbps link when controller is
  put into suspend/shutdown.  Old PCI controllers performed that
  operation in firmware but for RTL8111C or newer controllers, it's
  responsibility of driver.  It's not clear whether the firmware of
  RTL8111B still downgrades its speed to 10/100Mbps so leave it as it
  was.

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

12 years agoMFC r227587,227590-227591,227593,227638-227639:
yongari [Wed, 4 Jan 2012 22:53:18 +0000 (22:53 +0000)]
MFC r227587,227590-227591,227593,227638-227639:
r227587:
  Add preliminary support for RTL8402 PCIe FastEthernet with
  integrated card reader.

r227590:
  Add preliminary support for RTL8411 PCIe Gigabit ethernet with
  integrated card reader.

r227591:
  Add missing driver lock in SIOCSIFCAP handler.

r227593:
  Disable PCIe ASPM (Active State Power Management) for all
  controllers.
  More and more RealTek controllers started to implement EEE feature.
  Vendor driver seems to load a kind of firmware for EEE with
  additional PHY fixups.  It is known that the EEE feature may need
  ASPM support.  Unfortunately there is no documentation for EEE of
  the controller so enabling ASPM may cause more problems.

r227638:
  Add preliminary support for second generation RTL8105E PCIe
  FastEthernet.

r227639:
  Add preliminary support for RTL8168/8111F PCIe Gigabit ethernet.

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

12 years agoMFC: r228898
brueffer [Wed, 4 Jan 2012 21:56:47 +0000 (21:56 +0000)]
MFC: r228898

Add missing -l flag to usage().

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

12 years agoMFC r227582:
yongari [Wed, 4 Jan 2012 21:50:59 +0000 (21:50 +0000)]
MFC r227582:
  Enable 64bit DMA addressing support for all msk(4) controllers.
  Unnecessarily complex LE format used on Marvell controller was
  main reason not to enable 64bit DMA addressing in driver.  If high
  32bit address of DMA address of TX/RX buffer is changed, driver has
  to generate a new LE.  In TX path, driver will keep track of lastly
  used high 32bit address of DMA address and generate a new LE
  whenever it sees high address change in the DMA address. In RX path,
  driver will always use two LEs to specify 64bit DMA address of RX
  buffer.  If the high 32bit address of DMA address of RX buffer is
  the same as previous DMA address of RX buffer, driver does not have
  to use two LEs but driver will use two LEs for simplicity in RX
  ring management.

  One of draw back for switching to 64bit DMA addressing is that the
  large amount of LEs are used to specify 64bit DMA address such that
  number of available LEs for TX/RX buffers are considerably reduced.
  To mitigate the issue, increase number of available LEs from 256 to
  384 for TX and from 256 to 512 for RX. For 32bit architectures,
  msk(4) does not use 64bit DMA addressing to save resources.

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

12 years agoMFC r227452:
yongari [Wed, 4 Jan 2012 21:25:11 +0000 (21:25 +0000)]
MFC r227452:
  To send a frame, controller requires a prepended TX header and
  the length of frame should be treated as multiple of 4. Actual
  frame length is set in the TX header. The TX header position
  should be aligned on 4 byte boundary and actual frame start
  position should be aligned on 4 byte boundary as well. This means
  we need 4(TX header length) + 3(frame length fixup) additional free
  space in TX buffer in addition to actual frame length.
  Make sure TX handler check these additional bytes.
  ae_tx_avail_size() returns actual free space in TX buffer to ease
  the calculation of available TX buffer space in caller. While I'm
  here, replace magic number to appropriate sizeof operator to
  enhance readability.

  This change should fix controller lockup issue happened under
  certain conditions but it still does not fix watchdog timeout. It
  seems the watchdog timeout is side-effect of TxS and TxD
  mismatches. The root cause of TxD/TxD mismatch is not known yet but
  it looks like silicon bug. I guess driver may have to reinitialize
  controller whenever it sees TxS and TxD mismatches but leave it as
  it was at this moment.

  PR: kern/145918

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

12 years agoMFC r229183:
dim [Wed, 4 Jan 2012 20:14:07 +0000 (20:14 +0000)]
MFC r229183:

In several llvm library Makefiles, remove extraneous slashes at the end
of SRCDIR definitions.

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

12 years agoRegen.
jhb [Wed, 4 Jan 2012 19:43:53 +0000 (19:43 +0000)]
Regen.

Reminded by: kib

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

12 years agoThe list of packages we will put on the 9.0-RELEASE DVD images was
kensmith [Wed, 4 Jan 2012 19:38:35 +0000 (19:38 +0000)]
The list of packages we will put on the 9.0-RELEASE DVD images was
worked out a bit late so this won't make it into releng/9.0 or
release/9.0.0 but it's worth committing to stable/9 for reference
when 9.1-RELEASE rolls around.

The new installer doesn't handle installing packages itself like sysinstall
had done so in that respect packages are no longer as closely tied to
doing an install.  We'll provide a "disc1" image that has no packages on
it at all.  For the "dvd1" image there will be a /packages directory with
the set of pre-built packages generated by this script (and all the
dependencies of these packages...).  The idea is to provide enough
packages on the DVD for a user to get a minimal graphical workstation
installed without needing to do a network based install if their network
link is so-so...

Discussed with: portmgr, re

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

12 years agoMFC r225773, r225781, r225782, r225783, r225784, 225785, r225786, r225787,
trociny [Wed, 4 Jan 2012 17:22:10 +0000 (17:22 +0000)]
MFC r225773, r225781, r225782, r225783, r225784, 225785, r225786, r225787,
  r225830, r225831, r225832, r225835, r226461, r226462, r226463, r226842,
  r226851, r226852, r226854, r226855, r226856, r226857, r226859, r226861,
  r228542, r228542, r228543, r228544, r228695, r228696:

r225773 (pjd):

Ensure that pjdlog functions don't modify errno.

r225781 (pjd):

No need to use KEEP_ERRNO() macro around pjdlog functions, as they don't
modify errno.

r225782 (pjd):

Prefer PJDLOG_ASSERT() and PJDLOG_ABORT() over assert() and abort().
pjdlog versions will log problem to syslog when application is running in
background.

r225783 (pjd):

Correct two mistakes when converting asserts to PJDLOG_ASSERT()/PJDLOG_ABORT().

r225784 (pjd):

- Convert some impossible conditions into assertions.
- Add missing 'if' in comment.

r225785 (pjd):

Prefer PJDLOG_ASSERT()/PJDLOG_ABORT() over assert().

r225786 (pjd):

No need to wrap pjdlog functions around with KEEP_ERRNO() macro.

r225787 (pjd):

Use PJDLOG_ASSERT() and PJDLOG_ABORT() everywhere instead of assert().

r225830 (pjd):

After every activemap change flush disk's write cache, so that write
reordering won't make the actual write to be committed before marking
the coresponding extent as dirty.

It can be disabled in configuration file.

If BIO_FLUSH is not supported by the underlying file system we log a warning
and never send BIO_FLUSH again to that GEOM provider.

r225831 (pjd):

Break a bit earlier.

r225832 (pjd):

If the underlying provider doesn't support BIO_FLUSH, log it only once
and don't bother trying in the future.

r225835 (pjd):

Correct typo.

r226461 (pjd):

When path to the configuration file is relative, obtain full path,
so we can always find the file, even after daemonizing and changing
working directory to /.

r226462 (pjd):

Remove redundant space.

r226463 (pjd):

Allow to specify pidfile in HAST configuration file.

r226842 (pjd):

Correct comments.

r226851 (pjd):

Delay resuid generation until first connection to secondary, not until first
write. This way on first connection we will synchronize only the extents that
were modified during the lifetime of primary node, not entire GEOM provider.

r226852 (pjd):

Minor cleanups.

r226854 (pjd):

- Eliminate the need for hio_nv.
- Introduce hio_clear() function for clearing hio before returning it
  onto free queue.

r226855 (pjd):

Improve comment so it doesn't suggest race is possible, but that we handle
the race.

r226856 (pjd):

Reduce indentation.

r226857 (pjd):

Minor cleanups.

r226859 (pjd):

Implement 'async' mode for HAST.

r226861 (pjd):

Remove redundant space.

r228542 (pjd):

Remove redundant setting of the error variable.

Found by:       Clang Static Analyzer

r228543 (pjd):

Simplify code by changing functions types from int to avoid, as the functions
always return 0.

Found by:       Clang Static Analyzer

r228544 (pjd):

Remove redundant assignment.

Found by:       Clang Static Analyzer

r228695 (pjd):

Don't use function name as format string.

Detected by:    clang

r228696 (pjd):

Use lex's standard way of not generating unused function.

Inspired by:    r228555

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

12 years agoMFC 227069:
jhb [Wed, 4 Jan 2012 16:50:12 +0000 (16:50 +0000)]
MFC 227069:
Move the cleanup of f_cdevpriv when the reference count of a devfs
file descriptor drops to zero out of _fdrop() and into devfs_close_f()
as it is only relevant for devfs file descriptors.

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

12 years agoMFC r228435:
kib [Wed, 4 Jan 2012 16:43:29 +0000 (16:43 +0000)]
MFC r228435:
Add support for STT_GNU_IFUNC and R_MACHINE_IRELATIVE GNU extensions to
rtld on 386 and amd64.

MFC r228503:
Postpone the resolution for irelative/ifunc right before initializers
are called, and drop bind lock around calls to dispatcher.  Use
initlist to iterate over the objects instead of the ->next, due to
drop of the bind lock in iteration.

For i386/reloc.c:reloc_iresolve(), fix calculation of the dispatch
function address for dso, by taking into account possible non-zero
relocbase.

MFC r228635 (by nwhitehorn):
Fix RTLD on PowerPC after r228435. Changing the order of init_pltgot()
caused the icache to be invalidated at the wrong time, resulting in
an icache full of nonsense in the PLT section.

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

12 years agoMFC 226746:
jhb [Wed, 4 Jan 2012 16:39:39 +0000 (16:39 +0000)]
MFC 226746:
Consolidate duplicate definitions of V86_CY() and V86_ZR() which check for
the carry and zero flags being set, respectively, in <btxv86.h> and use
them throughout the x86 boot code.

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

12 years agoMFC 226364:
jhb [Wed, 4 Jan 2012 16:29:45 +0000 (16:29 +0000)]
MFC 226364:
Use PAIR32TO64() for the offset and length parameters to
freebsd32_posix_fallocate() to properly handle big-endian platforms.

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

12 years agoMFC 226039:
jhb [Wed, 4 Jan 2012 16:26:45 +0000 (16:26 +0000)]
MFC 226039:
Ignore SRAT memory entries if the memory range does not overlap with an
existing phys_avail[] entry.  If a hw.physmem setting causes a memory
domain to not be present in phys_avail[], the SRAT table will now be
ignored rather than triggering a panic when a CPU in the missing domain
tries to allocate a page.

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

12 years agoMFC r228916:
pluknet [Wed, 4 Jan 2012 15:58:35 +0000 (15:58 +0000)]
MFC r228916:
 Clean up from the 4.x era.

 In an example of boot command:
 - rename wd(4) IDE disk drives name to ad(4) for the time being.
 - update the used kernel path "/kernel" to the current default.

 Bump .Dd for this and previous changes.

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

12 years agoMFC r227792:
pluknet [Wed, 4 Jan 2012 14:47:32 +0000 (14:47 +0000)]
MFC r227792:

 Add history for setsockopt(2).

PR: docs/162719
Submitted by: Niclas Zeising <niclas at zeising gmail>

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

12 years agoMFC r227447:
pluknet [Wed, 4 Jan 2012 14:33:54 +0000 (14:33 +0000)]
MFC r227447:

 struct timespec32: change types of tv_sec and tv_nsec fields to signed
 to match native struct timespec ABI on __LP32__.

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

12 years agoMFC r226882:
pluknet [Wed, 4 Jan 2012 14:18:47 +0000 (14:18 +0000)]
MFC r226882:
 Fix arguments list for proc:::signal-discard DTrace probe.

Reported by: Anton Yuzhaninov <citrin citrin ru>

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

12 years agoMFC r227055:
pluknet [Wed, 4 Jan 2012 14:02:00 +0000 (14:02 +0000)]
MFC r227055:
 Remove a couple of write-only variables.

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

12 years agoRevert MFC r226833,227056.
pluknet [Wed, 4 Jan 2012 13:49:46 +0000 (13:49 +0000)]
Revert MFC r226833,227056.
/stand exists in the MFS root used during a sysinstall-based install.

Reported by: jhb
Pointy hat to: pluknet

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

12 years agoMFC: r227527
pho [Wed, 4 Jan 2012 12:54:35 +0000 (12:54 +0000)]
MFC: r227527

Removed extra PRELE() call.

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

12 years agoMFC r226833,r227056:
pluknet [Wed, 4 Jan 2012 12:39:52 +0000 (12:39 +0000)]
MFC r226833,r227056:

Remove the long reprecated ``/stand/sysinstall'' from the init_path.

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

12 years agoMFC r228436:
fabient [Wed, 4 Jan 2012 08:14:05 +0000 (08:14 +0000)]
MFC r228436:
Add VIA microde update support to cpuctl(4) and cpucontrol(8).

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

12 years agoMFC r227458, r226436:
eadler [Wed, 4 Jan 2012 03:37:41 +0000 (03:37 +0000)]
MFC r227458, r226436:

- change "is is" to "is" or "it is"
- change "the the" to "the"
- other typo fixes

Approved by: lstewart

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

12 years agoMFC r226482
eadler [Wed, 4 Jan 2012 02:02:58 +0000 (02:02 +0000)]
MFC r226482
- remove device keyword from makefs manpage

Approved by: gjb

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

12 years agoMFC r227675:
yongari [Wed, 4 Jan 2012 01:38:52 +0000 (01:38 +0000)]
MFC r227675:
  Partially revert r218788. r218788 removed calling dc_setcfg() for
  !DC_IS_ADMTEK in dc_miibus_statchg(). This change broke link
  establishment of Intel 21143 with dcphy(4) where it stuck in
  "ability detect" state without completing auto-negotiation.
  Also nuke dc_if_media as it's not actually used.

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

12 years agoMFC r227349,227513-227514:
yongari [Wed, 4 Jan 2012 00:03:33 +0000 (00:03 +0000)]
MFC r227349,227513-227514:
r227349:
  Document TI_SF_BUF_JUMBO and Xr altq.

r227513:
  Document newly introduced a loader tunable and sysctl variables.

r227514:
  Clarify hw.ti.%d.dac tunable.

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

12 years agoMFC r227348:
yongari [Tue, 3 Jan 2012 23:57:27 +0000 (23:57 +0000)]
MFC r227348:
  ti(4) supports altq(4).

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

12 years agoMFC r227512:
yongari [Tue, 3 Jan 2012 23:44:05 +0000 (23:44 +0000)]
MFC r227512:
  Overhaul bus_dma(9) usage in driver:
   - Don't use a single big DMA block for all rings. Create separate
     DMA area for each ring instead.  Currently the following DMA
     areas are created:
        Event ring, standard RX ring, jumbo RX ring, RX return ring,
        hardware MAC statistics and producer/consumer status area.
     For Tigon II, mini RX ring and TX ring are additionally created.
   - Added missing bus_dmamap_sync(9) in various TX/RX paths.
   - TX ring is no longer created for Tigon 1 such that it saves more
     resources on Tigon 1.
   - Data sheet is not clear about alignment requirement of each ring
     so use 32 bytes alignment for normal DMA area but use 64 bytes
     alignment for jumbo RX ring where the extended RX descriptor
     size is 64 bytes.
   - For each TX/RX buffers use separate DMA tag(e.g. the size of a
     DMA segment, total size of DMA segments etc).
   - Tigon allows separate DMA area for event producer, RX return
     producer and TX consumer which is really cool feature.  This
     means TX and RX path could be independently run in parallel.
     However ti(4) uses a single driver lock so it's meaningless
     to have separate DMA area for these producer/consumer such that
     this change creates a single status DMA area.
   - It seems Tigon has no limits on DMA address space and I also
     don't see any problem with that but old comments in driver
     indicates there could be issues on descriptors being located in
     64bit region.  Introduce a tunable, dev.ti.%d.dac, to disable
     using 64bit DMA in driver. The default is 0 which means it would
     use full 64bit DMA.  If there are DMA issues, users can disable
     it by setting the tunable to 0.
   - Do not increase watchdog timer in ti_txeof(). Previously driver
     increased the watchdog timer whenever there are queued TX frames.
   - When stat ticks is set to 0, skip processing ti_stats_update(),
     avoiding bus_dmamap_sync(9) and updating if_collisions counter.
   - MTU does not include FCS bytes, replace it with
     ETHER_VLAN_ENCAP_LEN.

  With these changes, ti(4) should work on PAE environments.
  Many thanks to Jay Borkenhagen for remote hardware access.

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

12 years agoMFC r227431-227432,227505,227509:
yongari [Tue, 3 Jan 2012 23:36:29 +0000 (23:36 +0000)]
MFC r227431-227432,227505,227509:
r227431:
  style.
  No functional changes.

r227432:
  Remove dead ifdef.  Driver should always check raised interrupt is
  for the device.

r227505:
  It's bad idea to allocate large memory, 4KB, from stack.
  Pre-allocate the memory in device attach time. While I'm here
  remove unnecessary reassignment of error variable as it was already
  initialized. Also added a missing driver lock in TIIOCSETTRACE
  handler.

r227509:
  Export sysctl node for various interrupt moderation parameters and
  have administrators control them.  ti(4) provides a character
  device to control various other features of driver via ioctls but
  users had to write their own code to manipulate these parameters.
  It seems some default values for these parameters are not optimal
  on today's system but leave it as it was and let administrators
  change them.  The following parameters could be changed:

  dev.ti.%d.rx_coal_ticks
  dev.ti.%d.rx_max_coal_bds
  dev.ti.%d.tx_coal_ticks
  dev.ti.%d.tx_max_coal_bds
  dev.ti.%d.tx_buf_ratio
  dev.ti.%d.stat_ticks

  The interface has to be brought down and up again before a change
  takes effect.

  ti(4) controller supports hardware MAC counters with additional
  DMA statistics.  So it's doable to export these counters via
  sysctl interface.  Unfortunately, these counters are cumulative
  such that driver have to either send an explicit clear command to
  controller after extracting them or have to maintain internal
  counters to get actual changes.  Neither look good to me so
  counters were not exported via sysctl.

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

12 years agoMFC r227347,227367:
yongari [Tue, 3 Jan 2012 21:16:00 +0000 (21:16 +0000)]
MFC r227347,227367:
r227347:
  Retire 'options TI_PRIVATE_JUMBOS' and replace local jumbo
  allocator with UMA backed jumbo allocator by default. Previously
  ti(4) used sf_buf(9) interface for jumbo buffers but it was broken
  at this moment such that enabling jumbo frame caused instant panic.
  Due to the nature of sf_buf(9) it heavily relies on VM changes but
  it seems ti(4) was not received much blessing from VM gurus.  I
  don't understand VM magic and implications used in driver either.
  Switching to UMA backed jumbo allocator like other network drivers
  will make jumbo frame work on ti(4).
  While I'm here, fully allocate all RX buffers. This means ti(4) now
  uses 512 RX buffer and 1024 mini RX buffers.

  To use sf_buf(9) interface for jumbo buffers, introduce a new
  'options TI_SF_BUF_JUMBO'. If it is proven that sf_buf(9) is better
  for jumbo buffers, interesting developers can fix the issue in
  future.

  ti(4) still needs more bus_dma(9) cleanups and should use separate
  DMA tag/map for each ring(standard, jumbo, mini, command, event
  etc) but it should work on all platforms except PAE.

  Special thanks to Jay[1] who provided complete remote debugging
  access.

r227367:
  Comment out TI_JUMBO_HDRSPLIT. TI_JUMBO_HDRSPLIT requires TI_SF_BUF_JUMBO.

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

12 years agoMFC r228411:
trociny [Tue, 3 Jan 2012 20:53:16 +0000 (20:53 +0000)]
MFC r228411:

Include sys/queue.h: snmpmod.h uses TAILQ.

PR: bin/153153

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

12 years agoMFC r227311-227312,227318-227319,227322-227324:
yongari [Tue, 3 Jan 2012 20:48:28 +0000 (20:48 +0000)]
MFC r227311-227312,227318-227319,227322-227324:
r227311:
  Remove ti_unit member variable in softc.
  While I'm here use PCIR_BAR macro.

r227312:
   o Remove unnecessary controller reinitialization.
   o Do not blindly UP controller when MTU is changed. Reinitialize
     controller only if driver is running.
   o Remove useless ti_stop() in ti_watchdog() since ti_init_locked()
     always invokes ti_stop().

r227318:
  Track which ring was updated in RX handler and update only modified
  ring. This should reduce unnecessary register accesses.

r227319:
  Mini ring is not available on Tigon 1 so do not create DMA maps for
  mini ring on Tigon 1 to save resources.

r227322:
  Show RX buffer allocation failure and do not blindly send alive
  message to firmware. Probably the correct way for this error is to
  send a TI_CMD_CODE_STACK_DOWN message to firmware and let firmware
  handle the rest.

r227323:
  If ti_chipinit() fails in ti_stop(), ignore the error and release
  all allocated TX/RX buffer resources. If the interface is brought
  to up again after the error, we will leak allocated TX/RX buffers.

r227324:
  Do not allow changing MTU to be less than the minimum.

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

12 years agoMFC r227091-227095,227098-227099:
yongari [Tue, 3 Jan 2012 20:24:56 +0000 (20:24 +0000)]
MFC r227091-227095,227098-227099:
r227091:
  Make sure to unload loaded DMA area(descriptor, command, event ring).

r227092:
  Announce IFCAP_LINKSTATE capability and let network stack know link
  state changes.  Hide superfluous link up/down message under
  bootverbose since if_link_state_change(9) shows that information.
  While I'm here, change baudrate with the resolved speed of the
  established link instead of blindly setting it 1G. Unfortunately,
  it seems there is no way to differentiate 10/100Mbps from
  non-gigabit link so just assume we established a 100Mbps link if
  current link is not a gigabit link.

r227093:
  Introduce ti_ifmedia_upd_locked() to use in driver initialization
  and add missing driver lock for both ti_ifmedia_upd() and
  ti_ifmedia_sts().

r227094:
  Don't clear upper 4bits from VLAN tag information.  It's
  responsibility of vlan(4) to extract VLAN id from the tag
  information and vlan(4) correctly handles it.

r227095:
  Don't abuse if_hwassist and make sure enabling corresponding TX/RX
  checksum offloading and VLAN hardware tag insertion/stripping from
  the currently enabled hardware offloading capabilities.
  Previously if_hwassist, which was initialized to TX/RX checksum
  offloading, was blindly used to enable both TX and RX checksum
  offloading such that disabling either TX or RX checksum offloading
  was not possible.

  ti(4) controllers support TX/RX checksum offloading with VLAN
  tagging so announce TX/RX checksum offloading capability over VLAN
  to vlan(4).

  Make VLAN hardware tag insertion/stripping honors currently enabled
  interface capability instead of blindly enabling VLAN hardware
  tagging. This change allows disabling hardware support of VLAN tag.

  Because ti(4) supports VLAN oversized frames, make network stack
  know the capability by setting if_hdrlen.

  While I'm here, rewrite SIOCSIFCAP handler and make sure to
  reinitialize controller whenever TX/RX checksum offloading and VLAN
  hardware tagging option is changed.  The requirement of controller
  reinitialization comes from the limitation of Tigon I/II firmware.
  Tigon I/II firmware requires all related RCBs should be
  reinitialized whenever any of its hardware offloading capabilities
  change.

  vlan(4) is also notified whenever the parent interface's capability
  changes such that it can correctly handle TX/RX checksum offloading
  based on parent interface's enabled offloading capabilities.

  RX checksum offloading handler was changed to make upper stack use
  controller computed partial checksum value.  Previously, ti(4) just
  set the computed value for any frames(IPv4, IPv6) and the value was
  not used in upper stack because driver didn't set CSUM_DATA_VALID
  such that upper network stack had to recompute checksum of TCP/UDP
  packets. I have no idea how this was not noticed for a long time.
  With this change, upper network stack does not have to fully
  recompute the checksum such that calculating pseudo checksum based
  on partial checksum is sufficient to know whether received packet's
  checksum is correct or not. However, I don't know why ti(4) does
  not have controller compute pseudo checksum as controller has
  ability to do it. I'm just guessing enabling that feature could
  trigger a firmware bug or could be slower than computing it on host
  side so just leave it as it was.

  In order not to produce false positives, ti(4) now checks whether
  controller actually computed IP or TCP/UDP checksum by checking
  ti_flags field.

r227098:
  Because ti(4) drops a driver lock in RX handler, check whether
  driver is still running before re-enabling interrupts.

r227099:
  Implement altq(4) support.
  While I'm here fix a logic error in r227098 where it didn't
  re-enable interrupts when TX queue is empty.

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

12 years agoMFC r227086-227089:
yongari [Tue, 3 Jan 2012 18:58:20 +0000 (18:58 +0000)]
MFC r227086-227089:
r227086:
  Use ANSI function definations.

r227087:
  No functional changes.

r227088:
  Make ti(4) build with 'options TI_PRIVATE_JUMBOS'.
  This was broken in r175872.

  We have a UMA backed jumbo allocator and that is much better
  implementation than having a local jumbo buffer allocator in
  driver. This local allocator would be removed in near future but
  fixing build before removal wouldn't be a bad idea.

r227089:
  s/u_intXX_t/uintXX_t/g

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

12 years agoMFC r228438:
fabient [Tue, 3 Jan 2012 17:15:27 +0000 (17:15 +0000)]
MFC r228438:
There's a small set of events on Nehalem, that are not supported in
processors with CPUID signature 06_1AH, 06_1EH, and 06_1FH.

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

12 years agoMFC r228198:
fabient [Tue, 3 Jan 2012 16:41:38 +0000 (16:41 +0000)]
MFC r228198:
Update Westmere uncore event exception list.

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

12 years agoMFC r226514,r226526,r226986:
fabient [Tue, 3 Jan 2012 16:35:00 +0000 (16:35 +0000)]
MFC r226514,r226526,r226986:
Add a flush of the current PMC log buffer before displaying the next top.

As the underlying block is 4KB if the PMC throughput is low the measurement
will be reported on the next tick. pmcstat(8) use the modified flush API to
reclaim current buffer before displaying next top.

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

12 years agoMFC: r227690
rmacklem [Tue, 3 Jan 2012 16:32:33 +0000 (16:32 +0000)]
MFC: r227690
The old NFS client will crash due to the reply being m_freem()'d
twice if the server bogusly returns an error with the NFSERR_RETERR
bit (bit 31) set. No actual NFS error has this bit set, but it seems
that amd will sometimes do this. This patch makes sure the NFSERR_RETERR
bit is cleared to avoid a crash.

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

12 years agoMFC r225839:
mav [Tue, 3 Jan 2012 12:47:55 +0000 (12:47 +0000)]
MFC r225839:
Import the rest of HID improvements from the branch:
 - improve report descriptor parser in libusbhid to handle several kinds of
reports same time;
 - add to the libusbhid API two functions wrapping respective kernel IOCTLs
for reading and writing reports;
 - tune uhid IOCTL interface to allow reading and writing arbitrary report,
when multiple supported by the device;
 - teach usbhidctl to set output and feature reports;
 - make usbhidaction support all the same item names as bhidctl.

Sponsored by: iXsystems, inc.

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

12 years agoMFC r227530:
kib [Tue, 3 Jan 2012 10:36:38 +0000 (10:36 +0000)]
MFC r227530:
Update the device pager interface.

Sponsored by: The FreeBSD Foundation

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

12 years agoMFC r227102:
kib [Tue, 3 Jan 2012 10:30:27 +0000 (10:30 +0000)]
MFC r227102:
Provide typedefs for the type of bit mask for the page bits.
Use the defined types instead of int when manipulating masks.
Supposedly, it could fix support for 32KB page size in the
machine-independend VM layer.

MFC r227103:
Remove redundand definitions. The chunk was missed from r227102.

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

12 years agoMFC r226471 (se):
delphij [Tue, 3 Jan 2012 10:22:09 +0000 (10:22 +0000)]
MFC r226471 (se):

Add missing default values for daily/800.scrub-zfs for documentation
purposes. No functional change, since all parameters are set to their
default values.

MFC r226865 (delphij):

Increase default scrub threshold from 30 days to 5 weeks.  Using
whole weeks makes it easier to predicate when the scrub would
happen.

Requested by: gjb

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

12 years agoMFC r228307:
kib [Tue, 3 Jan 2012 10:02:44 +0000 (10:02 +0000)]
MFC r228307:
Force linker error when created shared library contains a relocation
against text. Provide the override switch to turn off the strict
behaviour. Apparently, openssl libcrypto needs it due to assembler
code not being PIC.

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

12 years agoMFC r228261:
kib [Tue, 3 Jan 2012 09:51:34 +0000 (09:51 +0000)]
MFC r228261:
Use explicit information from the kernel to detect the traps due to
syscall entry and leave.

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

12 years agoMFC r225974:
kib [Tue, 3 Jan 2012 09:46:51 +0000 (09:46 +0000)]
MFC r225974:
Remove no longer valid statement about ARM.

MFC r226066:
Remove no longer needed BUGS section.

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

12 years agoMFC r226112:
kib [Tue, 3 Jan 2012 09:43:26 +0000 (09:43 +0000)]
MFC r226112:
Remove unused define.

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

12 years agoMFC r226065:
kib [Tue, 3 Jan 2012 09:42:08 +0000 (09:42 +0000)]
MFC r226065:
Convert MIPS to the syscallenter/syscallret system call sequence handlers.

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

12 years agoMFC rr225973:
kib [Tue, 3 Jan 2012 09:40:31 +0000 (09:40 +0000)]
MFC rr225973:
Convert ARM to the syscallenter/syscallret system call sequence handlers.

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

12 years agoMFC r229104:
kib [Tue, 3 Jan 2012 09:27:23 +0000 (09:27 +0000)]
MFC r229104:
Make the comment in i386/include/ucontext.h identical to the one in
amd64/include/ucontext.h. The later is better worded.

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

12 years agoMFC r229317:
hselasky [Tue, 3 Jan 2012 08:31:47 +0000 (08:31 +0000)]
MFC r229317:
Fix for USB suspend and resume.

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

12 years agoMFC r228795:
eadler [Tue, 3 Jan 2012 03:38:50 +0000 (03:38 +0000)]
MFC r228795:

- document the -l option to usermod

Approved by: gjb

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

12 years agoMFC r226871-226872:
yongari [Tue, 3 Jan 2012 00:56:05 +0000 (00:56 +0000)]
MFC r226871-226872:
r226871:
  Add initial BCM5720 support.
  Many thanks to Broadcom for continuing support of FreeBSD.

  Submitted by: Geans Pin at Broadcom (initial version)
  H/W donated by: Broadcom

r226872:
  Disable updating InputDiscards counter for BCM5717, BCM5718,
  BCM5719 A0 and BCM5720 A0 and add comment why driver does not try
  to read it.

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

12 years agoMFC r226870:
yongari [Tue, 3 Jan 2012 00:45:14 +0000 (00:45 +0000)]
MFC r226870:
  Recognize BCM5720C PHY.

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

12 years agoMFC r226814-226815,226820-226821,226864,226866-226867:
yongari [Tue, 3 Jan 2012 00:22:57 +0000 (00:22 +0000)]
MFC r226814-226815,226820-226821,226864,226866-226867:
r226814:
  Rename definition of BGE_SOFTWARE_GENCOMM_* to more readable ones.
  The origin of GENCOMM seems to come from Alteon Tigon Host/NIC
  interface definition where it defines general communications region
  which is active when firmware is loaded and running.  This region
  was used in communication between the host and processor internal
  to the Tigon chip.
  Broadcom data sheet also defines the region as 'Software Gencomm'
  in NetXtreme memory map but lacks detailed description of its
  interface so it was hard to know which ones are used for which
  interface.
  This change shall slightly enhance readability.

  No functional changes.

r226815:
  Define MAC address mail box and use it instead of using
  hard-coded value.

r226820:
  Offset 0x6810 is RX-RISC event register. Rename BGE_CPU_EVENT with
  BGE_RX_CPU_EVENT for readability.
  Additionally define BGE_TX_CPU_EVENT for TX-RSIC event register(BCM570[0-4] only).

r226821:
  SRAM offset 0x0C04 is used by driver to inform the IPMI/ASF firmware
  about the various driver events like load, unload, reset, suspend,
  restart, and ioctl operations.
  Define driver's event rather than using hard-coded values.  We don't
  still send suspend/resume event to firmware.

  Previously bge(4) used BGE_SDI_STATUS to send events. Because driver
  has to access firmware mail box to inform current state, using
  BGE_SDI_STATUS register was wrong. The end result was the same as
  BGE_SDI_STATUS is 0x0C04.

  No functional changes.

r226864:
  Rename BGE_FW_DRV_ALIVE/BGE_FW_PAUSE to BGE_FW_CMD_DRV_ALIVE/BGE_FW_CMD_PAUSE.
  Also add more firmware commands(not used yet).
  No functional changes.

r226866:
  Rename hard-coded value 1 << 14 with BGE_RX_CPU_DRV_EVENT.
  This bit(SW event 7 in publicly available data sheet) is used to
  make RX CPU handle a firmware command and the bit is automatically
  cleared after RX CPU completed the command.
  Generally firmware command takes the following steps.
   1. Write BGE_SRAM_FW_CMD_MB with a command.
   2. Write BGE_SRAM_FW_CMD_LEN_MB with the length of the command in bytes.
   3. Write BGE_SRAM_FW_CMD_DATA_MB with actual command data.
   4. Generate BGE_RX_CPU_EVENT and let firmware handle the command.
   5. Wait for the ACK of the firmware command.

  No functional changes.

r226867:
  Define BGE_FW_HB_TIMEOUT_SEC and remove one more magic value.
  bge(4) sends BGE_FW_CMD_DRV_ALIVE command to firmware every 2
  seconds.  BGE_FW_CMD_DRV_ALIVE command requires 4 bytes data.  This
  data contains timeout value in seconds until the next
  BGE_FW_CMD_DRV_ALIVE command.
  Broadcom recommends driver set the value 3 times longer than the
  interval that it sends BGE_FW_CMD_DRV_ALIVE.  Currently bge(4) uses
  3 seconds so probably we have to increase it in future and use
  different ALIVE command(e.g. BGE_FW_CMD_DRV_ALIVE3).

  No functional changes.

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

12 years agoMFC r226749,226770,226804-226807:
yongari [Tue, 3 Jan 2012 00:07:49 +0000 (00:07 +0000)]
MFC r226749,226770,226804-226807:
r226749:
  Whitespace nits.

r226770:
  Fix long standing bge_sysctl_debug_info() issues.
   o Protect bge(4) status block access and register dump with driver lock.
   o Add missing bus_dmamap_sync() before dumping status block.
   o Use minimum status block size, 32 bytes, for status block dump on most
     controllers except BCM5700 AX/BX.
  While I'm here, make the handler show 5717 Plus in hardware flags.

r226804:
  Make CPMU handle GPHY power down control on controllers that have
  CPMU capability.

r226805:
  It is known that all Broadcom controllers have 4GB boundary DMA
  bug.  Apply workaround to all controllers.

r226806:
  Broadcom says BCM5755 or higher and BCM5906 have short DMA bug.
  Apply workaround to these controllers.

r226807:
  BCM5719 cannot handle DMA requests for DMA segments that have
  larger than 4KB in size.  However the maximum DMA segment size
  created in DMA tag is 4KB, so we wouldn't encounter the issue here.
  Just record this issue such that let developers not to create a DMA
  segment that is larger than 4KB for BCM5719. It's possible to split
  a DMA segment into multiple smaller ones in run time but I believe
  it's not worth to implement that.

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

12 years agoMFC r226745:
yongari [Mon, 2 Jan 2012 23:53:26 +0000 (23:53 +0000)]
MFC r226745:
  axe(4) got VLAN over-sized frame support.
  Add axe(4) to the list of interfaces that support VLAN over-sized frame.

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

12 years agoMFC r226744:
yongari [Mon, 2 Jan 2012 23:52:20 +0000 (23:52 +0000)]
MFC r226744:
  AX88178/AX88772A/AX88772B supports VLAN over-sized frame.
  Xr vlan.

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

12 years agoMFC r228356:
gjb [Mon, 2 Jan 2012 23:43:16 +0000 (23:43 +0000)]
MFC r228356:

r228356:
 - Update du(1):
   - Sort arguments alphabetically where appropriate
   - '-B blocksize' is not mutually exclusive of '-h|-k|-m'
   - Mention '-t' in synopsis
   - Other wording improvements
   - Update usage() output to reflect the new synopsis
   - Other miscellaneous improvements

PR: 162438

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

12 years agoMFC 226703-226704:
yongari [Mon, 2 Jan 2012 23:43:08 +0000 (23:43 +0000)]
MFC 226703-226704:
r226703:
  Add ALi/ULi M5261/M5263 to supported hardware chipets.

r226704:
  All dc(4) controllers support VLAN over-sized frame.
  Xr vlan

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

12 years agoMFC r226701:
yongari [Mon, 2 Jan 2012 23:35:18 +0000 (23:35 +0000)]
MFC r226701:
  Add support for ALi/ULi, now NVIDIA, M5261/M5263 PCI FastEthernet
  controller which is found on ULi M1563 South Bridge & M1689 Bridge.
  These controllers look like a tulip clone.
  M5263 controller does not support MII bitbang so use DC_ROM
  register to access MII registers.  Like other tulip variants, ULi
  controller uses a setup frame to configure RX filter and uses new
  setup frame format.  It's not clear to me whether the controller
  supports a hash based multicast filtering so this patch uses 14
  perfect multicast filter to filter multicast frames.  If number of
  multicast addresses is greater than 14, controller is put into a
  mode that receives all multicast frames.
  Due to lack of access to M5261, this change was not tested with
  M5261 but it probably works.  Many thanks to Marco who provided
  remote access to M5263.

  Tested by: Marco Steinbach <coco <> executive-computing dot de>,
Martin MATO <martin.mato <> orange dot fr>

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

12 years agoMFC r226699:
yongari [Mon, 2 Jan 2012 23:17:45 +0000 (23:17 +0000)]
MFC r226699:
  When driver is run for the first time there would be no established
  link such that calling dc_setcfg() right after media change would
  be meaningless unless controller in question is not Davicom DM9102.
  Ideally dc_setcfg() should be called when speed/duplex is resolved
  otherwise it would reprogram controller with wrong speed/duplex
  information.  Because MII status change callback already calls
  dc_setcfg() I think calling dc_setcfg() in dc_init_locked() is
  wrong.  For instance, it would take some time to establish a link
  after mii_mediachg(), so blindly calling dc_setcfg() right after
  mii_mediachg() will always yield wrong media configuration.

  Extend dc_ifmedia_upd() to handle media change and still allow
  21143 and Davidcom controllers program speed/duplex regardless of
  current resolved speed/duplex of link. In theory 21143 may not need
  to call dc_setcfg() right after media change, but leave it as it is
  because there are too many variants to test that change.  Probably
  dc(4) shall need a PHY reset in dc_ifmedia_upd() but it's hard to
  verify correctness of the change.

  This change reliably makes ULi M5263 establish a link.

  While I'm here correctly report media change result. Previously it
  always reported a success.

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

12 years agoMFC r228885:
gjb [Mon, 2 Jan 2012 22:25:21 +0000 (22:25 +0000)]
MFC r228885:

r228885:
 - Add missing opening and closing brackets in getopt_long.3 and
   getsubopt.3 to make the examples reflect reality more closely.

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

12 years agoMFC r228823:
gjb [Mon, 2 Jan 2012 22:23:26 +0000 (22:23 +0000)]
MFC r228823:

r228823:
 - Enclose tabbed content in quote
 - Start a sentence on a newline

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

12 years agoMFC r228823:
gjb [Mon, 2 Jan 2012 22:18:07 +0000 (22:18 +0000)]
MFC r228823:

r228823:
 - Enclose tabbed content in quotes

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

12 years agoMFC r228823, r228824:
gjb [Mon, 2 Jan 2012 22:15:32 +0000 (22:15 +0000)]
MFC r228823, r228824:

r228823:
 - Properly escape a special character
 - Enclose tabbed content in quotes

r228824:
 - Remove trailing whitespace

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

12 years agoMFC r228418, 228419:
gjb [Mon, 2 Jan 2012 22:11:08 +0000 (22:11 +0000)]
MFC r228418, 228419:

r228418:
 - Document the SVN variable needs to be set in make.conf(5) when
   SVN_UPDATE is set [1]

r228419:
 - Minor whitespace cleanup to make.conf(5)

PR: 163162 [1]

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

12 years agoSince stable/9 has been released from code freeze and the 9.0-RELEASE
kensmith [Mon, 2 Jan 2012 20:39:59 +0000 (20:39 +0000)]
Since stable/9 has been released from code freeze and the 9.0-RELEASE
builds are underway shift stable/9 to 9.0-STABLE.

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

12 years agoMFC r228741, r228742:
mav [Mon, 2 Jan 2012 19:55:59 +0000 (19:55 +0000)]
MFC r228741, r228742:
Add timecounters(4) man page alike to eventtimers(4).

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

12 years agoMFC r228735, r228737, r228739:
mav [Mon, 2 Jan 2012 19:54:17 +0000 (19:54 +0000)]
MFC r228735, r228737, r228739:
Add apic(4) man page, now mostly to cover its event timer functionality.

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

12 years agoMFC r228731:
mav [Mon, 2 Jan 2012 19:51:12 +0000 (19:51 +0000)]
MFC r228731:
Add eventtimers(9) man page, describing related KPIs.

Sponsored by:   iXsystems, Inc.

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

12 years agoMFC r228575:
mav [Mon, 2 Jan 2012 19:49:01 +0000 (19:49 +0000)]
MFC r228575:
Some formatting fixes.

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

12 years agoMFC r228501:
mav [Mon, 2 Jan 2012 19:47:35 +0000 (19:47 +0000)]
MFC r228501:
After several suggestions from people, move eventtimers page from 7 to 4.

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

12 years agoMFC r228305:
mav [Mon, 2 Jan 2012 19:44:34 +0000 (19:44 +0000)]
MFC r228305:
Mention that Cold Presence Detection feature used for hot-plug detection
when interface power management is enabled.

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

12 years agoThe portion of r225757 that added the packages-9.0-release directory
kensmith [Mon, 2 Jan 2012 18:42:29 +0000 (18:42 +0000)]
The portion of r225757 that added the packages-9.0-release directory
was supposed to be MFCed closer to the release but that got missed.

Pointy hat: kensmith

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

12 years agoMFC r227464, r227471
mav [Mon, 2 Jan 2012 18:06:48 +0000 (18:06 +0000)]
MFC r227464, r227471
Major GEOM MULTIPATH class rewrite:
 - Improved locking and destruction process to fix crashes.
 - Improved "automatic" configuration method to make it consistent and safe
by reading metadata back from all specified paths after writing to one.
 - Added provider size check to reduce chance of ordering conflict with
other GEOM classes.
 - Added "manual" configuration method without using on-disk metadata.
 - Added "add" and "remove" commands to allow manage paths manually.
 - Failed paths are no longer dropped from geom, but only marked as FAIL
and excluded from I/O operations.
 - Automatically restore failed paths when all others paths are marked
as failed, for example, because of device-caused (not transport) errors.
 - Added "fail" and "restore" commands to manually control FAIL flag.
 - geom is now destroyed on last path disconnection.
 - Added optional Active/Active mode support. Unlike Active/Passive
mode, load evenly distributed between all working paths. If supported by
the device, it allows to significantly improve performance, utilizing
bandwidth of all paths. It is controlled by -A option during creation.
Disabled by default now.
 - Improved `status` and `list` commands output.

Sponsored by:   iXsystems, inc.

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

12 years agoMFC r226816:
mav [Mon, 2 Jan 2012 17:56:45 +0000 (17:56 +0000)]
MFC r226816:
Clarify disks/volumes above 2TiB support in geom_raid:
 - add support for volumes above 2TiB with Promise metadata format;
 - enforse and document other limitations:
   - Intel and Promise metadata formats do not support disks above 2TiB;
   - NVIDIA metadata format does not support volumes above 2TiB.

Sponsored by:   iXsystems, Inc.

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

12 years agoMFC r228819:
mav [Mon, 2 Jan 2012 17:39:18 +0000 (17:39 +0000)]
MFC r228819:
Update list of 4K physical sector hard drives.

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

12 years agoMFC r227637:
mav [Mon, 2 Jan 2012 17:36:14 +0000 (17:36 +0000)]
MFC r227637:
Introduce CAM_SIM_POLLED SIM flag, indicating that it works in polling mode.
It blocks CAM SWI usage on requests completion, unneeded because of polling
and denied during kernel dumping because of blocked scheduler.

Before r198899 there was periph flag CAM_PERIPH_POLLED, but that was wrong,
because there is whole SIM is polled or handled by SWI, not a single periph.

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

12 years agoMFC r228497:
mav [Mon, 2 Jan 2012 17:30:27 +0000 (17:30 +0000)]
MFC r228497:
Add PCI IDs for the Intel ICH9M SATA controllers.

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

12 years agoMFC r226680:
mav [Mon, 2 Jan 2012 17:27:07 +0000 (17:27 +0000)]
MFC r226680:
Some dmesg cosmetics:
 - for the legacy PCI ATA channels move channel number out of the device
description, same as it is for ahci(4), siis(4) and mvs(4);
 - add device description for the ISA ATA channels.

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

12 years agoMFC r228200:
mav [Mon, 2 Jan 2012 17:19:58 +0000 (17:19 +0000)]
MFC r228200:
Add hw.ahci.force tunable to control whether AHCI drivers should attach
to known AHCI-capable chips (AMD/NVIDIA), configured for legacy emulation.

Enabled by default to get additional performance and functionality of AHCI
when it can't be enabled by BIOS. Can be disabled to honor BIOS settings if
needed for some reason.

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

12 years agoMFC r227635:
mav [Mon, 2 Jan 2012 17:13:56 +0000 (17:13 +0000)]
MFC r227635:
Change the way how "not implemented" AHCI channels handled. Instead of
completely skipping them, create ahcich devices for them to allocate unit
numbers, but mark them as disabled to prevent driver probe and attach.

Last time some BIOSes tend to report unused channels as "not implemented".
This change makes ahcichX devices numbering consistent, independently of
connected disks. It makes per-channel driver hints usable and CAM devices
wiring possible on such systems.

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

12 years agoMFC: r227543
rmacklem [Mon, 2 Jan 2012 16:54:21 +0000 (16:54 +0000)]
MFC: r227543
Modify the new NFS client so that nfs_fsync() only calls ncl_flush()
for regular files. Since other file types don't write into the
buffer cache, calling ncl_flush() is almost a no-op. However, it does
clear the NMODIFIED flag and this shouldn't be done by nfs_fsync() for
directories.

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

12 years agoMFC r228444:
mdf [Mon, 2 Jan 2012 16:14:52 +0000 (16:14 +0000)]
MFC r228444:

 - Define true and false in sys/types.h for _KERNEL consumers, and
   typedef bool.  Due to macro expansion it seemed better to use a
   typedef for kernel consumers (specifically ofed won't compile
   without more changes if a define is used).
 - <stdbool.h> should also not re-define bool/true/false if they are
   defined by <sys/types.h>.  It would probably be a programming error
   to define _KERNEL for user-space code, but downstream consumers
   like Isilon have already been including <stdbool.h> in kernel
   sources, and this protects that usage.
 - sizeof(_Bool) is not necessarily the same as sizeof(int), so kernel
   modules should be rebuilt with this change.  Bump __FreeBSD_version.

No KBI change is expected based on review of the code.

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

12 years agoGuess when we'll be ready to announce 9.0-RELEASE.
kensmith [Mon, 2 Jan 2012 14:43:33 +0000 (14:43 +0000)]
Guess when we'll be ready to announce 9.0-RELEASE.

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

12 years agoMFC r228868:
dim [Mon, 2 Jan 2012 13:21:34 +0000 (13:21 +0000)]
MFC r228868:

When building the kernel for amd64 with clang, don't attempt to use the
-frename-registers option, as it is not supported.  No change for builds
with gcc.

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

12 years agoMFC r228861:
dim [Mon, 2 Jan 2012 13:20:01 +0000 (13:20 +0000)]
MFC r228861:

Set WERROR= for the nve(4) module.  This driver gives several warnings
with clang, which will probably never be fixed, as it is unmaintained,
and superseded by nfe(4).

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

12 years agoMFC r228822:
dim [Mon, 2 Jan 2012 13:17:31 +0000 (13:17 +0000)]
MFC r228822:

  When building the kernel with clang, it produces several warnings which
  might be useful in some cases, but which are not severe enough to error
  out the whole kernel build.  Display them anyway, so there is at least
  some incentive to fix them eventually.

  Start with -Wtautological-compare warnings.  These usually occur when
  people check if unsigned quantities are negative, or similar cases.  To
  clean these up would be painful, and might give problems if the base
  type which is compared against changes to signed later on.

MFC r228841:

  Amend r228822 by not directly adding to CWARNFLAGS, but to an optional
  CWARNEXTRA variable, which gets included into the initial CWARNFLAGS
  setting.  This makes it easier to override CWARNFLAGS with completely
  custom settings (including enabling any disabled warnings).

  Reminded by: arundel

MFC r228860:

  Make another clang warning, -Wempty-body, non-fatal during kernel
  builds.  All the instances of this warning in our tree are completely
  harmless.  (Most of the empty bodies look to be used simply as reminder
  for the developer to add something later.)

  While here, assign to CWARNEXTRA with ?=, so it can be overridden
  easily, if needed.

MFC r228867:

  Make another clang warning, -Wparentheses-equality, non-fatal during
  kernel builds.  All the instances of this warning in our tree are
  completely harmless, and many people seem to like adding extra
  parentheses to make precedence clearer.

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

12 years agoMFC r228801:
dim [Mon, 2 Jan 2012 13:12:53 +0000 (13:12 +0000)]
MFC r228801:

Remove -mfancy-math from LIB32CPUFLAGS for amd64.  It has been default
for our gcc since more than three years (see r181534, which is also in
stable/9 and stable/8).  This flag used to be for the benefit of the old
in-kernel math emulator, which was removed more than eight years ago.

Pointed out by: arundel

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

12 years agoMFC r228783:
dim [Mon, 2 Jan 2012 13:01:57 +0000 (13:01 +0000)]
MFC r228783:

  When building with clang, disable -Wshift-count-negative and
  -Wshift-count-overflow for sys/dev/ath/ath_hal/ah_regdomain.c, as it
  gets multiple instances of the following warnings:

  In file included from sys/dev/ath/ath_hal/ah_regdomain.c:99:
  sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:69:15: warning: shift count is negative [-Wshift-count-negative]
           .chan11a               = BM4(F1_4950_4980,
                                    ^~~~~~~~~~~~~~~~~
  sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:41:4: note: expanded from:
            W1(_fa) | W1(_fb) | W1(_fc) | W1(_fd) }
            ^
  sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:34:45: note: expanded from:
          (((_a) > 63 && (_a) < 128 ? (((uint64_t) 1)<<((_a)-64)) : (uint64_t) 0))
                                                     ^ ~~~~~~~~~

  and:

  In file included from sys/dev/ath/ath_hal/ah_regdomain.c:99:
  sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:629:15: error: shift count >= width of type [-Werror,-Wshift-count-overflow]
           .chan11a               = BM4(W2_5260_5320,
                                    ^~~~~~~~~~~~~~~~~
  sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:40:34: note: expanded from:
          { W0(_fa) | W0(_fb) | W0(_fc) | W0(_fd),                        \
                                          ^
  sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:32:44: note: expanded from:
          (((_a) >= 0 && (_a) < 64 ? (((uint64_t) 1)<<(_a)) : (uint64_t) 0))
                                                    ^ ~~~~

  Both warnings are false positives, caused by LLVM PR 10030.  For global
  initializations, clang fails to detect that the branch of the ternary
  operator causing the warning is dead.

MFC r228793:

  Amend r228783 by also disabling -Wshift-count-negative
  -Wshift-count-overflow warnings for the ath module.

MFC r228818:

  Disable various warnings for the ath module in a more fine-grained way:
  only add the option for the specific .c files that need them, like via
  sys/conf/files.

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