Commit Graph

6491 Commits

Author SHA1 Message Date
Wei Dai
45f79aea9e net/ixgbe/base: fix IXGBE LSWFW register
This register was incorrect when compared to the data sheet.
Even though the driver doesn't currently use this register,
it is better to fix it upstream.

Fixes: af75078fec ("first public release")

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
4d17b12634 net/ixgbe/base: remove unused enum type
remove unused enum type for master/slave control in ixbge_type.h

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
3ab3671b0b net/ixgbe/base: add EEE support for some PHYs
This patch adds Energy Efficient Ethernet (EEE) support for
some Marvell PHYs on some future platforms.
Because EEE capability or status was not indicated previously,
this patch simply assumes that it is supported.

As soon as there is a PHY that does not support EEE, there will
be defects in this area because the driver will not report the
EEE status correctly.

This also deletes some now-unused definitions from an earlier
Marvell PHY implementation and combines a device ID check into a
switch statement.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
611001b802 net/ixgbe/base: update FW PHY flow control
This patch removes the flow control conversion from Rx and Tx to pause
and asymmetric pause, as that is handled by the ixgbe_negotiate_fc().

Performing the conversion prior to ixgbe_negotiate_fc() results in
an incorrect fc mode if Rx only pause is selected when the link partner
is advertising Tx.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
88814faa87 net/ixgbe/base: remove unused PHY ID
The first PHY ID for X550 was only used on original HW and
never released. So remove these unused PHY ID.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
71e4482941 net/ixgbe/base: remove unneeded MAC type check
ixgbe_read_i2c_combined_generic_int() is only used by devices >= X550.
Set the initial value accordingly and remove the MAC type check.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
a2fdf99edf net/ixgbe/base: add physical layer options for FW PHY type
The "FW" PHY type now supports speeds 10M, 100M, and 1G.
Previously, only the 1G speed was reported for this PHY type.
Add reporting 10M and 100M speed options.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
6d5408c1e6 net/ixgbe/base: limit 5Gb support to X550 devices
Only X550 devices support 5Gb. MAC type checks for 5Gb should
be done only for X550 devices.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
12e2090690 net/ixgbe/base: include new speeds in VFLINK interpretation
This patch moves some of the extended speeds that come with X552
(5G, 2.5G, 10M) into the link check functions.
It also now returns speed_unknown for speeds that are not known
how to interpret.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
8ccdd7bf94 net/ixgbe/base: support busy SGMII register reads
Read and store NW_MNG_IF_SEL register because register fields are
used to determine SGMII link for busy SGMII register reads.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
fa4ccb68e0 net/ixgbe/base: use FW commands to control some PHYs
Use the new firmware interface to access and control some PHYs.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
4832a1cb78 net/ixgbe/base: support FW commands to control some PHYs
Implement support for new firmware commands to be used to access
and control some PHYs.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
222c651941 net/ixgbe/base: fix setting unsupported autoneg speeds
Update ixgbe_setup_phy_link_generic that set/unset auto-negotiation.
Ensure that unsupported auto-negotiation speeds are unset.

This is necessary since the PHY NVM may advertise unsupported speeds.

Fixes: af75078fec ("first public release")

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
2ac6248ae4 net/ixgbe/base: cleanup dead EEE code
Remove some specific code for enabling/disabling Energy Efficient
Ethernet (EEE).

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
f7894d88b3 net/ixgbe/base: fix SGMII link setup for M88 PHYs
Fix ixgbe_setup_sgmii_m88 to set lane speed to autoneg instead of 1G
to prevent problems with link between PHYs

Fixes: d4b4c68454 ("net/ixgbe/base: add X550em_a FW ALEF support")

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
63b32fda0c net/ixgbe/base: fix getting PHY type for some x550 devices
Return correct physical layer for some x550 devices.

Fixes: 76d5b807ff ("ixgbe/base: new X557 phy")
Fixes: d2e72774e5 ("ixgbe/base: support X550")

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
d395ae5592 net/ixgbe/base: limit iXFI setup to X552 devices
The MAC register NW_MNG_IF_SEL fields have been redefined for X553.
These changes impact the iXFI driver code flow. Since iXFI is only
supported in X552, this patch adds X552 MAC check for iXFI flows.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
769e6ae308 net/ixgbe/base: enable LASI only for X552 devices
Enable the Link Alarm Status Interrupt (LASI) only for X552 devices
to receive notifications of the link configurations of the external
PHY and correspondingly support the configuration of the internal
iXFI link, since iXFI does not support auto-negotiation.

This is not required for X553 devices having KR support, which
performs auto-negotiations and which is used as the internal
link to the external PHY.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
06d85f7c7a net/ixgbe/base: cleanup X540 checksum calculation
The variable checksum_last_word is used only for bounds check.
So remove this variable and use IXGBE_EEPROM_CHECKSUM directly.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
72f3bd5801 net/ixgbe/base: store link active LED
Add support to get the link active LED index via the LEDCTL register.
If the LEDCTL register does not have link active LED set then
use MAC default LED index.
Link active LED is used for adapter identify/blink support.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
74b9878181 net/ixgbe/base: add driver version to firmware
Send the driver version string to firmware through
the host interface command on x550 devices.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
2f8c0a2335 net/ixgbe/base: clean up X557 link status check
This patch cleans up the code and clarifies the comment around
the X557 PHY link status check in ixgbe_check_link_t_x550em().

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
5b313c497f net/ixgbe/base: fix PHY identification for x550a
Method to identify the CS4223/CS4227 is incorrect and unreliable.
Provide a new register to differentiate between these PHY SKUs.

Fixes: fc0559bdb5 ("net/ixgbe/base: add link MAC setup for X550a SFP+")

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
81ada1e197 net/ixgbe/base: use fast MDIO for non-10G devices
Devices that cannot go 10G speeds can safely select a faster
Management Data Input/Output (MDIO) speed.
Select fast MDIO clock speed for for those devices.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
1b417db3d3 net/ixgbe/base: fix clearing SAN MAC address
Receive Address Register (RAR) entries, including SAN MAC address,
are cleared when VMDq pool bits are cleared.
Prevent SAN MAC address to be cleared.

Fixes: af75078fec ("first public release")

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
e39713e45f net/ixgbe/base: fix PHY reset check for x550em-ext
PHY type ixgbe_phy_x550em_ext_t requires different check
to verify reset status.

Fixes: af75078fec ("first public release")

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Alejandro Lucero
011411586e net/nfp: extend speed capabilities advertised
NFP supports more speeds than just 40 and 100GB, which were
what was advertised before.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2017-01-17 19:40:51 +01:00
Alejandro Lucero
8245355acb net/nfp: report link speed using hardware info
Previous reported speed was hardcoded because there was not firmware
support for getting this information. This change needs also to support
old firmware versions, but instead of the previous hardcoded report, no
speed is reported to the user avoiding to give the wrong speed when link
is not configured to 40G.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2017-01-17 19:40:51 +01:00
Alejandro Lucero
348dbdd8d1 net/nfp: fix typo in Tx offload capabilities
Because macros for TCP and UDP related to offload cksums have
same values, this was not a main problem. But better to use the
right ones.

Fixes: d4a27a3b09 ("nfp: add basic features")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2017-01-17 19:40:51 +01:00
Alejandro Lucero
51151be63c net/nfp: remove Rx port metadata
This was required for middlebox-like firmware which NFP does
not support anymore.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2017-01-17 19:40:51 +01:00
Stefan Puiu
8fce14b789 net/vmxnet3: fix Rx deadlock
Our use case is that we have an app that needs to keep mbufs around
for a while. We've seen cases when calling vmxnet3_post_rx_bufs() from
vmxet3_recv_pkts(), it might not succeed to add any mbufs to any RX
descriptors (where it returns -err). Since there are no mbufs that the
virtual hardware can use, no packets will be received after this; the
driver won't refill the mbuf after this so it gets stuck in this
state. I call this a deadlock for lack of a better term - the virtual
HW waits for free mbufs, while the app waits for the hardware to
notify it for data (by flipping the generation bit on the used Rx
descriptors). Note that after this, the app can't recover.

This fix is a rework of this patch by Marco Lee:
http://dpdk.org/dev/patchwork/patch/6575/. I had to forward port
it, address review comments and also reverted the allocation
failure handling to the first version of the patch
(http://dpdk.org/ml/archives/dev/2015-July/022079.html), since
that's the only approach that seems to work, and seems to be what
other drivers are doing (I checked ixgbe and em). Reusing the mbuf
that's getting passed to the application doesn't seem to make
sense, and it was causing weird issues in our app. Also, reusing
rxm without checking if it's NULL could cause the code to crash.

Fixes: 14680e3747 ("vmxnet3: improve Rx performance")

Signed-off-by: Stefan Puiu <stefan.puiu@gmail.com>
Acked-by: Yong Wang <yongwang@vmware.com>
2017-01-17 19:40:51 +01:00
Michał Mirosław
f4ff17a465 net/af_packet: guard against buffer overruns in Tx path
Signed-off-by: Michał Mirosław <michal.miroslaw@atendesoftware.pl>
Acked-by: John W. Linville <linville@tuxdriver.com>
2017-01-17 19:40:51 +01:00
Michał Mirosław
b5a8868bde net/af_packet: guard against buffer overruns in Rx path
Signed-off-by: Michał Mirosław <michal.miroslaw@atendesoftware.pl>
Acked-by: John W. Linville <linville@tuxdriver.com>
2017-01-17 19:40:51 +01:00
Piotr Bartosiewicz
c4fdcb6aed net/pcap: fix timestamps in output pcap file
Fixes: 4c173302c3 ("pcap: add new driver")

Signed-off-by: Michał Mirosław <michal.miroslaw@atendesoftware.pl>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-17 19:40:51 +01:00
Ivan Malov
fec33d5bb3 net/sfc: support firmware-assisted TSO
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: Mark Spender <mspender@solarflare.com>
Reviewed-by: Robert Stonehouse <rstonehouse@solarflare.com>
2017-01-17 19:40:51 +01:00
Ivan Malov
32bcfb0a50 net/sfc: update RSS redirection table
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>
2017-01-17 19:40:50 +01:00
Ivan Malov
af0d931797 net/sfc: query RSS redirection table
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>
2017-01-17 19:40:50 +01:00
Ivan Malov
82faef5076 net/sfc: set RSS key and hash types config
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>
2017-01-17 19:40:50 +01:00
Ivan Malov
088e17210a net/sfc: query RSS key and hash types config
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>
2017-01-17 19:40:50 +01:00
Ivan Malov
d9ff551fc9 net/sfc: support RSS hash offload
Extract RSS hash provided by the HW in the prefix and put it to mbuf.

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>
2017-01-17 19:40:50 +01:00
Ivan Malov
4ec1fc3ba8 net/sfc: add basic stubs for RSS support on driver attach
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>
2017-01-17 19:40:50 +01:00
Andrew Rybchenko
e2fd54f28b net/sfc/base: do not use enum type when values are bitmask
ICC complains that enumerated type mixed with another type.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Robert Stonehouse <rstonehouse@solarflare.com>
2017-01-17 19:40:50 +01:00
Ivan Malov
7fd636815a net/sfc: support VLAN offload on transmit path
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>
2017-01-17 19:40:50 +01:00
Ivan Malov
c6a1d9b5ab net/sfc: support deferred start of transmit queues
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>
2017-01-17 19:40:50 +01:00
Ivan Malov
21f6411c89 net/sfc: support Tx free threshold
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>
2017-01-17 19:40:50 +01:00
Ivan Malov
c593883880 net/sfc: get transmit queue information
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>
2017-01-17 19:40:50 +01:00
Andrew Rybchenko
ac7af39692 net/sfc: support deferred start of receive queues
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Robert Stonehouse <rstonehouse@solarflare.com>
2017-01-17 19:40:50 +01:00
Andrew Rybchenko
e0b063941e net/sfc: support scattered Rx DMA
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Robert Stonehouse <rstonehouse@solarflare.com>
2017-01-17 19:40:50 +01:00
Andrew Rybchenko
36d84f87b3 net/sfc: get RxQ descriptor done
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Robert Stonehouse <rstonehouse@solarflare.com>
2017-01-17 19:40:50 +01:00
Andrew Rybchenko
04aa6b9c5f net/sfc: get RxQ pending descriptors count
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Robert Stonehouse <rstonehouse@solarflare.com>
2017-01-17 19:40:50 +01:00