]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoImproves the GPIO API description a little bit.
loos [Wed, 24 Dec 2014 03:24:50 +0000 (03:24 +0000)]
Improves the GPIO API description a little bit.

gpio_pin_max must return the maximum supported pin number and not the total
number of pins on the system.

PR: 157070
Submitted by: brix

9 years agoRevert a glitched mismerge that got caught up in the prior commit.
ian [Wed, 24 Dec 2014 03:09:55 +0000 (03:09 +0000)]
Revert a glitched mismerge that got caught up in the prior commit.
The PJ4B family is still armv7, not armv6.

9 years agoDefine the old-school arm arch constants we still use internally based on
ian [Wed, 24 Dec 2014 03:02:12 +0000 (03:02 +0000)]
Define the old-school arm arch constants we still use internally based on
the somewhat newer constants predefined by the compiler.  This will allow
userland apps to use various machine/foo.h headers without CPUTYPE defined.

9 years agoAllow info to display correctly in for varying tabstop settings
smh [Wed, 24 Dec 2014 01:50:44 +0000 (01:50 +0000)]
Allow info to display correctly in for varying tabstop settings

The SAMPLE message and notes where tab seperated for some parts and hence
displayed incorrectly unless tabstop was set to 8. Switch to spaces to it
displays correctly independent of the tabstop setting.

Sponsored by: Multiplay

9 years agoDon't assume required FDT properties are present.
ian [Wed, 24 Dec 2014 01:19:11 +0000 (01:19 +0000)]
Don't assume required FDT properties are present.

9 years agoRevert r276101, it didn't fix the problem and causes a compile error
ian [Wed, 24 Dec 2014 01:10:53 +0000 (01:10 +0000)]
Revert r276101, it didn't fix the problem and causes a compile error
(nested comment blocks).

9 years agoRemove if_stf.h. It contains only one function declaration used by if_stf(4).
ae [Tue, 23 Dec 2014 20:54:59 +0000 (20:54 +0000)]
Remove if_stf.h. It contains only one function declaration used by if_stf(4).
Also make in_stf_protosw structure static.

9 years agoDo not return the total number of available pins but the maximum pin number
loos [Tue, 23 Dec 2014 19:31:56 +0000 (19:31 +0000)]
Do not return the total number of available pins but the maximum pin number
we can cope.

Previously the returned value could prevent access to some of the pins.

9 years agoBump the valid GPIO range for rfkill up from 8 to 16.
adrian [Tue, 23 Dec 2014 18:48:45 +0000 (18:48 +0000)]
Bump the valid GPIO range for rfkill up from 8 to 16.

AR5416 and later NICs have more than 8 (Well, more than 6) GPIO pins.
So to support rfkill on these NICs we need to bump this up or the
rfkill GPIO pin may get reset to the wrong value.

Noticed by: Anthony Jenkins <scoobi_doo@yahoo.com>

9 years agoRemove in_gif.h and in6_gif.h files. They only contain function
ae [Tue, 23 Dec 2014 16:17:37 +0000 (16:17 +0000)]
Remove in_gif.h and in6_gif.h files. They only contain function
declarations used by gif(4). Instead declare these functions in C files.
Also make some variables static.

9 years agoUpdate comment: only one file in the FAT file system EFI boot image
emaste [Tue, 23 Dec 2014 16:00:25 +0000 (16:00 +0000)]
Update comment: only one file in the FAT file system EFI boot image

Sponsored by: The FreeBSD Foundation

9 years agoUse explicit --output-target to set EFI file format
emaste [Tue, 23 Dec 2014 15:58:45 +0000 (15:58 +0000)]
Use explicit --output-target to set EFI file format

According to objcopy(1) --target is for use where the input and output
formats are the same ("no translation"). In practice it does detect the
input format in any case, but be explicit that we're specifying the
output format as we are translating from ELF to EFI PE format.

Sponsored by: The FreeBSD Foundation

9 years agoConvert a couple lingering NO_FORTH conditionals to test MK_FORTH.
ian [Tue, 23 Dec 2014 15:42:34 +0000 (15:42 +0000)]
Convert a couple lingering NO_FORTH conditionals to test MK_FORTH.

9 years agoWe can stop iterating once we've found the DOF section.
markj [Tue, 23 Dec 2014 15:42:33 +0000 (15:42 +0000)]
We can stop iterating once we've found the DOF section.

Submitted by: Fedor Indutny <fedor@indutny.com>

9 years agoFix a memory leak that occured when looking up CTF info for a symbol.
markj [Tue, 23 Dec 2014 15:40:57 +0000 (15:40 +0000)]
Fix a memory leak that occured when looking up CTF info for a symbol.

9 years agoRestore the trap type argument to the DTrace trap hook, removed in r268600.
markj [Tue, 23 Dec 2014 15:38:19 +0000 (15:38 +0000)]
Restore the trap type argument to the DTrace trap hook, removed in r268600.
It's redundant at the moment since it can be obtained from the trapframe
on the architectures where DTrace is supported, but this won't be the case
with ARM.

9 years agoHide block device VPD pages for non-block devices.
mav [Tue, 23 Dec 2014 15:18:28 +0000 (15:18 +0000)]
Hide block device VPD pages for non-block devices.

MFC after: 2 weeks

9 years agoFix kernel builds with "options NFS_DEBUG" that
rmacklem [Tue, 23 Dec 2014 14:24:36 +0000 (14:24 +0000)]
Fix kernel builds with "options NFS_DEBUG" that
were broken by r276096. Also delete the two
kernel options NFS_GATHERDELAY, NFS_WDELAYHASHSIZ
which are no longer used.

Reported by: bz

9 years agom_clrprotoflags() is designed to cleanup M_PROTO flags when mbufs cross
glebius [Tue, 23 Dec 2014 12:26:35 +0000 (12:26 +0000)]
m_clrprotoflags() is designed to cleanup M_PROTO flags when mbufs cross
protocol and facility boundaries.  However, now it cleans up only the
first mbuf, while intent clearly means all mbufs in a possible chain.

Differential Revision: https://reviews.freebsd.org/D1352
Reviewed by: rpaulo, gnn, adrian
Sponsored by: Nginx, Inc.

9 years agoFix build with recent binutils
bapt [Tue, 23 Dec 2014 10:43:35 +0000 (10:43 +0000)]
Fix build with recent binutils

Recent binutils considered the .gnu.warning.symbol section as a fatal error when
run with --fatal-warnings which makes any users of "insecure" functions from
libc failing to build with recent binutils.

Introduce a new macro: LD_FATAL_WARNINGS=no to run ld(1) with
--no-fatal-warnings for the users of "insecure" functions

Differential Revision: https://reviews.freebsd.org/D1320

9 years agoFix potential division by zero after r275920.
mav [Tue, 23 Dec 2014 10:18:42 +0000 (10:18 +0000)]
Fix potential division by zero after r275920.

Reported by: Coverity Scan
CID: 1260387
MFC after: 3 days

9 years agoAlways sync the global ZFS config cache to reflect the new mosconfig
smh [Tue, 23 Dec 2014 09:31:24 +0000 (09:31 +0000)]
Always sync the global ZFS config cache to reflect the new mosconfig

This fixes out of date zpool.cache for root pools, which can cause issues
such as confusion of zdb etc.

MFC after: 1 month

9 years agoAlways select the card before we do the 4.x specific stuff and
imp [Tue, 23 Dec 2014 05:50:53 +0000 (05:50 +0000)]
Always select the card before we do the 4.x specific stuff and
deselect it after setting the block size. This is a similar bug that
was fixed elsewhere, but not here. This makes sure that we leave the
card deselected at the end of the loop, and we don't send any commands
to the card without it selected.

Reviewed by: ian@

9 years agoTemporarily disable the cpus directive until I figure out what's wrong.
rpaulo [Tue, 23 Dec 2014 03:00:18 +0000 (03:00 +0000)]
Temporarily disable the cpus directive until I figure out what's wrong.

9 years agoAllow ktr(4) tracing of all guest exceptions via the tunable
neel [Tue, 23 Dec 2014 02:14:49 +0000 (02:14 +0000)]
Allow ktr(4) tracing of all guest exceptions via the tunable
"hw.vmm.trace_guest_exceptions".  To enable this feature set the tunable
to "1" before loading vmm.ko.

Tracing the guest exceptions can be useful when debugging guest triple faults.

Note that there is a performance impact when exception tracing is enabled
since every exception will now trigger a VM-exit.

Also, handle machine check exceptions that happen during guest execution
by vectoring to the host's machine check handler via "int $18".

Discussed with: grehan
MFC after: 2 weeks

9 years agoAdd an UPDATING entry for r276096, which removed the kernel
rmacklem [Tue, 23 Dec 2014 01:32:18 +0000 (01:32 +0000)]
Add an UPDATING entry for r276096, which removed the kernel
sources for the old NFS client and server.

9 years agoRemove the old NFS client and server from head,
rmacklem [Tue, 23 Dec 2014 00:47:46 +0000 (00:47 +0000)]
Remove the old NFS client and server from head,
which means that the NFSCLIENT and NFSSERVER
kernel options will no longer work. This commit
only removes the kernel components. Removal of
unused code in the user utilities will be done
later. This commit does not include an addition
to UPDATING, but that will be committed in a
few minutes.

Discussed on: freebsd-fs

9 years agoUse "RCS tag" instead of "$FreeBSD$ tag", since svn will obediently
des [Mon, 22 Dec 2014 23:03:18 +0000 (23:03 +0000)]
Use "RCS tag" instead of "$FreeBSD$ tag", since svn will obediently
expand the latter.

MFC after: 3 days

9 years agoAdd a new loader(8) variable, twiddle_divisor, allowing control over the
ian [Mon, 22 Dec 2014 22:07:22 +0000 (22:07 +0000)]
Add a new loader(8) variable, twiddle_divisor, allowing control over the
output frequency of the "twiddle" IO progress indicator.  The default
value is 1.  For larger values N, the next stage of the animation is only
output on every Nth call to the output routine.  A sufficiently large N
effectively disables the animation completely.

9 years agoStrip trailing / characters from paths in "not present" index entries, not
cperciva [Mon, 22 Dec 2014 21:52:37 +0000 (21:52 +0000)]
Strip trailing / characters from paths in "not present" index entries, not
just "directory" entries.

Prior to this commit, if / was added as part of a security update (how? In
the most recent case, because lib32 was accidentally omitted and was then
re-added, and every installer distribution set gets its own paths) then
the code which was supposed to filter out updates to deleted parts of the
base system (if someone decides to delete / then we shouldn't re-create it
for them) would instead get confused and decided that while / should exist,
// should not exist and needs to be removed.

This fixes the bug which caused freebsd-update to want to delete / (which is
harmless, since `rm /` fails, but scary nonetheless).  A workaround is being
applied to the update bits in order to avoid triggering the bug on unpatched
systems.

PR: 196055, 196091, 196147

9 years agoAdd VAMI (VMware Appliance Management Interface) port.
marck [Mon, 22 Dec 2014 21:26:49 +0000 (21:26 +0000)]
Add VAMI (VMware Appliance Management Interface) port.

Reviewed by: eadler
MFC after: 2 weeks

9 years agoAdd a divisor parameter to twiddle() so that callers can request that output
ian [Mon, 22 Dec 2014 20:42:36 +0000 (20:42 +0000)]
Add a divisor parameter to twiddle() so that callers can request that output
only happen on every Nth call.  Update the existing twiddle() calls done in
various IO loops to roughly reflect the relative IO sizes.  That is, tftp
and nfs call twiddle() on every 1K block, ufs on every filesystem block,
so the network calls now use a much larger divisor than disk IO calls.

Also add a new twiddle_divisor() function that allows an application to set
a global divisor that is applied on top of the per-call divisors.  Nothing
calls this yet, but loader(8) will be using it to further throttle the
cursor for slow serial consoles.

9 years agoDon't require ${SYSDIR}/../COPYRIGHT to exist. Fall back to the
imp [Mon, 22 Dec 2014 19:10:21 +0000 (19:10 +0000)]
Don't require ${SYSDIR}/../COPYRIGHT to exist. Fall back to the
current date if we can't find it.

MFC After: 2 weeks

9 years agoMake this compile when TERM_EMU is not defined.
imp [Mon, 22 Dec 2014 19:10:11 +0000 (19:10 +0000)]
Make this compile when TERM_EMU is not defined.

9 years agoFix multiple ntp vulnerabilities.
delphij [Mon, 22 Dec 2014 18:54:55 +0000 (18:54 +0000)]
Fix multiple ntp vulnerabilities.

Reviewed by: roberto (earlier revision), philip
Security: CVE-2014-9293, CVE-2014-9294
Security: CVE-2014-9295, CVE-2014-9296
Security: FreeBSD-SA-14:31.ntp

Differential Revision: https://reviews.freebsd.org/D1343

9 years agoFix panic when resizing ZFS zvol's
smh [Mon, 22 Dec 2014 18:39:38 +0000 (18:39 +0000)]
Fix panic when resizing ZFS zvol's

Resizing a ZFS ZVOL with debug enabled would result in a panic due to
recursion on dp_config_rwlock.

The upstream change "3464 zfs synctask code needs restructuring" changed
zvol_set_volsize to avoid the recursion on dp_config_rwlock, but this was
missed when originally merged in by r248571 due to significant differences
in our codebases in this area.

These changes also relied on bring in changes from upstream:
3557 dumpvp_size is not updated correctly when a dump zvol's size is
changed, which where also not present.

In order to help prevent future issues in this area a direct comparison
and diff minimisation from current upstream version (b515258) of zvol.c.

Differential Revision: https://reviews.freebsd.org/D1302
MFC after: 1 month
X-MFC-With: r276063 & r276066
Sponsored by: Multiplay

9 years agoRefactor zvol locking to minimise diff with upstream
smh [Mon, 22 Dec 2014 17:04:51 +0000 (17:04 +0000)]
Refactor zvol locking to minimise diff with upstream

Use #define zfsdev_state_lock spa_namespace_lock instead of replacing all
zfsdev_state_lock with spa_namespace_lock to minimise changes from upstream.

Differential Revision: D1302
MFC after: 1 month
X-MFC-With r276063
Sponsored by: Multiplay

9 years agoExplicitly treat timeouts when waiting for IBF or OBF to change state as an
jhb [Mon, 22 Dec 2014 16:53:04 +0000 (16:53 +0000)]
Explicitly treat timeouts when waiting for IBF or OBF to change state as an
error.  This fixes occasional hangs in the IPMI kcs thread when using
ipmitool locally.

MFC after: 1 week

9 years agovt: register the memory regions used by the vt drivers
royger [Mon, 22 Dec 2014 16:46:07 +0000 (16:46 +0000)]
vt: register the memory regions used by the vt drivers

Current VT drivers don't register the memory regions they use with the
nexus. This patch makes vt_vga and vt_efifb register the memory regions they
use.

This is needed (at least) for Xen support, since the FreeBSD kernel will try
to use the holes in the memory map to map memory from other domains and
setup it's grant table.

Sponsored by: Citrix Systems R&D
Reported by: sbruno
Tested by: emaste
Reviewed by: ray
PR: 195537
Differential Revision: https://reviews.freebsd.org/D1291

9 years agoStandardise on illumos for #ifdef's in zvol.c
smh [Mon, 22 Dec 2014 16:38:29 +0000 (16:38 +0000)]
Standardise on illumos for #ifdef's in zvol.c

Also correct as per style(9) on the use of #ifdef comments.

This is a no-op change as pre-cursor to a full cleanup and merge with
upstream zvol changes.

Sponsored by: Multiplay

9 years agoAdd AArch64 machine time and relocations for readelf
emaste [Mon, 22 Dec 2014 16:34:59 +0000 (16:34 +0000)]
Add AArch64 machine time and relocations for readelf

Reviewed by: andrew
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1333

9 years agoSet up default shstrtab entries at shstrtab initialization
emaste [Mon, 22 Dec 2014 16:31:09 +0000 (16:31 +0000)]
Set up default shstrtab entries at shstrtab initialization

Instead of waiting until the addition of the first non-default entry.
This fixes a segfault when strip(1) is asked to remove every section from
an object file.

Upstream elftoolchain ticket 463

Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1341

9 years agoRemove some leftovers from OMAP3 support.
loos [Mon, 22 Dec 2014 16:29:15 +0000 (16:29 +0000)]
Remove some leftovers from OMAP3 support.

9 years agoSimplify the use of locks where possible, remove the locking when it is not
loos [Mon, 22 Dec 2014 16:12:55 +0000 (16:12 +0000)]
Simplify the use of locks where possible, remove the locking when it is not
required.

Simplify the code a little bit.

Reviewed by: andrew (previous version)

9 years agoIn sbappend*() family of functions clear M_PROTO flags of incoming
glebius [Mon, 22 Dec 2014 15:39:24 +0000 (15:39 +0000)]
In sbappend*() family of functions clear M_PROTO flags of incoming
mbufs. sbappendstream() already does this in m_demote().

PR: 196174
Sponsored by: Nginx, Inc.

9 years agoAdd flag VM_ALLOC_NOWAIT for vm_page_grab() that prevents sleeping and
glebius [Mon, 22 Dec 2014 09:02:21 +0000 (09:02 +0000)]
Add flag VM_ALLOC_NOWAIT for vm_page_grab() that prevents sleeping and
allows the function to fail.

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

9 years agoDo not clear flag that vm_page_alloc() doesn't support.
glebius [Mon, 22 Dec 2014 09:00:47 +0000 (09:00 +0000)]
Do not clear flag that vm_page_alloc() doesn't support.

Submitted by: kib

9 years agoDocument flags of vm_page allocation functions.
glebius [Mon, 22 Dec 2014 08:59:44 +0000 (08:59 +0000)]
Document flags of vm_page allocation functions.

Reviewed by: alc

9 years agoUpdate the text for building texinfo with build-tools to reflect the fact
ngie [Mon, 22 Dec 2014 04:54:57 +0000 (04:54 +0000)]
Update the text for building texinfo with build-tools to reflect the fact
that make install is being called as well

MFC after: 1 week
X-MFC with: r276052

9 years agoBuild selective portions of gnu/usr.bin/texinfo as part of build-tools to
ngie [Mon, 22 Dec 2014 04:52:24 +0000 (04:52 +0000)]
Build selective portions of gnu/usr.bin/texinfo as part of build-tools to
ensure that building on a host without makeinfo (i.e. a host where
make delete-old -DWITHOUT_INFO was run), then building with MK_INFO == yes
doesn't manifest in build errors when building info pages

This manifested itself like the following when I was build testing an MFC
change on stable/10:

  makeinfo --no-split -I /usr/src/gnu/lib/libregex/doc -I /usr/src/gnu/lib/libregex/doc regex.texi  -o regex.info
  makeinfo: not found
  *** [regex.info] Error code 127

make[6]: stopped in /usr/src/gnu/lib/libregex/doc
1 error

Tested on a head VM without makeinfo installed and by building with MK_INFO=yes

MFC after: 1 week

9 years agoReplace the clock divisor terms with values that also result in a 1 MHz
ian [Mon, 22 Dec 2014 00:50:01 +0000 (00:50 +0000)]
Replace the clock divisor terms with values that also result in a 1 MHz
clock, but actually work on real hardware, unlike the original set of
values I chose.

PR: 195009
Submitted by: Scott Ellis <jumpnowtek@gmail.com>

9 years agoAdd -march=armv7a to the kernel compile for all ARM systems which are v7a.
ian [Sun, 21 Dec 2014 23:48:32 +0000 (23:48 +0000)]
Add -march=armv7a to the kernel compile for all ARM systems which are v7a.

Submitted by: Michal Meloun <meloun@miracle.cz>

9 years agoAdd __FreeBSD_version guards around hsearch_r to ease MFCing the code to
ngie [Sun, 21 Dec 2014 23:47:30 +0000 (23:47 +0000)]
Add __FreeBSD_version guards around hsearch_r to ease MFCing the code to
stable/10

It was added when __FreeBSD_version was ~1100027

9 years agoAllow -march=armv7a on the gcc command line, for compatibility with clang.
ian [Sun, 21 Dec 2014 23:45:13 +0000 (23:45 +0000)]
Allow -march=armv7a on the gcc command line, for compatibility with clang.
This will result in __ARM_ARCH_7A__ being defined during the compile.

When compiling with gcc, it will still only generate armv6 opcodes itself,
but should pass the arch to gas so that inline asm can use v7 opcodes.

9 years agosh: Move some code from onint() to onsig(), making onint() noreturn.
jilles [Sun, 21 Dec 2014 23:09:59 +0000 (23:09 +0000)]
sh: Move some code from onint() to onsig(), making onint() noreturn.

As a result, the INTON macro which is used many times generates fewer
bytes of code.

9 years agosh: Remove EXP_REDIR.
jilles [Sun, 21 Dec 2014 22:18:30 +0000 (22:18 +0000)]
sh: Remove EXP_REDIR.

EXP_REDIR was supposed to generate pathnames in redirection if exactly one
file matches, as permitted but not required by POSIX in interactive mode. It
is unlikely this will be implemented.

No functional change is intended.

MFC after: 1 week

9 years agoFix the unwinder to get past functions with no stack but may cause an
andrew [Sun, 21 Dec 2014 21:38:12 +0000 (21:38 +0000)]
Fix the unwinder to get past functions with no stack but may cause an
exception. In this case no registers will be updated but the link register
will be copied to the program counter to be used to find the calling
function. In this case the program counter may be updated and we should
continue with the trace.

9 years agoPull out the fdt mapping code into intr.c. The arm_intrng branch also
andrew [Sun, 21 Dec 2014 21:27:12 +0000 (21:27 +0000)]
Pull out the fdt mapping code into intr.c. The arm_intrng branch also
defines this function allowing the mapping method to change when we move
to it.

9 years agoEliminate a "cast discards qualifiers" warning when building with gcc.
ian [Sun, 21 Dec 2014 21:24:19 +0000 (21:24 +0000)]
Eliminate a "cast discards qualifiers" warning when building with gcc.

9 years agoEliminate a redundant declaration.
ian [Sun, 21 Dec 2014 21:23:53 +0000 (21:23 +0000)]
Eliminate a redundant declaration.

9 years agoRemove a volatile qualifier on return type that is ignored and results in
ian [Sun, 21 Dec 2014 21:11:54 +0000 (21:11 +0000)]
Remove a volatile qualifier on return type that is ignored and results in
a -Wreturn-type warning when compiled with gcc.

9 years agoFurther reduce the diff between the arm_intrng gic driver and the version
andrew [Sun, 21 Dec 2014 17:25:21 +0000 (17:25 +0000)]
Further reduce the diff between the arm_intrng gic driver and the version
in head.

9 years agoSwitch zfsboot installer force 4K option to use vfs.zfs.min_auto_ashift=12
smh [Sun, 21 Dec 2014 17:21:29 +0000 (17:21 +0000)]
Switch zfsboot installer force 4K option to use vfs.zfs.min_auto_ashift=12

Previously we used gnop(8) to fake 4K sector size disks but ZFS now has a
sysctl to control this when creating new top level vdev's so use that
instead.

Differential Revision: D566
MFC after: 1 month
Sponsored by: Multiplay

9 years agoAllow whitspace to appear between device name and unit number in loaderdev.
ian [Sun, 21 Dec 2014 17:10:24 +0000 (17:10 +0000)]
Allow whitspace to appear between device name and unit number in loaderdev.
This allows the same value to be used in u-boot commands and the loaderdev
env var that gets passed to ubldr, for example 'fatload mmc 1 ${bootfile}".

9 years agoReduce the diff between the lpc interrupt controller in head and arm_intrng
andrew [Sun, 21 Dec 2014 16:59:41 +0000 (16:59 +0000)]
Reduce the diff between the lpc interrupt controller in head and arm_intrng

9 years agoReduce the diff in the Ti aintc between head and arm_intrng
andrew [Sun, 21 Dec 2014 16:48:57 +0000 (16:48 +0000)]
Reduce the diff in the Ti aintc between head and arm_intrng

9 years agostyle (9) nits
smh [Sun, 21 Dec 2014 16:38:29 +0000 (16:38 +0000)]
style (9) nits

Use return (val); instead of return val;

Differential Revision: D838
MFC after: 2 weeks
Sponsored by: Multiplay

9 years agoReduce the diff between head and arm_intrng with the bcm2835 interrupt
andrew [Sun, 21 Dec 2014 16:35:42 +0000 (16:35 +0000)]
Reduce the diff between head and arm_intrng with the bcm2835 interrupt
controller.

9 years agoReturn the error from ahci_setup_interrupt in ahci_attach
smh [Sun, 21 Dec 2014 16:32:57 +0000 (16:32 +0000)]
Return the error from ahci_setup_interrupt in ahci_attach

Previously ahci_attach returned a hard coded ENXIO instead of the value
from ahci_setup_interrupt. This is effectively a NOOP change as currently
ahci_setup_interrupt only ever returns 0 or ENXIO, so just there to protect
against any future changes to that.

Differential Revision: D838
MFC after: 2 weeks
Sponsored by: Multiplay

9 years agoReduce the diff to the arm_intrng project branch by having the read/write
andrew [Sun, 21 Dec 2014 16:21:56 +0000 (16:21 +0000)]
Reduce the diff to the arm_intrng project branch by having the read/write
macros take the softc they are accessing.

9 years agoClamp ahci max irq's to AHCI_MAX_IRQS
smh [Sun, 21 Dec 2014 16:15:29 +0000 (16:15 +0000)]
Clamp ahci max irq's to AHCI_MAX_IRQS

This prevents the possiblity of any overruns on the statically allocated
struct irqs field.

Differential Revision: D838
MFC after: 2 weeks
X-MFC-With: r276012
Sponsored by: Multiplay

9 years agoAdd a constant AHCI_MAX_IRQS removing magic number
smh [Sun, 21 Dec 2014 16:07:46 +0000 (16:07 +0000)]
Add a constant AHCI_MAX_IRQS removing magic number

Sponsored by: Multiplay

9 years agoDon't check twice that inp is not NULL.
tuexen [Sun, 21 Dec 2014 13:58:53 +0000 (13:58 +0000)]
Don't check twice that inp is not NULL.

Reported by: Coverity
CID: 748671
MFC after: 3 days

9 years agoAdd VN_OPEN_NAMECACHE flag for vn_open_cred(9), which requests that
kib [Sun, 21 Dec 2014 13:32:07 +0000 (13:32 +0000)]
Add VN_OPEN_NAMECACHE flag for vn_open_cred(9), which requests that
the created file name was cached.  Use the flag for core dumps.

Requested by: rpaulo
Tested by: pho (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoHandle MAKEENTRY cnp flag in the VOP_CREATE(). Curiously, some
kib [Sun, 21 Dec 2014 13:29:33 +0000 (13:29 +0000)]
Handle MAKEENTRY cnp flag in the VOP_CREATE().  Curiously, some
fs, e.g. smbfs, already did it.

Tested by: pho (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoVarious mdoc fixes and a few EOL whitespace removals.
brueffer [Sun, 21 Dec 2014 12:36:36 +0000 (12:36 +0000)]
Various mdoc fixes and a few EOL whitespace removals.

Found with: mandoc -Tlint

9 years agoVarious mdoc fixes.
brueffer [Sun, 21 Dec 2014 12:13:49 +0000 (12:13 +0000)]
Various mdoc fixes.

Found with: mandoc -Tlint

9 years agoFix the indentation to simplify comparing the ARM config files.
andrew [Sun, 21 Dec 2014 11:55:40 +0000 (11:55 +0000)]
Fix the indentation to simplify comparing the ARM config files.

9 years agotart to clean up the armv6 kernel configs by reducing the diff between
andrew [Sun, 21 Dec 2014 11:37:00 +0000 (11:37 +0000)]
tart to clean up the armv6 kernel configs by reducing the diff between
them in the first sections and the later FDT support.

Differential Revision: https://reviews.freebsd.org/D1346
Reviewed by: rpaulo (earlier version)

9 years agoFix various mdoc issues and some EOL whitespace.
brueffer [Sun, 21 Dec 2014 10:57:42 +0000 (10:57 +0000)]
Fix various mdoc issues and some EOL whitespace.

Found with: mandoc -Tlint

9 years agoRemove EOL whitespace.
brueffer [Sun, 21 Dec 2014 10:04:26 +0000 (10:04 +0000)]
Remove EOL whitespace.

Found with: mandoc -Tlint

9 years agoFix various mdoc issues.
brueffer [Sun, 21 Dec 2014 09:53:29 +0000 (09:53 +0000)]
Fix various mdoc issues.

Found with: mandoc -Tlint

9 years agoWhere appropriate, use the modern terms for the one true time base
imp [Sun, 21 Dec 2014 05:07:11 +0000 (05:07 +0000)]
Where appropriate, use the modern terms for the one true time base
(UTC) rather than the archaic (GMT) in comments. Except where the
comments are making fun of people doing this (and pedants who insist
on the new terms).

9 years agoUpdate ieee80211_sta_tim_notify() to do double duty - handle STA sleep
adrian [Sun, 21 Dec 2014 04:58:45 +0000 (04:58 +0000)]
Update ieee80211_sta_tim_notify() to do double duty - handle STA sleep
to awake transition as well as handle waking up a VAP in STA powersave
mode if it's in bgscan.

This was a reasonably hairy bug to try and figure out and it became
more obvious because of stuff I've done.

Specifically:

* a NIC would go into bgscan mode - either because of a bgscan timer
  or wpa_supplicant asked it to;
* the AP would indicate there's traffic for the STA by setting the TIM
  bitmap bit for it;
* mindwell would be met during scan, so it'd wake up and break out of
  the scan loop in scan_task(), but
* because the scan wasn't completed, it wouldn't bring the VAP out of
  STA mode powersave (so it wouldn't tell the AP about it and it would
  block VAP TX);
* .. but because we kept seeing the TIM bit set, ic->ic_lastdata was
  being constantly updated, and ..
* bgscancont() would thus never say "yes we can continue a bgscan"
  so the bgscan would hang and never make progress.

Now, I do see this particular state occur on iwn(4) - /however/ -
this NIC has the firmware call ieee80211_scan_next() once the firmware
scan for that channel has completed.  This has the effect of moving
the scan along to the next channel.  I do see the debug that I'm adding
where we see a beacon with a TIM bit set whilst we're in bgscan, so
the condition about waking up to receive traffic is triggering.
It just won't cause a hang.

For other NICs - all of the USB ones and at least ath(4) -
ieee80211_scan_next() / ieee80211_scan_done() isn't called.
So it relies upon the mindwell timer, the beacon receive and the
beacon / probe response -> ieee80211_add_scan() to move along
the scan state.

In the above case, mindwell triggered, there's no beacons triggering
the scan_add code to move things along, and we weren't waking things
up when seeing the TIM set for us.  So it just hung until the interface
was dropped.

So, the short-term fix here is to do what the comment in scan_task()
says - if we are in bgscan mode and we see our TIM bit set, just wake
up the VAP.  If it's already awake then it's a nop.  If we're awake
then we transition to awake and handle the traffic.  Once there's no
TX or RX traffic going on, ic->ic_lastdata won't be updated anymore
and bgscancont() will continue.

This was triggered more often after my initial SLEEP state handling
for software sleep states - because now I update ic->ic_lastdata
upon seeing a TIM bit set, not just the RX of the subsequent traffic.
That's needed so the thing doesn't ping-pong up and down between
seeing the TIM bit set, sending the "I'm awake" NULL data frame, and
starting to receive data from the AP.

I'd like to subsequently split ic_lastdata into two - one for TX and
one for RX - so it becomes easier to use the correct one (or both!)
when making decisions like whether to scan, go to sleep, etc.

I'd appreciate this getting some further testing.

Tested:

* rsu(4), STA mode, bgscan on
* iwn(4), STA mode, bgscan on

9 years agoBreak out the unicast/multicast TIM bit setting into "set something
adrian [Sun, 21 Dec 2014 04:48:54 +0000 (04:48 +0000)]
Break out the unicast/multicast TIM bit setting into "set something
that indicates we have traffic" bit and a "do something if we have
traffic bit."

I'm going to be fleshing out this stuff more over time and it'll make
more sense to have it broken out into two pieces here.

9 years agoAdd more debugging to try and track down this scan hang nonsense.
adrian [Sun, 21 Dec 2014 01:15:55 +0000 (01:15 +0000)]
Add more debugging to try and track down this scan hang nonsense.

9 years agoAdd some more debugging to the scan cancel methods - I'd like to see
adrian [Sat, 20 Dec 2014 23:41:37 +0000 (23:41 +0000)]
Add some more debugging to the scan cancel methods - I'd like to see
what situations would cause the scan cancel's to not complete.

9 years agoRevert r274494, r274712, r275955 and provide extra comments explaining
glebius [Sat, 20 Dec 2014 22:12:04 +0000 (22:12 +0000)]
Revert r274494, r274712, r275955 and provide extra comments explaining
why there could appear a zero-sized mbufs in socket buffers.

A proper fix would be to divorce record socket buffers and stream
socket buffers, and divorce pru_send that accepts normal data from
pru_send that accepts control data.

9 years agoFix and harmonize the validation of PR-SCTP policies.
tuexen [Sat, 20 Dec 2014 21:17:28 +0000 (21:17 +0000)]
Fix and harmonize the validation of PR-SCTP policies.

Reported by: Coverity
CID: 1232044
MFC after: 3 days

9 years agoRemove some hard-coded IE assembly over to use net80211 methods.
adrian [Sat, 20 Dec 2014 20:07:48 +0000 (20:07 +0000)]
Remove some hard-coded IE assembly over to use net80211 methods.

PR: kern/196069
Submitted by:  Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoEmulate writes to the IA32_MISC_ENABLE MSR.
neel [Sat, 20 Dec 2014 19:47:51 +0000 (19:47 +0000)]
Emulate writes to the IA32_MISC_ENABLE MSR.

PR: 196093
Reported by: db
Tested by: db
Discussed with: grehan
MFC after: 1 week

9 years agoDocument where in scan_task the scan state can change, and potentially
adrian [Sat, 20 Dec 2014 19:41:31 +0000 (19:41 +0000)]
Document where in scan_task the scan state can change, and potentially
deal/log a warning if the scan flags change during one of those race
windows.

It's highly likely that I need to actually sit down and replace this
scan infrastructure at some point.  It has some other side effects too -
the scan task is a blocking task scheduled in the net80211 taskqueue;
so drivers that use this taskqueue have other things not run.  Eek.

If you see this printf happen then please let me know!

9 years agoDriver for CPU frequency/voltage control on the Raspberry Pi.
rpaulo [Sat, 20 Dec 2014 19:15:10 +0000 (19:15 +0000)]
Driver for CPU frequency/voltage control on the Raspberry Pi.

Differential Revision: https://reviews.freebsd.org/D1025
Submitted by: Daisuke Aoyama aoyama@peach.ne.jp
Reviewed by: ian (earlier version), rpaulo
MFC after: 1 month
Relnotes: yes

9 years agoClean up the style of the CUBIEBOARD2 config file
andrew [Sat, 20 Dec 2014 18:42:20 +0000 (18:42 +0000)]
Clean up the style of the CUBIEBOARD2 config file

9 years agoClean up to use the standard style of "options \t" and "device\t\t"
andrew [Sat, 20 Dec 2014 18:15:23 +0000 (18:15 +0000)]
Clean up to use the standard style of "options \t" and "device\t\t"

9 years agoIncrease allowed size of the microcode blob to 32KB. Some Intel CPU's
kib [Sat, 20 Dec 2014 16:40:49 +0000 (16:40 +0000)]
Increase allowed size of the microcode blob to 32KB.  Some Intel CPU's
updates weight 28KB.

PR: 179523
MFC after: 1 week

9 years agoReport initiator id in portlist XML in more formalized way.
mav [Sat, 20 Dec 2014 16:39:56 +0000 (16:39 +0000)]
Report initiator id in portlist XML in more formalized way.

MFC after: 3 days

9 years agoReport XML parsing errors.
mav [Sat, 20 Dec 2014 16:13:31 +0000 (16:13 +0000)]
Report XML parsing errors.

MFC after: 3 days

9 years agoAdd to sbappendstream_locked() a check against NULL mbuf, like it is done
glebius [Sat, 20 Dec 2014 14:19:46 +0000 (14:19 +0000)]
Add to sbappendstream_locked() a check against NULL mbuf, like it is done
in sbappend_locked() and sbappendrecord_locked().

This is a quick fix to the panic introduced by r274712.

A proper solution should be to make sosend_generic() avoid calling
pru_send() with NULL mbuf for the protocols that do not understand
control messages. Those protocols that understand control messages,
should be able to receive NULL mbuf, if control is non-NULL.

9 years agoCleanup the code.
tuexen [Sat, 20 Dec 2014 13:47:38 +0000 (13:47 +0000)]
Cleanup the code.

Reported by: Coverity
CID: 1232003