Commit Graph

118 Commits

Author SHA1 Message Date
Andrew Rybchenko
3d385f4e51 sfxge: cleanup: improve consistency in efx_check.h
Make error messages consistent, and remove redundant checks.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4884
2016-01-12 15:27:11 +00:00
Andrew Rybchenko
74bb0ed8b9 sfxge: remove obsolete efx_mac_hash_set() from common code
This API has been replaced by efx_mac_multicast_list_set()
and has no callers.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4883
2016-01-12 15:26:17 +00:00
Andrew Rybchenko
14d6f73e33 sfxge: rework MCDI header version handling
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4882
2016-01-12 15:25:03 +00:00
Andrew Rybchenko
1289fe72c4 sfxge: rename hunt filter methods, types etc. to ef10 and use for Medford
New filters types may be added, but the same machinery should be able to
handle them.

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4881
2016-01-12 15:24:13 +00:00
Andrew Rybchenko
1fa702a261 sfxge: add definitions for compressed satellite images to common code headers
Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4878
2016-01-12 15:21:52 +00:00
Andrew Rybchenko
8b286d1c57 sfxge: add new MCDI sensors to common code
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4877
2016-01-12 15:20:53 +00:00
Andrew Rybchenko
5a2680acd4 sfxge: remove unnecessary pulling out of soft bits from RX events
These bigs are changed on Medford.

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4876
2016-01-12 15:20:03 +00:00
Andrew Rybchenko
dae248ee46 sfxge: remove obsolete common code PKTFILTER module
The pktfilter module has been obsolete for some time, as
it was replaced by newer features in filter module. With
the removal of the storport driver, this module has no
users and can be removed.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4875
2016-01-12 13:42:27 +00:00
Andrew Rybchenko
ead1c5dfe5 sfxge: rename hunt MCDI methods to ef10 and use for Medford
Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4874
2016-01-12 13:39:25 +00:00
Andrew Rybchenko
de9775ad34 sfxge: rename hunt nvram methods and use for Medford
Some new partitions have been added, but they shouldn't need to be
handled any differently.

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4873
2016-01-12 13:37:58 +00:00
Andrew Rybchenko
5311abfa25 sfxge: rename Huntington VPD methods to ef10 and use for Medford
Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4872
2016-01-12 13:36:21 +00:00
Andrew Rybchenko
b627be989d sfxge: rename hunt RX methods to ef10 and use for Medford
Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4871
2016-01-12 13:34:55 +00:00
Andrew Rybchenko
cc62e811f9 sfxge: rename hunt TX methods to ef10 and use for Medford
Rename all except hunt_tx_qdesc_tso_create(), which creates a
fw-assisted TSO v1 descriptor which isn't supported on Medford.

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4870
2016-01-12 13:33:16 +00:00
Andrew Rybchenko
ad8a32cb5d sfxge: rename hunt ev methods to ef10 and use for Medford
Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4869
2016-01-12 13:32:04 +00:00
Andrew Rybchenko
15f20ea67d sfxge: rename hunt interrupt methods to ef10 and use on Medford
All of these apply to both Huntington and Medford.

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4868
2016-01-12 13:30:42 +00:00
Andrew Rybchenko
3c5bf8f1c2 sfxge: update SRAM methods to be no-ops on Medford as well
Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4867
2016-01-12 13:29:05 +00:00
Andrew Rybchenko
b026a4006f sfxge: use NIC config in place of some Huntington specific PIO constants
This should allow these functions to work for Medford as well.

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4866
2016-01-12 13:27:46 +00:00
Andrew Rybchenko
e7119ad9ae sfxge: change hunt specific fields of efx_nic_t to ef10
All these fields will be used in shared ef10 code, so put them in an
ef10 member of a per-architecture union, rather that in the per-chip
union.

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4865
2016-01-12 13:26:04 +00:00
Andrew Rybchenko
435c201468 sfxge: update autogenerated monitors lists
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-01-12 09:52:38 +00:00
Andrew Rybchenko
5f5c71cc13 sfxge: add medford_impl.h, medford_nic.c, ef10_impl.h
Creating some files together to do the build system changes in one go.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4859
2016-01-12 08:32:53 +00:00
Andrew Rybchenko
b13ad4deb6 sfxge: add Medford sensor support
Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4858
2016-01-12 06:37:42 +00:00
Andrew Rybchenko
19bc938f5a sfxge: use MCDIv2 on Medford
Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4857
2016-01-12 06:34:45 +00:00
Andrew Rybchenko
34f6ea2980 sfxge: add Medford PCI IDs to common code
Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4856
2016-01-12 06:32:56 +00:00
Andrew Rybchenko
8883918d66 sfxge: add sanity checking for EFX_OPT_MEDFORD build option to efx_check.h
Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4854
2016-01-12 06:29:17 +00:00
Andrew Rybchenko
b53f4a640f sfxge: add Medford build option disabled by default
Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-01-11 09:15:25 +00:00
Andrew Rybchenko
548ebee5d0 sfxge: unify MCDI response polling
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    philip
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D4496
2015-12-11 07:20:33 +00:00
Andrew Rybchenko
31a7f3730c sfxge: simplify MCDI methods
It is a part of MCDI rework to share more code among NIC families.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D4481
2015-12-11 06:28:15 +00:00
Andrew Rybchenko
af986c757a sfxge: consolidate privilege check functions
To reduce code duplication in common code, consolidate similar privilege
check functions.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4480
2015-12-10 07:42:56 +00:00
Andrew Rybchenko
9f09d81e0d sfxge: cleanup: fix header
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2015-12-10 07:35:38 +00:00
Andrew Rybchenko
273302a453 sfxge: simplify privilege checks with macro
Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4455
2015-12-10 07:17:46 +00:00
Andrew Rybchenko
1ff6d62640 sfxge: [6/6] support for MCDI proxy authorization in common code
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D4454
2015-12-10 07:16:21 +00:00
Andrew Rybchenko
90426c9934 sfxge: [5/6] rework event completion error handling
Required for MCDI proxy authorization support.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D4453
2015-12-10 07:15:09 +00:00
Andrew Rybchenko
610126e3a5 sfxge: cleanup: removed unused variable
Submitted by:   Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2015-12-09 06:59:04 +00:00
Andrew Rybchenko
0216bcdd5d sfxge: cleanup: fix (unused) EFX_OR_BYTE macro
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2015-12-09 06:53:43 +00:00
Andrew Rybchenko
ddfb0c9e8d sfxge: use MAC spoofing TX and MAC change privileges
Update of common code to provide a query on the MAC_SPOOFING_TX and
CHANGE_MAC privileges instead of the deprecated MAC_SPOOFING privilege.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4436
2015-12-09 06:24:22 +00:00
Andrew Rybchenko
083e18ee00 sfxge: [4/6] rework MCDI response polling
Required for MCDI proxy authorization support.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D4435
2015-12-09 06:14:47 +00:00
Andrew Rybchenko
59bfa22ab2 sfxge: [3/6] rework MCDI response handling
Required for MCDI proxy authorization support.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D4420
2015-12-08 06:25:52 +00:00
Andrew Rybchenko
06af9686c1 sfxge: [2/6] rework MCDI response polling
Required to support MCDI proxy authorization.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D4418
2015-12-07 07:22:21 +00:00
Andrew Rybchenko
3edad19717 sfxge: [1/6] add common code MCDI proxy auth build option
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D4417
2015-12-07 07:20:49 +00:00
Andrew Rybchenko
c590f76295 sfxge: fix pointer parameter/value signedness mismatch warnings
TLV routines use 'uint8_t *', NVRAM code uses caddr_t. Just cast to
required type to fix the warning.

Required to build with -Werror=pointer-signg.

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4391
2015-12-07 06:07:01 +00:00
Andrew Rybchenko
ef13016e2c sfxge: fix name conflict with crc32_table from sys/crc32.h
The header is not present on FreeBSD, but exists on OmniOS where sfxge
common code is used as well.

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4390
2015-12-07 06:05:23 +00:00
Andrew Rybchenko
9dd0e15fab sfxge: switch to TxQ creation specific flags
It is better do not mix TxQ creation and receive event flags since only
checksum flags are applicable to TxQ.
Also it will allow to add a new TxQ creation specific flags.

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after: 2    days
Differential Revision: https://reviews.freebsd.org/D4389
2015-12-07 06:04:24 +00:00
Andrew Rybchenko
57396b7a90 sfxge: [Sorrento] support writing of MUM firmware
When writing the MUM firmware the chunk size must be equal to the erase
size.

Submitted by:   Laurence Evans <levans at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4388
2015-12-07 06:01:14 +00:00
Andrew Rybchenko
1547de018e sfxge: support PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED flag
Use flag on vadapter alloc when reported as a supported capability.
Use the slow device reset only when the capability is missing.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4387
2015-12-07 05:59:24 +00:00
Andrew Rybchenko
af128f2270 sfxge: erase nvram partitions in chunks equal to their erase size
The erase size is reported by the nvram info command.

Submitted by:   Paul Fox <pfox at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4386
2015-12-05 17:11:14 +00:00
Andrew Rybchenko
4d982a2562 sfxge: pick up the new TLV structures
The header is auto-generated from firmware sources.

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2015-12-05 08:34:51 +00:00
Andrew Rybchenko
029f0fcd79 sfxge: cleanup: remove set but not used trailer variable
Required to build with -Werror=unused-but-set-variable.

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2015-12-05 08:26:16 +00:00
Andrew Rybchenko
6f750b3281 sfxge: cleanup: remove set but not used variable with parse error indication
Required to build with -Werror=unused-but-set-variable.
Keep it under #if 0 as a reminder for parse error processing.

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2015-12-05 08:24:54 +00:00
Andrew Rybchenko
5a28872b84 sfxge: cleanup: remove set but not used saved_spec variable
Required to build with -Werror=unused-but-set-variable.

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2015-12-05 08:21:45 +00:00
Andrew Rybchenko
3005902f91 sfxge: cleanup: remove SFL9122 "Huntington" PCI IDs
The SFL9122 "Huntington" controller was never built.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2015-12-05 08:10:32 +00:00