]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoRename DT_FEATURE_1 to DT_FEATURE
Ed Maste [Thu, 21 Aug 2014 20:55:10 +0000 (20:55 +0000)]
Rename DT_FEATURE_1 to DT_FEATURE

This provides a minor cleanup in elfdump; there are otherwise no
consumers in the tree.  Old SUN documentation can be found for either
variant, but GNU binutils switched to DT_FEATURE around 2000.

Sponsored by: The FreeBSD Foundation

10 years agoModify a few output file names as used with vt.
Stefan Eßer [Thu, 21 Aug 2014 20:35:39 +0000 (20:35 +0000)]
Modify a few output file names as used with vt.

MFC after: 3 days

10 years agoNext round of fixes.
Stefan Eßer [Thu, 21 Aug 2014 20:33:09 +0000 (20:33 +0000)]
Next round of fixes.

MFC after: 3 days

10 years agovt_vga: When clearing video memory, don't read from it
Jean-Sébastien Pédron [Thu, 21 Aug 2014 20:10:05 +0000 (20:10 +0000)]
vt_vga: When clearing video memory, don't read from it

The goal is to clear the video memory, in case an application drew to
it. So the content shouldn't be loaded in the latches, it can't be
trusted anyway.

This improves a bit the window switch speed.

MFC after: 1 week

10 years agovt(4): Rename the "mouse_cursor" structure to "vt_mouse_cursor"
Jean-Sébastien Pédron [Thu, 21 Aug 2014 19:42:24 +0000 (19:42 +0000)]
vt(4): Rename the "mouse_cursor" structure to "vt_mouse_cursor"

At the same time, "w" and "h" members are now called "width" and
"height". The goal is to have a more "public" structure, because it will
soon be passed as argument to a new callback, replacing vd_bitbltchr_t.

MFC after: 1 week

10 years agovt(4): Test if the cursor is shown only once
Jean-Sébastien Pédron [Thu, 21 Aug 2014 19:15:22 +0000 (19:15 +0000)]
vt(4): Test if the cursor is shown only once

Later, we just see if the "struct mouse_cursor" pointer is set. This
avoids the need to mess with all the conditions several times; this has
been error prone.

While here, rename the variable "m" to a more meaningful "cursor", like
it's done elsewhere in the code.

MFC after: 1 week

10 years agoChange file permissions for some setuid executables so they are "o+r".
Neel Natu [Thu, 21 Aug 2014 19:04:15 +0000 (19:04 +0000)]
Change file permissions for some setuid executables so they are "o+r".
The executable itself doesn't contain any privileged information.

An example of where this is useful is when makefs(8) is creating an image
that includes /sbin/shutdown. This can now be done without root privileges.

Reviewed by: delphij
Discussed with: delphij, des
CR: https://reviews.freebsd.org/D662

10 years agovt(4): Constify vt_buf argument of vtbuf_iscursor()
Jean-Sébastien Pédron [Thu, 21 Aug 2014 18:26:32 +0000 (18:26 +0000)]
vt(4): Constify vt_buf argument of vtbuf_iscursor()

MFC after: 1 week

10 years ago* Add new net/sff8436.h containing constants used to access
Alexander V. Chernikov [Thu, 21 Aug 2014 17:54:42 +0000 (17:54 +0000)]
* Add new net/sff8436.h containing constants used to access
  QSFP+ data via i2c inteface. These constants has been taken
  from SFF-8436 "QSFP+ 10 Gbs 4X PLUGGABLE TRANSCEIVER" standard
  rev 4.8.
* Add support for printing QSFP+ information from 40G NICs
  such as Chelsio T5.

This commit does not contain ioctl changes necessary for this
functionality work, there will be another commit soon.

Example:
cxl1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=ec07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,.....>
        ether 00:07:43:28:ad:08
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet 40Gbase-LR4 <full-duplex>
        status: active
        plugged: QSFP+ 40GBASE-LR4 (MPO Parallel Optic)
        vendor: OEM PN: OP-QSFP-40G-LR4 SN: 20140318001 DATE: 2014-03-18
        module temperature: 64.06 C voltage: 3.26 Volts
        lane 1: RX: 0.47 mW (-3.21 dBm) TX: 2.78 mW (4.46 dBm)
        lane 2: RX: 0.20 mW (-6.94 dBm) TX: 2.80 mW (4.47 dBm)
        lane 3: RX: 0.18 mW (-7.38 dBm) TX: 2.79 mW (4.47 dBm)
        lane 4: RX: 0.90 mW (-0.45 dBm) TX: 2.80 mW (4.48 dBm)

Tested on: Chelsio T5
Tested on: Mellanox/Huawei passive/active cables/transceivers.
MFC after: 2 weeks
Sponsored by: Yandex LLC

10 years agoAdd `-A' flag to pkg-install(8) invocation when installing dependencies.
Devin Teske [Thu, 21 Aug 2014 17:15:09 +0000 (17:15 +0000)]
Add `-A' flag to pkg-install(8) invocation when installing dependencies.

MFC after: 3 days
X-MFC-to: stable/10, stable/9
Reported by: gjb
Discussed with: jelischer, gjb, bdrewery

10 years agoUse proper include paths in kernel iSCSI code.
Edward Tomasz Napierala [Thu, 21 Aug 2014 16:08:17 +0000 (16:08 +0000)]
Use proper include paths in kernel iSCSI code.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

10 years agoFix includes.
Edward Tomasz Napierala [Thu, 21 Aug 2014 15:59:25 +0000 (15:59 +0000)]
Fix includes.

Suggested by: pluknet@
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

10 years agovt(4): Pause the flush timer while swithing window
Jean-Sébastien Pédron [Thu, 21 Aug 2014 15:55:18 +0000 (15:55 +0000)]
vt(4): Pause the flush timer while swithing window

This fixes bad looking refresh when switching window: squares instead
of text, flashing screen, and so on. In the worst case, vt_flush() came
at a very inappropriate timing and the screen was not refreshed at all
(leaving squares all over the place).

This doesn't fix the flickering of the screen with vt_vga, because the
sync signal is temporarily stopped and the video memory is cleared.

MFC after: 1 week

10 years agoMake the iSCSI stack use __FBSDID() properly.
Edward Tomasz Napierala [Thu, 21 Aug 2014 15:32:38 +0000 (15:32 +0000)]
Make the iSCSI stack use __FBSDID() properly.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

10 years agovt(4): Mark cursor position as dirty when we enable/disable it
Jean-Sébastien Pédron [Thu, 21 Aug 2014 15:14:54 +0000 (15:14 +0000)]
vt(4): Mark cursor position as dirty when we enable/disable it

MFC after: 1 week

10 years agoAdd guards to ptrdiff_t definition in include/stddef.h
Alexander Kabaev [Thu, 21 Aug 2014 15:10:10 +0000 (15:10 +0000)]
Add guards to ptrdiff_t definition in include/stddef.h

Back in 2011 obrien has added the #define macro in sys/sys/stddef.h to
guard ptrdiff_t. Add similar protection to the identical code in
include/stddef.h.

Submitted by:   Mariusz Zaborski <oshogbo@FreeBSD.org>
MFC after:      1 week

10 years agoUse __FBSDID() properly.
Edward Tomasz Napierala [Thu, 21 Aug 2014 15:07:25 +0000 (15:07 +0000)]
Use __FBSDID() properly.

Suggested by: pluknet@
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

10 years agovt(4): Mark the current cursor position as dirty
Jean-Sébastien Pédron [Thu, 21 Aug 2014 15:00:21 +0000 (15:00 +0000)]
vt(4): Mark the current cursor position as dirty

Like r270273, this has no effect for now, because the cursor is always
drawn. This is in preparation of future changes to vd_bitbltchr_t API.

MFC after: 1 week

10 years agovt(4): If the cursor didn't move, don't mark its position as dirty
Jean-Sébastien Pédron [Thu, 21 Aug 2014 14:54:37 +0000 (14:54 +0000)]
vt(4): If the cursor didn't move, don't mark its position as dirty

Currently, this has no effect, because the cursor is always redrawn
anyway. But this will be useful after improvements to the vd_bitbltchr_t
callback API.

The vt_device structure members used to store the position of the cursor
as of the last redraw are renamed from vd_mdirty{x,y} to vd_mold{x,y}.
The associated comment is fixed too. Also, their value is now expressed
in pixels, not in character columns/row.

MFC after: 1 week

10 years agovt(4): If the cursor is globally disabled, don't mark its position as dirty
Jean-Sébastien Pédron [Thu, 21 Aug 2014 14:12:11 +0000 (14:12 +0000)]
vt(4): If the cursor is globally disabled, don't mark its position as dirty

This avoids unnecessary redraw. In particular, during boot, where the
cursor is disabled and its fake position is [0;0], this triggered a
refresh of the whole screen each time vt_flush() is called.

MFC after: 1 week

10 years agovt(4): Mark cursor old position as dirty before reading the dirty area
Jean-Sébastien Pédron [Thu, 21 Aug 2014 13:28:48 +0000 (13:28 +0000)]
vt(4): Mark cursor old position as dirty before reading the dirty area

Otherwise, the redraw is done during the next vt_flush run.

MFC after: 1 week

10 years agovt(4): Handle global and per-window mouse cursor toggle in one place
Jean-Sébastien Pédron [Thu, 21 Aug 2014 13:04:34 +0000 (13:04 +0000)]
vt(4): Handle global and per-window mouse cursor toggle in one place

Before the global flag was set/unset using the CONS_MOUSECTL ioctl, and
the per-window flag through the MOUSE_SETLEVEL or MOUSE_SETMODE ioctls.

Also, if the cursor is already enabled/disabled, return immediatly. This
avoids to reset the cursor's position to the center of the screen.

This matches syscons' behavior.

While here, remove a trailing space and a redundant variable
declaration.

10 years agoDocument MAC address selection and setting for atse(4).
Bjoern A. Zeeb [Thu, 21 Aug 2014 12:50:11 +0000 (12:50 +0000)]
Document MAC address selection and setting for atse(4).

Submitted by: brooks
MFC after: 3 days
Sponsored by: DARPA/AFRL

10 years agovt(4): Fix an inconsistency between the mouse cursor bitmap and its mask
Jean-Sébastien Pédron [Thu, 21 Aug 2014 10:54:39 +0000 (10:54 +0000)]
vt(4): Fix an inconsistency between the mouse cursor bitmap and its mask

MFC after: 1 week

10 years agoRevert r270227. GCC doesn't like the lack of LL suffix,
Davide Italiano [Thu, 21 Aug 2014 09:01:42 +0000 (09:01 +0000)]
Revert r270227. GCC doesn't like the lack of LL suffix,
so this makes powerpc build failing.

10 years agoProvide compatibility shim for atomic_dec_64_nv.
Xin LI [Thu, 21 Aug 2014 08:25:46 +0000 (08:25 +0000)]
Provide compatibility shim for atomic_dec_64_nv.

X-MFC-with: r270247
MFC after: 13 days

10 years agoAdd a missing brace to callout_init_rm() to fix syntax.
Gavin Atkinson [Thu, 21 Aug 2014 07:52:51 +0000 (07:52 +0000)]
Add a missing brace to callout_init_rm() to fix syntax.

MFC after: 1 week

10 years agoAlways check the limits of array index variables before using them.
Pedro F. Giffuni [Thu, 21 Aug 2014 02:40:33 +0000 (02:40 +0000)]
Always check the limits of array index variables before using them.

Obtained from: DragonFlyBSD
MFC after: 1 week

10 years agoAdd missing locking.
Adrian Chadd [Thu, 21 Aug 2014 00:57:32 +0000 (00:57 +0000)]
Add missing locking.

Whilst here, assert that the lock is held when calling epstop().

Tested:

ep0: <3com Megahertz 574B>

10 years agoChange netmap's global lock to sx instead of a mutex.
Navdeep Parhar [Wed, 20 Aug 2014 23:37:44 +0000 (23:37 +0000)]
Change netmap's global lock to sx instead of a mutex.

Reviewed by: luigi@
MFC after: 1 day

10 years agoFix return type of callout_init_rm() and add return type to
Gavin Atkinson [Wed, 20 Aug 2014 23:29:34 +0000 (23:29 +0000)]
Fix return type of callout_init_rm() and add return type to
callout_deactivate().

PR: 192520
Submitted by: yaneurabeya gmail com
MFC after: 3 days

10 years agoTurns out that IDENTIFY DEVICE and IDENTIFY PACKET DEVICE return data
Warner Losh [Wed, 20 Aug 2014 22:58:12 +0000 (22:58 +0000)]
Turns out that IDENTIFY DEVICE and IDENTIFY PACKET DEVICE return data
that's only mostly similar. Specifically word 78 bits are defined for
IDENTIFY DEVICE as
5 Supports Hardware Feature Control
while a IDENTIFY PACKET DEVICE defines them as
5 Asynchronous notification supported
Therefore, only pay attention to bit 5 when we're talking to ATAPI
devices (we don't use the hardware feature control at this time).
Ignore it for ATA devices. Remove kludge that papered over this issue
for Samsung SATA SSDs, since Micron drives also have the bit set and
the error was caused by this bad interpretation of the spec (which is
quite easy to do, since bits aren't normally overlapping like this).

10 years agoMFV r270196:
Xin LI [Wed, 20 Aug 2014 22:39:26 +0000 (22:39 +0000)]
MFV r270196:

Illumos issue:
    5047 don't use atomic_*_nv if you discard the return value

MFC after: 2 weeks

10 years agoMFC r270195:
Xin LI [Wed, 20 Aug 2014 21:44:48 +0000 (21:44 +0000)]
MFC r270195:

Illumos issue:
    5045 use atomic_{inc,dec}_* instead of atomic_add_*

MFC after: 2 weeks

10 years agosh: Remove two redundant (uintmax_t) casts.
Jilles Tjoelker [Wed, 20 Aug 2014 20:15:43 +0000 (20:15 +0000)]
sh: Remove two redundant (uintmax_t) casts.

Submitted by: jmallett

10 years agoMFV r270193:
Xin LI [Wed, 20 Aug 2014 18:29:18 +0000 (18:29 +0000)]
MFV r270193:

Illumos issues:
    5042 stop using deprecated atomic functions

MFC after: 2 weeks

10 years agoRecover sin6_scope_id of gateway addresses in riprecv() by using the if_index
Hiroki Sato [Wed, 20 Aug 2014 17:27:15 +0000 (17:27 +0000)]
Recover sin6_scope_id of gateway addresses in riprecv() by using the if_index
where a RIP packet was received.  This fixes a bug which prevented gateway
addresses in fe80::/64 from being added.

10 years agoThe conversion tools have been further improved and some erroneous
Stefan Eßer [Wed, 20 Aug 2014 17:07:41 +0000 (17:07 +0000)]
The conversion tools have been further improved and some erroneous
conversions have been detected and fixed.

It is now possible to add options after the encoding in the parameter
list for convert-keymap.pl. This is currently used to selectively
enable interpretation of the ISO8859-1 currency symbol as the Euro
sign found in ISO5589-15, or to add a Yen symbol in place of '\' for
specific Japanese keyboards. The option are appended to the parameter
list, as in e.g. "convert-keymap.pl german.iso.kbd ISO5589-1 EURO".

The options are appended to the encoding in the form "+EURO" or "+YEN"
in KBDFILES.map, to keep the meaning of the columns intact.

MFC after: 3 days

10 years agoMisc fixes suggested by Coverity.
Alan Somers [Wed, 20 Aug 2014 17:04:49 +0000 (17:04 +0000)]
Misc fixes suggested by Coverity.

sbin/devd/tests/client_test.c
* In the event that popen fails, don't dereference its return value.
* Fix array overwrite in the stream and seqpacket tests.
* Close sockets at the end of successful ATF tests.

Reported by: Coverity scan
CID: 1232019123202012320291232030
MFC after: 1 week
Sponsored by: Spectra Logic

10 years agoRewrite of ti_i2c based on gonzo's patch, fix the following bugs/problems:
Luiz Otavio O Souza [Wed, 20 Aug 2014 17:02:37 +0000 (17:02 +0000)]
Rewrite of ti_i2c based on gonzo's patch, fix the following bugs/problems:

  . interrupt storm detected on "intr70:"; throttling interrupt source;

  . Added access serialization on iicbus_transfer(), previously there was
    no such protection and a new transfer could easily confuse the
    controller;

  . Add error checkings (i.e. stop the transfer when a error is detected
    and do _not_ overwrite the previous error);

  . On command done interrupt do not assume that the transfer was finished
    sucessfully as we will receive the command done interrupt even after
    errors;

  . Simplify the FIFO handling;

  . Reset the FIFO between the transfers as the FIFO may contain data from
    the last (failed) transfer;

  . Fix the iicbus speed for AM335x, which in turn will make better use of
    the I2C noise filter (set to one internal clock cycle);

  . Move the read and write handler to ithread instead of notifying the
    requesting thread with wakeup(9);

  . Fix the comments based on OMAP4 TRM.

The above changes allows me to read the EDID from my HDMI monitor on BBB
with gonzo's patches to support TDA19988 (which does 128 bytes reads) and
repeatedly scan the iicbus (with a modified i2c(8)) without lock up the bus.

Phabric: D465

10 years agoAnother rpund of fixes, after checking keymaps for plausibility and with
Stefan Eßer [Wed, 20 Aug 2014 17:00:47 +0000 (17:00 +0000)]
Another rpund of fixes, after checking keymaps for plausibility and with
several updates to the converter tools. There is now support for hybrid
source keymaps, which e.g. use ISO8859-1 (not -15) but still provide an
Euro key (on the "E" key). ISO8859-1 currency symbols on other keys are
still converted to that character, not the Euro sign. A similar hack was
applied to the Japanese keyboards to add the Yen key, that could not be
expressed in SYSCONS.

Several modifications have been applied after the conversion (removal of
unused accents tables, some reformatting, exchange of a few key symbols).

The German keymap (de.kbd) is now using deadkeys only for those keys,
that behave that way under Windows. There are now ".acc" and ".noacc"
variants, which use deadkeys vs. nodeadkeys for all accent keys.

I'm still in the process of comparing keymaps that existed in different
encodings in SYSCONS. These are generally translated slightly differently,
either because of mistakes, or because of different preferences, or due
to limitations of the respective encoding.

MFC after: 3 days

10 years agoNumerous small fixes, mostly suggested by Coverity.
Alan Somers [Wed, 20 Aug 2014 16:59:33 +0000 (16:59 +0000)]
Numerous small fixes, mostly suggested by Coverity.

tests/sys/kern/unix_seqpacket_test.c
* Remove a duplicate error check in mk_pair_of_sockets
* Always close sockets in the success path of ATF test cases.  Don't
  bother with the error paths, because those are mostly assertions
  anyway.  Most of these socket leaks were reported by Coverity.
  All of them are harmless, because each ATF test case runs in its
  own process.
* Fix the len argument to send in shutdown_send and
  shutdown_send_sigpipe.  The old version was using sizeof a pointer
  instead of sizeof the char array.  Reported by Coverity.
* Change a few ATF_CHECK to ATF_REQUIRE if the test can't reasonably
  continue past a failure.

Reported by: Coverity Scan
CID: 122999512299911229988122999412299891229992
CID: 122999312299901229984122996712300051229977
CID: 122996612300041229976
MFC after: 1 week
Sponsored by: Spectra Logic

10 years agoMake Bruce happy removing the "LL abomination" from time.h
Davide Italiano [Wed, 20 Aug 2014 16:32:02 +0000 (16:32 +0000)]
Make Bruce happy removing the "LL abomination" from time.h
It's not necessary in all the three instances because
they already have the correct type on all the supported
arches.

Requested by: bde

10 years agoAdd kernel modules for si(4), wds(4), and wl(4).
John Baldwin [Wed, 20 Aug 2014 16:09:05 +0000 (16:09 +0000)]
Add kernel modules for si(4), wds(4), and wl(4).

10 years agoUnexpand TAILQ_FOREACH().
John Baldwin [Wed, 20 Aug 2014 16:07:56 +0000 (16:07 +0000)]
Unexpand TAILQ_FOREACH().

10 years agoFix build of si(4) and enable it in LINT on amd64 and i386.
John Baldwin [Wed, 20 Aug 2014 16:07:17 +0000 (16:07 +0000)]
Fix build of si(4) and enable it in LINT on amd64 and i386.

10 years agoBump MAXCPU on amd64 from 64 to 256. In practice APIC only permits 255
John Baldwin [Wed, 20 Aug 2014 16:06:24 +0000 (16:06 +0000)]
Bump MAXCPU on amd64 from 64 to 256.  In practice APIC only permits 255
CPUs (IDs 0 through 254).  Getting above that limit requires x2APIC.

MFC after: 1 month

10 years agoBump the default size of cpuset_t masks in userland from 128 bits to 256.
John Baldwin [Wed, 20 Aug 2014 16:05:15 +0000 (16:05 +0000)]
Bump the default size of cpuset_t masks in userland from 128 bits to 256.

This should not be an ABI change since the various public APIs that use
cpusets all include an explicit size parameter in addition to the cpuset
parameter.

MFC after: 1 week

10 years agoReplace dev_clone with cdevpriv(9) KPI in audit_pipe code.
Davide Italiano [Wed, 20 Aug 2014 16:04:30 +0000 (16:04 +0000)]
Replace dev_clone with cdevpriv(9) KPI in audit_pipe code.
This is (yet another) step towards the removal of device
cloning from our kernel.

CR: https://reviews.freebsd.org/D441
Reviewed by: kib, rwatson
Tested by: pho

10 years agoAdd ${LIBC} to DPADD to fix "make checkdpadd"
Enji Cooper [Wed, 20 Aug 2014 15:43:26 +0000 (15:43 +0000)]
Add ${LIBC} to DPADD to fix "make checkdpadd"

Phabric: D632
Approved by: jmmv (mentor)
MFC after: 2 weeks

10 years agoAdd missing break.
Pedro F. Giffuni [Wed, 20 Aug 2014 14:58:25 +0000 (14:58 +0000)]
Add missing break.

CID: 603368

10 years agopci: make MSI(-X) enable and disable methods of the PCI bus
Roger Pau Monné [Wed, 20 Aug 2014 14:57:20 +0000 (14:57 +0000)]
pci: make MSI(-X) enable and disable methods of the PCI bus

Make the functions pci_disable_msi, pci_enable_msi and pci_enable_msix
methods of the newbus PCI bus. This code should not include any
functional change.

Sponsored by: Citrix Systems R&D
Reviewed by: imp, jhb
Differential Revision: https://reviews.freebsd.org/D354

dev/pci/pci.c:
 - Convert the mentioned functions to newbus methods.
 - Fix the callers of the converted functions.

sys/dev/pci/pci_private.h:
dev/pci/pci_if.m:
 - Declare the new methods.

dev/pci/pcivar.h:
 - Add helpers to call the newbus methods.

ofed/include/linux/pci.h:
 - Add define to prevent the ofed version of pci_enable_msix from
   clashing with the FreeBSD native version.

10 years agoRemove useless - and buggy, it resulted in spurious warnings in logs - code.
Edward Tomasz Napierala [Wed, 20 Aug 2014 13:54:27 +0000 (13:54 +0000)]
Remove useless - and buggy, it resulted in spurious warnings in logs - code.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

10 years agoAdd description for the "automounted" mount flag.
Edward Tomasz Napierala [Wed, 20 Aug 2014 13:52:47 +0000 (13:52 +0000)]
Add description for the "automounted" mount flag.

Reviewed by: emaste@
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

10 years agoRework ".." lookup; previous one failed to properly busy the mountpoint.
Edward Tomasz Napierala [Wed, 20 Aug 2014 13:46:51 +0000 (13:46 +0000)]
Rework ".." lookup; previous one failed to properly busy the mountpoint.

Reviewed by: kib@
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

10 years agoAfter much toying around with this AMRR initial rate stuff,
Adrian Chadd [Wed, 20 Aug 2014 09:10:03 +0000 (09:10 +0000)]
After much toying around with this AMRR initial rate stuff,
I've decided that for 11n rates it's best to start (very) low and work
our way up.

So, from now on, the initial rate for AMRR 11n is MCS4.
It doesn't try MCS12 or MCS20 - at low signal strengths those don't
work very well at all.

AMRR will step the rate control up over time if things work out better.

Tested:

* Intel 5100
* Intel 5300 (using local diffs to test out 3x3 stream support)

10 years agoDo not busy the UFS mount point inside VOP_RENAME(). The
Konstantin Belousov [Wed, 20 Aug 2014 08:15:23 +0000 (08:15 +0000)]
Do not busy the UFS mount point inside VOP_RENAME().  The
kern_renameat() already starts write on the mp, which prevents
parallel unmount from proceed.  Busying mp after vn_start_write()
deadlocks the unmount.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoCorrect the test for condition to suspend UFS filesystem during
Konstantin Belousov [Wed, 20 Aug 2014 08:13:03 +0000 (08:13 +0000)]
Correct the test for condition to suspend UFS filesystem during
unmount.  There is no need to suspend read-only filesystem, while we
need suspension on modificable mount point.

Reported by: rwatson
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoIncrease max number of physical segments on amd64 to 63.
Konstantin Belousov [Wed, 20 Aug 2014 08:07:08 +0000 (08:07 +0000)]
Increase max number of physical segments on amd64 to 63.

Eventually, the vmd_segs of the struct vm_domain should become bitset
instead of long, to allow arbitrary compile-time selected maximum.

Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoAdd arch-specific macro SFBUF_PHYS_DMAP(), which should translate the
Konstantin Belousov [Wed, 20 Aug 2014 08:02:38 +0000 (08:02 +0000)]
Add arch-specific macro SFBUF_PHYS_DMAP(), which should translate the
physical address of the page to direct map address, in case
SFBUF_OPTIONAL_DIRECT_MAP returns true.  The case of PowerPC AIM
64bit, where the page physical address is identical to the direct map
address, is accidental.

Reviewed by: alc
Sponsored by: The FreeBSD Foundation

10 years agoFix conversion errors leading to malformed keymap files.
Stefan Eßer [Wed, 20 Aug 2014 07:48:09 +0000 (07:48 +0000)]
Fix conversion errors leading to malformed keymap files.

MFC after: 3 days

10 years agoFix further conversion errors found while testing the converted keymaps.
Stefan Eßer [Wed, 20 Aug 2014 07:46:28 +0000 (07:46 +0000)]
Fix further conversion errors found while testing the converted keymaps.

MFC after: 3 days

10 years ago5047 don't use atomic_*_nv if you discard the return value
Xin LI [Wed, 20 Aug 2014 06:25:43 +0000 (06:25 +0000)]
5047 don't use atomic_*_nv if you discard the return value
Reviewed by: Garrett D'Amore <garrett@damore.org>
Reviewed by: Jason King <jason.brian.king@gmail.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>

illumos/illumos-gate@640c1670a105457bb0040e8e11037b53ab6ebcfa

10 years ago5045 use atomic_{inc,dec}_* instead of atomic_add_*
Xin LI [Wed, 20 Aug 2014 06:22:59 +0000 (06:22 +0000)]
5045 use atomic_{inc,dec}_* instead of atomic_add_*
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>

illumos/illumos-gate@1a5e258f5471356ca102c7176637cdce45bac147

10 years ago5043 remove deprecated atomic functions' prototypes
Xin LI [Wed, 20 Aug 2014 06:20:06 +0000 (06:20 +0000)]
5043 remove deprecated atomic functions' prototypes
Reviewed by: Garrett D'Amore <garrett@damore.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>

illumos/illumos-gate@6ed9368a130d7c9a82e574da808d34034da33748

10 years ago5042 stop using deprecated atomic functions
Xin LI [Wed, 20 Aug 2014 06:15:53 +0000 (06:15 +0000)]
5042 stop using deprecated atomic functions
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>

illumos/illumos-gate@75d94465dbafa487b716482dc36d5150a4ec9853

10 years agoIf eapol packets are sent at the lowest rate, key negotiation will
Kevin Lo [Wed, 20 Aug 2014 01:32:04 +0000 (01:32 +0000)]
If eapol packets are sent at the lowest rate, key negotiation will
become more reliable.

Submitted by: Akinori Furukoshi <moonlightakkiy at yahoo dot ca>

10 years agoAdd the D-Link DWA-125 rev D1.
Kevin Lo [Wed, 20 Aug 2014 01:26:27 +0000 (01:26 +0000)]
Add the D-Link DWA-125 rev D1.

Tested by myself.

10 years agoDon't stop other legs of a parallel build due to a failure in make_check.
Ian Lepore [Wed, 20 Aug 2014 00:33:37 +0000 (00:33 +0000)]
Don't stop other legs of a parallel build due to a failure in make_check.
The whole point is to see if there's any failure, which is handled by
building a newer version of make.

10 years agoAdd zdb into rescue environment.
Xin LI [Wed, 20 Aug 2014 00:14:41 +0000 (00:14 +0000)]
Add zdb into rescue environment.

On amd64, this would increase the binary size by 1.1MiB and
make it possible to examine zpool status offline, useful for
recovery and diagnostic purposes.

Submitted by: sef
Obtained from: FreeNAS
MFC after: 2 weeks

10 years agoAvoid showing stale errors when nmount(2) fails.
Bryan Drewery [Tue, 19 Aug 2014 21:04:31 +0000 (21:04 +0000)]
Avoid showing stale errors when nmount(2) fails.

Sometimes nmount(2) will fail without setting errmsg. The previous (ignored)
error would then be shown as the reason for the failed call if the next
nmount(2) also fails without [ENOENT,ENOTSUP].

An example is when there is a tmpfs mounted with -o size. vfs_filteropt() adds
'size' as an error in errmsg due to 'size' not being in tmpfs_updateopts. Then
tmpfs_mount returns [ENOTSUP] from nmount(2), which is then ignored. The next
call may race with an unmount causing an invalid [EINVAL] that then does log an
error, with the tmpfs errmsg.

The race itself is a separate issue to fix as it is expected to have an
[ENOENT] returned instead.

In this example the mount being shown is actually nullfs, not tmpfs that the
error is from.

  mountd[740]: can't delete exports for /poudriere/data/.m/exp-head-commit-test-devel/04/.npkg: Invalid argument mount option <size> is unknown

It should only show:

  mountd[740]: can't delete exports for /poudriere/data/.m/exp-head-commit-test-devel/04/.npkg: Invalid argument

MFC after: 2 weeks

10 years agoAdd recent DragonFly releases.
Bryan Drewery [Tue, 19 Aug 2014 20:35:09 +0000 (20:35 +0000)]
Add recent DragonFly releases.

Submitted by: Zach Crownover <zachary.crownover@gmail.com>
MFC after: 1 week

10 years agoAdd LIBMD and LIBUTIL to DPADD to fix "make checkdpadd"
Enji Cooper [Tue, 19 Aug 2014 18:47:47 +0000 (18:47 +0000)]
Add LIBMD and LIBUTIL to DPADD to fix "make checkdpadd"

Approved by: jmmv (mentor)
MFC after: 5 days
Phabric: D633
PR: 192763

10 years agoAdd missing libraries to DPADD; sort DPADD so DPADD and LDADD match up
Enji Cooper [Tue, 19 Aug 2014 18:31:20 +0000 (18:31 +0000)]
Add missing libraries to DPADD; sort DPADD so DPADD and LDADD match up

This fixes "make checkdpadd"

Approved by: jmmv (mentor)
MFC after: 2 weeks
Phabric: D630
PR: 192765

10 years agoFix typo (LIBLDNSADD -> LIBLDNS) to fix "make checkdpadd"
Enji Cooper [Tue, 19 Aug 2014 18:27:43 +0000 (18:27 +0000)]
Fix typo (LIBLDNSADD -> LIBLDNS) to fix "make checkdpadd"

X-MFC with: r269648
Phabric: D634
Approved by: jmmv (mentor)

10 years agoFix lock recursion on LUN shutdown, introduced on r269497.
Alexander Motin [Tue, 19 Aug 2014 17:04:18 +0000 (17:04 +0000)]
Fix lock recursion on LUN shutdown, introduced on r269497.

MFC after: 3 days

10 years agoBump __FreeBSD_version after r269489 so ports can use it.
Bryan Drewery [Tue, 19 Aug 2014 15:47:51 +0000 (15:47 +0000)]
Bump __FreeBSD_version after r269489 so ports can use it.

10 years agoRegen after r270171
Bryan Drewery [Tue, 19 Aug 2014 15:46:40 +0000 (15:46 +0000)]
Regen after r270171

10 years agoAdd missing WITHOUT_CUSE file.
Hans Petter Selasky [Tue, 19 Aug 2014 15:40:26 +0000 (15:40 +0000)]
Add missing WITHOUT_CUSE file.

10 years agoUse bsd.lib.mk here as all other csu Makefiles do.
Bryan Drewery [Tue, 19 Aug 2014 15:30:56 +0000 (15:30 +0000)]
Use bsd.lib.mk here as all other csu Makefiles do.

This effectively reverts r124752.

There's no reason this should be different. It resulted in needing NO_PIE in
the original opt-out NO_PIE commit as this was not using the proper framework.

Reported by: peter

10 years agoRegen after r270168
Bryan Drewery [Tue, 19 Aug 2014 15:09:24 +0000 (15:09 +0000)]
Regen after r270168

10 years agoRevert r267233 for now. PIE support needs to be reworked.
Bryan Drewery [Tue, 19 Aug 2014 15:04:32 +0000 (15:04 +0000)]
Revert r267233 for now. PIE support needs to be reworked.

1. 50+% of NO_PIE use is fixed by adding -fPIC to INTERNALLIB and other
   build-only utility libraries.
2. Another 40% is fixed by generating _pic.a variants of various libraries.
3. Some of the NO_PIE use is a bit absurd as it is disabling PIE (and ASLR)
   where it never would work anyhow, such as csu or loader. This suggests
   there may be better ways of adding support to the tree. Many of these
   cases can be fixed such that -fPIE will work but there is really no
   reason to have it in those cases.
4. Some of the uses are working around hacks done to some Makefiles that are
   really building libraries but have been using bsd.prog.mk because the code
   is cleaner. Had they been using bsd.lib.mk then NO_PIE would not have
   been needed.

We likely do want to enable PIE by default (opt-out) for non-tree consumers
(such as ports). For in-tree though we probably want to only enable PIE
(opt-in) for common attack targets such as remote service daemons and setuid
utilities. This is also a great performance compromise since ASLR is expected
to reduce performance. As such it does not make sense to enable it in all
utilities such as ls(1) that have little benefit to having it enabled.

Reported by: kib

10 years agoSort ASUS section and add USB device ID of ASUS USB-AC51.
Kevin Lo [Tue, 19 Aug 2014 09:02:58 +0000 (09:02 +0000)]
Sort ASUS section and add USB device ID of ASUS USB-AC51.

10 years agoAdd support for -X, which installs the native cross tools for qemu
Warner Losh [Tue, 19 Aug 2014 03:51:10 +0000 (03:51 +0000)]
Add support for -X, which installs the native cross tools for qemu
operations. Doesn't install qemu nor setup the jail, yet.

10 years agoNew DTS files to suppport the SAM9260EK eval board. Derived, in part,
Warner Losh [Tue, 19 Aug 2014 03:51:05 +0000 (03:51 +0000)]
New DTS files to suppport the SAM9260EK eval board. Derived, in part,
from the SAM9G20EK dts files (so that file is GPL'd).

10 years agoDestroy the "qdiffsample_zone" UMA zone on unload to avoid a use-after-unload
Lawrence Stewart [Tue, 19 Aug 2014 02:19:53 +0000 (02:19 +0000)]
Destroy the "qdiffsample_zone" UMA zone on unload to avoid a use-after-unload
panic easily triggered by running "sysctl -a" after unload.

Reported and tested by: Grenville Armitage <garmitage@swin.edu.au>
MFC after: 1 week

10 years agoFor vendors like Juniper, extensibility for sockets is important. A
Marcel Moolenaar [Mon, 18 Aug 2014 23:45:40 +0000 (23:45 +0000)]
For vendors like Juniper, extensibility for sockets is important.  A
good example is socket options that aren't necessarily generic.  To
this end, OSD is added to the socket structure and hooks are defined
for key operations on sockets.  These are:
o   soalloc() and sodealloc()
o   Get and set socket options
o   Socket related kevent filters.

One aspect about hhook that appears to be not fully baked is the return
semantics (the return value from the hook is ignored in hhook_run_hooks()
at the time of commit).  To support return values, the socket_hhook_data
structure contains a 'status' field to hold return values.

Submitted by: Anuranjan Shukla <anshukla@juniper.net>
Obtained from: Juniper Networks, Inc.

10 years agoFix a few conversion problems (e.g. when a keymap is derived from ISO8859-1,
Stefan Eßer [Mon, 18 Aug 2014 21:07:12 +0000 (21:07 +0000)]
Fix a few conversion problems (e.g. when a keymap is derived from ISO8859-1,
but shall provide an Euro sign - similar for Japanese Yen).

The Brazilian keymap "br.kbd" now has accents, by default - the no-accents
version has been renamed to "br.noacc.kbd".

MFC after: 3 days

10 years agoCreate the native-xtools target. This target creates only the cross
Warner Losh [Mon, 18 Aug 2014 21:04:44 +0000 (21:04 +0000)]
Create the native-xtools target. This target creates only the cross
building toolchain for the host computer. This toolchain produces
TARGET_ARCH and assumes the rest of the system contains libraries for
the target. It is intended to be used in a "qemu-user jail" where all
the binaries would otherwise be the target architecture's to build
ports. However, emulation of the compilers is too slow, so we build
native binaries for that. Rather than use the xdev produced binaries,
with all their weird links and paths, these binaries use the native
paths. They will not work unless installed into the qemu-user jail.

Differential Revision: https://phabric.freebsd.org/D518
Reviewed by: sbruno@

10 years agoMake note about reset vs RTOE actions...
Warner Losh [Mon, 18 Aug 2014 21:04:35 +0000 (21:04 +0000)]
Make note about reset vs RTOE actions...

10 years agoFix minor problems found while converting to NEWCONS format.
Stefan Eßer [Mon, 18 Aug 2014 20:58:17 +0000 (20:58 +0000)]
Fix minor problems found while converting to NEWCONS format.

MFC after: 3 days

10 years agoMinor fixes to convert-keymap.pl (conversion of 8bit characters in the form
Stefan Eßer [Mon, 18 Aug 2014 20:55:11 +0000 (20:55 +0000)]
Minor fixes to convert-keymap.pl (conversion of 8bit characters in the form
'x' with high bit set) and to KBDFILES.map (fix encodings and comment out a
few redundant keymap files).

MFC after: 3 days

10 years agoThere exists a possible sequence of page table page allocation failures
Alan Cox [Mon, 18 Aug 2014 20:28:08 +0000 (20:28 +0000)]
There exists a possible sequence of page table page allocation failures
starting with a superpage demotion by pmap_enter() that could result in
a PV list lock being held when pmap_enter() is just about to return
KERN_RESOURCE_SHORTAGE.  Consequently, the KASSERT that no PV list locks
are held needs to be replaced with a conditional unlock.

Discussed with: kib
X-MFC with: r269728
Sponsored by: EMC / Isilon Storage Division

10 years agoDeal explicitly with possible failures of make_dev_alias_p() in GEOM.
Scott Long [Mon, 18 Aug 2014 19:27:47 +0000 (19:27 +0000)]
Deal explicitly with possible failures of make_dev_alias_p() in GEOM.

Submitted by:   Mariusz Zaborski <oshogbo@FreeBSD.org>
MFC after:      3 days

10 years agoAdd the patch commited in r270147.
Roman Divacky [Mon, 18 Aug 2014 18:07:28 +0000 (18:07 +0000)]
Add the patch commited in r270147.

10 years agoBackport r197824, r213427 and r213960 from LLVM trunk:
Roman Divacky [Mon, 18 Aug 2014 18:05:55 +0000 (18:05 +0000)]
Backport r197824, r213427 and r213960 from LLVM trunk:

  r197824 | rdivacky | 2013-12-20 19:08:54 +0100 (Fri, 20 Dec 2013) | 2 lines

  Implement initial-exec TLS for PPC32.

  r213427 | hfinkel | 2014-07-19 01:29:49 +0200 (Sat, 19 Jul 2014) | 7 lines

  [PowerPC] 32-bit ELF PIC support

  This adds initial support for PPC32 ELF PIC (Position Independent Code; the
  -fPIC variety), thus rectifying a long-standing deficiency in the PowerPC
  backend.

  Patch by Justin Hibbits!

  r213960 | hfinkel | 2014-07-25 19:47:22 +0200 (Fri, 25 Jul 2014) | 3 lines

  [PowerPC] Support TLS on PPC32/ELF

  Patch by Justin Hibbits!

Reviewed by: jhibbits
Approved by: dim

10 years agoAdd LIBCRYPTO and LIBSSL to DPADD
Enji Cooper [Mon, 18 Aug 2014 18:01:18 +0000 (18:01 +0000)]
Add LIBCRYPTO and LIBSSL to DPADD

This fixes "make checkdpadd"

Phabric: D621
PR: 192761
Approved by: rpaulo (mentor)
MFC after: 2 weeks

10 years agoReplace DPADD with DPSRCS to fix "make checkdpadd"
Enji Cooper [Mon, 18 Aug 2014 17:38:50 +0000 (17:38 +0000)]
Replace DPADD with DPSRCS to fix "make checkdpadd"

Phabric: D625
Approved by: jmmv (mentor)
Reviewed by: dim
PR: 192734
MFC after: 2 weeks

10 years agoAdd LIBCRYPT to DPADD, remove LDFLAGS from LDADD, and sort the Makefile variables
Enji Cooper [Mon, 18 Aug 2014 17:35:39 +0000 (17:35 +0000)]
Add LIBCRYPT to DPADD, remove LDFLAGS from LDADD, and sort the Makefile variables

This fixes "make checkdpadd"

Phabric: D620
Approved by: jmmv (mentor)
PR: 192729
MFC after: 5 days

10 years agoAdd Canadian Bilingual keyboard
Ed Maste [Mon, 18 Aug 2014 17:10:55 +0000 (17:10 +0000)]
Add Canadian Bilingual keyboard