]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoiwm: If firmware load fails during init via iwm_preinit() we bail out
gavin [Sat, 12 Nov 2016 18:33:56 +0000 (18:33 +0000)]
iwm: If firmware load fails during init via iwm_preinit() we bail out
before calling ieee80211_ifattach() so the taskqueue hasn't been
initialized. Don't try to drain it, we'll panic.
Looks like this issue was introduced in r303326.

Reviewed by: avos, sbruno, adrian
Differential Revision: https://reviews.freebsd.org/D8499

7 years agoAdd myself (def) as a src committer and pjd as my mentor.
def [Sat, 12 Nov 2016 18:04:03 +0000 (18:04 +0000)]
Add myself (def) as a src committer and pjd as my mentor.

Approved by: pjd (mentor)

7 years agortwn: enable 11n support for RTL8188CE.
avos [Sat, 12 Nov 2016 17:58:37 +0000 (17:58 +0000)]
rtwn: enable 11n support for RTL8188CE.

- Increase Rx buffer size from MCLBYTES to MJUMPAGESIZE.
- Provide an additional defragmentation routine for frames larger
than MCLBYTES; that is required by A-MSDU / Atheros Fast-Frames
support to work with current Tx path implementation.

Enabled features list for RTL8188CE:
- Atheros Fast-Frames;
- A-MPDU (Tx / Rx);
- A-MSDU (Tx / Rx; 4k only);
- Short Guard Interval.

Tested with:
- RTL8188CE (STA+AP) + RTL8821AU (STA).
- RTL8188CE (STA) + RTL8188CUS (AP).

Relnotes: yes

7 years agoThe return type of is_managed() was changed from boolean_t to bool type
skra [Sat, 12 Nov 2016 17:24:41 +0000 (17:24 +0000)]
The return type of is_managed() was changed from boolean_t to bool type
in r308569. Now, propagate this change further for consistency sake.

MFC after: 2 weeks

7 years agoAlways call PHYS_TO_VM_PAGE() in is_managed(). Fast road for addresses
skra [Sat, 12 Nov 2016 17:03:21 +0000 (17:03 +0000)]
Always call PHYS_TO_VM_PAGE() in is_managed(). Fast road for addresses
under first_page cannot be taken as this variable is connected only to
vm_page_array segment. There could be more segments in system like
the ones for various fictitious page ranges. These can be situated
under vm_page_array segment and so, they could be skipped before this
fix. However, as far as I know, there is no report associated with it.

While here, the return type of this function is changed from boolean_t
to bool type.

Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D8502

7 years agoSet of improvements to acpi_hp(4) driver.
mav [Sat, 12 Nov 2016 05:09:39 +0000 (05:09 +0000)]
Set of improvements to acpi_hp(4) driver.

 - Attach only to WMI devices that provide supported GUIDs.  HP Spectre x360
has two WMI devices, only one of which provides the GUIDs.
 - Pass proper device to ACPI_WMI_REMOVE_EVENT_HANDLER() on detach.
 - Improve error WMI handling separating status and data paths.  This allows
to hide sysctls not supported by specific hardware/BIOS.
 - Improve CMI block parser to make it work on HP Spectre x360 laptop.
 - In verbose mode log all unknown events to help futher improvements.

7 years agoFix build when WITHOUT_BLACKLIST=yes is specified
lidl [Sat, 12 Nov 2016 03:07:41 +0000 (03:07 +0000)]
Fix build when WITHOUT_BLACKLIST=yes is specified

PR: 214409
Submitted by: matthew
Reported by: matteo
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

7 years agoReserve space for control message payload (currently a port name).
jceel [Sat, 12 Nov 2016 01:41:43 +0000 (01:41 +0000)]
Reserve space for control message payload (currently a port name).

Approved by: trasz (mentor)
Sponsored by: iXsystems, Inc.

7 years agoAllow scheduling during early boot.
jhb [Sat, 12 Nov 2016 00:23:09 +0000 (00:23 +0000)]
Allow scheduling during early boot.

- Send IPI wakeups once SMP is started even if cold is true.
- Permit preemptions when cold is true.

These changes are needed for EARLY_AP_STARTUP.

MFC after: 2 weeks
Sponsored by: Netflix

7 years agoDon't place threads on the run queue after waking up other CPUs.
jhb [Sat, 12 Nov 2016 00:14:13 +0000 (00:14 +0000)]
Don't place threads on the run queue after waking up other CPUs.

The other CPU might resume and see a still-empty runq and go back to
sleep before sched_add() adds the thread to the runq.  This results
in a lost wakeup and a potential hang if the system is otherwise
completely idle.

The race originated due to a micro-optimization (my fault) in 4BSD in
that it avoided putting a thread on the run queue if the scheduler was
going to preempt to the new thread.  To avoid complexity while fixing
this race, just drop this optimization.  4BSD now always sets the
"owepreempt" flag when a preemption is warranted and defers the actual
preemption to the thread_unlock of the caller the same as ULE.

MFC after: 2 weeks
Sponsored by: Netflix

7 years agolibcc_{s,eh}: build without SSP
emaste [Fri, 11 Nov 2016 23:28:07 +0000 (23:28 +0000)]
libcc_{s,eh}: build without SSP

As in the gnu/lib/libgcc Makefile:
    libgcc is linked in last and thus cannot depend on ssp
    symbols coming from earlier libraries. Disable stack protection
    for this library.

Reviewed by: dim
Sponsored by: The FreeBSD Foundation

7 years agoFix git tools when run against a worktree
rstone [Fri, 11 Nov 2016 23:07:31 +0000 (23:07 +0000)]
Fix git tools when run against a worktree

In a git worktree, the gitdir is in an entirely different location.
In arcgit, use git rev-parse --git-dir to get the correct path to it
always.

When running git from outside of the work tree, as in importgit,
the path provided by git rev-parse --git-dir can be either a
relative or absolute path depending on the work tree.  Rather
than trying to deal with that, just use git -C.

Differential Revision: https://reviews.freebsd.org/D8501
Reviewed by: markj

7 years agoCorrect spelling in syslog: getttimeofday -> gettimeofday
gavin [Fri, 11 Nov 2016 21:53:38 +0000 (21:53 +0000)]
Correct spelling in syslog: getttimeofday -> gettimeofday

7 years agoReplace another fdt_is_compatible() call.
jhibbits [Fri, 11 Nov 2016 21:29:48 +0000 (21:29 +0000)]
Replace another fdt_is_compatible() call.

7 years agoPull in r263169 from upstream llvm trunk (by Tim Northover):
dim [Fri, 11 Nov 2016 21:01:45 +0000 (21:01 +0000)]
Pull in r263169 from upstream llvm trunk (by Tim Northover):

  AArch64: only try to use scaled fcvt ops on legal vector types.

  Before we ended up calling getSimpleVectorType on a <3 x float>, which
  asserted.

This fixes an assertion when building the print/ghostscript9-agpl-base
port for AArch64.

PR: 213865
MFC after: 3 days

7 years agoqueue.3: Document existing QMD_* macros
cem [Fri, 11 Nov 2016 20:44:33 +0000 (20:44 +0000)]
queue.3: Document existing QMD_* macros

Feedback from: bapt, bdrewery, emaste
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D3983

7 years agoioat(4): Fix race between process_events and reset_hw
cem [Fri, 11 Nov 2016 20:09:54 +0000 (20:09 +0000)]
ioat(4): Fix race between process_events and reset_hw

In the case where a hardware error is detected during
ioat_process_events, hardware may advance (by one descriptor, probably)
and a subsequent ioat_process_events may race the intended ioat_reset_hw
followup.  In that case, the second process_events would observe a
completion update that does not match the software "last_seen" status,
and attempt to successfully complete already-failed descriptors.

Guard against this race with the resetting_cleanup flag.

Reviewed by: bdrewery, markj
Sponsored by: Dell EMC Isilon

7 years agoIncrease the max allowed size of the microcode update blob for x86.
kib [Fri, 11 Nov 2016 18:57:41 +0000 (18:57 +0000)]
Increase the max allowed size of the microcode update blob for x86.

Newer CPUs (SkyLakes) have updates of 100K size, which is bigger than
current limit 32K. Increase it to 4M but leave the check around to
prevent kernel memory allocator abuse.  Some time ago, the memory for
update was allocated by contigmalloc(9), and it was reasonable to be
conservative as much as possible.  Since all uses of contigmalloc(9)
appear to be either misunderstanding or too cautious, and were
removed, provide more slack than strictly neccessary.

Submitted by: Oliver Pinter
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D8486

7 years agoSpell 'PACKAGE' correctly.
gjb [Fri, 11 Nov 2016 18:47:53 +0000 (18:47 +0000)]
Spell 'PACKAGE' correctly.

Submitted by: Kyle Evans, emaste
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

7 years agoUse ofw_bus_node_is_compatible() instead of fdt_is_compatible()
jhibbits [Fri, 11 Nov 2016 18:10:13 +0000 (18:10 +0000)]
Use ofw_bus_node_is_compatible() instead of fdt_is_compatible()

No need to have two functions that do the same thing, let's let fdt_* go away,
and use ofw_bus_* equivalents instead.

Requested by: andrew

7 years agoAdd support for LOADER_RC setting in the pkgfs manifest (defaults to
stevek [Fri, 11 Nov 2016 17:41:17 +0000 (17:41 +0000)]
Add support for LOADER_RC setting in the pkgfs manifest (defaults to
/loader.rc) to specify a Forth file to read from the pkgfs tarball and
process by Ficl.

This allows for the tarball to do runtime things like load a
platform-specific FDT blob, among other things.

Reviewed by: imp
Approved by: sjg (mentor)
MFC after: 2 weeks
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D8494

7 years agoThe file_loadraw function grew an argument, update install function
stevek [Fri, 11 Nov 2016 16:59:26 +0000 (16:59 +0000)]
The file_loadraw function grew an argument, update install function
accordingly.

Reviewed by: imp
Approved by: sjg (mentor)
MFC after: 2 weeks
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D8494

7 years agoUse ofw_bus_node_is_compatible in more drivers used on arm.
andrew [Fri, 11 Nov 2016 15:42:12 +0000 (15:42 +0000)]
Use ofw_bus_node_is_compatible in more drivers used on arm.

Sponsored by: ABT Systems Ltd

7 years agoupdate SMB_BWRITE documentation, clarify SMB_BREAD
avg [Fri, 11 Nov 2016 15:16:37 +0000 (15:16 +0000)]
update SMB_BWRITE documentation, clarify SMB_BREAD

After removal of SMB_TRANS some information in the description of
SMB_BWRITE has become stale.  E.g., the maximum block size has been
restored to 32.

Also, the descriptions of SMB_BREAD and SMB_BWRITE had some
incorrect information on the SMBus protocol details.

MFC after: 1 week
X-MFC with: r308242
Differential Revision: https://reviews.freebsd.org/D8431

7 years agoUse the modern spelling of ofw_bus_node_is_compatible in sys/arm.
andrew [Fri, 11 Nov 2016 15:13:30 +0000 (15:13 +0000)]
Use the modern spelling of ofw_bus_node_is_compatible in sys/arm.

Sponsored by: ABT Systems Ltd

7 years agoiicsmb: SMB_MAXBLOCKSIZE can be used again
avg [Fri, 11 Nov 2016 15:11:54 +0000 (15:11 +0000)]
iicsmb: SMB_MAXBLOCKSIZE can be used again

The constant was set to the correct value in r308242.
While there, fix iicsmb_bread() to not use a value of an out parameter
'count'.

MFC after: 3 weeks
X-MFC after: r308242

7 years agointpm: clean up intsmb_bread and intsmb_pcall
avg [Fri, 11 Nov 2016 15:08:12 +0000 (15:08 +0000)]
intpm: clean up intsmb_bread and intsmb_pcall

The hardware does not implement SMBus Process Call command, so remove
ifdef-ed out code from intsmb_pcall.  The code used exactly the same
start sequence as for Write Word command.

intsmb_bread code used to access an in value of the count parameter,
but that parameter is supposed to be an out only parameter.
For example, smb(4) does not initialize it before calling smbus_bread.

MFC after: 3 weeks

7 years agosmbmsg: use a more convenient way of accessing data read from a slave
avg [Fri, 11 Nov 2016 15:00:13 +0000 (15:00 +0000)]
smbmsg: use a more convenient way of accessing data read from a slave

Developers writing code for accessing /dev/smb may use this base utility
as an example.  Now that SMB_READB, SMB_READW, SMB_PCALL behave as
documented, wwe can use them in a more convenient way than before.

MFC after: 4 weeks
X-MFC after: r308527

7 years agosmb: fix SMB_READB, SMB_READW, SMB_PCALL to work as documented
avg [Fri, 11 Nov 2016 14:41:02 +0000 (14:41 +0000)]
smb: fix SMB_READB, SMB_READW, SMB_PCALL to work as documented

Previously, those ioctls were defined as 'in' only, so rdata.byte and
rdata.word were never updated in the userland.  The read data went only
to rbuf if it was provided.  Thus, consumers were forced to always use it.

Now the ioctls are marked as in-out.
Compatibility handlers are provided for old ioctls.

PR: 213481
Reported by: Lewis Donzis <lew@perftech.com>
MFC after: 2 weeks
Relnotes: maybe
Differential Revision: https://reviews.freebsd.org/D8430

7 years agoFix ata_at91_alloc_resource to use rman_res_t.
andrew [Fri, 11 Nov 2016 14:30:09 +0000 (14:30 +0000)]
Fix ata_at91_alloc_resource to use rman_res_t.

Sponsored by: ABT Systems Ltd

7 years agoRemove more unneeded users of the fdt_pic_decode_t table.
andrew [Fri, 11 Nov 2016 14:22:35 +0000 (14:22 +0000)]
Remove more unneeded users of the fdt_pic_decode_t table.

Sponsored by: ABT Systems Ltd

7 years agoReplace OF_getprop ... fdt32_to_cpu with OF_getencprop. The latter
andrew [Fri, 11 Nov 2016 14:19:12 +0000 (14:19 +0000)]
Replace OF_getprop ... fdt32_to_cpu with OF_getencprop. The latter
correctly adjusts for the endian.

MFC after: 1 week
Sponsored by: ABT Systems Ltd

7 years agoMFV r305100: Update amd from am-utils 6.1.5 to 6.2.
cy [Fri, 11 Nov 2016 02:42:53 +0000 (02:42 +0000)]
MFV r305100: Update amd from am-utils 6.1.5 to 6.2.

Used extensively on my network over the past month.

Reviewed by: pfg, brooks
Suggested by: pfg
Obtained from: ftp://ftp.am-utils.org/pub/am-utils/
MFC after: 6 weeks
Relnotes: yes
Differential Revision: D8405

7 years agoReply to a snmpEngineID discovery PDU with a Report PDU as per the
syrinx [Thu, 10 Nov 2016 20:51:26 +0000 (20:51 +0000)]
Reply to a snmpEngineID discovery PDU with a Report PDU as per the
requirements of RFC 3414 section 4.

PR: 174974
Submitted by: pguyot@kallisys.net
Reported by: several people
Reviewed by: bz@

7 years agoAdd the laundry page count to the displays of systat, top, and vmstat.
markj [Thu, 10 Nov 2016 19:55:45 +0000 (19:55 +0000)]
Add the laundry page count to the displays of systat, top, and vmstat.

Reviewed by: alc, kib
Differential Revision: https://reviews.freebsd.org/D8467

7 years agoPull in r263301 from upstream llvm trunk (by Ahmed Bougacha):
dim [Thu, 10 Nov 2016 19:40:14 +0000 (19:40 +0000)]
Pull in r263301 from upstream llvm trunk (by Ahmed Bougacha):

  [AArch64] Don't blindly lower f16/f128 FCCMPs.

  Instead, extend f16 (like we do when lowering a standalone SETCC),
  and let f128 be legalized to the RT calls.

  Fixes PR26803.

This fixes a fatal "Cannot select" backend error when building the
net/freerdp port for AArch64.

PR: 214380
MFC after: 3 days

7 years agopfctl: fix nested inline anchors
kp [Thu, 10 Nov 2016 18:41:43 +0000 (18:41 +0000)]
pfctl: fix nested inline anchors

Import the OpenBSD fix for nested inline anchors.

PR: 196314
Submitted by: krichy@cflinux.hu
Obtained from: OpenBSD

7 years ago[net80211] implement "first RX defines the BAW" hack.
adrian [Thu, 10 Nov 2016 18:36:40 +0000 (18:36 +0000)]
[net80211] implement "first RX defines the BAW" hack.

Unfortunately (sigh) some firmware doesn't provide the RX BA starting point,
so we need to cope and set a "close enough" sequence number so we (hopefully!)
don't discard frames as duplicates.

Tested:

* QCA9880v2, athp driver (under development), STA mode

7 years agoAdd limits(1) to native-xtools so that it can be used in qemu user-mode jails
antoine [Thu, 10 Nov 2016 16:27:34 +0000 (16:27 +0000)]
Add limits(1) to native-xtools so that it can be used in qemu user-mode jails

7 years agoImplement riscv jumpto() so world can be compiled.
br [Thu, 10 Nov 2016 12:54:33 +0000 (12:54 +0000)]
Implement riscv jumpto() so world can be compiled.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

7 years agopmc_process_csw_out: ignore deleted counters
avg [Thu, 10 Nov 2016 11:12:45 +0000 (11:12 +0000)]
pmc_process_csw_out: ignore deleted counters

I see the fllowing panic on AMD when exiting pmcstat:

panic: [pmc,1473] pp_pmcval outside of expected range cpu=2 ri=17
pp_pmcval=fffffffffa529f5b pm_reloadcount=10000

It seems that at least on AMD a performance counter keeps counting after
overflowing.  When pmcstat exits it sets counters that it used to
PMC_STATE_DELETED and waits until their use count goes to zero.
amd_intr() wouldn't reload a counter in that state and, thus, a counter
would be allowed to overflow.  That means that the counter's value would
be allowed to go outside the expected range.

MFC after: 2 weeks

7 years agofix a watchdogd regression introduced in r308040
avg [Thu, 10 Nov 2016 10:45:12 +0000 (10:45 +0000)]
fix a watchdogd regression introduced in r308040

The code assumed that 'timeout' and 'timeout_sec' are in sync
which they weren't if no '-t' option was passed to watchdogd.

Reported by: Olivier Smedts <olivier@gid0.org>,
Alex Deiter <alex.deiter@gmail.com>
Tested by: Olivier Smedts <olivier@gid0.org>,
Alex Deiter <alex.deiter@gmail.com>
MFC after: 5 days
X-MFC with: r308040

7 years agoWe can't use protect(1) inside a jail(8)!
araujo [Thu, 10 Nov 2016 07:05:41 +0000 (07:05 +0000)]
We can't use protect(1) inside a jail(8)!
To avoid have warning for services that are using oomprotect, oomprotect
will only be applied on services that won't run inside jails.

Reported by: allanjude
MFC after: 2 weeks.

7 years agomake pxeboot consistent with common/dev_net.c
bapt [Wed, 9 Nov 2016 21:51:48 +0000 (21:51 +0000)]
make pxeboot consistent with common/dev_net.c

Always define boot.netif.server in kenv in pxeboot
Add "boot.tftproot.server" to kenv when pxeboot uses tftpfs
Change the code order when setting env for TFTP or NFS to be the same as
common/dev_net.c

Reported by: tsoome

7 years agoboot/forth spelling issue in forth word
tsoome [Wed, 9 Nov 2016 21:28:46 +0000 (21:28 +0000)]
boot/forth spelling issue in forth word

Reviewed by: dteske, imp
Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D8484

7 years agoIntroduce a new page queue, PQ_LAUNDRY, for storing unreferenced, dirty
alc [Wed, 9 Nov 2016 18:48:37 +0000 (18:48 +0000)]
Introduce a new page queue, PQ_LAUNDRY, for storing unreferenced, dirty
pages, specificially, dirty pages that have passed once through the inactive
queue.  A new, dedicated thread is responsible for both deciding when to
launder pages and actually laundering them.  The new policy uses the
relative sizes of the inactive and laundry queues to determine whether to
launder pages at a given point in time.  In general, this leads to more
intelligent swapping behavior, since the laundry thread will avoid pageouts
when the marginal benefit of doing so is low.  Previously, without a
dedicated queue for dirty pages, the page daemon didn't have the information
to determine whether pageout provides any benefit to the system.  Thus, the
previous policy often resulted in small but steadily increasing amounts of
swap usage when the system is under memory pressure, even when the inactive
queue consisted mostly of clean pages.  This change addresses that issue,
and also paves the way for some future virtual memory system improvements by
removing the last source of object-cached clean pages, i.e., PG_CACHE pages.

The new laundry thread sleeps while waiting for a request from the page
daemon thread(s).  A request is raised by setting the variable
vm_laundry_request and waking the laundry thread.  We request launderings
for two reasons: to try and balance the inactive and laundry queue sizes
("background laundering"), and to quickly make up for a shortage of free
pages and clean inactive pages ("shortfall laundering").  When background
laundering is requested, the laundry thread computes the number of page
daemon wakeups that have taken place since the last laundering.  If this
number is large enough relative to the ratio of the laundry and (global)
inactive queue sizes, we will launder vm_background_launder_target pages at
vm_background_launder_rate KB/s.  Otherwise, the laundry thread goes back
to sleep without doing any work.  When scanning the laundry queue during
background laundering, reactivated pages are counted towards the laundry
thread's target.

In contrast, shortfall laundering is requested when an inactive queue scan
fails to meet its target.  In this case, the laundry thread attempts to
launder enough pages to meet v_free_target within 0.5s, which is the
inactive queue scan period.

A laundry request can be latched while another is currently being
serviced.  In particular, a shortfall request will immediately preempt a
background laundering.

This change also redefines the meaning of vm_cnt.v_reactivated and removes
the functions vm_page_cache() and vm_page_try_to_cache().  The new meaning
of vm_cnt.v_reactivated now better reflects its name.  It represents the
number of inactive or laundry pages that are returned to the active queue
on account of a reference.

In collaboration with: markj
Reviewed by: kib
Tested by: pho
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8302

7 years agoUpdate jemalloc to 4.3.1.
jasone [Wed, 9 Nov 2016 18:42:30 +0000 (18:42 +0000)]
Update jemalloc to 4.3.1.

7 years agoFix copy/paste bug in r308464.
mav [Wed, 9 Nov 2016 17:57:55 +0000 (17:57 +0000)]
Fix copy/paste bug in r308464.

MFC after: 1 week

7 years agoc++filt: flush output after newline
emaste [Wed, 9 Nov 2016 15:04:29 +0000 (15:04 +0000)]
c++filt: flush output after newline

Some tools spawn c++filt and pass it a single line at a time for
demangling. This is akin to r276689 for addr2line.

Sponsored by: The FreeBSD Foundation

7 years agoAdd some device IDs found in my new laptop.
mav [Wed, 9 Nov 2016 08:57:59 +0000 (08:57 +0000)]
Add some device IDs found in my new laptop.

7 years agoAdd flag -B which does the same like batch mode but without exiting after
araujo [Wed, 9 Nov 2016 07:31:39 +0000 (07:31 +0000)]
Add flag -B which does the same like batch mode but without exiting after
print. Also add a new flag -s that add blocks size to statistics.

PR: 198347, 212726
Submitted by: Ben RUBSON <ben.rubson@gmail.com>
Tested by: pi
MFC After: 2 weeks.

7 years agoAllow higher sample rates to have more jitter than lower ones.
hselasky [Wed, 9 Nov 2016 07:09:27 +0000 (07:09 +0000)]
Allow higher sample rates to have more jitter than lower ones.

PR: 208791
MFC after: 3 days

7 years agoSort DLINK section and add USB device ID of D-Link DWA-131 rev E1.
kevlo [Wed, 9 Nov 2016 06:47:29 +0000 (06:47 +0000)]
Sort DLINK section and add USB device ID of D-Link DWA-131 rev E1.

7 years agoFix missing '-' for the flags -s and -d on both manpage and usage.
araujo [Wed, 9 Nov 2016 04:42:09 +0000 (04:42 +0000)]
Fix missing '-' for the flags -s and -d on both manpage and usage.

Reported by: garga, bde

7 years agoAdd the DTS for the Netgate SG-1000 (micro-Firewall).
loos [Wed, 9 Nov 2016 04:07:15 +0000 (04:07 +0000)]
Add the DTS for the Netgate SG-1000 (micro-Firewall).

The SG-1000 boots with GENERIC ARM kernel on -head.

Obtained from: pfSense
Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agoFix improper use of "its".
bdrewery [Tue, 8 Nov 2016 23:59:41 +0000 (23:59 +0000)]
Fix improper use of "its".

Sponsored by: Dell EMC Isilon

7 years agoPass the correct flag to find_symdef() from _rtld_bind().
jhb [Tue, 8 Nov 2016 22:41:11 +0000 (22:41 +0000)]
Pass the correct flag to find_symdef() from _rtld_bind().

When symbol versioning was added to rtld, the boolean 'in_plt' argument
to find_symdef() was converted to a bitmask of flags.  The first flag
added was 'SYMLOOK_IN_PLT' which replaced the 'in_plt' bool.  This
happened to still work by accident as SYMLOOK_IN_PLT had the value of 1
which is the same as 'true', so there should be no functional change.

Tested on: amd64
Reviewed by: kan
MFC after: 2 weeks
Sponsored by: DARPA / AFRL

7 years agocam: Zero bio pointer in user-supplied SCSI CCBs
cem [Tue, 8 Nov 2016 21:17:24 +0000 (21:17 +0000)]
cam: Zero bio pointer in user-supplied SCSI CCBs

The BUF_TRACKING bio pointer only makes sense for kernel consumers of
CCBs.

PR: 214250
Reported by: trasz@
Reviewed by: imp@, markj@
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8477

7 years agoadd missing i386 symbols libgcc_s symbol version map
emaste [Tue, 8 Nov 2016 17:36:19 +0000 (17:36 +0000)]
add missing i386 symbols libgcc_s symbol version map

After r308294 they were missing on i386 (and previously were exported
only accidentally).

Reported by: antoine

7 years agoStart to remove the old pre-INTRNG code from the arm platforms. These have
andrew [Tue, 8 Nov 2016 12:15:57 +0000 (12:15 +0000)]
Start to remove the old pre-INTRNG code from the arm platforms. These have
all moved to use INTRNG.

Reviewed by: manu, mmel
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D8469

7 years agoAdd -d flag that prints domain only.
araujo [Tue, 8 Nov 2016 11:36:33 +0000 (11:36 +0000)]
Add -d flag that prints domain only.

PR: 212875
Submitted by: Ben RUBSON <ben.rubson@gmail.com>
Reviewed by: pi

7 years agoTweaks for the buffer pager.
kib [Tue, 8 Nov 2016 10:10:55 +0000 (10:10 +0000)]
Tweaks for the buffer pager.

Pass current thread credentials instead of NOCRED.
Only allow unmapped buffers for filesystem which proclaimed the support.

For all filesystems which currently use buffer pager (UFS, msdosfs and
cd9660), the changes are effectively nop.

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

7 years agoDo not fail to attach the clock if we cannot set the assigned parents as this
manu [Tue, 8 Nov 2016 10:06:43 +0000 (10:06 +0000)]
Do not fail to attach the clock if we cannot set the assigned parents as this
property isn't mandatory.

MFC after: 2 weeks

7 years agoDo not warn if the 'assigned-clock-parents' property does not exists.
manu [Tue, 8 Nov 2016 10:05:11 +0000 (10:05 +0000)]
Do not warn if the 'assigned-clock-parents' property does not exists.

MFC after: 2 weeks

7 years agoRange check the jitter values to avoid bogus sample rate adjustments.
hselasky [Tue, 8 Nov 2016 08:09:48 +0000 (08:09 +0000)]
Range check the jitter values to avoid bogus sample rate adjustments.
The expected deviation should not be more than 1Hz per second. The USB
v2.0 specification also mandates this requirement. Refer to chapter
5.12.4.2 about feedback.

PR: 208791
MFC after: 3 days

7 years agoLoader paged/pageable data is not always paged.
tsoome [Tue, 8 Nov 2016 06:50:18 +0000 (06:50 +0000)]
Loader paged/pageable data is not always paged.

This change does modify devsw dv_print() to return the int value,
enabling walkers to interrupt the walk on non zero value from dv_print().

This will allow the pager_print actually to stop displaying data on
user input, and additionally pager is used in various *dev_print callbacks,
where it was missing.

For test, lsdev [-v] command should display data by screenfuls and should
stop when the key 'q' is pressed on pager prompt.

Reviewed by: allanjude
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D5461

7 years agoCapsicumize some trivial stdio programs
cem [Tue, 8 Nov 2016 05:31:01 +0000 (05:31 +0000)]
Capsicumize some trivial stdio programs

Trivially capsicumize some simple programs that just interact with
stdio.  This list of programs uses 'pledge("stdio")' in OpenBSD.

No objection from: allanjude, emaste, oshogbo
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8307

7 years agoConvert the Q-Pair and PRP list memory allocations to use BUSDMA. Add a
scottl [Tue, 8 Nov 2016 00:24:49 +0000 (00:24 +0000)]
Convert the Q-Pair and PRP list memory allocations to use BUSDMA.  Add a
bunch of safery belts and error handling in related codepaths.

Reviewed by: jimharris
Obtained from: Netflix
Differential Revision: D8453

7 years agolibelftc: add elf{32,64}-tradbigmips target emulation names
emaste [Mon, 7 Nov 2016 22:41:52 +0000 (22:41 +0000)]
libelftc: add elf{32,64}-tradbigmips target emulation names

Reported by: theraven
Sponsored by: The FreeBSD Foundation

7 years agoThe igb driver currently requires a VF interface to have a non-zero MAC
sbruno [Mon, 7 Nov 2016 22:24:37 +0000 (22:24 +0000)]
The igb driver currently requires a VF interface to have a non-zero MAC
address, but the associated PF is giving the VF an all zeros MAC address
when one is not administratively assigned. The driver should check for
this case and generate a random address, similar to how the linux igbvf
driver does.

Submitted by: skoumjian@juniper.net (Scott Koumjian)
MFH: 2 weeks
Differential Revision: https://reviews.freebsd.org/D8399

7 years agoRefactor FDT part of gpioled driver
gonzo [Mon, 7 Nov 2016 21:15:39 +0000 (21:15 +0000)]
Refactor FDT part of gpioled driver

- Split driver in two parts: FDT and non-FDT
- Instead of reattach gpioled nodes to GPIO bus use
    gpio_pin_get_by_ofw_idx and add ofwbus and simplebus as parrent buses

Reviewed by: loos
Differential Revision: https://reviews.freebsd.org/D8233

7 years agoFix include order as required post r308415
gonzo [Mon, 7 Nov 2016 20:02:18 +0000 (20:02 +0000)]
Fix include order as required post r308415

7 years agoAdd support for EIIOE flag in Additional Element Status.
mav [Mon, 7 Nov 2016 18:21:53 +0000 (18:21 +0000)]
Add support for EIIOE flag in Additional Element Status.

It was added in SES-3 spec, and its support required to properly link
the Additional Element Status page data to the original elements.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.

7 years agoFix locking in bcm2835_audio driver
gonzo [Mon, 7 Nov 2016 17:38:39 +0000 (17:38 +0000)]
Fix locking in bcm2835_audio driver

- Move all VCHI activity to worker thread: channel methods are called with
    non-sleepable lock held and VCHI uses sleepable lock.

- In worker thread use sx(9) lock instead of mutex(9) for the same reason.

PR: 213801, 205979

7 years agoFix the fallout from r308268 (mpt driver causes endless witness warnings in
scottl [Mon, 7 Nov 2016 17:34:19 +0000 (17:34 +0000)]
Fix the fallout from r308268 (mpt driver causes endless witness warnings in
VMWare and elsewhere) with the precision of a dull, rusty butter knife.

Reported by: tuexen
Obtained from: Netflix

7 years agoMFV r308392: file 5.29.
delphij [Mon, 7 Nov 2016 15:54:47 +0000 (15:54 +0000)]
MFV r308392: file 5.29.

MFC after: 2 weeks

7 years agoUse the armv6 GENERIC in the qemu nanobsd image.
andrew [Mon, 7 Nov 2016 14:07:11 +0000 (14:07 +0000)]
Use the armv6 GENERIC in the qemu nanobsd image.

Sponsored by: ABT Systems Ltd

7 years agoFix the order of includes so machine/asm.h is first.
andrew [Mon, 7 Nov 2016 11:56:18 +0000 (11:56 +0000)]
Fix the order of includes so machine/asm.h is first.

MFC after: 1 week
Sponsored by: ABT Systems Ltd

7 years agoAdd timer to watch the RQ when we are out of mbufs.
hselasky [Mon, 7 Nov 2016 11:39:45 +0000 (11:39 +0000)]
Add timer to watch the RQ when we are out of mbufs.

The firmware/hardware does not generate additional completion
events unless we post new buffers. Use a timer to try to post
more buffers in case we are temporarily out of mbufs. Else
the receive schedule completely stops.

Sponsored by: Mellanox Technologies
MFC after: 1 week

7 years agoGenerate an error if machine/armreg.h is included without sys/cdefs.h
sgalabov [Mon, 7 Nov 2016 11:35:14 +0000 (11:35 +0000)]
Generate an error if machine/armreg.h is included without sys/cdefs.h

machine/armreg.h requires access to the __ARM_ARCH macro, which is not
always properly defined (especially by gcc 4.2.1). We should include
sys/cdefs.h in order to get the definitions in machine/acle-compat.h,
which would properly define the __ARM_ARCH macro in these cases.

So, in cases where machine/armreg.h is included without _SYS_CDEFS_H_
being defined - generate an #error.

Reviewed by: andrew
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D8460

7 years agoAdd more firmware related structures and update existing ones in the
hselasky [Mon, 7 Nov 2016 11:28:50 +0000 (11:28 +0000)]
Add more firmware related structures and update existing ones in the
MLX5 core module. Update the set and query diagnostics counter API.

Sponsored by: Mellanox Technologies
MFC after: 1 week

7 years agoQuery flow table capabilities according to the correct capability bit
hselasky [Mon, 7 Nov 2016 11:26:25 +0000 (11:26 +0000)]
Query flow table capabilities according to the correct capability bit
for infiniband.

Sponsored by: Mellanox Technologies
MFC after: 1 week

7 years agoCorrect checksum fields in the "mlx5_mini_cqe8" structure. The fields
hselasky [Mon, 7 Nov 2016 11:22:50 +0000 (11:22 +0000)]
Correct checksum fields in the "mlx5_mini_cqe8" structure. The fields
in question are currently not used.

Sponsored by: Mellanox Technologies
MFC after: 1 week

7 years agoEnsure the firmware is notified of any host memory allocation
hselasky [Mon, 7 Nov 2016 11:20:13 +0000 (11:20 +0000)]
Ensure the firmware is notified of any host memory allocation
failures. Else firmware commands may time out waiting for host
memory.

Sponsored by: Mellanox Technologies
MFC after: 1 week

7 years agoWhen a firmware command times out do not free the command structure to
hselasky [Mon, 7 Nov 2016 11:15:40 +0000 (11:15 +0000)]
When a firmware command times out do not free the command structure to
avoid use after free.

Sponsored by: Mellanox Technologies
MFC after: 1 week

7 years agoInclude machine/armreg.h after machine/asm.h to ensure __ARM_ARCH is
andrew [Mon, 7 Nov 2016 11:01:09 +0000 (11:01 +0000)]
Include machine/armreg.h after machine/asm.h to ensure __ARM_ARCH is
defined.

MFC after: 1 week
Sponsored by: ABT Systems Ltd

7 years agovn_fullpath1() checked VV_ROOT and then unreferenced
kib [Mon, 7 Nov 2016 10:55:56 +0000 (10:55 +0000)]
vn_fullpath1() checked VV_ROOT and then unreferenced
vp->v_mount->mnt_vnodecovered unlocked.  This allowed unmount to race.
Lock vnode after we noticed the VV_ROOT flag.  See comments for
explanation why unlocked check for the flag is considered safe.

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

7 years agoOnly include sys/boot.h if LINUX_BOOT_ABI is defined
sgalabov [Mon, 7 Nov 2016 10:54:56 +0000 (10:54 +0000)]
Only include sys/boot.h if LINUX_BOOT_ABI is defined

Only include sys/boot.h if LINUX_BOOT_ABI is defined in
sys/arm/arm/machdep.c

Not doing this prevents kernels that do not define LINUX_BOOT_ABI from
being build with gcc (at least 4.2.1).

Reviewed by: mmel
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D8459

7 years agoStart to deorbit the kernel configs in GENERIC by marking them with
andrew [Mon, 7 Nov 2016 10:26:44 +0000 (10:26 +0000)]
Start to deorbit the kernel configs in GENERIC by marking them with
NO_UNIVERSE. This stops them from being built with the universe,
tinderbox, and related targets.

Sponsored by: ABT Systems Ltd

7 years agoVendor import of file 5.29.
delphij [Mon, 7 Nov 2016 07:26:06 +0000 (07:26 +0000)]
Vendor import of file 5.29.

7 years agoAdd NVIDIA Tegra XHCI driver and coresponding firmware blob.
mmel [Mon, 7 Nov 2016 05:37:10 +0000 (05:37 +0000)]
Add NVIDIA Tegra XHCI driver and coresponding firmware blob.

MFC after: 3 weeks
Approved by: core@ (NVIDIA license)

7 years agoRework NVIDIA Tegra124 XUSBPAD driver.
mmel [Mon, 7 Nov 2016 05:34:44 +0000 (05:34 +0000)]
Rework NVIDIA Tegra124 XUSBPAD driver.
 - Adapt it for new, incompatible, DT bindings introduced by r306197.
 - Add support for USB super speed pads/ports.

MFC after: 3 weeks

7 years agortwn: add HOSTAP / IBSS mode support for RTL8188CE.
avos [Sun, 6 Nov 2016 23:13:13 +0000 (23:13 +0000)]
rtwn: add HOSTAP / IBSS mode support for RTL8188CE.

NOTE: some multi-vap configurations (e.g., STA+IBSS) are not stable;
that will be fixed later.

Tested with:
 - RTL8188CE, STA + AP mode;
 - RTL8188CE, IBSS mode;
 - RTL8188CUS, IBSS mode;
 - RTL8188EU, IBSS mode.

Relnotes: yes

7 years agoFix device driver name if devd.conf + move it into appropriate place.
avos [Sun, 6 Nov 2016 19:51:01 +0000 (19:51 +0000)]
Fix device driver name if devd.conf + move it into appropriate place.

Noticed by: Idwer Vollering <vidwer@gmail.com>

7 years agoDocument that getfsstat(2) called with MNT_NOWAIT skips file systems
trasz [Sun, 6 Nov 2016 19:37:22 +0000 (19:37 +0000)]
Document that getfsstat(2) called with MNT_NOWAIT skips file systems
that are in the process of being unmounted.

Reviewed by: des@ (earlier version)
MFC after: 1 month

7 years ago[net80211] extend the net80211 ALQ code to support variable payloads.
adrian [Sun, 6 Nov 2016 19:18:25 +0000 (19:18 +0000)]
[net80211] extend the net80211 ALQ code to support variable payloads.

Also - allow driver specific bits to be added, rather than just net80211.

This still isn't as useful as it should be by default; it needs to
be a standalone struct/instance so it can be done before net80211
registration occurs, and it can log per-device items.

But, it's getting there.

7 years agortwn_pci: omit tx_done() stage if device is not running.
avos [Sun, 6 Nov 2016 19:17:39 +0000 (19:17 +0000)]
rtwn_pci: omit tx_done() stage if device is not running.
rtwn_usb: drain USB transfers during device shutdown; this fixes possible
panic with 'options IEEE80211_SUPPORT_SUPERG' during device detach.

Tested with RTL8188CE, STA mode.

7 years ago[net80211] add a method to also explicitly tear down RX A-MPDU.
adrian [Sun, 6 Nov 2016 19:16:46 +0000 (19:16 +0000)]
[net80211] add a method to also explicitly tear down RX A-MPDU.

The ath10k firmware API doesn't pass up the ADDBA/DELBA frames, only
WMI firmware notifications.

Tested:

* ath10k (QCA9880), doing actual (ha!) 11n!

7 years agortwn: fix Tx ring cleanup.
avos [Sun, 6 Nov 2016 18:11:19 +0000 (18:11 +0000)]
rtwn: fix Tx ring cleanup.

Do not try to clear stale Tx descriptor entries when there are some
running vaps; just free node references - rtwn_pci_tx_done() will free
mbufs without creating holes in the Tx descriptor space.
Also, reset only 2 first entries in the beacon ring - other will not be
used anyway.

Tested with RTL8188CE, STA + STA mode.

7 years agortwn: reduce shutdown time for RTL8188CE.
avos [Sun, 6 Nov 2016 17:24:16 +0000 (17:24 +0000)]
rtwn: reduce shutdown time for RTL8188CE.