]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years ago[bwn] begin migrating PHY common routines into if_bwn_phy_common.[ch].
Adrian Chadd [Sat, 14 May 2016 20:11:48 +0000 (20:11 +0000)]
[bwn] begin migrating PHY common routines into if_bwn_phy_common.[ch].

This isn't compiled in yet; so some code here duplicates what
is in the existing code.  I'll migrate it all out in subsequent
commits.

Obtained from: b43 (definitions), bcm-v4 specifications website

8 years ago[bwn] add Q52 macros.
Adrian Chadd [Sat, 14 May 2016 20:09:37 +0000 (20:09 +0000)]
[bwn] add Q52 macros.

The PHY-N code uses a different format for gain values, so these macros
are used for converting to/from and print out values.

8 years agoUse OF_prop_free instead of direct call to free(9)
Oleksandr Tymoshenko [Sat, 14 May 2016 20:06:38 +0000 (20:06 +0000)]
Use OF_prop_free instead of direct call to free(9)

Reviewed by: jhibbits

8 years agoUse OF_prop_free instead of direct call to free(9)
Oleksandr Tymoshenko [Sat, 14 May 2016 20:05:35 +0000 (20:05 +0000)]
Use OF_prop_free instead of direct call to free(9)

Reviewed by: sgalabov

8 years ago[bwn] add BCMA chip identifiers.
Adrian Chadd [Sat, 14 May 2016 20:03:24 +0000 (20:03 +0000)]
[bwn] add BCMA chip identifiers.

This will eventually live in sys/dev/bhnd/, but I won't use that until
we migrate the whole driver over.

So, this'll live here for now.

Obtained from: Linux b43 (definitions)

8 years agoFix fuse to use DIRECT_IO when required.
Rick Macklem [Sat, 14 May 2016 20:03:22 +0000 (20:03 +0000)]
Fix fuse to use DIRECT_IO when required.

When a file is opened write-only and a partial block was written,
buffered I/O would try and read the whole block in. This would
result in a hung thread, since there was no open (fuse filehandle)
that allowed reading. This patch avoids the problem by forcing
DIRECT_IO for this case.
It also sets DIRECT_IO when the file system specifies the FN_DIRECTIO
flag in its reply to the open.

Tested by: nishida@asusa.net, freebsd@moosefs.com
PR: 194293, 206238
MFC after: 2 weeks

8 years ago[bwn] add more debugging bits.
Adrian Chadd [Sat, 14 May 2016 20:02:02 +0000 (20:02 +0000)]
[bwn] add more debugging bits.

I'm hoping to migrate the device_printf() bits out into macros so we can
control it later.

Also, add some new debug sections that I'll soon be using.

8 years ago[bwn] migrate sqrt and add another couple of util routines.
Adrian Chadd [Sat, 14 May 2016 19:52:04 +0000 (19:52 +0000)]
[bwn] migrate sqrt and add another couple of util routines.

bwn_sqrt() is in the PHY-LP code but is also needed by the upcoming
PHY-N support.

The other two routines are used by the PHY-N code.

The next commit will introduce it into the compile and pull bwn_sqrt()
out of the PHY-LP source.

8 years agoAdd DTS files for the Allwinner A83T SoC and the Sinovoip BananaPi BPI-M3
Jared McNeill [Sat, 14 May 2016 18:47:36 +0000 (18:47 +0000)]
Add DTS files for the Allwinner A83T SoC and the Sinovoip BananaPi BPI-M3
development board.

8 years agoUse OF_prop_free instead of direct call to free(9)
Oleksandr Tymoshenko [Sat, 14 May 2016 18:44:30 +0000 (18:44 +0000)]
Use OF_prop_free instead of direct call to free(9)

8 years agoAdd an EARLY_AP_STARTUP option to start APs earlier during boot.
John Baldwin [Sat, 14 May 2016 18:22:52 +0000 (18:22 +0000)]
Add an EARLY_AP_STARTUP option to start APs earlier during boot.

Currently, Application Processors (non-boot CPUs) are started by
MD code at SI_SUB_CPU, but they are kept waiting in a "pen" until
SI_SUB_SMP at which point they are released to run kernel threads.
SI_SUB_SMP is one of the last SYSINIT levels, so APs don't enter
the scheduler and start running threads until fairly late in the
boot.

This change moves SI_SUB_SMP up to just before software interrupt
threads are created allowing the APs to start executing kernel
threads much sooner (before any devices are probed).  This allows
several initialization routines that need to perform initialization
on all CPUs to now perform that initialization in one step rather
than having to defer the AP initialization to a second SYSINIT run
at SI_SUB_SMP.  It also permits all CPUs to be available for
handling interrupts before any devices are probed.

This last feature fixes a problem on with interrupt vector exhaustion.
Specifically, in the old model all device interrupts were routed
onto the boot CPU during boot.  Later after the APs were released at
SI_SUB_SMP, interrupts were redistributed across all CPUs.

However, several drivers for multiqueue hardware allocate N interrupts
per CPU in the system.  In a system with many CPUs, just a few drivers
doing this could exhaust the available pool of interrupt vectors on
the boot CPU as each driver was allocating N * mp_ncpu vectors on the
boot CPU.  Now, drivers will allocate interrupts on their desired CPUs
during boot meaning that only N interrupts are allocated from the boot
CPU instead of N * mp_ncpu.

Some other bits of code can also be simplified as smp_started is
now true much earlier and will now always be true for these bits of
code.  This removes the need to treat the single-CPU boot environment
as a special case.

As a transition aid, the new behavior is available under a new kernel
option (EARLY_AP_STARTUP).  This will allow the option to be turned off
if need be during initial testing.  I plan to enable this on x86 by
default in a followup commit in the next few days and to have all
platforms moved over before 11.0.  Once the transition is complete,
the option will be removed along with the !EARLY_AP_STARTUP code.

These changes have only been tested on x86.  Other platform maintainers
are encouraged to port their architectures over as well.  The main
things to check for are any uses of smp_started in MD code that can be
simplified and SI_SUB_SMP SYSINITs in MD code that can be removed in
the EARLY_AP_STARTUP case (e.g. the interrupt shuffling).

PR: kern/199321
Reviewed by: markj, gnn, kib
Sponsored by: Netflix

8 years agoAdd allwinner,sun8i-a83t-i2c to the list of compatible devices.
Jared McNeill [Sat, 14 May 2016 18:02:47 +0000 (18:02 +0000)]
Add allwinner,sun8i-a83t-i2c to the list of compatible devices.

8 years agoFix a locking bug which only shows up on Mac OS X.
Michael Tuexen [Sat, 14 May 2016 13:44:49 +0000 (13:44 +0000)]
Fix a locking bug which only shows up on Mac OS X.

MFC after: 1 week

8 years agoUpdate comment at top of file to mention all currently supported Allwinner
Jared McNeill [Sat, 14 May 2016 10:39:57 +0000 (10:39 +0000)]
Update comment at top of file to mention all currently supported Allwinner
SoCs. Previously mentioned A20 and A31, added A31S, A83T, and H3.

8 years agoAdd thr*.2 and _umtx_op.2 manpages to the build.
Konstantin Belousov [Sat, 14 May 2016 09:43:28 +0000 (09:43 +0000)]
Add thr*.2 and _umtx_op.2 manpages to the build.

Sponsored by: The FreeBSD Foundation

8 years agoRevert r299739. That did not make it better.
Bjoern A. Zeeb [Sat, 14 May 2016 09:39:21 +0000 (09:39 +0000)]
Revert r299739.  That did not make it better.
Instead disconnect gpiokeys from the build until it's fixed and buildable;
the SUBDIR list was not ordered properly anyway ;-)

8 years agoBlind long shot. Add ofw_gpiobus.c to the SRCS list in the hope to
Bjoern A. Zeeb [Sat, 14 May 2016 09:18:50 +0000 (09:18 +0000)]
Blind long shot.  Add ofw_gpiobus.c to the SRCS list in the hope to
make the remaining MIPS kernels compile which set MODULES_OVERRIDE="gpio..."

8 years agoUpdate file list for sfgxe(4) again and hey, my amd64 kernels compile again.
Bjoern A. Zeeb [Sat, 14 May 2016 08:55:15 +0000 (08:55 +0000)]
Update file list for sfgxe(4) again and hey, my amd64 kernels compile again.

8 years agoRevert parts of r299575 in order to make more MIPS kernels build
Bjoern A. Zeeb [Sat, 14 May 2016 08:54:34 +0000 (08:54 +0000)]
Revert parts of r299575 in order to make more MIPS kernels build
again hopefully.
Rather than blindly removing a supposedly unused variable as reported by
the Clang Static Analyzer, inspect the code and hide them with proper
#ifdefs as they are used in certain conditional parts of the code.

8 years agoMFV r299716: file 5.27
Xin LI [Sat, 14 May 2016 08:52:37 +0000 (08:52 +0000)]
MFV r299716: file 5.27

MFC after: 2 weeks
Relnotes: yes

8 years agoDocument the non-obsoleted kernel interfaces used by libthr.
Konstantin Belousov [Sat, 14 May 2016 08:36:37 +0000 (08:36 +0000)]
Document the non-obsoleted kernel interfaces used by libthr.

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D6335

8 years agosfxge(4): remove unused EFX PHY symbols
Andrew Rybchenko [Sat, 14 May 2016 06:20:08 +0000 (06:20 +0000)]
sfxge(4): remove unused EFX PHY symbols

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove obsolete EFX_MON types
Andrew Rybchenko [Sat, 14 May 2016 06:18:49 +0000 (06:18 +0000)]
sfxge(4): remove obsolete EFX_MON types

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove unimplemented sensor reconfigure method
Andrew Rybchenko [Sat, 14 May 2016 06:17:55 +0000 (06:17 +0000)]
sfxge(4): remove unimplemented sensor reconfigure method

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove unimplemented sensor reset method
Andrew Rybchenko [Sat, 14 May 2016 06:17:03 +0000 (06:17 +0000)]
sfxge(4): remove unimplemented sensor reset method

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): fix build with -Werror=pointer-sign
Andrew Rybchenko [Sat, 14 May 2016 06:16:14 +0000 (06:16 +0000)]
sfxge(4): fix build with -Werror=pointer-sign

-Werror=pointer-sign is enabled in OmniOS GLD driver build.

Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove unimplemented MAC reset method
Andrew Rybchenko [Sat, 14 May 2016 06:14:28 +0000 (06:14 +0000)]
sfxge(4): remove unimplemented MAC reset method

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): cleanup: remove unused define EFX_EVQ_FALCON_TIMER_QUANTUM_NS
Andrew Rybchenko [Sat, 14 May 2016 06:13:24 +0000 (06:13 +0000)]
sfxge(4): cleanup: remove unused define EFX_EVQ_FALCON_TIMER_QUANTUM_NS

Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): cleanup: remove unused variable flags
Andrew Rybchenko [Sat, 14 May 2016 06:12:26 +0000 (06:12 +0000)]
sfxge(4): cleanup: remove unused variable flags

Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agoRemove more files from sfxge(4) which are no longer in the tree
Bjoern A. Zeeb [Sat, 14 May 2016 06:09:01 +0000 (06:09 +0000)]
Remove more files from sfxge(4) which are no longer in the tree
in order to make the universe a more happy place.

8 years agovtnet: fix panic on unload
Kristof Provost [Sat, 14 May 2016 06:07:15 +0000 (06:07 +0000)]
vtnet: fix panic on unload

Since r276367 added the virtio_mmio support vtnet_modevent() gets called twice.
This resulted in a memory leak during load and a panic on unload.

Count the loads so we only initialise once (just like cxgbe(4)), and only clean
up in the final unload.

PR: 209428
Submitted by: novel@FreeBSD.org
MFC after: 1 week

8 years agosfxge(4): remove unimplemented EFX PHY methods
Andrew Rybchenko [Sat, 14 May 2016 06:06:48 +0000 (06:06 +0000)]
sfxge(4): remove unimplemented EFX PHY methods

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): import TLV layout from firmwaresrc
Andrew Rybchenko [Sat, 14 May 2016 06:05:45 +0000 (06:05 +0000)]
sfxge(4): import TLV layout from firmwaresrc

Submitted by:   Laurence Evans <levans at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove obsolete EFSYS_OPT_PHY_PROPS option and APIs
Andrew Rybchenko [Sat, 14 May 2016 06:04:29 +0000 (06:04 +0000)]
sfxge(4): remove obsolete EFSYS_OPT_PHY_PROPS option and APIs

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove PHY property method stubs
Andrew Rybchenko [Sat, 14 May 2016 06:03:18 +0000 (06:03 +0000)]
sfxge(4): remove PHY property method stubs

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): move ef10 definitions to ef10_impl.h
Andrew Rybchenko [Sat, 14 May 2016 06:02:00 +0000 (06:02 +0000)]
sfxge(4): move ef10 definitions to ef10_impl.h

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): prepare for moving EF10 definitions to ef10_impl.h
Andrew Rybchenko [Sat, 14 May 2016 06:00:00 +0000 (06:00 +0000)]
sfxge(4): prepare for moving EF10 definitions to ef10_impl.h

Move legacy privilege masks near to their only user.
Move Huntington definitions to the top of hunt_impl.h to prepare
for moving the remaining EF10 definitions to ef10_impl.h.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6343

8 years agosfxge(4): rename falconsiena_filter types
Andrew Rybchenko [Sat, 14 May 2016 05:59:18 +0000 (05:59 +0000)]
sfxge(4): rename falconsiena_filter types

Falcon support has been removed, so this code only supports Siena.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6342

8 years agoVendor import of file 4.27.
Xin LI [Sat, 14 May 2016 05:25:47 +0000 (05:25 +0000)]
Vendor import of file 4.27.

8 years agoUse OF_prop_free instead of direct call to free(9)
Oleksandr Tymoshenko [Sat, 14 May 2016 05:00:17 +0000 (05:00 +0000)]
Use OF_prop_free instead of direct call to free(9)

Reviewed by: mmel@

8 years agoUse OF_prop_free instead of direct call to free(9)
Oleksandr Tymoshenko [Sat, 14 May 2016 04:59:36 +0000 (04:59 +0000)]
Use OF_prop_free instead of direct call to free(9)

Reviewed by: mmel@

8 years agoUndo the bogus gethostname() change from r299709.
Pedro F. Giffuni [Sat, 14 May 2016 04:29:13 +0000 (04:29 +0000)]
Undo the bogus gethostname() change from r299709.

The "- 1" is there specifically to enable checking for NUL termination.

I should also admit the rest change was mostly cosmetic and the
overruns can't occur in practice: still I leave them to pacify
static analyzers.

Pointed out by: bde

8 years agoFix some trivial clang/gcc warnings in bsnmptc.c
Enji Cooper [Sat, 14 May 2016 04:13:28 +0000 (04:13 +0000)]
Fix some trivial clang/gcc warnings in bsnmptc.c

- By definition, `enum snmp_tc` can't be false (the implied starting sequence
  index for the enum is 0). Don't test for it being < 0.
- Staticize `struct snmp_text_conv` to mute a -Wmissing-variable-declarations
  warning from clang.
- Remove set but unused variable, ptr, in parse_bridge_id(..) and
  parse_bport_id(..) to mute warning from gcc 4.9+.
- Mark value and string unused in snmp_inetaddr2oct(..) and parse_inetaddr(..)
  as they're just stub functions.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoFold two malloc + memset(.., 0, ..) calls into equivalent calloc calls
Enji Cooper [Sat, 14 May 2016 04:00:17 +0000 (04:00 +0000)]
Fold two malloc + memset(.., 0, ..) calls into equivalent calloc calls

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoStaticize global variables only used in bsnmpimport.c to fix
Enji Cooper [Sat, 14 May 2016 03:57:18 +0000 (03:57 +0000)]
Staticize global variables only used in bsnmpimport.c to fix
-Wmissing-variable-declarations warnings

MFC after: 3 weeks
Reported by: clang
Sponsored by: EMC / Isilon Storage Division

8 years agotimed(8): Use strlcpy() for bounds checking.
Pedro F. Giffuni [Sat, 14 May 2016 02:42:09 +0000 (02:42 +0000)]
timed(8): Use strlcpy() for bounds checking.

Prevent some theorical buffer overruns reported by Coverity.
Cleanup a use of gethostname() while here.

CID: 1006713101116610111671011168,

8 years agotimed(8): Use stronger random number generator.
Pedro F. Giffuni [Sat, 14 May 2016 01:12:23 +0000 (01:12 +0000)]
timed(8): Use stronger random number generator.

Using arc4random simplifies the code by not having to worry about
seeds which ironically depend on the time.

CID: 1300004

8 years agotimed(8): use NULL instead of zero for pointers.
Pedro F. Giffuni [Sat, 14 May 2016 00:46:38 +0000 (00:46 +0000)]
timed(8): use NULL instead of zero for pointers.

8 years agoiconvctl(3): remove superfluous NULL pointer tests
Eric van Gyzen [Sat, 14 May 2016 00:35:35 +0000 (00:35 +0000)]
iconvctl(3): remove superfluous NULL pointer tests

convname and dst are guaranteed to be non-NULL by iconv_open(3).
src is an array. Remove these tests for NULL pointers.
While I'm here, eliminate a strlcpy with a correct but suspicious-looking
calculation for the third parameter (i.e. not a simple sizeof).
Compare the strings in-place instead of copying.

Found by: bdrewery
Found by: Coverity
CID: 11300501130056
MFC after: 3 days
Sponsored by: Dell Inc.
Differential Revision:  https://reviews.freebsd.org/D6338

8 years agoUse OF_prop_free instead of direct call to free(9)
Oleksandr Tymoshenko [Fri, 13 May 2016 22:28:02 +0000 (22:28 +0000)]
Use OF_prop_free instead of direct call to free(9)

Approved by: jmcneill

8 years agoUse OF_prop_free instead of direct call to free(9)
Oleksandr Tymoshenko [Fri, 13 May 2016 22:05:16 +0000 (22:05 +0000)]
Use OF_prop_free instead of direct call to free(9)

8 years agoMove _bsnmptools_debug extern from bsnmpmap.c to bsnmptools.h
Enji Cooper [Fri, 13 May 2016 21:26:12 +0000 (21:26 +0000)]
Move _bsnmptools_debug extern from bsnmpmap.c to bsnmptools.h

It was used in bsnmpmap.c but was stored in bsnmptools.c; moving the extern
to the header allows us to cover all of our bases for the variable, and allows
_bsnmptools_debug to be used in the future elsewhere -- not just bsnmpmap.c.

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoWork around invalid gcc warning (explicit cast apparently lost).
Jason Evans [Fri, 13 May 2016 21:18:10 +0000 (21:18 +0000)]
Work around invalid gcc warning (explicit cast apparently lost).

8 years agoRemove NO_WERROR from libbsnmp/Makefile.inc
Enji Cooper [Fri, 13 May 2016 21:17:49 +0000 (21:17 +0000)]
Remove NO_WERROR from libbsnmp/Makefile.inc

This has been compiling without warnings with clang/gcc for a while now

Tested with: clang 3.8.0, gcc 4.2.x, gcc 5.x
MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoFix a bug in r298340: "sim" was referenced after being unset.
Mark Johnston [Fri, 13 May 2016 20:54:54 +0000 (20:54 +0000)]
Fix a bug in r298340: "sim" was referenced after being unset.

8 years agoEliminate an unused #include. For a brief period of time, _unrhdr.h was
Alan Cox [Fri, 13 May 2016 20:14:41 +0000 (20:14 +0000)]
Eliminate an unused #include.  For a brief period of time, _unrhdr.h was
used to implement PCID support on amd64.

Reviewed by: kib

8 years agoUse awk to run bhnd's awk script, to allow noexec src dir
Ed Maste [Fri, 13 May 2016 18:56:56 +0000 (18:56 +0000)]
Use awk to run bhnd's awk script, to allow noexec src dir

PR: 209435
Submitted by: Landon Fuller <landonf@landonf.org>
Differential Revision: https://reviews.freebsd.org/D6312

8 years agoFix FCP_CMD LENGTH mask in ATIO7 IOCB.
Alexander Motin [Fri, 13 May 2016 18:55:03 +0000 (18:55 +0000)]
Fix FCP_CMD LENGTH mask in ATIO7 IOCB.

This caused "long IU length (16384) ignored" errors following by others.

MFC after: 2 weeks

8 years agoRemove sh accidentally added to dependency lines in r299684
Ed Maste [Fri, 13 May 2016 18:54:48 +0000 (18:54 +0000)]
Remove sh accidentally added to dependency lines in r299684

Submitted by: Landon Fuller <landonf@landonf.org>

8 years ago[bwn] add N-PHY related register defintions.
Adrian Chadd [Fri, 13 May 2016 18:41:36 +0000 (18:41 +0000)]
[bwn] add N-PHY related register defintions.

* Add the siba bus phy/mac/bandwidth clock definitions (TGSLOW*)
* Add the PHY-N register gateway (BWN_PHY_N())
* Add the PHY-N TX phystat1 register - we need to actually fill out
  more of the PHY encoding information when we assemble a frame.
* Various ancillary stuff

Nothing uses this yet, but I do have CCK/OFDM somewhat working
in 2GHz mode on a PHY-N device.

Obtained from: b43 (definitions)

8 years agoAdd support for Allwinner H3 SoC.
Emmanuel Vadot [Fri, 13 May 2016 18:20:54 +0000 (18:20 +0000)]
Add support for Allwinner H3 SoC.
For now clocks, GPIO, Pinmux, UART, MMC, EHCI is supported.
Tested on OrangePi-One

Reviewed by: jmcneill
Approved by: cognet (mentor)
Differential Revision: https://reviews.freebsd.org/D6311

8 years agoAnother attempt at resolving CID 1305629. The test of cmd == -1
Don Lewis [Fri, 13 May 2016 17:48:04 +0000 (17:48 +0000)]
Another attempt at resolving CID 1305629.  The test of cmd == -1
may make Coverity think that other negative values of cmd (used
as an index) are possible.  Testing < 0 is a more common idiom
in any case.

Reported by: Coverity
CID: 1305629

8 years agoSupport libsoft for restage.
Bryan Drewery [Fri, 13 May 2016 17:44:20 +0000 (17:44 +0000)]
Support libsoft for restage.

This is essentially fixing a merge conflict.

8 years agocxgbe(4): Update T5 and T4 firmwares to 1.15.37.0.
Navdeep Parhar [Fri, 13 May 2016 17:38:59 +0000 (17:38 +0000)]
cxgbe(4): Update T5 and T4 firmwares to 1.15.37.0.

These firmwares were obtained from the "Chelsio T5/T4 Unified Wire
v2.12.0.3 for Linux" release.  Changes since 1.14.4.0 (which is the
firmware in -STABLE branches) are in the "Release Notes" accompanying
the Unified Wire release and are copy-pasted here as well.

22.1. T5 Firmware
+++++++++++++++++++++++++++++++++

Version : 1.15.37.0
Date    : 04/27/2016
================================================================================

FIXES
-----

BASE:
 - Fixed an issue in FW_RSS_VI_CONFIG_CMD handling where the default ingress
   queue was ignored.
 - Fixed an issue where adapter failed to load fw by adjusting DRAM frequency.
 - Fixed an issue in watchdog which was causing VM bring-up failure after reboot.
 - Fixed 40G link failures with some switches when auto-negotiation enabled.
 - Fixed to improve on link bring-up time.
 - Per port buffer groups size doubled to improve performance.
 - Fixed an issue where bogus d3hot bits were set causing traffic stall.
 - Fixed an issue where sometimes adapter was not seen after reboot.
 - Fixed an issue where iWARP was crashing in conjunction with traffic management.
 - Fixed an issue where link failed to come up after removing twinax cable and
   inserting optical module.

ETH
 - Fixed a link flap issue on T580-CR.

OFLD
 - Fixed a potential iSCSI data corruption issue by disabling RxFragEn flag.

FOiSCSI
 - Fixed an issue in recovery path where connection was getting closed before
   recovery processing was done.
 - Fixed an issue in TCP port reuse.
 - Fixed an issue in recovery path when large number (>64) of iSCSI connections
   were in use.
 - Returned ENETUNREACH if IP was not been provisioned yet and driver tried to
   use given inerface.
 - Fixed an issue where fw was sending ENETUNREACH event for normal tcp
   disconnection.

DCBX
 - Fixed an issue where iscsi tlv is sent incorrectly to host. (DCBX CEE)
 - Fixed an issue where apply bit set for APP id was affecting the ETS and PFC
  settings.(DCBX IEEE)
 - Fixed an issue where app priority values are not handled correctly in fw.
  (DCBX IEEE)
 - Fixed an issue where enable/disable dcbx can cause crash. (DCBX CEE,DCBX IEEE)

FOFCoE
 - Removed BB6 support.

ENHANCEMENTS
------------

BASE:
 - Added new interface to program DCA settings in SGE contexts; allow 32-byte
   IQE size
 - Added PTP interface fw_ptp_ts to support PTP Frequeny and Offset adjustment.
 - Added MPS raw interface.

ETH:
 - New mailbox command FW_DCB_IEEE_CMD api added for IEEE dcbx.

OFLD:
 - WR opcode is returned to host in cqe error response.

22.2. T4 Firmware
+++++++++++++++++

Version : 1.15.37.0
Date    : 04/27/2016
================================================================================

FIXES
-----

BASE:
 - Fixed an issue in FW_RSS_VI_CONFIG_CMD handling where default ingress queue
   was ignored.
 - Fixed an issue in watchdog which was causing VM bring-up failure after reboot.
 - Per port buffer groups size doubled to improve performance.
 - Fixed an issue where iWARP was crashing in conjunction with traffic management.

FOiSCSI:
 - Fixed an issue in recovery path where connection was getting closed before
   recovery processing was done.
 - Fixed an issue in TCP port reuse.
 - Fixed an issue in recovery path when large number (>64) of iSCSI connections
   were in use.
 - Returned ENETUNREACH if IP had not been provisioned yet and driver tried to
   use given inerface.

DCBX
 - Fixed an issue where iscsi tlv is sent incorrectly to host.(DCBX CEE)
 - Fixed an issue where enable/disable dcbx can cause crash in firmware.(DCBX CEE)

FOiSCSI
 - Fixes an issue where fw was sending ENETUNREACH event for normal tcp
   disconnection.

FOFCoE
 - Removed BB6 support.

ENHANCEMENTS
------------

BASE:
 - Added MPS raw interface.

ETH:
 - New mailbox command FW_DCB_IEEE_CMD api added for IEEE dcbx.
================================================================================

Obtained from: Chelsio Communications
MFC after: 6 weeks
Relnotes: yes
Sponsored by: Chelsio Communications

8 years agoAfter r299241, which added bhnd(4), use sh to run the shell scripts for
Dimitry Andric [Fri, 13 May 2016 16:35:37 +0000 (16:35 +0000)]
After r299241, which added bhnd(4), use sh to run the shell scripts for
generating nvram maps, to allow a noexec-mounted source directory.

Reported by: Johan Hendriks <joh.hendriks@gmail.com>
PR: 209435

8 years agoAdd support to the arm64 busdma to handle the cache. For now this is
Andrew Turner [Fri, 13 May 2016 16:03:50 +0000 (16:03 +0000)]
Add support to the arm64 busdma to handle the cache. For now this is
disabled, however when we enable it it will default to assume memory is
not cache-coherent, unless either the tag was created or the parent was
marked as cache-coherent.

Obtained from: ABT Systems Ltd
Relnotes: yes
Sponsored by: The FreeBSD Foundation

8 years agoi2c(8): uninitialized variable (UNINIT).
Pedro F. Giffuni [Fri, 13 May 2016 15:57:55 +0000 (15:57 +0000)]
i2c(8): uninitialized variable (UNINIT).

If i2c_opt.width is somehow zero, buf will be left uninitialized and may
cause trouble later on. This is a followup to r299586.

CID: 1331548

8 years agohunt_ev.c was deleted with r299596. Remove it from the files list to
Bjoern A. Zeeb [Fri, 13 May 2016 15:32:16 +0000 (15:32 +0000)]
hunt_ev.c was deleted with r299596.  Remove it from the files list to
(hopefully) unbreak amd64 LINT kernels.

MFC after: 1 week

8 years agoRemove the extra _RD as _RDTUN already includes it.
Bjoern A. Zeeb [Fri, 13 May 2016 15:29:40 +0000 (15:29 +0000)]
Remove the extra _RD as _RDTUN already includes it.

Submitted by: emaste
MFC after: 2 weeks

8 years agoAdd DMA sync operations around accessing the dwmmc descriptor ring. Even
Andrew Turner [Fri, 13 May 2016 15:15:54 +0000 (15:15 +0000)]
Add DMA sync operations around accessing the dwmmc descriptor ring. Even
with it maps as cache-coherent we still need to call bus_dmamap_sync.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

8 years agoWe already turn the AMD erratum383 workaround on for certain VM_GUEST_VM
Bjoern A. Zeeb [Fri, 13 May 2016 15:11:17 +0000 (15:11 +0000)]
We already turn the AMD erratum383 workaround on for certain VM_GUEST_VM
if specific CPU features are not present.
Some simulation environments, e.g. gem5, have been found to require more
TLB management from the kernel in certain setups. It is currently unclear why.
Turning on the workaround_erratum383 seems to help and make problems (panics)
go away.
Given this is a fairly uncommon environment so far, allowing the workaround
to be manually enabled from loader in order to make debugging and comparing
traces easier, but also to allow gem5 run FreeBSD in X86 timing mode, seems
to be the least intrusive option for now until the issue if fully understood.

Sponsored by: DARPA/AFRL
Reviewed by: kib, alc (earlier)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D6206

8 years agobhyve: consider the bogus case of a negative bar idx.
Pedro F. Giffuni [Fri, 13 May 2016 14:59:02 +0000 (14:59 +0000)]
bhyve: consider the bogus case of a negative bar idx.

This is a followup to r297472 to squelch Coverity.

CID: 1194319

8 years agobhyve: replace uninitialized variable "offset".
Pedro F. Giffuni [Fri, 13 May 2016 14:38:04 +0000 (14:38 +0000)]
bhyve: replace uninitialized variable "offset".

Use io->io_req.br_offset instead.

Suggested by: grehan
CID: 1288937

8 years agoHandle case of class being set, but not parent when calling
Hans Petter Selasky [Fri, 13 May 2016 13:01:02 +0000 (13:01 +0000)]
Handle case of class being set, but not parent when calling
device_register() in the LinuxKPI.

Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoAdd more PAGE related defines to the LinuxKPI. Move the definition of
Hans Petter Selasky [Fri, 13 May 2016 12:41:21 +0000 (12:41 +0000)]
Add more PAGE related defines to the LinuxKPI. Move the definition of
"pgprot_t" to "linux/page.h" similar to what Linux does.

Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoVersion update patch.
Kashyap D Desai [Fri, 13 May 2016 12:24:39 +0000 (12:24 +0000)]
Version update patch.

Submitted by:   Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by:    Kashyap Desai <Kashyap.Desai@broadcom.com>
MFC after:  3 days
Sponsored by:   AVAGO Technologies

8 years agoFollowing bugs fixed as part of this patch:
Kashyap D Desai [Fri, 13 May 2016 12:21:50 +0000 (12:21 +0000)]
Following bugs fixed as part of this patch:
.Kernel panic while collecting kdump (reported by Doug A.)
.NULL pointer dereference at sertain places
.Removed dead codes

Submitted by:   Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by:    Kashyap Desai <Kashyap.Desai@broadcom.com>
MFC after:  3 days
Sponsored by:   AVAGO Technologies

8 years agoAdded supprot for Avago Intruder controller.
Kashyap D Desai [Fri, 13 May 2016 12:18:12 +0000 (12:18 +0000)]
Added supprot for Avago Intruder controller.

Submitted by:   Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by:    Kashyap Desai <Kashyap.Desai@broadcom.com>
MFC after:  3 days
Sponsored by:   AVAGO Technologies

8 years agoImplemented interrupt Config Hook in mrsas(4) to defer some of the tasks, like:
Kashyap D Desai [Fri, 13 May 2016 12:15:20 +0000 (12:15 +0000)]
Implemented interrupt Config Hook in mrsas(4) to defer some of the tasks, like:
riegistering AEN, creating cdev.

Submitted by:   Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by:    Kashyap Desai <Kashyap.Desai@broadcom.com>
MFC after:  3 days
Sponsored by:   AVAGO Technologies

8 years agoThis patch implements driver support for 1MB IO size.
Kashyap D Desai [Fri, 13 May 2016 12:12:09 +0000 (12:12 +0000)]
This patch implements driver support for 1MB IO size.

NOTE:
The FreeBSD system currently restricts the MAX IO size to MAXPHYS which
in turn is 128KB. We tested the 1MB IO by converting the MAXPHYS to 1MB.

Following is the mail reference:
http://lists.freebsd.org/pipermail/freebsd-scsi/2015-January/006568.html

Submitted by:   Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by:    Kashyap Desai <Kashyap.Desai@broadcom.com>
MFC after:  3 days
Sponsored by:   AVAGO Technologies

8 years agoSimilar to RAID map for Logical Drives, now JBOD map has been introduced for
Kashyap D Desai [Fri, 13 May 2016 12:05:02 +0000 (12:05 +0000)]
Similar to RAID map for Logical Drives, now JBOD map has been introduced for
JBODs. Driver has to sync the JBOD map with firmware and use sequence number
as a reference for JBOD FastPath I/O's.

Submitted by:   Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by:    Kashyap Desai <Kashyap.Desai@broadcom.com>
MFC after:  3 days
Sponsored by:   AVAGO Technologies

8 years agoThere was no ERROR handling for firmware command TIMEOUT. This patch
Kashyap D Desai [Fri, 13 May 2016 12:00:46 +0000 (12:00 +0000)]
There was no ERROR handling for firmware command TIMEOUT. This patch
takes care of any firmware command timeout scenarios by initiating OCR.

Submitted by:   Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by:    Kashyap Desai <Kashyap.Desai@broadcom.com>
MFC after:  3 days
Sponsored by:   AVAGO Technologies

8 years agoImplement "old_encode_dev()" for the LinuxKPI.
Hans Petter Selasky [Fri, 13 May 2016 11:51:43 +0000 (11:51 +0000)]
Implement "old_encode_dev()" for the LinuxKPI.

Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoDefine _IOC_SIZE() in the LinuxKPI.
Hans Petter Selasky [Fri, 13 May 2016 11:42:36 +0000 (11:42 +0000)]
Define _IOC_SIZE() in the LinuxKPI.

Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoAdd unlikely() statement to optimise the IS_ERR_VALUE() macro.
Hans Petter Selasky [Fri, 13 May 2016 11:30:56 +0000 (11:30 +0000)]
Add unlikely() statement to optimise the IS_ERR_VALUE() macro.

Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoFix a -Wformat warning by using %d, not %ld for md_iterations
Enji Cooper [Fri, 13 May 2016 11:27:49 +0000 (11:27 +0000)]
Fix a -Wformat warning by using %d, not %ld for md_iterations

md_iterations is int32_t, not long.

Reported by: clang
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd geliboot_crypt(..) definition to geliboot.h to mute a -Wimplicit-function-declaration
Enji Cooper [Fri, 13 May 2016 11:24:55 +0000 (11:24 +0000)]
Add geliboot_crypt(..) definition to geliboot.h to mute a -Wimplicit-function-declaration
warning

Reported by: clang
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoPut slba and elba under LOADER_GELI_SUPPORT ifdef to mute warning about them being
Enji Cooper [Fri, 13 May 2016 11:20:21 +0000 (11:20 +0000)]
Put slba and elba under LOADER_GELI_SUPPORT ifdef to mute warning about them being
unused in the non-GELI case

MFC after: 1 week
Reported by: clang
Sponsored by: EMC / Isilon Storage Division

8 years agoRemove unused const variable
Enji Cooper [Fri, 13 May 2016 11:18:29 +0000 (11:18 +0000)]
Remove unused const variable

MFC after: 1 week
Reported by: clang
Sponsored by: EMC / Isilon Storage Division

8 years agoWhen using IOPORT with pci_host_generic we are missing setting the rman_end()
Bjoern A. Zeeb [Fri, 13 May 2016 11:18:27 +0000 (11:18 +0000)]
When using IOPORT with pci_host_generic we are missing setting the rman_end()
which leads to end being before start and thus a signed extended very large
number of size later on, which kva_alloc() will fail upon and we will panic.
Add the missing call.

Debugged with: andrew
Reviewed by: br, andrew
Sponsored by: DARPA/AFRL
Found: while using virtio with gem5
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D6337

8 years agoInclude arpa/inet.h to get the htonl(3) definition
Enji Cooper [Fri, 13 May 2016 11:15:33 +0000 (11:15 +0000)]
Include arpa/inet.h to get the htonl(3) definition

MFC after: 2 weeks
Reported by: clang
Sponsored by: EMC / Isilon Storage Division

8 years agoImplement nsecs_to_jiffies() in the LinuxKPI and while at it
Hans Petter Selasky [Fri, 13 May 2016 11:02:02 +0000 (11:02 +0000)]
Implement nsecs_to_jiffies() in the LinuxKPI and while at it
streamline the rest of the xxx_to_jiffies() functions to have a
constant 64-bit argument and use identical range checks for the
result.

Specifically preserve msecs_to_jiffies(0) returning 0. See r282743 for
further details.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoAdd missing prototype for getchar(..)
Enji Cooper [Fri, 13 May 2016 10:59:46 +0000 (10:59 +0000)]
Add missing prototype for getchar(..)

MFC after: 1 week
Reported by: clang
Sponsored by: EMC / Isilon Storage Division

8 years agoRead the contents of the snapshot files properly
Enji Cooper [Fri, 13 May 2016 10:52:02 +0000 (10:52 +0000)]
Read the contents of the snapshot files properly

- Use fgetln instead of fgets; localize complexity related to fgetln(3)
  inside the loop.
- Skip over blank lines.
- Skip over lines (properly) that start with a "#"

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd more Linux defines. Improve some existing ones.
Hans Petter Selasky [Fri, 13 May 2016 10:10:43 +0000 (10:10 +0000)]
Add more Linux defines. Improve some existing ones.

Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoThe Linux error defines should all be positive, else frequently used
Hans Petter Selasky [Fri, 13 May 2016 09:21:22 +0000 (09:21 +0000)]
The Linux error defines should all be positive, else frequently used
error code checks might fail. ERESTART is in the BSD world defined as
-1. While at it add more Linux error codes.

Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoFix a bug introduced by the implementation of I-DATA support.
Michael Tuexen [Fri, 13 May 2016 09:11:41 +0000 (09:11 +0000)]
Fix a bug introduced by the implementation of I-DATA support.
There was the requirement that two structures are in sync,
which is not valid anymore. Therefore don't rely on this
in the code anymore.
Thanks to Radek Malcic for reporting the issue. He found this
when using the userland stack.

MFC after: 1 week

8 years agosfxge(4): rename falconsiena_filter_*
Andrew Rybchenko [Fri, 13 May 2016 07:17:38 +0000 (07:17 +0000)]
sfxge(4): rename falconsiena_filter_*

Falcon support has been removed, so this code only supports Siena.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): rename falconsiena_tx_*
Andrew Rybchenko [Fri, 13 May 2016 07:16:29 +0000 (07:16 +0000)]
sfxge(4): rename falconsiena_tx_*

Falcon support has been removed, so this code only supports Siena.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): rename falconsiena_rx_*
Andrew Rybchenko [Fri, 13 May 2016 07:15:51 +0000 (07:15 +0000)]
sfxge(4): rename falconsiena_rx_*

Falcon support has been removed, so this code only supports Siena.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week