]>
CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
arybchik [Sat, 4 Jun 2016 16:22:03 +0000 (16:22 +0000)]
MFC r299898
sfxge(4): restructure efx_lic to support V3 licensing
Create separate implementations of the efx_lic API for each revision of
the licensing system. All processing of the V1/V2 license partition is
moved to efx_lic, and an implementation of V3 licensing uses the existing
TLV functions with extensions for writing new TLV entries.
Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301361
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 16:19:48 +0000 (16:19 +0000)]
MFC r299734
sfxge(4): remove unused EFX PHY symbols
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301360
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 16:17:41 +0000 (16:17 +0000)]
MFC r299733
sfxge(4): remove obsolete EFX_MON types
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301359
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 16:15:31 +0000 (16:15 +0000)]
MFC r299732
sfxge(4): remove unimplemented sensor reconfigure method
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301358
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 16:13:18 +0000 (16:13 +0000)]
MFC r299731
sfxge(4): remove unimplemented sensor reset method
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301357
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 16:11:16 +0000 (16:11 +0000)]
MFC r299730
sfxge(4): fix build with -Werror=pointer-sign
-Werror=pointer-sign is enabled in OmniOS GLD driver build.
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301356
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 16:08:41 +0000 (16:08 +0000)]
MFC r299729
sfxge(4): remove unimplemented MAC reset method
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301355
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 16:06:19 +0000 (16:06 +0000)]
MFC r299728
sfxge(4): cleanup: remove unused define EFX_EVQ_FALCON_TIMER_QUANTUM_NS
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301354
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 16:04:06 +0000 (16:04 +0000)]
MFC r299727
sfxge(4): cleanup: remove unused variable flags
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301353
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 16:02:03 +0000 (16:02 +0000)]
MFC r299724
sfxge(4): remove unimplemented EFX PHY methods
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301352
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 15:58:02 +0000 (15:58 +0000)]
MFC r299723
sfxge(4): import TLV layout from firmwaresrc
Submitted by: Laurence Evans <levans at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301351
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 15:57:01 +0000 (15:57 +0000)]
MFC r299722
sfxge(4): remove obsolete EFSYS_OPT_PHY_PROPS option and APIs
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301350
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 15:54:54 +0000 (15:54 +0000)]
MFC r299721
sfxge(4): remove PHY property method stubs
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301349
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 15:52:48 +0000 (15:52 +0000)]
MFC r299720
sfxge(4): move ef10 definitions to ef10_impl.h
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301348
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 15:50:44 +0000 (15:50 +0000)]
MFC r299719
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.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301347
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 15:48:40 +0000 (15:48 +0000)]
MFC r299718
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.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301346
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 15:46:37 +0000 (15:46 +0000)]
MFC r299607-r299612
sfxge(4): rename falconsiena_*
Falcon support has been removed, so this code only supports Siena.
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301345
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 15:24:11 +0000 (15:24 +0000)]
MFC r299596-r299606, r299681, r299726, r299738
sfxge(4): move ef10_*() functions to ef10_*.c files
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301344
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 15:02:25 +0000 (15:02 +0000)]
MFC r299595
sfxge(4): comment on when we assume multicast chaining is available
It's the same on Medford as Huntington.
Multicast chaining is not always on, even with Medford, as it's not
supported by low latency firmware.
Unlike the Linux driver, we don't need to support virtulization with
firmware released before support for multicast chaining was added.
Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301343
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 15:01:08 +0000 (15:01 +0000)]
MFC r299594
sfxge(4): avoid duplicate delivery of packets when changing multicast
mode with multicast chaining enabled
With multicast chaining, if e.g. a specific multicast filter is
inserted and the multicast mis-match filter is then inserted, both may
match a packet and cause it to be delivered.
Copy the behaviour of the Linux driver, which is to remove the old filters
first, on the basis that customers are more likely to be able to handle
drops than duplicates (see bug49178 comment 4).
Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301342
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 14:59:54 +0000 (14:59 +0000)]
MFC r299518
sfxge(4): update multicast filter insertion algorithm
When the multicast filters we're allowed to insert are controlled by the
hypervisor, it may be that we can insert some but not others. So we need
to have fallbacks where we insert any filters we can without rolling back
when one fails to insert.
Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301341
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 14:58:34 +0000 (14:58 +0000)]
MFC r299517
sfxge(4): cleanup: constify common code method tables
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301340
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 14:57:08 +0000 (14:57 +0000)]
MFC r299411
sfxge(4): update unicast filter insertion algorithm
As unicast filters are not chained, we should always try to insert the
specific filter for our MAC address, and then try to insert the unicast
mis-match filter if that fails or all unicast has been requested.
Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301338
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 14:55:56 +0000 (14:55 +0000)]
MFC r299410
sfxge(4): fix efx_filter_reconfigure parameter type
This caused signed/unsigned errors in some subsequent patches.
The only value passed to this is a uint32_t.
Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301337
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 14:52:32 +0000 (14:52 +0000)]
MFC r299407
sfxge(4): make efx_sram_test Siena-only
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301336
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 14:50:42 +0000 (14:50 +0000)]
MFC r299406
sfxge(4): add new Emerald board sensors to 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@301334
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 14:48:48 +0000 (14:48 +0000)]
MFC r299405
sfxge(4): simplify efx_mac_select
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301332
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 14:48:00 +0000 (14:48 +0000)]
MFC r299404
sfxge(4): remove Falcon specific EV_GLOBAL support
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301331
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 14:46:40 +0000 (14:46 +0000)]
MFC r299403
sfxge(4): remove Falcon-specific code paths from 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@301330
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 14:45:18 +0000 (14:45 +0000)]
MFC r299344
sfxge(4): cleanup: remove unneeded include files
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301329
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 14:44:04 +0000 (14:44 +0000)]
MFC r299340
sfxge(4): cleanup: remove unused efx_infer_family()
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301328
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 14:42:36 +0000 (14:42 +0000)]
MFC r299339
sfxge(4): cleanup: remove obsolete common code module
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301327
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 14:41:09 +0000 (14:41 +0000)]
MFC r299338, r299345
sfxge(4): cleanup: fix typos
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301326
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 14:39:26 +0000 (14:39 +0000)]
MFC r299337
sfxge(4): cleanup efx_check.h comments and error messages
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301325
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 14:37:36 +0000 (14:37 +0000)]
MFC r299320-r299328, r299330-r299336
sfxge(4): remove EFSYS_OPT_FALCON and related EFSYS_OPT_ options
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301324
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 14:29:20 +0000 (14:29 +0000)]
MFC r299402
sfxge(4): add TLV format buffer manipulation functions for V3 licensing
The licensing partition for V3 licensing will use the standard TLV format,
so Medford licensing operations on the staging buffer are implemented using
the TLV functions.
Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301323
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 14:27:59 +0000 (14:27 +0000)]
MFC r299319
sfxge(4): add TLV item manipulation functions to common code
Add creation, deletion and checksumming operations to the private copy of
TLV functions in the common code. Functions added in preparation for V3
licensing support, as licensing keys are stored in the TLV format. Missing
support for multiple segment partitions added. Annotations for Windows code
analysis also updated.
Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301322
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 14:26:40 +0000 (14:26 +0000)]
MFC r299318
sfxge(4): restructure TLV buffer validation
Move TLV buffer validation into ef10-specific function and add accessor
function which also converts the partition ID to the internal
representation.
Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301321
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f
arybchik [Sat, 4 Jun 2016 14:23:11 +0000 (14:23 +0000)]
MFC r299254
sfxge(4): remove EFSYS_OPT_PCIE_TUNE
With the removal of Falcon support, this is now dead code.
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
git-svn-id: svn://svn.freebsd.org/base/stable/10@301320
ccf9f872 -aa2e-dd11-9fc8-
001c23d0bc1f