dpdk.git
7 years agonet/i40e/base: fix division by zero
Jingjing Wu [Sat, 10 Dec 2016 11:24:50 +0000 (19:24 +0800)]
net/i40e/base: fix division by zero

For some cases when reading from device are incorrect or image is
incorrect, this part of code causes crash due to division by zero.

Fixes: 8db9e2a1b232 ("i40e: base driver")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: add broadcast promiscuous control per VLAN
Jingjing Wu [Sat, 10 Dec 2016 11:24:49 +0000 (19:24 +0800)]
net/i40e/base: add broadcast promiscuous control per VLAN

Add a new adminq function that allows driver to configure per-VLAN
broadcast promiscuous mode, similar to how we handle unicast and
multicast promiscuous modes.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: add error state for NVM update state machine
Jingjing Wu [Sat, 10 Dec 2016 11:24:48 +0000 (19:24 +0800)]
net/i40e/base: add error state for NVM update state machine

This patch adds I40E_NVMUPD_STATE_ERROR state for NVM update.
Without this patch driver has no possibility to return NVM image write
failure.This state is being set when ARQ rises error.
arq_last_status is also updated every time when ARQ event comes,
not only on error cases.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: remove duplicate definitions
Jingjing Wu [Sat, 10 Dec 2016 11:24:47 +0000 (19:24 +0800)]
net/i40e/base: remove duplicate definitions

We already define I40E_AQ_PHY_TYPE_EXT_25G* flags in the response adminq
structure above, and do not need to re-define these.

While we are here, replace 0X with 0x as normal style.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: comment that UDP port must be in host order
Jingjing Wu [Sat, 10 Dec 2016 11:24:46 +0000 (19:24 +0800)]
net/i40e/base: comment that UDP port must be in host order

The firmware expects the Port number to be in Little Endian format, and
the i40e_aq_add_udp_tunnel command clearly expects the udp_port variable
to be in Host order, as it uses CPU_TO_LE16(). It was recently
discovered in the Linux driver that we were passing a Big Endian port
number, which was therefor not enabling the UDP tunnel correctly.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: convert shift values to hex
Jingjing Wu [Sat, 10 Dec 2016 11:24:45 +0000 (19:24 +0800)]
net/i40e/base: convert shift values to hex

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: fix NVM access interfering
Jingjing Wu [Sat, 10 Dec 2016 11:24:44 +0000 (19:24 +0800)]
net/i40e/base: fix NVM access interfering

Acquire NVM lock before reads on all devices.  Previously, locks were
only used for X722 and later.  Fixes an issue where simultaneous X710
NVM accesses were interfering with each other.

Fixes: 8db9e2a1b232 ("i40e: base driver")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: save link FEC info from link up event
Jingjing Wu [Sat, 10 Dec 2016 11:24:43 +0000 (19:24 +0800)]
net/i40e/base: save link FEC info from link up event

Store the FEC status bits from the link up event into the
hw_link_info structure.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: fix WoL failure on PF reset
Jingjing Wu [Sat, 10 Dec 2016 11:24:42 +0000 (19:24 +0800)]
net/i40e/base: fix WoL failure on PF reset

By default the device clears all MAC filter information on PF Reset.
However, this will cause Wake-On-LAN to fail because the wake filters
are deleted on transition to D3 power state. To get around this,
firmware is adding functionality to preserve certain MAC filters during
PFR. These bits allow the driver tell the FW which filters to preserve.

Set the datalen field and add I40E_AQ_FLAG_BUF/I40E_AQ_FLAG_RD flags in the
desc struct for the WoL/Proxy AQ descriptors. The WoL/Proxy AQ commands
were failing because these were missing.

Fixes: 3c89193a36fd ("i40e/base: support WOL config for X722")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: implement VSI full promiscuous mode
Jingjing Wu [Sat, 10 Dec 2016 11:24:41 +0000 (19:24 +0800)]
net/i40e/base: implement VSI full promiscuous mode

This patch implements a function to set a VSI to broadcast, multicast, and
unicast promiscuous mode all at once. This is specifically needed to set
the WoL/Proxy VSI created by FW to full promiscuous mode during power down
for WoL patterns and protocol offloads to function properly.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: implement clear all WoL filters
Jingjing Wu [Sat, 10 Dec 2016 11:24:40 +0000 (19:24 +0800)]
net/i40e/base: implement clear all WoL filters

This patch implements the clear Wake on LAN (WoL) filters admin queue
function which clears out ALL WoL patterns programmed into
the flex filters.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: adjust 25G PHY type values
Jingjing Wu [Sat, 10 Dec 2016 11:24:39 +0000 (19:24 +0800)]
net/i40e/base: adjust 25G PHY type values

Define the values for the 25G PHY type bit-fields that match
reported values from firmware. There was a gap in the bit
fields but no corresponding gap i40e_aq_phy_type enum.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: use BIT macro instead of bit fields
Jingjing Wu [Sat, 10 Dec 2016 11:24:38 +0000 (19:24 +0800)]
net/i40e/base: use BIT macro instead of bit fields

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: add FEC bits to PHY capabilities
Jingjing Wu [Sat, 10 Dec 2016 11:24:37 +0000 (19:24 +0800)]
net/i40e/base: add FEC bits to PHY capabilities

Add FEC bits to the PHY capabilities AQ command struct. This is required
for 25GbE support. Change the name of the generic mod_type_ext field to
indicate that it is now used for handling FEC.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: remove FPK HyperV VF device ID
Jingjing Wu [Sat, 10 Dec 2016 11:24:36 +0000 (19:24 +0800)]
net/i40e/base: remove FPK HyperV VF device ID

Microsoft recently removed the requirement for VFs to use the VMBus.
The Fort Park Windows VF has been changed to use only the hardware
mailbox, so the Hyper-V VF device ID can be removed.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: deprecate unused macro
Jingjing Wu [Sat, 10 Dec 2016 11:24:35 +0000 (19:24 +0800)]
net/i40e/base: deprecate unused macro

I40E_MAC_X710 was supposed to be for 10G and I40E_MAC_XL710
was supposed to be for 40G. But i40e_set_mac_type() sets
I40E_MAC_XL710 for all device IDS. I40E_MAC_X710 is not
used at all. Thus deprecating this extra macro.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: replace memcpy
Jingjing Wu [Sat, 10 Dec 2016 11:24:34 +0000 (19:24 +0800)]
net/i40e/base: replace memcpy

To align with current memcpy use, replace existing legacy memcpy() calls
with i40e_memcpy() calls.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: fix unknown PHYs incorrect identification
Jingjing Wu [Sat, 10 Dec 2016 11:24:33 +0000 (19:24 +0800)]
net/i40e/base: fix unknown PHYs incorrect identification

The PHY type value for unrecognized PHYs and cables was changed
based on firmware version number. Newer hardware use lower firmware
version numbers and this was causing some PHYs to be identified
as type 0x16 instead of 0xe (unknown).

Without this patch, newer card will incorrectly identify unknown
PHYs and cables.

This change adds hardware type to the check for firmware version
so the PHY type is reported correctly.

Fixes: 8db9e2a1b232 ("i40e: base driver")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: add protocols when discover capabilities
Jingjing Wu [Sat, 10 Dec 2016 11:24:32 +0000 (19:24 +0800)]
net/i40e/base: add protocols when discover capabilities

Add logical_id to I40E_AQ_CAP_ID_MNG_MODE capability starting from major
version 2.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: add bus number info
Jingjing Wu [Sat, 10 Dec 2016 11:24:31 +0000 (19:24 +0800)]
net/i40e/base: add bus number info

Currently i40e_bus_info has PCI device and function info only. However
in log messages slot number (i.e hw->bus.device) is being printed
as bus number. Another field should be added to provide bus number
info and preserve existing information.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: add clause22 and clause45 implementation
Jingjing Wu [Sat, 10 Dec 2016 11:24:30 +0000 (19:24 +0800)]
net/i40e/base: add clause22 and clause45 implementation

Some external PHYs require Clause22 and Clause45 method for
accessing registers. Mostly used for X722 support.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: add media type detection for 25G link
Jingjing Wu [Sat, 10 Dec 2016 11:24:29 +0000 (19:24 +0800)]
net/i40e/base: add media type detection for 25G link

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: fix long link down notification time
Jingjing Wu [Sat, 10 Dec 2016 11:24:28 +0000 (19:24 +0800)]
net/i40e/base: fix long link down notification time

This patch fixes a problem where it could take a very
long time (>100 msec) to print the link down notification.
This problem is fixed by changing how often we update link
info from fw, when link is down. Without this patch, it can
take over 100msec to notify user link is down.

Fixes: e6691b428eb1 ("i40e/base: fix PHY NVM interaction")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: group base mode VF offload flags
Jingjing Wu [Sat, 10 Dec 2016 11:24:27 +0000 (19:24 +0800)]
net/i40e/base: group base mode VF offload flags

Group together the minimum set of offload capabilities that are always
supported by VF in base mode. This define would be used by PF to make
sure VF in base mode gets minimum of base capabilities.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: fix bit test mask
Jingjing Wu [Sat, 10 Dec 2016 11:24:26 +0000 (19:24 +0800)]
net/i40e/base: fix bit test mask

Incorrect bit mask was used for testing "get link status" response.
Instead of I40E_AQ_LSE_ENABLE (which is actually 0x03) it should
be I40E_AQ_LSE_IS_ENABLED (which is defined as 0x01).

Fixes: 8db9e2a1b232 ("i40e: base driver")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: remove unnecessary code
Jingjing Wu [Sat, 10 Dec 2016 11:24:25 +0000 (19:24 +0800)]
net/i40e/base: remove unnecessary code

This patch changes some assignments and removing the unnecessary
code to avoid error reported by static analysis tools.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: fix flow control set for 25G
Jingjing Wu [Sat, 10 Dec 2016 11:24:24 +0000 (19:24 +0800)]
net/i40e/base: fix flow control set for 25G

Add phy_type_ext copied from old setting to rpevents 25G PHY
types from being disabled when setting the flow control modes.

Fixes: 51131ae119 ("net/i40e/base: get PHY abilities for 25G")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: add encap checksum VF offload flag
Jingjing Wu [Sat, 10 Dec 2016 11:24:23 +0000 (19:24 +0800)]
net/i40e/base: add encap checksum VF offload flag

Add ENCAP_CSUM offload negotiation flag. Currently VF assumes checksum
offload for encapsulated packets is supported by default. Going forward,
this feature needs to be negotiated with PF before advertising to the
stack. Hence, we need a flag to control it.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/nfp: document supported features
Alejandro Lucero [Fri, 2 Dec 2016 08:17:33 +0000 (08:17 +0000)]
net/nfp: document supported features

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agonet/ixgbe: fix typo in comment
Ferruh Yigit [Wed, 7 Dec 2016 17:19:48 +0000 (17:19 +0000)]
net/ixgbe: fix typo in comment

Fixes: c03fcee9abbd ("ixgbe: remove CRC size from byte counters")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/sfc: restart TxQ in case of exception on event queue
Ivan Malov [Fri, 2 Dec 2016 07:41:21 +0000 (07:41 +0000)]
net/sfc: restart TxQ in case of exception on event queue

Examples of recoverable exceptions because of Tx error are:
 - Tx descriptor PCI read error
 - invalid Tx option descriptor
 - Tx option descriptor not supported by the firmware variant
 - unexpected Tx option descriptor (e.g. missing FATSO2A before
   FATSO2B, missing FATSO2B after FATSO2A)
 - incomplete packet push (CONT bit set in the latest pushed DMA
   descriptor)

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Robert Stonehouse <rstonehouse@solarflare.com>
7 years agonet/sfc: restart RxQ in case of exception on event queue
Andrew Rybchenko [Fri, 2 Dec 2016 07:41:20 +0000 (07:41 +0000)]
net/sfc: restart RxQ in case of exception on event queue

Examples of recoverable exceptions are:
 - unexpected Rx event (Rx scatter abort with non-zero size,
   too big Rx descriptors batch completed)
 - Rx error due to invalid Rx descriptors push
 - Rx error due to Rx descriptor read error (e.g. unmapped Rx ring
   and denied by IOMMU)

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Robert Stonehouse <rstonehouse@solarflare.com>
7 years agonet/sfc: send bursts of packets
Ivan Malov [Tue, 29 Nov 2016 16:19:27 +0000 (16:19 +0000)]
net/sfc: send bursts of packets

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc: implement transmit path start / stop
Ivan Malov [Tue, 29 Nov 2016 16:19:26 +0000 (16:19 +0000)]
net/sfc: implement transmit path start / stop

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc: set up and release Tx queues
Ivan Malov [Tue, 29 Nov 2016 16:19:25 +0000 (16:19 +0000)]
net/sfc: set up and release Tx queues

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc: add function to check configured Tx mode
Ivan Malov [Tue, 29 Nov 2016 16:19:24 +0000 (16:19 +0000)]
net/sfc: add function to check configured Tx mode

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc: provide basic stubs for Tx subsystem
Ivan Malov [Tue, 29 Nov 2016 16:19:23 +0000 (16:19 +0000)]
net/sfc: provide basic stubs for Tx subsystem

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc: discard scattered packet on Rx correctly
Andrew Rybchenko [Tue, 29 Nov 2016 16:19:22 +0000 (16:19 +0000)]
net/sfc: discard scattered packet on Rx correctly

Since Rx scatter is not supported, all scattered packets are discarded.
It is not always possible to disable scatter on Huntington, so we
should handle scattered packets correctly in any case.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc: implement device callback to Rx burst of packets
Andrew Rybchenko [Tue, 29 Nov 2016 16:19:21 +0000 (16:19 +0000)]
net/sfc: implement device callback to Rx burst of packets

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc: implement Rx queue start and stop operations
Andrew Rybchenko [Tue, 29 Nov 2016 16:19:20 +0000 (16:19 +0000)]
net/sfc: implement Rx queue start and stop operations

These functions should set the queue state in dev->data->rx_queue_state
array.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc: validate Rx queue buffers setup
Andrew Rybchenko [Tue, 29 Nov 2016 16:19:19 +0000 (16:19 +0000)]
net/sfc: validate Rx queue buffers setup

Check that Rx mbuf pool, MTU and Rx scatter config are in sync.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc: calculate Rx buffer size which may be used
Andrew Rybchenko [Tue, 29 Nov 2016 16:19:18 +0000 (16:19 +0000)]
net/sfc: calculate Rx buffer size which may be used

Take Rx buffer start alignment and end-padding into account.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc: implement Rx queue setup release operations
Andrew Rybchenko [Tue, 29 Nov 2016 16:19:17 +0000 (16:19 +0000)]
net/sfc: implement Rx queue setup release operations

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc: check configured Rx mode
Andrew Rybchenko [Tue, 29 Nov 2016 16:19:16 +0000 (16:19 +0000)]
net/sfc: check configured Rx mode

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc: implement Rx subsystem stubs
Andrew Rybchenko [Tue, 29 Nov 2016 16:19:15 +0000 (16:19 +0000)]
net/sfc: implement Rx subsystem stubs

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc: retrieve link info
Artem Andreev [Tue, 29 Nov 2016 16:19:14 +0000 (16:19 +0000)]
net/sfc: retrieve link info

Signed-off-by: Artem Andreev <artem.andreev@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc: minimum port control sufficient to receive traffic
Andrew Rybchenko [Tue, 29 Nov 2016 16:19:13 +0000 (16:19 +0000)]
net/sfc: minimum port control sufficient to receive traffic

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc: periodic management EVQ polling using alarm
Andrew Rybchenko [Tue, 29 Nov 2016 16:19:12 +0000 (16:19 +0000)]
net/sfc: periodic management EVQ polling using alarm

Timers cannot be used to implement periodic polling, since it implies
requirement on application to process timers in the main loop.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc: maintain management event queue
Andrew Rybchenko [Tue, 29 Nov 2016 16:19:11 +0000 (16:19 +0000)]
net/sfc: maintain management event queue

The event queue is required for device level events (e.g. link status
change) and flush events.
Provide thread-safe function to poll the event queue since it may be
really done from different contexts.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc: implement EVQ dummy exception handling
Andrew Rybchenko [Tue, 29 Nov 2016 16:19:10 +0000 (16:19 +0000)]
net/sfc: implement EVQ dummy exception handling

Right now the code just logs the exception and sets flag to notify
subsequent event handlers and poller that recovery is required.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc: support event queue
Andrew Rybchenko [Tue, 29 Nov 2016 16:19:09 +0000 (16:19 +0000)]
net/sfc: support event queue

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc: interrupts support sufficient for event queue init
Andrew Rybchenko [Tue, 29 Nov 2016 16:19:08 +0000 (16:19 +0000)]
net/sfc: interrupts support sufficient for event queue init

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc: estimate available resources
Andrew Rybchenko [Tue, 29 Nov 2016 16:19:07 +0000 (16:19 +0000)]
net/sfc: estimate available resources

Resources required in accordance with configuration are
allocated only.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc: add device start and stop operations
Andrew Rybchenko [Tue, 29 Nov 2016 16:19:06 +0000 (16:19 +0000)]
net/sfc: add device start and stop operations

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc: add device configuration checks
Andrew Rybchenko [Tue, 29 Nov 2016 16:19:05 +0000 (16:19 +0000)]
net/sfc: add device configuration checks

Manual link speed/duplex configuration is not supported yet.
Loopback is not supported yet.
Flow Director is not supported.
Link status change notification using interrupt is not supported yet.
Receive data notification using interrupts is not supported yet.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc: add configure and close stubs
Andrew Rybchenko [Tue, 29 Nov 2016 16:19:04 +0000 (16:19 +0000)]
net/sfc: add configure and close stubs

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc: add init on attach
Andrew Rybchenko [Tue, 29 Nov 2016 16:19:03 +0000 (16:19 +0000)]
net/sfc: add init on attach

The setup and configuration of the PMD is not performance sensitive,
but is not thread safe either. It is possible that the multiple
read/writes during PMD setup and configuration could be corrupted
in a multi-thread environment.  Since this is not performance
sensitive, the developer can choose to add their own layer to provide
thread-safe setup and configuration. It is expected that, in most
applications, the initial configuration of the network ports would be
done by a single thread at startup.

In the case of exception on the event queue, the event queue and
corresponding Rx/Tx queue should be restarted in the Rx/Tx queue
polling context. These operations require access to the device
control which should be serialized. The device level lock will do
the job.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc: build libefx
Artem Andreev [Tue, 29 Nov 2016 16:19:02 +0000 (16:19 +0000)]
net/sfc: build libefx

Implement efsys.h for the PMD.

Signed-off-by: Artem Andreev <artem.andreev@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc/base: import libefx licensing
Andrew Rybchenko [Tue, 29 Nov 2016 16:19:01 +0000 (16:19 +0000)]
net/sfc/base: import libefx licensing

Provide API to deal with licenses on SFN7xxx and SFN8xxx
family adapters.

EFSYS_OPT_LICENSING should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc/base: import bootrom configuration
Andrew Rybchenko [Tue, 29 Nov 2016 16:19:00 +0000 (16:19 +0000)]
net/sfc/base: import bootrom configuration

Provide API to read/write bootrom configuration from/to NVRAM.

EFSYS_OPT_BOOTROM should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc/base: import VPD support
Andrew Rybchenko [Tue, 29 Nov 2016 16:18:59 +0000 (16:18 +0000)]
net/sfc/base: import VPD support

Provide API to read/write PCI Vital Product Data.

EFSYS_OPT_VPD should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc/base: import NVRAM support
Andrew Rybchenko [Tue, 29 Nov 2016 16:18:58 +0000 (16:18 +0000)]
net/sfc/base: import NVRAM support

Provide API to work with NIC non-volatile memory. It is used
to update firmware, configure NIC including bootrom parameters,
manage licenses, store PCI Vital Product Data etc.

EFSYS_OPT_NVRAM should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc/base: import Rx packed stream mode
Andrew Rybchenko [Tue, 29 Nov 2016 16:18:57 +0000 (16:18 +0000)]
net/sfc/base: import Rx packed stream mode

In packed stream mode, large buffers are provided to the NIC
into which many packets can be delivered. This reduces the
number of queue refills needed compared to delivering every
packet into a separate buffer.

EFSYS_OPT_RX_PACKED_STREAM should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc/base: import monitors access via MCDI
Andrew Rybchenko [Tue, 29 Nov 2016 16:18:56 +0000 (16:18 +0000)]
net/sfc/base: import monitors access via MCDI

EFSYS_OPT_MON_MCDI should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc/base: import monitors statistics
Andrew Rybchenko [Tue, 29 Nov 2016 16:18:55 +0000 (16:18 +0000)]
net/sfc/base: import monitors statistics

EFSYS_OPT_MON_STATS should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc/base: import loopback control
Andrew Rybchenko [Tue, 29 Nov 2016 16:18:54 +0000 (16:18 +0000)]
net/sfc/base: import loopback control

EFSYS_OPT_LOOPBACK should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc/base: import RSS support
Andrew Rybchenko [Tue, 29 Nov 2016 16:18:53 +0000 (16:18 +0000)]
net/sfc/base: import RSS support

EFSYS_OPT_RX_SCALE should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc/base: import Rx scatter support
Andrew Rybchenko [Tue, 29 Nov 2016 16:18:52 +0000 (16:18 +0000)]
net/sfc/base: import Rx scatter support

EFSYS_OPT_RX_SCATTER should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc/base: import event prefetch
Andrew Rybchenko [Tue, 29 Nov 2016 16:18:51 +0000 (16:18 +0000)]
net/sfc/base: import event prefetch

EFSYS_OPT_EV_PREFECT allows to enable event prefetching
when event queue is polled.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc/base: import MAC statistics
Andrew Rybchenko [Tue, 29 Nov 2016 16:18:50 +0000 (16:18 +0000)]
net/sfc/base: import MAC statistics

MAC statistics are either periodically (if supported/requested)
or on-demand written to provided DMA-mapped memory.
If periodic update is not supported (e.g. for EF10 virtual
functions), it is the driver responsibility to handle it.

EFSYS_OPT_MAC_STATS should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc/base: import PHY LEDs control
Andrew Rybchenko [Tue, 29 Nov 2016 16:18:49 +0000 (16:18 +0000)]
net/sfc/base: import PHY LEDs control

EFSYS_OPT_PHY_LED_CONTROL should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc/base: import PHY statistics
Andrew Rybchenko [Tue, 29 Nov 2016 16:18:48 +0000 (16:18 +0000)]
net/sfc/base: import PHY statistics

EFSYS_OPT_PHY_STATS should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc/base: import PHY flags control
Andrew Rybchenko [Tue, 29 Nov 2016 16:18:47 +0000 (16:18 +0000)]
net/sfc/base: import PHY flags control

EFSYS_OPT_PHY_FLAGS should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc/base: import software per-queue statistics
Andrew Rybchenko [Tue, 29 Nov 2016 16:18:46 +0000 (16:18 +0000)]
net/sfc/base: import software per-queue statistics

EFSYS_OPT_QSTATS should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc/base: import built-in selftest
Andrew Rybchenko [Tue, 29 Nov 2016 16:18:45 +0000 (16:18 +0000)]
net/sfc/base: import built-in selftest

EFSYS_OPT_BIST should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc/base: import diagnostics support
Andrew Rybchenko [Tue, 29 Nov 2016 16:18:44 +0000 (16:18 +0000)]
net/sfc/base: import diagnostics support

EFSYS_OPT_DIAG should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc/base: import SFN8xxx family support
Andrew Rybchenko [Tue, 29 Nov 2016 16:18:43 +0000 (16:18 +0000)]
net/sfc/base: import SFN8xxx family support

SFN8xxx is the second family based on EF10 architecture.

It has few differences from SFN7xxx adapters family.

EFSYS_OPT_MEDFORD should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc/base: import SFN7xxx family support
Andrew Rybchenko [Tue, 29 Nov 2016 16:18:42 +0000 (16:18 +0000)]
net/sfc/base: import SFN7xxx family support

SFN7xxx is the first family based on EF10 architecture.

EFSYS_OPT_HUNTINGTON should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc/base: import 5xxx/6xxx family support
Andrew Rybchenko [Tue, 29 Nov 2016 16:18:41 +0000 (16:18 +0000)]
net/sfc/base: import 5xxx/6xxx family support

EFSYS_OPT_SIENA should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc/base: import MCDI proxy authorization
Andrew Rybchenko [Tue, 29 Nov 2016 16:18:40 +0000 (16:18 +0000)]
net/sfc/base: import MCDI proxy authorization

MCDI proxy authorization may be used if privileged PCI
function (physical function) would like to intercept and
authorize MCDI requests done by unprivileged (e.g. virtual)
PCI function. It may be used to control unprivileged
function Rx mode (e.g. promiscuous, all-multicast), MTU
and default MAC address change requests etc.

Current libefx support is limited to client-side which
is required to work when function requests need to be
authorized.

Server side support required to request and do the
authorization is not implemented yet.

EFSYS_OPT_MCDI_PROXY_AUTH should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc/base: import MCDI logging
Andrew Rybchenko [Tue, 29 Nov 2016 16:18:39 +0000 (16:18 +0000)]
net/sfc/base: import MCDI logging

Driver can provide a function to be called to log MCDI
requests and responses to help with debugging.

Solarflare netlogdecode cross-platform tool may be used
to decode these logs.

EFSYS_OPT_MCDI_LOGGING should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc/base: import MCDI implementation
Andrew Rybchenko [Tue, 29 Nov 2016 16:18:38 +0000 (16:18 +0000)]
net/sfc/base: import MCDI implementation

Implement interface to talk to NIC management CPU. Provide
helpers to fill in MCDI requests, execute it and process
received response.

MCDI request is prepared in either PCI BAR mapped memory
(SFN5xxx/SFN6xxx) or DMA-mapped memory (SFN7xxx/SFN8xxx) and,
doorbell is pressed (memory-mapped register) to execute it.

Events about MCDI completion are delivered to house-keeping
event queue, but usage of these events is optional and MCDI
buffer may be simply polled waiting for completion
indication set.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc/base: import MCDI definition
Andrew Rybchenko [Tue, 29 Nov 2016 16:18:37 +0000 (16:18 +0000)]
net/sfc/base: import MCDI definition

The header defines data interface between host CPU and NIC
management CPU.

The header is automatically generated from firmware sources.

MCDI is used on NIC control path (configuration,
event/transmit/receive queues setup and teardown etc), but
not used on data path.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc/base: import filters support
Andrew Rybchenko [Tue, 29 Nov 2016 16:18:36 +0000 (16:18 +0000)]
net/sfc/base: import filters support

Filtering capabilities depend on NIC family and used firmware
variant. Provided API allows to get supported filter types
(in a priority order), add/delete individual filters and
restore entire filter table after, for example, NIC management
CPU reboot.

Rx filters allow to redirect matching flow to specified Rx queue.

Tx filters allow to control generated traffic (e.g. to implement
virtual function anti-spoofing control).

EFSYS_OPT_FILTER should be enabled to use it. It is required
for SFN7xxx and SFN8xxx adapter families support.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc/base: import register definitions
Andrew Rybchenko [Tue, 29 Nov 2016 16:18:35 +0000 (16:18 +0000)]
net/sfc/base: import register definitions

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc/base: import libefx base
Andrew Rybchenko [Tue, 29 Nov 2016 16:18:34 +0000 (16:18 +0000)]
net/sfc/base: import libefx base

libefx is a platform-independent library to implement drivers
for Solarflare network adapters. It provides unified adapter
family independent interface (if possible).

Driver must provide efsys.h header which defines options
(EFSYS_OPT_*) to be used and macros/functions to allocate
memory, read/write DMA-mapped memory, read/write PCI BAR
space, locks, barriers etc.

efx.h and efx_types.h provide external interfaces intended
to be used by drivers. Other header files are internal.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc: libefx-based driver stub
Andrew Rybchenko [Tue, 29 Nov 2016 16:18:33 +0000 (16:18 +0000)]
net/sfc: libefx-based driver stub

Enable the PMD by default on supported configurations.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/i40evf: fix casting between structs
Jingjing Wu [Wed, 30 Nov 2016 02:02:25 +0000 (10:02 +0800)]
net/i40evf: fix casting between structs

Casting from structs which lay out data in typed members
to structs which have flat memory buffers, will cause
problems if the alignment of the former isn't as expected.
This patch removes the casting between structs.

Fixes: ae19955e7c86 ("i40evf: support reporting PF reset")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/e1000/base: announce supported devices
Wenzhuo Lu [Sun, 27 Nov 2016 18:11:44 +0000 (13:11 -0500)]
net/e1000/base: announce supported devices

Document all supported NICs.
Add Intel I219 NICs support in release note.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/i40e: enable auto link update for 25G
Qi Zhang [Tue, 29 Nov 2016 20:26:21 +0000 (15:26 -0500)]
net/i40e: enable auto link update for 25G

For 25G devices auto link update was disabled because it was causing
link issues when enabled.

The problem found because of interface changes in admin queue command
"set_phy_config" and "get_phy_capabilities" for 25G.

This patch fixes the issue and enables auto link update for 25G devices.

Fixes: 75d133dd3296 ("net/i40e: enable 25G device")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
7 years agonet/i40e: fix logging for Tx free threshold check
Jingjing Wu [Sun, 27 Nov 2016 09:11:35 +0000 (17:11 +0800)]
net/i40e: fix logging for Tx free threshold check

Fixes: 4861cde46116 ("i40e: new poll mode driver")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/e1000: enable new I219 devices
Wenzhuo Lu [Wed, 23 Nov 2016 17:23:00 +0000 (12:23 -0500)]
net/e1000: enable new I219 devices

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/e1000/base: update shared code version
Wenzhuo Lu [Wed, 23 Nov 2016 17:22:59 +0000 (12:22 -0500)]
net/e1000/base: update shared code version

Updated to 2016.11.22

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/e1000/base: support more I219 devices
Wenzhuo Lu [Wed, 23 Nov 2016 17:22:58 +0000 (12:22 -0500)]
net/e1000/base: support more I219 devices

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/e1000/base: disable force K1-off feature
Wenzhuo Lu [Wed, 23 Nov 2016 17:22:57 +0000 (12:22 -0500)]
net/e1000/base: disable force K1-off feature

MAC-PHY desync may occur causing misdetection of link up event.
Disabling K1-off feature can work around the problem.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/e1000/base: add workaround for possible stalled packet
Wenzhuo Lu [Wed, 23 Nov 2016 17:22:56 +0000 (12:22 -0500)]
net/e1000/base: add workaround for possible stalled packet

This works around a possible stalled packet issue, which may occur due to
clock recovery from the PCH being too slow, when the LAN is transitioning
from K1 at 1G link speed.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/e1000/base: enable new I219 devices
Wenzhuo Lu [Wed, 23 Nov 2016 17:22:55 +0000 (12:22 -0500)]
net/e1000/base: enable new I219 devices

Enable the support of new I219 devices.
Also define some registers for future usage.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/e1000/base: add workaround for ULP entry flow
Wenzhuo Lu [Wed, 23 Nov 2016 17:22:54 +0000 (12:22 -0500)]
net/e1000/base: add workaround for ULP entry flow

For I217 revision 6, when entering Ultra Low Power (ULP) we need to enable
Low Power Link Up (LPLU) and disable Gig speed to make it work.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/e1000/base: increase LANPHYPC low duration
Wenzhuo Lu [Wed, 23 Nov 2016 17:22:53 +0000 (12:22 -0500)]
net/e1000/base: increase LANPHYPC low duration

LANPHYPC low duration of 10 usec was too low for some corner cases
causing interface mismatches during Ultra Low Power (ULP) exit.

This patch increases the LANPHYPC low duration to 1 msec.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/e1000/base: clear ULP configuration register on ULP exit
Wenzhuo Lu [Wed, 23 Nov 2016 17:22:52 +0000 (12:22 -0500)]
net/e1000/base: clear ULP configuration register on ULP exit

There are some client PHY Ultra Low Power (ULP) register bits that are
configured by the Manageability Engine (ME) FW.

The driver must ensure that these bits are cleared on exit from ULP.
Ordinarily the ME FW would do that, but there are cases in which the
FW is not present, and the driver must handle that.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>