]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoReduce verbosity in the "Console"->"Saver" module (bsdconfig syscons_saver)
dteske [Sat, 8 Jun 2013 16:49:19 +0000 (16:49 +0000)]
Reduce verbosity in the "Console"->"Saver" module (bsdconfig syscons_saver)
by replacing the infinitive [verb] phrase "Simply blank the screen" with a
simple description of what you get; "Blank screen".

PR: ports/169316

11 years agoRemove extraneous characters ('<<<') from `Exit' menutag in the "Security"
dteske [Sat, 8 Jun 2013 16:28:08 +0000 (16:28 +0000)]
Remove extraneous characters ('<<<') from `Exit' menutag in the "Security"
and "Startup"->"Misc" modules to make the menus appear more consistent with
the numerous other modules and look a little cleaner.

PR: ports/169316

11 years agoActually make the 2-byte atomics work.
ed [Sat, 8 Jun 2013 16:24:49 +0000 (16:24 +0000)]
Actually make the 2-byte atomics work.

Even though I tested the 1-byte operations on arbitrarily aligned bytes,
it seems I did not do this for the 2-byte operations.

Create easy to read functions that are used to get/put bytes and
halfwords in words. To keep the compiler happy, explicitly read two
bytes into a union to obtain a 16-bit value.

11 years agoImport Kevin Lo's port of urtwn(4) from OpenBSD. urtwn(4) is a driver for the
rpaulo [Sat, 8 Jun 2013 16:02:31 +0000 (16:02 +0000)]
Import Kevin Lo's port of urtwn(4) from OpenBSD. urtwn(4) is a driver for the
Realtek RTL8188CU/RTL8192CU USB IEEE 802.11b/g/n wireless cards.
This driver requires microcode which is available in FreeBSD ports:
net/urtwn-firmware-kmod.

Hiren ported the urtwn(4) man page from OpenBSD and Glen just commited a port
for the firmware.

TODO:
- 802.11n support
- Stability fixes - the driver can sustain lots of traffic but has trouble
coping with simultaneous iperf sessions.
- fix debugging

MFC after: 2 months
Tested by: kevlo, hiren, gjb

11 years agosigaction(2): Document various non-POSIX functions as async-signal safe.
jilles [Sat, 8 Jun 2013 13:45:43 +0000 (13:45 +0000)]
sigaction(2): Document various non-POSIX functions as async-signal safe.

11 years agoaio_mlock() added:
glebius [Sat, 8 Jun 2013 13:30:13 +0000 (13:30 +0000)]
aio_mlock() added:
  - Regen for r251526.
  - Bump __FreeBSD_version.

11 years ago Add new system call - aio_mlock(). The name speaks for itself. It allows
glebius [Sat, 8 Jun 2013 13:27:57 +0000 (13:27 +0000)]
  Add new system call - aio_mlock(). The name speaks for itself. It allows
to perform the mlock(2) operation, which can consume a lot of time, under
control of aio(4).

Reviewed by: kib, jilles
Sponsored by: Nginx, Inc.

11 years agoUse improved __sync_*() intrinsics for MIPS in userspace as well.
ed [Sat, 8 Jun 2013 13:22:53 +0000 (13:22 +0000)]
Use improved __sync_*() intrinsics for MIPS in userspace as well.

r251524 introduced custom tailored versions for MIPS of these functions
for kernel-space code. We can just reuse them in userspace as well.

11 years agoAdd proper __sync_*() intrinsics for MIPS.
ed [Sat, 8 Jun 2013 13:19:11 +0000 (13:19 +0000)]
Add proper __sync_*() intrinsics for MIPS.

To make <stdatomic.h> work on MIPS (and ARM) using GCC, we need to
provide implementations of the __sync_*() functions. I already added
these functions for 4 and 8 byte types to libcompiler-rt some time ago,
based on top of <machine/atomic.h>.

Unfortunately, <machine/atomic.h> only provides a subset of the features
needed to implement <stdatomic.h>. This means that in some cases we had
to do compare-and-exchange calls in loops, where a simple ll/sc would
suffice.

Also implement these functions for 1 and 2 byte types. MIPS only
provides ll/sc instructions for 4 and 8 byte types, but this is of
course no limitation. We can simply load 4 bytes and use some bitmask
tricks to modify only the bytes affected.

Discussed on: mips, arch
Tested with: QEMU

11 years ago Make sys_mlock() function just a wrapper around vm_mlock() function
glebius [Sat, 8 Jun 2013 13:13:40 +0000 (13:13 +0000)]
  Make sys_mlock() function just a wrapper around vm_mlock() function
that does all the job.

Reviewed by: kib, jilles
Sponsored by: Nginx, Inc.

11 years ago Separate LIO_SYNC processing into a separate function aio_process_sync(),
glebius [Sat, 8 Jun 2013 13:02:43 +0000 (13:02 +0000)]
  Separate LIO_SYNC processing into a separate function aio_process_sync(),
and rename aio_process() into aio_process_rw().

Reviewed by: kib
Sponsored by: Nginx, Inc.

11 years agoMFV r251519:
delphij [Sat, 8 Jun 2013 09:11:20 +0000 (09:11 +0000)]
MFV r251519:

 * Illumos ZFS issue #3805 arc shouldn't cache freed blocks

Quote from the Illumos issue:

    ZFS should proactively evict freed blocks from the cache.

    Even though these freed blocks will never be used again, and thus
    will eventually be evicted, this causes us to use memory
    inefficiently for 2 reasons:

    1. A block that is freed has no chance of being accessed again, but
       will be kept in memory preferentially to a block that was accessed
       before it (and is thus older) but has not been freed and thus has
       at least some chance of being accessed again.

    2. We partition the ARC into several buckets:
       user data that has been accessed only once (MRU)
       metadata that has been accessed only once (MRU)
       user data that has been accessed more than once (MFU)
       metadata that has been accessed more than once (MFU)

    The user data vs metadata split is somewhat arbitrary, and the
    primary control on how much memory is used to cache data vs metadata
    is to simply try to keep the proportion the same as it has been in the
    past (each bucket "evicts against" itself).  The secondary control is
    to evict data before evicting metadata.

    Because of this bucketing, we may end up with one bucket mostly
    containing freed blocks that are very old, while another bucket has
    more recently accessed, still-allocated blocks.  Data in the useful
    bucket (with still-allocated blocks) may be evicted in preference to
    data in the useless bucket (with old, freed blocks).

    On dcenter, we saw that the MFU metadata bucket was 230MB, while the
    MFU data bucket was 27GB and the MRU metadata bucket was 256GB.
    However, the vast majority of data in the MRU metadata bucket (256GB)
    was freed blocks, and thus useless.  Meanwhile, the MFU metadata bucket
    (230MB) was constantly evicting useful blocks that will be soon needed.

    The problem of cache segmentation is a larger problem that needs more
    investigation.  However, if we stop caching freed blocks, it should
    reduce the impact of this more fundamental issue.

MFC after: 2 weeks

11 years agocxgbe/tom: Fix bad signed/unsigned mixup in the stid allocator. This
np [Sat, 8 Jun 2013 07:23:26 +0000 (07:23 +0000)]
cxgbe/tom: Fix bad signed/unsigned mixup in the stid allocator.  This
fixes a panic when allocating a mixture of IPv6 and IPv4 stids.

MFC after: 1 week

11 years agoMerge in changes from NetBSD:
andrew [Sat, 8 Jun 2013 07:16:22 +0000 (07:16 +0000)]
Merge in changes from NetBSD:
 * Remove support for non-elf files.
 * Add the VFP setjmp magic numbers.
 * Add the offsets for the VFP registers within the buffer.

11 years agoImplement foreign volume handling. Allows admins to view foreign metadata
sbruno [Sat, 8 Jun 2013 02:54:59 +0000 (02:54 +0000)]
Implement foreign volume handling.  Allows admins to view foreign metadata
and clear or import it for use.

PR:     kern/172091
Submitted by:   smh@freebsd.org
Reviewed by:    jhb@freebsd.org
MFC after:      2 weeks

11 years agoFix some recent regression issues:
hselasky [Fri, 7 Jun 2013 22:35:58 +0000 (22:35 +0000)]
Fix some recent regression issues:

1) Only multi-TD isochronous transfers should use NORMAL
type after specific type as per XHCI specification.

2) BEI bit is only available in NORMAL and ISOCHRONOUS
TRB types. Don't use this bit for other types to avoid
hardware asserts. Reserved bits should be don't care
though ...

MFC after: 1 week
PR: usb/179342

11 years agoFinish pulling in the NetBSD setjmp/longjmp updates on ARM.
andrew [Fri, 7 Jun 2013 22:01:06 +0000 (22:01 +0000)]
Finish pulling in the NetBSD setjmp/longjmp updates on ARM.

Store/restore the VFP registers in setjmp/longjmp on ARM EABI if VFP is
enabled in the kernel. It checks the hw.floatingpoint sysctl to see if
floating-point is available and uses this to determine if it should store
them. If it does it uses a different magic value so longjmp is able to know
if it should load them.

11 years agoAdd WITH_DEBUG_FILES
emaste [Fri, 7 Jun 2013 21:51:10 +0000 (21:51 +0000)]
Add WITH_DEBUG_FILES

makeman currently generates a src.conf that claims every option also
enforces WITHOUT_BIND_UTILS, so I applied this section by hand.

11 years agoAdd a new knob WITH_DEBUG_FILES to control the building of standalone
emaste [Fri, 7 Jun 2013 21:40:02 +0000 (21:40 +0000)]
Add a new knob WITH_DEBUG_FILES to control the building of standalone
debug files for userland programs and libraries.  The "-g" debug flag
is automatically applied when WITH_DEBUG_FILES is set.

The debug files are now named ${prog}.debug and ${shlib}.debug for
consistency with other systems and documentation.  In addition they are
installed under /usr/lib/debug, to simplify the process of installing
them if needed after a crash.  Users of bsd.{prog,lib}.mk outside of the
base system place the standalone debug files in a .debug subdirectory.
GDB automatically searches both of these directories for standalone
debug files.

Thanks to everyone who contributed changes, review, and testing during
development.

11 years agoReduce the difference to NetBSD.
andrew [Fri, 7 Jun 2013 21:23:11 +0000 (21:23 +0000)]
Reduce the difference to NetBSD.

 * Stop pretending we support anything other than ELF by removing code
   surrounded by #ifdef __ELF__ ... #endif.
 * Remove _JB_MAGIC_SETJMP and _JB_MAGIC__SETJMP, they are defined in
   setjmp.h, which is able to be included from asm.
 * Fix the spelling of dependent.
 * Rename END _END and add END and ASEND to complement ENTRY and ASENTRY
   respectively
 * Add macros to simplify accessing the Global Offset Table, some of these
   will be used in the upcoming update to the setjmp functions.

11 years agoInclude machine/setjmp.h to get the definition of _JB_MAGIC__SETJMP. This
andrew [Fri, 7 Jun 2013 21:13:28 +0000 (21:13 +0000)]
Include machine/setjmp.h to get the definition of _JB_MAGIC__SETJMP. This
allows us to remove it from the ARM copy of machine/asm.h.

11 years agoRemove an extra copy of _setjmp from libstand. We have used the libc version
andrew [Fri, 7 Jun 2013 21:06:19 +0000 (21:06 +0000)]
Remove an extra copy of _setjmp from libstand. We have used the libc version
of this function since r183876.

11 years agoMake 'portsnap alfred' overwrite ports tree if it's not created by a
delphij [Fri, 7 Jun 2013 20:21:30 +0000 (20:21 +0000)]
Make 'portsnap alfred' overwrite ports tree if it's not created by a
portsnap.

Discussed with: alfred
Reviewed by: cperciva

11 years agoOverride bmake's default MAKEFILE_PREFERENCE
sjg [Fri, 7 Jun 2013 19:45:04 +0000 (19:45 +0000)]
Override bmake's default MAKEFILE_PREFERENCE

11 years agoAdd missing VM object unlocks in an error case.
alc [Fri, 7 Jun 2013 19:42:00 +0000 (19:42 +0000)]
Add missing VM object unlocks in an error case.

Reviewed by: kib

11 years agoDisable IGMPv3 link timers on a transition to IGMPv2.
bms [Fri, 7 Jun 2013 17:12:08 +0000 (17:12 +0000)]
Disable IGMPv3 link timers on a transition to IGMPv2.

Submitted by: Alan Smithee

11 years agoFreeBSD 8.4 added.
pluknet [Fri, 7 Jun 2013 17:06:08 +0000 (17:06 +0000)]
FreeBSD 8.4 added.

11 years agoAdd support for polling the XHCI interrupt handler when
hselasky [Fri, 7 Jun 2013 14:30:06 +0000 (14:30 +0000)]
Add support for polling the XHCI interrupt handler when
the regular interrupt handler is not working properly or
in case of MSI interrupts which are not yet supported.
Remove interrupt setup code for FreeBSD versions older
than 700031.

MFC after: 1 week
PR: usb/179342

11 years agoAdd libusb_get_port_numbers
emaste [Fri, 7 Jun 2013 13:45:58 +0000 (13:45 +0000)]
Add libusb_get_port_numbers

libusbx deprecated libusb_get_port_path and replaced it with
libusb_get_port_numbers.  The latter omits an extra parameter which was
unused in the FreeBSD implementation anyway.

11 years agoProperly set curvnet context in lagg_port_setlladdr() task handler.
trociny [Fri, 7 Jun 2013 10:27:50 +0000 (10:27 +0000)]
Properly set curvnet context in lagg_port_setlladdr() task handler.

Reported by: Nikos Vassiliadis <nvass gmx.com>
Submitted by: zec
Tested by: Nikos Vassiliadis <nvass gmx.com>
MFC after: 1 week

11 years agoDon't hold the node lock over the iterator.
adrian [Fri, 7 Jun 2013 09:03:56 +0000 (09:03 +0000)]
Don't hold the node lock over the iterator.

The "find node" function call will increase the node reference anyway;
so there's no reason to hold the node table lock during the MLME change.

The only reason I could think of is to stop overlapping mlme ioctls
from causing issues, but this should be fixed a different way.

This fixes a whole class of LORs that creep up when nodes are being
timed out or removed by hostapd.

Tested:

* AR5416, hostap, with nodes coming and going.  No LORs or stability
  issues were observed.

11 years agoBring over the initial static bluetooth coexistence configuration
adrian [Fri, 7 Jun 2013 09:02:02 +0000 (09:02 +0000)]
Bring over the initial static bluetooth coexistence configuration
for the WB195 combo NIC - an AR9285 w/ an AR3011 USB bluetooth NIC.

The AR3011 is wired up using a 3-wire coexistence scheme to the AR9285.

The code in if_ath_btcoex.c sets up the initial hardware mapping
and coexistence configuration.  There's nothing special about it -
it's static; it doesn't try to configure bluetooth / MAC traffic priorities
or try to figure out what's actually going on.  It's enough to stop basic
bluetooth traffic from causing traffic stalls and diassociation from
the wireless network.

To use this code, you must have the above NIC.  No, it won't work
for the AR9287+AR3012, nor the AR9485, AR9462 or AR955x combo cards.

Then you set a kernel hint before boot or before kldload, where 'X'
is the unit number of your AR9285 NIC:

# kenv hint.ath.X.btcoex_profile=wb195

This will then appear in your boot messages:

[100482] athX: Enabling WB195 BTCOEX

This code is going to evolve pretty quickly (well, depending upon my
spare time) so don't assume the btcoex API is going to stay stable.

In order to use the bluetooth side, you must also load in firmware using
ath3kfw and the binary firmware file (ath3k-1.fw in my case.)

Tested:

* AR9280, no interference
* WB195 - AR9285 + AR3011 combo; STA mode; basic bluetooth inquiries
  were enough to cause traffic stalls and disassociations.  This has
  stopped with the btcoex profile code.

TODO:

* Importantly - the AR9285 needs ASPM disabled if bluetooth coexistence
  is enabled.  No, I don't know why.  It's likely some kind of bug to do
  with the AR3011 sending bluetooth coexistence signals whilst the device
  is asleep.  Since we don't actually sleep the MAC just yet, it shouldn't
  be a problem.  That said, to be totally correct:

  + ASPM should be disabled - upon attach and wakeup
  + The PCIe powersave HAL code should never be called

  Look at what the ath9k driver does for inspiration.

* Add WB197 (AR9287+AR3012) support
* Add support for the AR9485, which is another combo like the AR9285
* The later NICs have a different signaling mechanism between the MAC
  and the bluetooth device; I haven't even begun to experiment with
  making that HAL code work.  But it should be a lot more automatic.

* The hardware can do much more interesting traffic weighting with
  bluetooth and wifi traffic.  None of this is currently used.
  Ideally someone would code up something to watch the bluetooth traffic
  GPIO (via an interrupt) and then watch it go high/low; then figure out
  what the bluetooth traffic is and adjust things appropriately.

* If I get the time I may add in some code to at least track this stuff
  and expose statistics.  But it's up to someone else to experiment with
  the bluetooth coexistence support and add the interesting stuff (like
  "real" detection of bulk, audio, etc bluetooth traffic patterns and
  change wifi parameters appropriately - eg, maximum aggregate length,
  transmit power, using quiet time to control TX duty cycle, etc.)

11 years agoUse getnameinfo(3) instead of inet_ntop(3) to make printable versions of
ae [Fri, 7 Jun 2013 08:06:48 +0000 (08:06 +0000)]
Use getnameinfo(3) instead of inet_ntop(3) to make printable versions of
sockaddr_in6 structures. getnameinfo(3) does the same thing, but it is
also able to represent a scope zone id as described in the RFC 4007.

MFC after: 2 weeks

11 years agoRevert r238399.
jh [Fri, 7 Jun 2013 07:17:46 +0000 (07:17 +0000)]
Revert r238399.

The "failok" option doesn't have any effect at all unless specified in
fstab(5) and combined with the -a flag. The "failok" option is already
documented in fstab(5).

PR: 177630
No objection: eadler
MFC after: 1 week

11 years agoAdd accessor macros for the bluetooth coexistence routines.
adrian [Fri, 7 Jun 2013 05:18:07 +0000 (05:18 +0000)]
Add accessor macros for the bluetooth coexistence routines.

11 years agoAdd bluetooth fixes to the AR5416/AR92xx HAL:
adrian [Fri, 7 Jun 2013 05:17:58 +0000 (05:17 +0000)]
Add bluetooth fixes to the AR5416/AR92xx HAL:

* Call the bluetooth setup function during the reset path, so the bluetooth
  settings are actually initialised.
* Call the AR9285 diversity functions during bluetooth setup; so the AR9285
  diversity and antenna configuration registers are correctly programmed
* Misc debugging info.

Tested:

* AR9285+AR3011 bluetooth combo; this code itself doesn't enable bluetooth
  coexistence but it's part of what I'm currently using.

11 years agoCorrect setting TX random backoff register. This register is
yongari [Fri, 7 Jun 2013 01:21:09 +0000 (01:21 +0000)]
Correct setting TX random backoff register. This register is
implemented as a 10 bits linear feedback shift register so only
lower 10 bits are valid.
Because this register is used to initialize random backoff interval
register only when resolved duplex is half-duplex, it wouldn't have
caused issues in these days.

Submitted by: Masanobu SAITOH <msaitoh@NetBSD.org>

11 years agoDo not report current link status if driver is not running.
yongari [Fri, 7 Jun 2013 01:01:39 +0000 (01:01 +0000)]
Do not report current link status if driver is not running.
Reporting link status in driver has a side-effect that makes mii(4)
check current link status.  mii(4) will call link status change
callback when it sees link state change.  Normally this wouldn't
have problems. However, ASF/IPMI firmware can actively access PHY
regardless of driver's running state such that reporting link
status for not-running interface can generate meaningless link
UP/DOWN messages.

This change also makes dhclient think driver got a valid link
regardless of link establishment so it will bypass dhclient's
initial link status check. I think that wouldn't be issue
though.

Tested by: Daniel Braniss <danny@cs.huji.ac.il>

11 years agogcc: install AMD intrinsics header ammintrin.h
pfg [Fri, 7 Jun 2013 00:48:01 +0000 (00:48 +0000)]
gcc: install AMD intrinsics header ammintrin.h

This file was included in the changes from r251212 and originated
in the pre-GPLv3 gcc43 branch.

MFC after: 2 weeks

11 years agoSimplify the checking of flags for cam_periph_mapmem(). This gets rid of
scottl [Fri, 7 Jun 2013 00:22:38 +0000 (00:22 +0000)]
Simplify the checking of flags for cam_periph_mapmem().  This gets rid of
a lot of code redundancy and grossness at very minor expense.

Reviewed by: smh
Obtained from: Netflix
MFC after: 3 days

11 years agoMFV r251474:
delphij [Thu, 6 Jun 2013 23:21:41 +0000 (23:21 +0000)]
MFV r251474:

 * Illumos zfs issue #3137 L2ARC compression

Whether or not to compress buffers entering the L2ARC is
controlled by "compression" setting on the dataset, when
compression is not "off", L2ARC compression is enabled.

The compress method is always LZ4 for L2ARC when enabled
because it works best for the scenario.

MFC after: 2 weeks

11 years agoFix r251444 so that gssd.c still builds for WITHOUT_KERBEROS.
rmacklem [Thu, 6 Jun 2013 22:02:03 +0000 (22:02 +0000)]
Fix r251444 so that gssd.c still builds for WITHOUT_KERBEROS.

Reported by: bf1783@gmail.com
MFC after: 2 weeks

11 years agoSwitch to 2-clause license and standard text
emaste [Thu, 6 Jun 2013 21:09:27 +0000 (21:09 +0000)]
Switch to 2-clause license and standard text

Approved by: bms@

11 years agoComplete r251452:
attilio [Thu, 6 Jun 2013 18:19:26 +0000 (18:19 +0000)]
Complete r251452:
Avoid to busy/unbusy a page in cases where there is no need to drop the
vm_obj lock, more nominally when the page is full valid after
vm_page_grab().

Sponsored by: EMC / Isilon storage division
Reviewed by: alc

11 years agoDo not compare the existing mask of a cpuset with a new mask when changing
jhb [Thu, 6 Jun 2013 14:43:19 +0000 (14:43 +0000)]
Do not compare the existing mask of a cpuset with a new mask when changing
the mask of a cpuset.  Also, change the cpuset's mask before updating the
masks of all children.  Previously changing a cpuset's mask first required
setting the mask to a super-set of both the old and new masks and then
changing it a second time to the new mask.

11 years agoAdjust CFLAGS to pick up correct regex.h and posix/regex.h. Note this
jkim [Thu, 6 Jun 2013 11:59:38 +0000 (11:59 +0000)]
Adjust CFLAGS to pick up correct regex.h and posix/regex.h.  Note this
actually reverts r250860 and r250861.

Reported by: gjb, tinderbox

11 years agoDon't busy the page unless we are likely to release the object lock.
alc [Thu, 6 Jun 2013 06:17:20 +0000 (06:17 +0000)]
Don't busy the page unless we are likely to release the object lock.

Reviewed by: kib
Sponsored by: EMC / Isilon Storage Division

11 years ago - Consolidate duplicate code into support functions.
jeff [Wed, 5 Jun 2013 23:53:00 +0000 (23:53 +0000)]
 - Consolidate duplicate code into support functions.
 - Split the bqlock into bqclean and bqdirty locks.
 - Only acquire the wakeup synchronization locks when we cross a
   threshold requiring them.
 - Restructure the way flushbufqueues() targets work so they are more
   smp friendly and sane.

Reviewed by: kib
Discussed with: mckusick, attilio
Sponsored by: EMC / Isilon Storage Division

M    vfs_bio.c

11 years agoDocument the new "-v" option for the gssd daemon.
rmacklem [Wed, 5 Jun 2013 23:28:29 +0000 (23:28 +0000)]
Document the new "-v" option for the gssd daemon.
This is a content change.

MFC after: 2 weeks

11 years agoAdd a "-v" (verbose) option to the gssd daemon, to help
rmacklem [Wed, 5 Jun 2013 23:17:39 +0000 (23:17 +0000)]
Add a "-v" (verbose) option to the gssd daemon, to help
with diagnosis of kerberized NFS mount problems. When set,
messages are sent to syslog() (or fprintf(stderr,...) if
"-d" is also specified) to indicate activity/results of
kgssapi upcalls.

Reviewed by: jhb
MFC after: 2 weeks

11 years agorelease: Allow empty extra distributions.
jilles [Wed, 5 Jun 2013 22:27:49 +0000 (22:27 +0000)]
release: Allow empty extra distributions.

For example, WITHOUT_SHAREDOCS= in src.conf creates an empty doc
distribution.

Submitted by: Kurt Lidl
Tested by: Kurt Lidl
Discussed with: gjb
MFC after: 1 week

11 years agoEnable slow diversity combining for the AR9285.
adrian [Wed, 5 Jun 2013 22:23:13 +0000 (22:23 +0000)]
Enable slow diversity combining for the AR9285.

Now that I understand what's going on - and the RX antenna array maps
to what the receive LNA configuration actually is - I feel comfortable
in enabling this.

If people do have issues with this, there's enough debugging now available
that we have a chance to diagnose it without writing it up as 'weird
crap.'

Tested:

* AR9285 STA w/ diversity combining enabled in EEPROM

TODO:

* (More) testing in hostap mode

11 years agoAs a temporary work-around (read: until there's a nice API for exposing
adrian [Wed, 5 Jun 2013 22:21:13 +0000 (22:21 +0000)]
As a temporary work-around (read: until there's a nice API for exposing
and controlling this form of antenna diversity) - print out the AR9285
antenna diversity configuration at attach time.

This will help track down and diagose if/when people have connectivity
issues on cards (eg if they connect a single antenna to LNA1, yet the
card has RX configured to only occur on LNA2.)

Tested:

* AR9285 w/ antenna diversity enabled in EEPROM;
* AR9285 w/ antenna diversity disabled in EEPROM; mapping only to a
  single antenna (LNA1.)

11 years agoUse calloc().
delphij [Wed, 5 Jun 2013 21:56:29 +0000 (21:56 +0000)]
Use calloc().

MFC after: 2 weeks

11 years agoRemove unneeded reference to link.h (sys/link_elf.h).
delphij [Wed, 5 Jun 2013 21:55:20 +0000 (21:55 +0000)]
Remove unneeded reference to link.h (sys/link_elf.h).

MFC after: 2 weeks

11 years agoConnect libgnuregex 2.17 to the build.
jkim [Wed, 5 Jun 2013 21:31:06 +0000 (21:31 +0000)]
Connect libgnuregex 2.17 to the build.

11 years agoFix build for FreeBSD. We do not have alloca.h.
jkim [Wed, 5 Jun 2013 21:28:33 +0000 (21:28 +0000)]
Fix build for FreeBSD.  We do not have alloca.h.

11 years agoAdd GNU regex from glibc 2.17.
jkim [Wed, 5 Jun 2013 21:27:04 +0000 (21:27 +0000)]
Add GNU regex from glibc 2.17.

11 years agoImport couple of important bug fixes from the upstream.
jkim [Wed, 5 Jun 2013 21:12:55 +0000 (21:12 +0000)]
Import couple of important bug fixes from the upstream.

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commit;h=7e2f0d2
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commit;h=a445af0

11 years agocxgbe(4): Never install a firmware if hw.cxgbe.fw_install is 0.
np [Wed, 5 Jun 2013 20:57:52 +0000 (20:57 +0000)]
cxgbe(4): Never install a firmware if hw.cxgbe.fw_install is 0.

MFC after: 1 week

11 years agosleep: Explain in a comment why the [EINTR] check is there.
jilles [Wed, 5 Jun 2013 20:15:18 +0000 (20:15 +0000)]
sleep: Explain in a comment why the [EINTR] check is there.

Suggested by: eadler

11 years agosh(1): Document new features in wait builtin.
jilles [Wed, 5 Jun 2013 19:54:28 +0000 (19:54 +0000)]
sh(1): Document new features in wait builtin.

PR: 176916

11 years agoPull in r183297 from upstream llvm trunk:
dim [Wed, 5 Jun 2013 19:46:39 +0000 (19:46 +0000)]
Pull in r183297 from upstream llvm trunk:

  PR15662: Optimized debug info produces out of order function
  parameters

  When a function is inlined we lazily construct the variables
  representing the function's parameters. After that, we add any
  remaining unused parameters.

  If the function doesn't use all the parameters, or uses them out of
  order, then the DWARF would produce them in that order, producing a
  parameter order that doesn't match the source.

  This fix causes us to always keep the arg variables at the start of
  the variable list & in the original order from the source.

Reported by: avg
MFC after: 1 week

11 years agosh: Return status 127 for unknown jobs in wait builtin.
jilles [Wed, 5 Jun 2013 19:40:52 +0000 (19:40 +0000)]
sh: Return status 127 for unknown jobs in wait builtin.

This is required by POSIX, at least for pids that are not known child
processes.

Other problems with job specifications still cause wait to abort with
exit status 2.

PR: 176916

11 years agosh: Allow multiple operands in wait builtin.
jilles [Wed, 5 Jun 2013 19:08:22 +0000 (19:08 +0000)]
sh: Allow multiple operands in wait builtin.

This is only part of the PR; the behaviour for unknown/invalid pids/jobs
remains unchanged (aborts the builtin with status 2).

PR: 176916
Submitted by: Vadim Goncharov

11 years agonew features (mostly for testing netmap capabilities)
luigi [Wed, 5 Jun 2013 17:37:59 +0000 (17:37 +0000)]
new features (mostly for testing netmap capabilities)

+ pkt-gen -f rx now remains active even when traffic stops
  Previous behaviour (exit after 1 second of silence) can be
  restored with the -W option

+ the -X option does a hexdump of the content of a packet (both tx and rx).
  This can be useful to check what goes in and out.

+ the -I option instructs the sender to use indirect buffers
  (not really useful other than to test the kernel module in the
  VALE switch)

11 years ago- fix a bug in the previous commit that was dropping the last packet
luigi [Wed, 5 Jun 2013 17:27:59 +0000 (17:27 +0000)]
- fix a bug in the previous commit that was dropping the last packet
  from each batch flowing on the VALE switch

- feature: add glue for 'indirect' buffers on the sender side:
  if a slot has NS_INDIRECT set, the netmap buffer contains pointer(s)
  to the actual userspace buffers, which are accessed with copyin().
     The feature is not finalised yet, as it will likely need to deal
  with some iovec variant for proper scatter/gather support.
  This will save one copy for clients (e.g. qemu) that cannot
  use the netmap buffer directly.

A curiosity: on amd64 copyin() appears to be 10-15% faster than pkt_copy()
or bcopy() at least for sizes of 256 and greater.

11 years agoNew install flags were merged to 9-STABLE and will appear in FreeBSD-9.2.
brooks [Wed, 5 Jun 2013 17:02:21 +0000 (17:02 +0000)]
New install flags were merged to 9-STABLE and will appear in FreeBSD-9.2.

Sponsored by: DARPA, AFRL
Submitted by: ru
MFC after: 3 days

11 years agoRelax the vm object locking. Use a read lock.
alc [Wed, 5 Jun 2013 17:00:10 +0000 (17:00 +0000)]
Relax the vm object locking.  Use a read lock.

Sponsored by: EMC / Isilon Storage Division

11 years agoUpdate to bmake-20130604 to fix file descriptor leak.
sjg [Wed, 5 Jun 2013 16:12:50 +0000 (16:12 +0000)]
Update to bmake-20130604 to fix file descriptor leak.

11 years agoRemove part of the NetBSD longjmp code that was not ready to be merged.
andrew [Wed, 5 Jun 2013 07:37:45 +0000 (07:37 +0000)]
Remove part of the NetBSD longjmp code that was not ready to be merged.

11 years agoStyle fixes.
das [Wed, 5 Jun 2013 05:33:01 +0000 (05:33 +0000)]
Style fixes.

Submitted by: bde

11 years ago- Flag sym(4) as supporting unmapped I/O; all necessary conversion actually
marius [Wed, 5 Jun 2013 01:22:59 +0000 (01:22 +0000)]
- Flag sym(4) as supporting unmapped I/O; all necessary conversion actually
  already has been done as part of r246713.
- Revert a part of r251402 in order to appease clang.

11 years agoHandle/mark/nuke unused arguments.
marius [Wed, 5 Jun 2013 01:07:40 +0000 (01:07 +0000)]
Handle/mark/nuke unused arguments.

11 years agoImplement a bit of a hack to store the AR9285/AR9485 RX LNA configuration in
adrian [Wed, 5 Jun 2013 00:45:19 +0000 (00:45 +0000)]
Implement a bit of a hack to store the AR9285/AR9485 RX LNA configuration in
the RX antenna field.

The AR9285/AR9485 use an LNA mixer to determine how to combine the signals
from the two antennas.  This is encoded in the RSSI fields (ctl/ext) for
chain 2.  So, let's use that here.

This maps RX antennas 0->3 to the RX mixer configuration used to
receive a frame.  There's more that can be done but this is good enough
to diagnose if the hardware is doing "odd" things like trying to
receive frames on LNA2 (ie, antenna 2 or "alt" antenna) when there's
only one antenna connected.

Tested:

* AR9285, STA mode

11 years agoAdd a new capability flag to announce that the chip implements LNA mixing
adrian [Wed, 5 Jun 2013 00:42:04 +0000 (00:42 +0000)]
Add a new capability flag to announce that the chip implements LNA mixing
for the RX path.

This is different to the div comb HAL flag, that says it actually
can use this for RX diversity (the "slow" diversity path implemented
but disabled in the AR9285 HAL code.)

Tested:

* AR9285, STA operation

11 years agoDocument the AR9285/AR9485 LNA configuration information that's
adrian [Wed, 5 Jun 2013 00:39:20 +0000 (00:39 +0000)]
Document the AR9285/AR9485 LNA configuration information that's
stored in the ctl/ext RSSI field for chain 2.

Tested:

* AR9285, STA

11 years agoAdd RX STBC statistics.
adrian [Tue, 4 Jun 2013 23:52:57 +0000 (23:52 +0000)]
Add RX STBC statistics.

11 years agoIn vm_object_split(), busy and consequently unbusy the pages only when
attilio [Tue, 4 Jun 2013 22:47:01 +0000 (22:47 +0000)]
In vm_object_split(), busy and consequently unbusy the pages only when
swap_pager_copy() is invoked, otherwise there is no reason to do so.
This will eliminate the necessity to busy pages most of the times.

Sponsored by: EMC / Isilon storage division
Reviewed by: alc

11 years agosys/dev/mps/mps.c
asomers [Tue, 4 Jun 2013 22:32:33 +0000 (22:32 +0000)]
sys/dev/mps/mps.c
sys/dev/mps/mps_user.c
Fix uninitialized memory reference in mps_read_config_page.  It was
referencing a field (params->hdr.Ext.ExtPageType) that would only be
set when reading an Extended config page.  The symptom was that
MPSIO_READ_CFG_PAGE ioctls would randomly fail with
MPI2_IOCSTATUS_CONFIG_INVALID_PAGE errors.  The solution is to
determine whether an extended or an ordinary config page is requested
by looking at the PageType field, which should be available regardless.

Similarly, mps_user_read_extcfg_header and mps_user_read_extcfg_page,
which call mps_read_config_page, had to be fixed to always set the
PageType field.  They were implicitly assuming that
mps_read_config_page always operated on Extended pages.

Reviewed by: ken
Approved by: ken (mentor)
MFC after: 3 days

11 years agoCAM_DEV_QFREEZE handling should only be done on request submission but
marius [Tue, 4 Jun 2013 20:49:17 +0000 (20:49 +0000)]
CAM_DEV_QFREEZE handling should only be done on request submission but
neither on completion nor by SIM drivers in the first place. This issue
has been revealed by r249466.

Reviewed by: mav
MFC after: 3 days

11 years agoFix build with both INET and INET6 disabled.
jhb [Tue, 4 Jun 2013 20:40:16 +0000 (20:40 +0000)]
Fix build with both INET and INET6 disabled.

11 years agoStart to merge the updated ARM NetBSD setjump/longjmp functions. To begin
andrew [Tue, 4 Jun 2013 19:47:26 +0000 (19:47 +0000)]
Start to merge the updated ARM NetBSD setjump/longjmp functions. To begin
with merge the functions but leave out the code to save/load the VFP
registers as that requires other changes to ensure the VFP is enabled
first.

This removes storing the old fpa registers. These were never fully
supported, and the only user of this code I can find have moved to newer
CPUs which use a VFP.

11 years agoRelax the vm object locking in mac_proc_vm_revoke_recurse(). A read lock
alc [Tue, 4 Jun 2013 17:23:09 +0000 (17:23 +0000)]
Relax the vm object locking in mac_proc_vm_revoke_recurse().  A read lock
suffices in one place.

Sponsored by: EMC / Isilon Storage Division

11 years agoShift Console->Saver menu items to place the default item at the top, making
dteske [Tue, 4 Jun 2013 17:08:26 +0000 (17:08 +0000)]
Shift Console->Saver menu items to place the default item at the top, making
this menu consistent with Console->Repeat, Console->Font, Console->Screenmap
and many others which place the default choice at the top.

NOTE: SVN r249751 changed things so that these menus highlight the active
selection, so the idea that the default choice (now at top) "can be selected
immediately by hitting ENTER" is not possible unless the default choice is
the currently active setting (e.g., on first visit to the menu). However, it
is still warranted to have the default choice at the top of the menu.

PR: bin/169316

11 years agoLessen verbosity of "Exit" menutag items to appear more consistent across
dteske [Tue, 4 Jun 2013 16:48:23 +0000 (16:48 +0000)]
Lessen verbosity of "Exit" menutag items to appear more consistent across
menus from one module to the next.

Replacing "Exit this menu (returning to previous)" with "Exit this menu".

PR: ports/169316

11 years agoAdd myself to committers-src.dot, and note kib is my mentor.
gjb [Tue, 4 Jun 2013 16:02:00 +0000 (16:02 +0000)]
Add myself to committers-src.dot, and note kib is my mentor.

Approved by: kib (mentor)

11 years agoEliminate unnecessary vm object locking from tmpfs_nocacheread().
alc [Tue, 4 Jun 2013 15:40:45 +0000 (15:40 +0000)]
Eliminate unnecessary vm object locking from tmpfs_nocacheread().

11 years agoBuild fix: Only <sys/cdefs.h> should be included before __FBSDID().
jhb [Tue, 4 Jun 2013 15:35:37 +0000 (15:35 +0000)]
Build fix:  Only <sys/cdefs.h> should be included before __FBSDID().
<sys/param.h> needs to be included after any "opt_foo.h" headers so it
sees the same set of defined macros as other headers.

11 years agoImprove r250890, so that we stop processing of a message with zero
glebius [Tue, 4 Jun 2013 11:19:08 +0000 (11:19 +0000)]
Improve r250890, so that we stop processing of a message with zero
descriptors as early as possible, and assert that number of descriptors
is positive in unp_freerights().

Reviewed by: mjg, pjd, jilles

11 years agoFlag isp(4) as supporting unmapped I/O; all necessary conversion actually
marius [Tue, 4 Jun 2013 11:05:57 +0000 (11:05 +0000)]
Flag isp(4) as supporting unmapped I/O; all necessary conversion actually
already has been done as part of r246713.

Reviewed by: mjacob

11 years agoFix the passing of time on Armada XP.
gber [Tue, 4 Jun 2013 09:33:03 +0000 (09:33 +0000)]
Fix the passing of time on Armada XP.

In order to become independent of Coherency Fabric frequency, configure
Timer and Watchdog to operate in 25MHz mode.

Submitted by: Zbigniew Bodek <zbb@semihalf.com>

11 years agoImplement pmap_copy() for ARMv6/v7.
gber [Tue, 4 Jun 2013 09:21:18 +0000 (09:21 +0000)]
Implement pmap_copy() for ARMv6/v7.

Copy the given range of mappings from the source map to the
destination map, thereby reducing the number of VM faults on fork.

Submitted by:   Zbigniew Bodek <zbb@semihalf.com>
Sponsored by:   The FreeBSD Foundation, Semihalf

11 years agomdoc: convert .Fd to .In, which is much nicer.
joel [Tue, 4 Jun 2013 07:37:06 +0000 (07:37 +0000)]
mdoc: convert .Fd to .In, which is much nicer.

11 years agoMatch the options of the kernel.
obrien [Tue, 4 Jun 2013 06:38:01 +0000 (06:38 +0000)]
Match the options of the kernel.

11 years agoUpdate a comment.
alc [Tue, 4 Jun 2013 05:44:52 +0000 (05:44 +0000)]
Update a comment.

11 years agoAdd man links for expl(3) and expm1l(3).
das [Tue, 4 Jun 2013 05:41:38 +0000 (05:41 +0000)]
Add man links for expl(3) and expm1l(3).

11 years agoUse f_shell_escape() instead of forking to awk. In this case, the
dteske [Tue, 4 Jun 2013 03:47:21 +0000 (03:47 +0000)]
Use f_shell_escape() instead of forking to awk. In this case, the
replacement comes with a great performance increase (as f_shell_escape()
uses the built-in based f_replaceall() which out-performs forking to
awk(1)). This should also improve readability slightly.

11 years agoUse a case-statement instead of multiple (separate even) if-statements.
dteske [Tue, 4 Jun 2013 03:38:16 +0000 (03:38 +0000)]
Use a case-statement instead of multiple (separate even) if-statements.

11 years agoComments.
dteske [Tue, 4 Jun 2013 03:37:35 +0000 (03:37 +0000)]
Comments.