202498 Commits

Author SHA1 Message Date
ache
199f286057 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.
2016-06-05 14:04:54 +00:00
ache
4ab0fcf85b 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.
2016-06-05 13:39:31 +00:00
dchagin
1d29d3ea45 MFC r300429:
Remove a now unused global declaration of some sysentvec struct.
2016-06-05 10:48:27 +00:00
kib
f7bbcd3e43 MFC r300959:
Do not leak the vm object lock when swap reservation failed, in
vm_object_coalesce().
2016-06-05 08:42:33 +00:00
dchagin
32dd9edc05 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
2016-06-05 07:43:20 +00:00
dchagin
f7acef050a MFC r300569:
Don't leak fp in case where fo_ioctl() returns an error.

Reported by:	C Turt <ecturt@gmail.com>
2016-06-05 07:40:12 +00:00
dchagin
e8e944c226 MFC r300416:
Add a missing errno translation for SO_ERROR optname.

PR:		135458
Reported by:	Stefan Schmidt
2016-06-05 07:38:56 +00:00
dchagin
74905f75d4 MFC r300415:
Add macro to convert errno and use it when appropriate.
2016-06-05 07:34:10 +00:00
dchagin
2caaff6b70 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.
2016-06-05 06:06:55 +00:00
dchagin
46f6e38f70 MFC r300412:
Add my copyright as I rewrote most of the futex code. Minor style(9) cleanup
while here.
2016-06-05 06:04:25 +00:00
dchagin
3d23c36165 MFC r300411:
Minor style(9) cleanup, no functional changes.
2016-06-05 06:02:37 +00:00
dchagin
a24d09886b 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.
2016-06-05 05:49:33 +00:00
bdrewery
fe5c6c0b6d MFC r300341:
FTS: Remove stale reference to nfs4 fs which was removed in r192578.
2016-06-04 17:40:23 +00:00
arybchik
ba2fd7424e 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.
2016-06-04 17:24:10 +00:00
arybchik
13b627958f 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.
2016-06-04 17:23:08 +00:00
arybchik
403b7a30dd 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.
2016-06-04 17:22:10 +00:00
arybchik
251b8b6025 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.
2016-06-04 17:20:50 +00:00
arybchik
0ae6c83e6e 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.
2016-06-04 17:19:25 +00:00
arybchik
cbf7e18c70 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.
2016-06-04 17:18:35 +00:00
arybchik
78cb60fee0 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.
2016-06-04 17:17:30 +00:00
arybchik
340d12ccfa 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.
2016-06-04 17:16:35 +00:00
arybchik
2a120a210a 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.
2016-06-04 17:15:38 +00:00
arybchik
47d515e964 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.
2016-06-04 17:14:28 +00:00
arybchik
28894f198e MFC r300609
sfxge(4): enable Medford support

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
2016-06-04 17:12:28 +00:00
arybchik
b40ec06d05 MFC r300608
sfxge(4): bump driver version to the closest out-of-tree version

Sponsored by:   Solarflare Communications, Inc.
2016-06-04 17:11:04 +00:00
arybchik
4f24c165ae MFC r300607
sfxge(4): cleanup: update copyright to 2016

Sponsored by:   Solarflare Communications, Inc.
2016-06-04 17:08:34 +00:00
arybchik
b21c7afe1c 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.
2016-06-04 17:05:20 +00:00
arybchik
40c12de63c 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.
2016-06-04 17:03:06 +00:00
arybchik
20c918cc21 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.
2016-06-04 17:00:50 +00:00
arybchik
b2684287e5 MFC r300135
sfxge(4): cleanup: remove trailing whitespaces

Sponsored by:   Solarflare Communications, Inc.
2016-06-04 16:58:34 +00:00
arybchik
6e80169d21 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.
2016-06-04 16:57:38 +00:00
arybchik
f9425301f6 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.
2016-06-04 16:56:36 +00:00
arybchik
a96cc44e84 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.
2016-06-04 16:54:28 +00:00
arybchik
5a3a6f3d46 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.
2016-06-04 16:52:04 +00:00
arybchik
727f2e3d26 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.
2016-06-04 16:49:58 +00:00
arybchik
66bf7c79e9 MFC r299925
sfxge(4): cleanup: quieten more common code MCDI handlers

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
2016-06-04 16:47:39 +00:00
arybchik
a147cc6429 MFC r299924
sfxge(4): cleanup: remove misnamed function declaration

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
2016-06-04 16:45:36 +00:00
arybchik
0ae24c12a4 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.
2016-06-04 16:43:26 +00:00
arybchik
da7af1d148 MFC r299920
sfxge(4): cleanup: simplify ef10_ev_qcreate

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
2016-06-04 16:42:31 +00:00
arybchik
114bc03a35 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.
2016-06-04 16:41:31 +00:00
arybchik
b9a9caf9f3 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.
2016-06-04 16:39:05 +00:00
arybchik
1b1e200aef MFC r299917
sfxge(4): set TSOv2 feature flag on Medford

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
2016-06-04 16:37:14 +00:00
arybchik
9e97d80032 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.
2016-06-04 16:36:23 +00:00
arybchik
e738411e4f 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.
2016-06-04 16:35:29 +00:00
arybchik
862e429e1d MFC r299909
sfxge(4): regenerate MCDI headers from firmwaresrc .yml

Sponsored by:   Solarflare Communications, Inc.
2016-06-04 16:33:54 +00:00
arybchik
abd6f70fe9 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.
2016-06-04 16:31:56 +00:00
arybchik
e6051453d4 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.
2016-06-04 16:31:04 +00:00
arybchik
ea37dd9538 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.
2016-06-04 16:28:52 +00:00
arybchik
242bfdd6d5 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.
2016-06-04 16:26:25 +00:00
arybchik
eb82ace472 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.
2016-06-04 16:25:18 +00:00