]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
7 years agoMFC r301465:
bdrewery [Thu, 9 Jun 2016 15:43:00 +0000 (15:43 +0000)]
MFC r301465:

  Fix bmake version upgrade logic to use the new bmake.

The '${WANT_MAKE} != "bmake"' logic seems wrong but is not being modified.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301738 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300870,r300884:
ngie [Wed, 8 Jun 2016 20:47:25 +0000 (20:47 +0000)]
MFC r300870,r300884:

r300870:

Unbreak the zfs(4) build

vm/vm_pageout.h grew a dependency on the bool typedef in r300865

arc.c didn't include sys/types.h, which included the definition for the typedef

Other items (ofed, drm2) might need to be chased for this commit.

Pointyhat to: alc

r300884:

Fix up r300870

The sys/types.h fix I proposed was only tested with zfs(4), not with
libzpool, which is where the build failure actually existed

Remove vm/vm_pageout.h from arc.c and zfs_vnops.c because they're both
unneeded

In collaboration with: kib

git-svn-id: svn://svn.freebsd.org/base/stable/10@301695 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300624:
ngie [Wed, 8 Jun 2016 18:46:10 +0000 (18:46 +0000)]
MFC r300624:

Fix up r300385

I accidentally glossed over the fact that tmp is manipulated via strchr, so
if we tried to free `tmp` after r300385, it would have crashed.

Create a separate pointer (tmp2) to track the original allocation of `tmp`,
and free `tmp2` if `p->nc_lookups` can't be malloced

CID: 1356026

git-svn-id: svn://svn.freebsd.org/base/stable/10@301687 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300385:
ngie [Wed, 8 Jun 2016 18:41:49 +0000 (18:41 +0000)]
MFC r300385:

Don't leak `tmp` if `p->nc_lookups` can't be malloced

git-svn-id: svn://svn.freebsd.org/base/stable/10@301684 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300386:
ngie [Wed, 8 Jun 2016 18:27:44 +0000 (18:27 +0000)]
MFC r300386:

Don't leak `handle` if svc_tp_create(..) succeeds and allocating a new
struct xlist object fails

CID: 978277

git-svn-id: svn://svn.freebsd.org/base/stable/10@301682 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300625:
ngie [Wed, 8 Jun 2016 18:22:54 +0000 (18:22 +0000)]
MFC r300625:

Remove unnecessary memset(.., 0, ..)'s

The mem_alloc macro calls calloc (userspace) / malloc(.., M_WAITOK|M_ZERO)
under the covers, so zeroing out memory is already handled by the underlying
calls

git-svn-id: svn://svn.freebsd.org/base/stable/10@301680 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300861,r300862:
ngie [Wed, 8 Jun 2016 18:21:25 +0000 (18:21 +0000)]
MFC r300861,r300862:

r300861:

- Sort make variables
- Use SRCTOP instead of ad hoc definition for it

r300862:

Install ioatcontrol to /usr/bin by default instead of /

git-svn-id: svn://svn.freebsd.org/base/stable/10@301678 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300856,r300857,r300858,r300874:
ngie [Wed, 8 Jun 2016 18:19:34 +0000 (18:19 +0000)]
MFC r300856,r300857,r300858,r300874:

r300856:

Initialize `t` with memset(.., 0, ..)

This will help ensure that we're not using random garbage on the stack by
accident with respect to the variable

r300857:

Document the default behavior for -c (0)

Bump .Dd for the change

r300858:

Fix description for -V in the -r case

t.verify_test = true is always set when -V is specified, regardless of whether
or not the tool is being run in raw mode

r300874:

Update usage(..)

- Document missing options
- Sync options with ioatcontrol(8).
- Make it clear that the first 2 parameters are always required.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301677 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300714:
ngie [Wed, 8 Jun 2016 18:15:51 +0000 (18:15 +0000)]
MFC r300714:

The readme provides a high-level overview of how to upgrade top(1).

Reviewed By: ngie

git-svn-id: svn://svn.freebsd.org/base/stable/10@301675 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299699:
ngie [Wed, 8 Jun 2016 18:14:06 +0000 (18:14 +0000)]
MFC r299699:

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

git-svn-id: svn://svn.freebsd.org/base/stable/10@301673 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299815:
ngie [Wed, 8 Jun 2016 18:08:06 +0000 (18:08 +0000)]
MFC r299815:

Remove NO_WERROR.clang from this Makefile

This compiles with clang without warnings

git-svn-id: svn://svn.freebsd.org/base/stable/10@301671 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299806:
ngie [Wed, 8 Jun 2016 18:05:52 +0000 (18:05 +0000)]
MFC r299806:

Bump WARNS to 6

git-svn-id: svn://svn.freebsd.org/base/stable/10@301669 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299834:
ngie [Wed, 8 Jun 2016 17:59:21 +0000 (17:59 +0000)]
MFC r299834:

Fix .Dd

Today is the 14th, not the 10th of May

git-svn-id: svn://svn.freebsd.org/base/stable/10@301667 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r294507,r294567,r299466:
ngie [Wed, 8 Jun 2016 17:49:03 +0000 (17:49 +0000)]
MFC r294507,r294567,r299466:

r294507 (by harti):

Fill the ifAlias leaf of the ifXTable with the interface description
if there is one available and it fits into the maximum size (64 characters).

r294567 (by bz):

Change the variable to a #define in order to make gcc happy which
otherwise will complain about "variably modified 'alias' at file scope".
Unbreaks the build on gcc platforms.

r299466 (by cem):

bsnmpd: Fix size of trapsink::comm to match other community arrays

This fixes a number of possible strcpy() buffer overruns between the various
community strings in trap.c.

CIDs: 100682010068211006822

git-svn-id: svn://svn.freebsd.org/base/stable/10@301663 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r256678,r256680,r260986,r272878,r286402:
ngie [Wed, 8 Jun 2016 17:43:04 +0000 (17:43 +0000)]
MFC r256678,r256680,r260986,r272878,r286402:

r256678 (by syrinx):

Fix SNMP Error response PDUs and properly encode them when using v3 auth/encryption.

r256680 (by syrinx):

Fix the -Wconversion warnings produced when compiling the SNMP agent.

r260986 (by harti):

Fix a problem with OBJECT IDENTIFIER encoding: need to check the
second subid to be less than 40, not the first when the first
subid is 0 or 1.

r272878 (by syrinx):

Fix a bug in decoding string indexes in snmp_target(3), thus causing
bsnmpd(1) to not send v3 notifications properly; while here add two
missing return statements which could lead to abort() in case of a
rollback

r286402 (by araujo):

Fix variable 'old' is used uninitialized whenever '&&' condition is false.
Spotted by clang.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301661 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299701:
ngie [Wed, 8 Jun 2016 17:34:37 +0000 (17:34 +0000)]
MFC r299701:

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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301657 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299778:
ngie [Wed, 8 Jun 2016 17:32:41 +0000 (17:32 +0000)]
MFC r299778:

Use a consistent errno save/restore pattern before running strtoul

- Save errno
- Set errno to 0
- Call strtoul
- Test errno (optional, but many calls to strtoul did this afterwards)

Some of the code was setting errno = 0 after calling strtoul, not setting
errno = 0, or setting errno to saved_errno after the call, but before the
test. These all have unwanted behavioral side-effects, depending on the
initial value of errno and whether or not the input to strtoul was correct
or incorrect.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301656 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299766:
ngie [Wed, 8 Jun 2016 17:30:29 +0000 (17:30 +0000)]
MFC r299766:

Fix logically dead code pointed out by clang/Coverity

parse_context, parse_user_security: test for validity of results from
parse_ascii(..) with by casting to int32_t and comparing to -1; comparing
unsigned types to negative values will always be false.

CID: 10114321011433

git-svn-id: svn://svn.freebsd.org/base/stable/10@301655 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299810:
ngie [Wed, 8 Jun 2016 17:27:38 +0000 (17:27 +0000)]
MFC r299810:

Correct function names that failed in error messages

It should be calloc/strdup, not malloc

git-svn-id: svn://svn.freebsd.org/base/stable/10@301653 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300947:
ngie [Wed, 8 Jun 2016 17:13:28 +0000 (17:13 +0000)]
MFC r300947:

Staticize variables only used in rpcbind.c

This is some low hanging fruit necessary for making this WARNS?= 6 clean

git-svn-id: svn://svn.freebsd.org/base/stable/10@301648 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300945:
ngie [Wed, 8 Jun 2016 17:11:42 +0000 (17:11 +0000)]
MFC r300945:

Remove unnecessary caller_uaddr != NULL test before calling free on it

git-svn-id: svn://svn.freebsd.org/base/stable/10@301646 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300942:
ngie [Wed, 8 Jun 2016 17:09:47 +0000 (17:09 +0000)]
MFC r300942:

Remove a useless if (x != NULL) check before calling free on allocated_uaddr

git-svn-id: svn://svn.freebsd.org/base/stable/10@301644 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300867,r300932,r300934,r300941,r300972,r300973:
ngie [Wed, 8 Jun 2016 15:41:39 +0000 (15:41 +0000)]
MFC r300867,r300932,r300934,r300941,r300972,r300973:

r300867:

Only expose `hint_uaddr` in the ND_DEBUG case

This fixes a -Wunused-but-set-variable warning with gcc

r300932:

Catch malloc(3) errors and socket(2) errors

- malloc failing will result in a delayed segfault
- socket failing will result in delayed failures with setsockopt

Exit in the event that either of these high-level conditions are met.

CID: 976288, 976321, 976858

r300934:

Plug leak with ifp by calling freeifaddrs after calling getifaddrs

Obtained from: NetBSD v1.18

r300941:

Don't leak res in network_init(..)

Call freeaddrinfo on it after it's been used

CID: 1225050

r300972 (by markj):

Fix rpcbind init after r300941.

- getaddrinfo() sets res = NULL on failure and freeaddrinfo() always
  dereferences its argument, so we should only free the address list after
  a successful call.
- Address a second potential leak caused by getaddrinfo(AF_INET6)
  overwriting the address list returned by getaddrinfo(AF_INET).

X-MFC-With: r300941

r300973:

Follow up to r300932

In the event MK_INET6 != no in userspace, but is disabled in the
kernel, or if there aren't any IPv6 addresses configured in userspace
(for lo0 and all physical interfaces), rpcbind would terminate
immediately instead of silently failing on

Skip over the IPv6 block to its respective cleanup with freeifaddrs if
creating the socket failed instead of terminating rpcbind immediately

git-svn-id: svn://svn.freebsd.org/base/stable/10@301636 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300387,r300388,r300389:
ngie [Wed, 8 Jun 2016 14:18:47 +0000 (14:18 +0000)]
MFC r300387,r300388,r300389:

r300387:

getnetid(..): consistently fclose fd at the end of the function

This mutes a false positive with cppcheck, but also helps eliminate future
potential issues with this variable

r300388:

Call endnetconfig on nc_handle sooner to avoid leaking nc_handle if tmpnconf
was NULL

This would theoretically happen if the netconfig protocol family and protocol
semantics were never matched.

CID: 978179

r300389:

nis_rpcent: don't leak resultbuf from yp_first(..)/yp_next(..)

If the buffer couldn't be adequately resized to accomodate an additional "\n",
it would leak resultbuf by breaking from the loop early

CID: 1016702

git-svn-id: svn://svn.freebsd.org/base/stable/10@301629 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300939:
ngie [Wed, 8 Jun 2016 14:07:43 +0000 (14:07 +0000)]
MFC r300939:

Use require.progs with bc instead of require.files with /usr/bin/bc

This will make things more flexible if the program path changes in the future,
and the test in and of itself doesn't call /usr/bin/bc -- it just calls bc

git-svn-id: svn://svn.freebsd.org/base/stable/10@301627 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300938:
ngie [Wed, 8 Jun 2016 14:06:34 +0000 (14:06 +0000)]
MFC r300938:

Remove the sa(8) tests if MK_ACCT == no when "make delete-old" is run

sa(8) is conditionally installed based on MK_ACCT != no today

git-svn-id: svn://svn.freebsd.org/base/stable/10@301626 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300937:
ngie [Wed, 8 Jun 2016 14:05:08 +0000 (14:05 +0000)]
MFC r300937:

Remove the etcupdate tests if MK_RCS == no when "make delete-old" is run

etcupdate is conditionally installed based on MK_RCS != no today

git-svn-id: svn://svn.freebsd.org/base/stable/10@301625 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300936:
ngie [Wed, 8 Jun 2016 14:01:42 +0000 (14:01 +0000)]
MFC r300936:

Remove the calendar tests if MK_CALENDAR == no when "make delete-old"
is run

git-svn-id: svn://svn.freebsd.org/base/stable/10@301623 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300620,r300621:
ngie [Wed, 8 Jun 2016 13:58:47 +0000 (13:58 +0000)]
MFC r300620,r300621:

r300620:

Use reallocf instead of malloc to fix leak with outbuf_pmap

The previous code overwrote outbuf_pmap's memory with malloc once per
loop iteration, which leaked its memory; use reallocf instead to ensure
that memory is properly free'd each loop iteration.

Add a outbuf_pmap = NULL in the failure case to avoid a double-free
at the bottom of the function.

CID: 1038776

r300621:

Remove redundant NULLing of outbuf_pmap

If reallocf ever failed, outbuf_pmap would already be NULL

git-svn-id: svn://svn.freebsd.org/base/stable/10@301622 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300430:
ngie [Wed, 8 Jun 2016 13:49:59 +0000 (13:49 +0000)]
MFC r300430:

Wrap EXPAND(..) macro with a do-while(0) loop and put a single statement on each line

As a positive side-effect, this eliminates the double semicolons reported by Coverity:
the macro contained a trailing semicolon, in addition to the semicolon placed on
each line where EXPAND(..) was called.

CID: 1194269

git-svn-id: svn://svn.freebsd.org/base/stable/10@301619 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300428:
ngie [Wed, 8 Jun 2016 13:44:01 +0000 (13:44 +0000)]
MFC r300428:

Fix humanized decoding of struct stat with respect to .st_mtim

st_mtim was being incorrectly described as "stime=", not "mtime=". This was
introduced with the original feature commit (r176471).

PR: 209699

git-svn-id: svn://svn.freebsd.org/base/stable/10@301617 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299844,r300931:
ngie [Wed, 8 Jun 2016 13:40:07 +0000 (13:40 +0000)]
MFC r299844,r300931:

r299844:

Make hostid_save depend on hostid

r300931:

Make netif REQUIRE hostid

As noted in the PR, if etc/rc.d/zvol is removed, netif will be run before
hostid, and the MAC address generated for any bridge devices will be
non-deterministic. Make the MAC address generated be deterministic for
bridge devices by explicitly REQUIRE'ing hostid.

This fixes up the rest of the PR, inadvertently committed in r299844

PR: 195188

git-svn-id: svn://svn.freebsd.org/base/stable/10@301615 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299843:
ngie [Wed, 8 Jun 2016 13:34:52 +0000 (13:34 +0000)]
MFC r299843:

Fix broken dependency with routed when MK_ROUTED != no

Remove routed as a requirement in NETWORKING, and put it in routed as a BEFORE
requirement instead

git-svn-id: svn://svn.freebsd.org/base/stable/10@301613 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299839,r299840,r299841:
ngie [Wed, 8 Jun 2016 13:32:00 +0000 (13:32 +0000)]
MFC r299839,r299840,r299841:

r299839:

Make FILESYSTEMS, dumpon, and var not depend on zfs and zvol

Make zfs and zvol come before all of the items that depended on them
previously

r299840:

Conditionalize etc/rc.d/{zfs,zvol} install on MK_ZFS != no

r299841:

Remove etc/rc.d/{zfs,zvol} if MK_ZFS != no

git-svn-id: svn://svn.freebsd.org/base/stable/10@301612 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299833:
ngie [Wed, 8 Jun 2016 13:24:42 +0000 (13:24 +0000)]
MFC r299833:

Fix fully canonicalized example for `myvariable.27...`

`6` doesn't occur in the OID; it was spurious

Bump .Dd for the change

git-svn-id: svn://svn.freebsd.org/base/stable/10@301610 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299657:
ngie [Wed, 8 Jun 2016 13:21:17 +0000 (13:21 +0000)]
MFC r299657:

Include arpa/inet.h to get the htonl(3) definition

git-svn-id: svn://svn.freebsd.org/base/stable/10@301608 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300691:
kib [Wed, 8 Jun 2016 04:49:20 +0000 (04:49 +0000)]
MFC r300691:
Fix issues found by Coverity in the rtld-elf.c:gethints().

git-svn-id: svn://svn.freebsd.org/base/stable/10@301581 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r301102:
cy [Wed, 8 Jun 2016 03:08:37 +0000 (03:08 +0000)]
MFC r301102:

Don't rely on $ntpd_enable to periodically fetch the latest leapfile.

Suggested by: cperciva

git-svn-id: svn://svn.freebsd.org/base/stable/10@301577 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r301139
truckman [Wed, 8 Jun 2016 01:17:22 +0000 (01:17 +0000)]
MFC r301139

The (i < PROMPTLEN - 1) test added by r300442 in the code for the default
case of \c in the prompt format string is a no-op.  We already passed
this test at the top of the loop, and i has not yet been incremented in
this path.  Change this test to (i < PROMPTLEN - 2).

Reported by: Coverity
CID: 1008328
Reviewed by: cem
Differential Revision: https://reviews.freebsd.org/D6552

git-svn-id: svn://svn.freebsd.org/base/stable/10@301571 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300564
truckman [Tue, 7 Jun 2016 16:56:15 +0000 (16:56 +0000)]
MFC r300564

Fix CID 1006692 in /usr/sbin/pw pw_log() function and other fixes

The length of the name returned from the $LOGNAME and $USER can be
very long and it was being concatenated to a fixed length buffer
with no bounds checking.  Fix this problem by limiting the length
of the name copied.

Additionally, this name is actually used to create a format string
to be used in adding log file entries so embedded % characters in
the name could confuse *printf(), and embedded whitespace could
confuse a log file parser.  Handle the former by escaping each %
with an additional %, and handle the latter by simply stripping it
out.

Clean up the code by moving the variable declarations to the top
of the function, formatting them to conform with style, and moving
intialization elsewhere.

Reduce code indentation by returning early in a couple of places.

Reported by: Coverity
CID: 1006692
Reviewed by: markj (previous version)
Differential Revision: https://reviews.freebsd.org/D6490

git-svn-id: svn://svn.freebsd.org/base/stable/10@301557 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299921
truckman [Tue, 7 Jun 2016 16:53:05 +0000 (16:53 +0000)]
MFC r299921

Add an assertion to catch a potential underflow in an array index
calculation, though this should not happen in the current code.

Reported by: Coverity
CID: 1008486

git-svn-id: svn://svn.freebsd.org/base/stable/10@301556 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r301235:
pfg [Mon, 6 Jun 2016 13:31:28 +0000 (13:31 +0000)]
MFC r301235:
dhclient(1): correct obvious mismatch in get_char().

Correct switch between current and previous line buffers when
encountering a carriage return in the input.

CID: 1305719
Obtained from: OpenBSD (CVS rev. 1.30)

git-svn-id: svn://svn.freebsd.org/base/stable/10@301506 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoFix missing svn:mergeinfo from r301101.
gjb [Mon, 6 Jun 2016 11:10:37 +0000 (11:10 +0000)]
Fix missing svn:mergeinfo from r301101.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@301501 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r297052:
grembo [Mon, 6 Jun 2016 11:08:05 +0000 (11:08 +0000)]
MFC r297052:

Update fetch.1 and fetch.3 to reflect libfetch's actual use of CA bundles

git-svn-id: svn://svn.freebsd.org/base/stable/10@301500 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r301203
kadesai [Mon, 6 Jun 2016 07:10:38 +0000 (07:10 +0000)]
MFC r301203

r301203: Added support for Avago/Broadcom Cutlass(12 Gbps- 16 port count) controllers.

Sponsored by:   AVAGO Technologies/Broadcom Limited

git-svn-id: svn://svn.freebsd.org/base/stable/10@301486 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC: r301115
ache [Sun, 5 Jun 2016 18:11:52 +0000 (18:11 +0000)]
MFC: r301115

Don't use fixup for C99 and up, the compiler result is already correct.

Suggested by: bde

git-svn-id: svn://svn.freebsd.org/base/stable/10@301459 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC: r301448
ache [Sun, 5 Jun 2016 16:21:53 +0000 (16:21 +0000)]
MFC: r301448

Reflect error indication according to POSIX and what those functions
currently do.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301454 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r301206:
pfg [Sun, 5 Jun 2016 15:03:55 +0000 (15:03 +0000)]
MFC r301206:
usb/uhso: Don't bail out on first USB error.

CID: 1305680
Submitted by: hselasky
MFC after: 3 days

git-svn-id: svn://svn.freebsd.org/base/stable/10@301446 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC: r300956
ache [Sun, 5 Jun 2016 14:31:36 +0000 (14:31 +0000)]
MFC: r300956

1) Unifdef USE_WEAK_SEEDING since it is too obsolete to support and makes
reading hard.

2) Instead of doing range transformation in each and every function here,
do it single time directly in do_rand(). One "mod" operation overhead is not
a big deal, but the code looks nicer and possible future functions additions
or PRNG change do not miss range transformations neither have unneeded ones.

3) Use POSIX argument types for visible functions (cosmetic).

git-svn-id: svn://svn.freebsd.org/base/stable/10@301445 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoPrepare for merge of r300956. One year old r288030 which fix prototypes
ache [Sun, 5 Jun 2016 14:04:54 +0000 (14:04 +0000)]
Prepare for merge of r300956. One year old r288030 which fix prototypes
can't be merged without conflicts and require merging of other versions
too and I don't want to go deep in that unmerged commits chain.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301444 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC: r300953
ache [Sun, 5 Jun 2016 13:39:31 +0000 (13:39 +0000)]
MFC: r300953

1) Unifdef USE_WEAK_SEEDING it is too obsolete to support and makes reading
harder.

2) ACM paper require seed to be in [1, 2^31-2] range, so use the same range
shifting as already done for rand(3). Also protect srandomdev() + TYPE_0 case
(non default) from negative seeds.

3) Don't check for valid "type" range in setstate(), it is always valid as
calculated. Instead add a check that rear pointer not exceeed end pointer.

MFC: r300965

Micro optimize: C standard guarantees that right shift for unsigned value
fills left bits with zero, and we have exact 32bit unsigned value
(uint32_t), so there is no reason to add "& 0x7fffffff" here.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301443 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300429:
dchagin [Sun, 5 Jun 2016 10:48:27 +0000 (10:48 +0000)]
MFC r300429:

Remove a now unused global declaration of some sysentvec struct.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301441 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300959:
kib [Sun, 5 Jun 2016 08:42:33 +0000 (08:42 +0000)]
MFC r300959:
Do not leak the vm object lock when swap reservation failed, in
vm_object_coalesce().

git-svn-id: svn://svn.freebsd.org/base/stable/10@301436 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300431:
dchagin [Sun, 5 Jun 2016 07:43:20 +0000 (07:43 +0000)]
MFC r300431:

Convert proto family in both directions. The linux and native values for
local and inet are identical, but for inet6 values differ.

PR: 155040
Reported by: Simon Walton

git-svn-id: svn://svn.freebsd.org/base/stable/10@301431 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300569:
dchagin [Sun, 5 Jun 2016 07:40:12 +0000 (07:40 +0000)]
MFC r300569:

Don't leak fp in case where fo_ioctl() returns an error.

Reported by: C Turt <ecturt@gmail.com>

git-svn-id: svn://svn.freebsd.org/base/stable/10@301430 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300416:
dchagin [Sun, 5 Jun 2016 07:38:56 +0000 (07:38 +0000)]
MFC r300416:

Add a missing errno translation for SO_ERROR optname.

PR: 135458
Reported by: Stefan Schmidt

git-svn-id: svn://svn.freebsd.org/base/stable/10@301429 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300415:
dchagin [Sun, 5 Jun 2016 07:34:10 +0000 (07:34 +0000)]
MFC r300415:

Add macro to convert errno and use it when appropriate.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301428 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300413:
dchagin [Sun, 5 Jun 2016 06:06:55 +0000 (06:06 +0000)]
MFC r300413:

Due to lack the priority propagation feature replace sx by mutex. WIth this
commit NPTL tests are ends in 1 minute faster.

MFC r300414:

For future use move futex timeout code to the separate function and
switch to the high resolution sbintime_t.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301426 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300412:
dchagin [Sun, 5 Jun 2016 06:04:25 +0000 (06:04 +0000)]
MFC r300412:

Add my copyright as I rewrote most of the futex code. Minor style(9) cleanup
while here.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301425 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300411:
dchagin [Sun, 5 Jun 2016 06:02:37 +0000 (06:02 +0000)]
MFC r300411:

Minor style(9) cleanup, no functional changes.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301424 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300359, r300360:
dchagin [Sun, 5 Jun 2016 05:49:33 +0000 (05:49 +0000)]
MFC r300359, r300360:

Correct an argument param of linux_sched_* system calls as a struct l_sched_param
does not defined due to it's nature.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301422 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300341:
bdrewery [Sat, 4 Jun 2016 17:40:23 +0000 (17:40 +0000)]
MFC r300341:

  FTS: Remove stale reference to nfs4 fs which was removed in r192578.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301405 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300849
arybchik [Sat, 4 Jun 2016 17:24:10 +0000 (17:24 +0000)]
MFC r300849

sfxge(4): fix typo in monitor types strings in common code

Submitted by:   Garrett D'Amore <garrett at damore.org>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301401 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300848
arybchik [Sat, 4 Jun 2016 17:23:08 +0000 (17:23 +0000)]
MFC r300848

sfxge(4): avoid necessity to add one more constant condition note

Use for forever loop instead of while.

Found by lint on illumos.

Submitted by:   Garrett D'Amore <garrett at damore.org>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301400 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300847
arybchik [Sat, 4 Jun 2016 17:22:10 +0000 (17:22 +0000)]
MFC r300847

sfxge(4): cope with always true unsigned comparison with 0 to make lint happier

Found by lint on illumos.

Submitted by:   Garrett D'Amore <garrett at damore.org>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301399 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300846
arybchik [Sat, 4 Jun 2016 17:20:50 +0000 (17:20 +0000)]
MFC r300846

sfxge(4): unsigned 1 should be shifted to produce bitmask

Found by lint on illumos.

Submitted by:   Garrett D'Amore <garrett at damore.org>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301398 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300845
arybchik [Sat, 4 Jun 2016 17:19:25 +0000 (17:19 +0000)]
MFC r300845

sfxge(4): cope with lint for EFX_SET_OWORD_BIT() with const bit arg

Found by lint on illumos.

Submitted by:   Garrett D'Amore <garrett at damore.org>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301397 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300844
arybchik [Sat, 4 Jun 2016 17:18:35 +0000 (17:18 +0000)]
MFC r300844

sfxge(4): remove set but not used variable

Found by lint on illumos.

Submitted by:   Garrett D'Amore <garrett at damore.org>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301396 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300842
arybchik [Sat, 4 Jun 2016 17:17:30 +0000 (17:17 +0000)]
MFC r300842

sfxge(4): remove unreachable break after goto

Found by lint on illumos.

Submitted by:   Garrett D'Amore <garrett at damore.org>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301395 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300841
arybchik [Sat, 4 Jun 2016 17:16:35 +0000 (17:16 +0000)]
MFC r300841

sfxge(4): add constant condition note to make lint happier

Found by lint on illumos.

Submitted by:   Garrett D'Amore <garrett at damore.org>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301393 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300840
arybchik [Sat, 4 Jun 2016 17:15:38 +0000 (17:15 +0000)]
MFC r300840

sfxge(4): note unused variables to make lint happier

Found by lint on illumos.

Submitted by:   Garrett D'Amore <garrett at damore.org>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301392 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300739
arybchik [Sat, 4 Jun 2016 17:14:28 +0000 (17:14 +0000)]
MFC r300739

sfxge(4): correct parenthesis location in if coundition

Found by lint on illumos.

Submitted by:   Garrett D'Amore <garrett at damore.org>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301391 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300609
arybchik [Sat, 4 Jun 2016 17:12:28 +0000 (17:12 +0000)]
MFC r300609

sfxge(4): enable Medford support

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301390 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300608
arybchik [Sat, 4 Jun 2016 17:11:04 +0000 (17:11 +0000)]
MFC r300608

sfxge(4): bump driver version to the closest out-of-tree version

Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301389 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300607
arybchik [Sat, 4 Jun 2016 17:08:34 +0000 (17:08 +0000)]
MFC r300607

sfxge(4): cleanup: update copyright to 2016

Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301388 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300606
arybchik [Sat, 4 Jun 2016 17:05:20 +0000 (17:05 +0000)]
MFC r300606

sfxge(4): provide option to disable not a local MAC address check

Option EFSYS_OPT_ALLOW_UNCONFIGURED_NIC disables check that the adapter
MAC address is not a local address (beginning 02).

Submitted by:   Laurence Evans <levans at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301387 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300605
arybchik [Sat, 4 Jun 2016 17:03:06 +0000 (17:03 +0000)]
MFC r300605

sfxge(4): be ready to receive events immediately after event queues are created

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301386 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300505
arybchik [Sat, 4 Jun 2016 17:00:50 +0000 (17:00 +0000)]
MFC r300505

sfxge(4): cleanup: remove unused EFX preempt macros

The EFSYS_PREEMPT_DISABLE() and EFSYS_PREEMPT_ENABLE() macros
were used to ensure correct timing of I2C operations. The APIs
for I2C operations have been removed, so these macros have no
callers.

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

git-svn-id: svn://svn.freebsd.org/base/stable/10@301385 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300135
arybchik [Sat, 4 Jun 2016 16:58:34 +0000 (16:58 +0000)]
MFC r300135

sfxge(4): cleanup: remove trailing whitespaces

Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301384 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300011
arybchik [Sat, 4 Jun 2016 16:57:38 +0000 (16:57 +0000)]
MFC r300011

sfxge(4): only raise an exception after MC assert or reboot in the common code

Fix efx_mcdi_request_poll so it only raises an exception if EIO is
reported from a detected MC assert or reboot. This prevents
an unnecessary exception being raised if an MCDI response error code
is trandlated to EIO.

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

git-svn-id: svn://svn.freebsd.org/base/stable/10@301383 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300010
arybchik [Sat, 4 Jun 2016 16:56:36 +0000 (16:56 +0000)]
MFC r300010

sfxge(4): restore clearing of MCDI new epoch flag in common code

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

git-svn-id: svn://svn.freebsd.org/base/stable/10@301382 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300009
arybchik [Sat, 4 Jun 2016 16:54:28 +0000 (16:54 +0000)]
MFC r300009

sfxge(4): fix Medford timer quantum calculation in common code

The event/timer block used sysclk in Huntington, but has been
moved to the dpcpu clock domain for Medford. Fix the computed
timer quantum to use the right clock.

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

git-svn-id: svn://svn.freebsd.org/base/stable/10@301381 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300008
arybchik [Sat, 4 Jun 2016 16:52:04 +0000 (16:52 +0000)]
MFC r300008

sfxge(4): query and use current MTU if setting the MTU fails

This allows the driver to fall back to the largest usable MTU if a
user attempts to configure an unprivileged function with an MTU higher
than that of the attached port.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301380 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300007
arybchik [Sat, 4 Jun 2016 16:49:58 +0000 (16:49 +0000)]
MFC r300007

sfxge(4): store licensing state in efx_lic

Check licensing support at NIC startup to avoid multiple checks later.
As state is stored, licensing initialisation is moved later in start
procedure.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301379 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299925
arybchik [Sat, 4 Jun 2016 16:47:39 +0000 (16:47 +0000)]
MFC r299925

sfxge(4): cleanup: quieten more common code MCDI handlers

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

git-svn-id: svn://svn.freebsd.org/base/stable/10@301378 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299924
arybchik [Sat, 4 Jun 2016 16:45:36 +0000 (16:45 +0000)]
MFC r299924

sfxge(4): cleanup: remove misnamed function declaration

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301377 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299923
arybchik [Sat, 4 Jun 2016 16:43:26 +0000 (16:43 +0000)]
MFC r299923

sfxge(4): cleanup: make MCDI license queries quieter in common code

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

git-svn-id: svn://svn.freebsd.org/base/stable/10@301376 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299920
arybchik [Sat, 4 Jun 2016 16:42:31 +0000 (16:42 +0000)]
MFC r299920

sfxge(4): cleanup: simplify ef10_ev_qcreate

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

git-svn-id: svn://svn.freebsd.org/base/stable/10@301375 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299919
arybchik [Sat, 4 Jun 2016 16:41:31 +0000 (16:41 +0000)]
MFC r299919

sfxge(4): translate MC_CMD_ERR_EEXIST to host errno value

This is needed because the new MCDI command nvram_private_append can
return MC_CMD_ERR_EEXIST

Submitted by:   Tom Millington <tmillington at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301374 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299918
arybchik [Sat, 4 Jun 2016 16:39:05 +0000 (16:39 +0000)]
MFC r299918

sfxge(4): cleanup: run genfwdef to propogate prior changes to TLV headers

Submitted by:   Andrew Lee <alee at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301373 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299917
arybchik [Sat, 4 Jun 2016 16:37:14 +0000 (16:37 +0000)]
MFC r299917

sfxge(4): set TSOv2 feature flag on Medford

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301372 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299915
arybchik [Sat, 4 Jun 2016 16:36:23 +0000 (16:36 +0000)]
MFC r299915

sfxge(4): improve TX/RX queue error messages

Report the full error descriptor in a form that can be passed to
firmwaresrc/dpcpu/scripts/evdecode

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301371 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299911
arybchik [Sat, 4 Jun 2016 16:35:29 +0000 (16:35 +0000)]
MFC r299911

sfxge(4): fix license validation check for V3 licenses

Length consistency checks were failing for ECC hashes.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301370 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299909
arybchik [Sat, 4 Jun 2016 16:33:54 +0000 (16:33 +0000)]
MFC r299909

sfxge(4): regenerate MCDI headers from firmwaresrc .yml

Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301369 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299907
arybchik [Sat, 4 Jun 2016 16:31:56 +0000 (16:31 +0000)]
MFC r299907

sfxge(4): increase maximum size of license keys

Increase buffer sizes for license keys to 160 bytes to accomodate ECDSA
hashes.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301368 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299905
arybchik [Sat, 4 Jun 2016 16:31:04 +0000 (16:31 +0000)]
MFC r299905

sfxge(4): fix V1 licensing MCDI operations

Implementation of the MCDI commands for Siena boards was requesting
the wrong operation.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301366 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299904
arybchik [Sat, 4 Jun 2016 16:28:52 +0000 (16:28 +0000)]
MFC r299904

sfxge(4): improve PCIe link speed and width check

Perform a more accurate check of whether the PCIe bandwidth is
sufficient for the current/supported port modes.

Give a different warning if there is sufficient bandwidth to achieve
line rate, but the link is not fast enough for optimal latency.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301365 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299903
arybchik [Sat, 4 Jun 2016 16:26:25 +0000 (16:26 +0000)]
MFC r299903

sfxge(4): cleanup: make TLV scans quieter

Find end of segments in a more direct way that avoids an error report at
the terminator.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301364 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299901
arybchik [Sat, 4 Jun 2016 16:25:18 +0000 (16:25 +0000)]
MFC r299901

sfxge(4): cleanup: make VPD lookups quieter

A lookup on a VPD entry which is missing reports several failure
messages as it propagates through wrapper functions. Restructured
the wrappers to treat this gracefully as an expected case.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301363 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299899
arybchik [Sat, 4 Jun 2016 16:24:14 +0000 (16:24 +0000)]
MFC r299899

sfxge(4): cleanup: make licensing function quieter

Silent handling of failure to invoke functions that are not supported on
older licensing versions.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301362 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f