* [net-next 0/9][pull request] 10GbE Intel Wired LAN Driver Updates 2015-12-24
@ 2015-12-25 5:29 Jeff Kirsher
2015-12-25 5:29 ` [net-next 1/9] ixgbevf: Fix handling of NAPI budget when multiple queues are enabled per vector Jeff Kirsher
` (9 more replies)
0 siblings, 10 replies; 12+ messages in thread
From: Jeff Kirsher @ 2015-12-25 5:29 UTC (permalink / raw)
To: davem; +Cc: Jeff Kirsher, netdev, nhorman, sassmann, jogreene, john.ronciak
This series contains updates to ixgbe and ixgbevf.
William Dauchy provides a fix for ixgbevf that was implemented for ixgbe,
commit 5d6002b7b822c7 ("ixgbe: Fix handling of NAPI budget when multiple
queues are enabled per vector"). The issue was that the polling routine
would increase the budget for receive to at least 1 per queue if multiple
queues were present, which resulted in receive packets being processed
when the budget was 0.
Emil provides minor cleanups for ixgbevf, one being that we need to
check rx_itr_setting with == and not &, since it is not a mask. Added
QSFP PHY support in ixgbe to allow for more accurate reporting of port
settings. Fixed the max RSS limit for X550 which is 63, not 64. Lastly,
fix an issue which was causing PCI AER errors, by fixing the write to
the VLVFR register in ixgbe_clear_vf_vlans() where the word argument
is the actual offset of the register and not the index for the
IXGBE_VLVFB() macro.
Veola fixes ixgbe ethtool reporting of backplane type interfaces as
1000/10000baseT link modes, instead, report the media as KR, KX or KX4
based on the backplane interface present.
Mark cleans up redundancy in the setting of hw_enc_features that makes
it appear that X550 has more encapsulation features than other devices.
Also do not set NETIF_F_SG any longer since that is set by the
register_netdev() call. Also fixed the X550EM_x revision check, which
needs to check a value, not just a bit.
Alex Duyck fixes additional bugs in ixgbe_clear_vf_vlans(), one being
that the mask was using a divide instead of a modulus, which resulted
in the mask bit being incorrectly set to 0 or 1 based on the value of
the VF being tested. Alex also found that he was not consistent in
using the "word" argument as an offset or as a register offset, so
made the code consistently use word as the offset in the array.
The following are changes since commit d7d3e25f40e950bdcec6d94faf9346b7a7d6e4bb:
cxgb4: Remove deprecated module parameters
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue 10GbE
Alexander Duyck (1):
ixgbe: Fix bugs in ixgbe_clear_vf_vlans()
Emil Tantilov (4):
ixgbevf: minor cleanups for ixgbevf_set_itr()
ixgbe: add support for QSFP PHY types in ixgbe_get_settings()
ixgbe: fix RSS limit for X550
ixgbe: fix write to VLVFB in ixgbe_clear_vf_vlans()
Mark Rustad (2):
ixgbe: Clean up redundancy in hw_enc_features
ixgbe: Correct X550EM_x revision check
Veola Nazareth (1):
ixgbe: report correct media type for KR, KX and KX4 interfaces
William Dauchy (1):
ixgbevf: Fix handling of NAPI budget when multiple queues are enabled
per vector
drivers/net/ethernet/intel/ixgbe/ixgbe.h | 2 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 59 ++++++++++++++++++-----
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 7 +--
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 10 ++--
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 2 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 9 ++--
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 7 ++-
7 files changed, 63 insertions(+), 33 deletions(-)
--
2.5.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [net-next 1/9] ixgbevf: Fix handling of NAPI budget when multiple queues are enabled per vector
2015-12-25 5:29 [net-next 0/9][pull request] 10GbE Intel Wired LAN Driver Updates 2015-12-24 Jeff Kirsher
@ 2015-12-25 5:29 ` Jeff Kirsher
2015-12-25 5:29 ` [net-next 2/9] ixgbevf: minor cleanups for ixgbevf_set_itr() Jeff Kirsher
` (8 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Jeff Kirsher @ 2015-12-25 5:29 UTC (permalink / raw)
To: davem; +Cc: William Dauchy, netdev, nhorman, sassmann, jogreene, Jeff Kirsher
From: William Dauchy <william@gandi.net>
This is the same patch as for ixgbe but applied differently according to
busy polling. See commit 5d6002b7b822c74 ("ixgbe: Fix handling of NAPI
budget when multiple queues are enabled per vector")
Signed-off-by: William Dauchy <william@gandi.net>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index f098952..478c0f1 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -1016,6 +1016,8 @@ static int ixgbevf_poll(struct napi_struct *napi, int budget)
ixgbevf_for_each_ring(ring, q_vector->tx)
clean_complete &= ixgbevf_clean_tx_irq(q_vector, ring);
+ if (budget <= 0)
+ return budget;
#ifdef CONFIG_NET_RX_BUSY_POLL
if (!ixgbevf_qv_lock_napi(q_vector))
return budget;
--
2.5.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [net-next 2/9] ixgbevf: minor cleanups for ixgbevf_set_itr()
2015-12-25 5:29 [net-next 0/9][pull request] 10GbE Intel Wired LAN Driver Updates 2015-12-24 Jeff Kirsher
2015-12-25 5:29 ` [net-next 1/9] ixgbevf: Fix handling of NAPI budget when multiple queues are enabled per vector Jeff Kirsher
@ 2015-12-25 5:29 ` Jeff Kirsher
2015-12-25 5:29 ` [net-next 3/9] ixgbe: add support for QSFP PHY types in ixgbe_get_settings() Jeff Kirsher
` (7 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Jeff Kirsher @ 2015-12-25 5:29 UTC (permalink / raw)
To: davem; +Cc: Emil Tantilov, netdev, nhorman, sassmann, jogreene, Jeff Kirsher
From: Emil Tantilov <emil.s.tantilov@intel.com>
adapter->rx_itr_setting is not a mask so check it with == instead of &
do not default to 12K interrupts in ixgbevf_set_itr()
There should be no functional effect from these changes.
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index 478c0f1..3558f01 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -1047,7 +1047,7 @@ static int ixgbevf_poll(struct napi_struct *napi, int budget)
return budget;
/* all work done, exit the polling mode */
napi_complete_done(napi, work_done);
- if (adapter->rx_itr_setting & 1)
+ if (adapter->rx_itr_setting == 1)
ixgbevf_set_itr(q_vector);
if (!test_bit(__IXGBEVF_DOWN, &adapter->state) &&
!test_bit(__IXGBEVF_REMOVING, &adapter->state))
@@ -1250,9 +1250,10 @@ static void ixgbevf_set_itr(struct ixgbevf_q_vector *q_vector)
new_itr = IXGBE_20K_ITR;
break;
case bulk_latency:
- default:
new_itr = IXGBE_12K_ITR;
break;
+ default:
+ break;
}
if (new_itr != q_vector->itr) {
--
2.5.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [net-next 3/9] ixgbe: add support for QSFP PHY types in ixgbe_get_settings()
2015-12-25 5:29 [net-next 0/9][pull request] 10GbE Intel Wired LAN Driver Updates 2015-12-24 Jeff Kirsher
2015-12-25 5:29 ` [net-next 1/9] ixgbevf: Fix handling of NAPI budget when multiple queues are enabled per vector Jeff Kirsher
2015-12-25 5:29 ` [net-next 2/9] ixgbevf: minor cleanups for ixgbevf_set_itr() Jeff Kirsher
@ 2015-12-25 5:29 ` Jeff Kirsher
2015-12-25 5:29 ` [net-next 4/9] ixgbe: report correct media type for KR, KX and KX4 interfaces Jeff Kirsher
` (6 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Jeff Kirsher @ 2015-12-25 5:29 UTC (permalink / raw)
To: davem; +Cc: Emil Tantilov, netdev, nhorman, sassmann, jogreene, Jeff Kirsher
From: Emil Tantilov <emil.s.tantilov@intel.com>
Add missing QSFP PHY types to allow for more accurate reporting of
port settings.
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
index 1ed4c9a..e10d197 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
@@ -225,6 +225,10 @@ static int ixgbe_get_settings(struct net_device *netdev,
case ixgbe_phy_sfp_avago:
case ixgbe_phy_sfp_intel:
case ixgbe_phy_sfp_unknown:
+ case ixgbe_phy_qsfp_passive_unknown:
+ case ixgbe_phy_qsfp_active_unknown:
+ case ixgbe_phy_qsfp_intel:
+ case ixgbe_phy_qsfp_unknown:
/* SFP+ devices, further checking needed */
switch (adapter->hw.phy.sfp_type) {
case ixgbe_sfp_type_da_cu:
--
2.5.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [net-next 4/9] ixgbe: report correct media type for KR, KX and KX4 interfaces
2015-12-25 5:29 [net-next 0/9][pull request] 10GbE Intel Wired LAN Driver Updates 2015-12-24 Jeff Kirsher
` (2 preceding siblings ...)
2015-12-25 5:29 ` [net-next 3/9] ixgbe: add support for QSFP PHY types in ixgbe_get_settings() Jeff Kirsher
@ 2015-12-25 5:29 ` Jeff Kirsher
2015-12-25 5:29 ` [net-next 5/9] ixgbe: Clean up redundancy in hw_enc_features Jeff Kirsher
` (5 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Jeff Kirsher @ 2015-12-25 5:29 UTC (permalink / raw)
To: davem; +Cc: Veola Nazareth, netdev, nhorman, sassmann, jogreene, Jeff Kirsher
From: Veola Nazareth <veola.nazareth@intel.com>
Ethtool reports backplane type interfaces as 1000/10000baseT link modes.
This has been corrected to report the media as KR, KX or KX4 based on the
backplane interface present.
Signed-off-by: Veola Nazareth <veola.nazareth@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 55 ++++++++++++++++++------
1 file changed, 42 insertions(+), 13 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
index e10d197..2448eba 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
@@ -151,6 +151,34 @@ static const char ixgbe_gstrings_test[][ETH_GSTRING_LEN] = {
};
#define IXGBE_TEST_LEN sizeof(ixgbe_gstrings_test) / ETH_GSTRING_LEN
+/* currently supported speeds for 10G */
+#define ADVRTSD_MSK_10G (SUPPORTED_10000baseT_Full | \
+ SUPPORTED_10000baseKX4_Full | \
+ SUPPORTED_10000baseKR_Full)
+
+#define ixgbe_isbackplane(type) ((type) == ixgbe_media_type_backplane)
+
+static u32 ixgbe_get_supported_10gtypes(struct ixgbe_hw *hw)
+{
+ if (!ixgbe_isbackplane(hw->phy.media_type))
+ return SUPPORTED_10000baseT_Full;
+
+ switch (hw->device_id) {
+ case IXGBE_DEV_ID_82598:
+ case IXGBE_DEV_ID_82599_KX4:
+ case IXGBE_DEV_ID_82599_KX4_MEZZ:
+ case IXGBE_DEV_ID_X550EM_X_KX4:
+ return SUPPORTED_10000baseKX4_Full;
+ case IXGBE_DEV_ID_82598_BX:
+ case IXGBE_DEV_ID_82599_KR:
+ case IXGBE_DEV_ID_X550EM_X_KR:
+ return SUPPORTED_10000baseKR_Full;
+ default:
+ return SUPPORTED_10000baseKX4_Full |
+ SUPPORTED_10000baseKR_Full;
+ }
+}
+
static int ixgbe_get_settings(struct net_device *netdev,
struct ethtool_cmd *ecmd)
{
@@ -165,29 +193,30 @@ static int ixgbe_get_settings(struct net_device *netdev,
/* set the supported link speeds */
if (supported_link & IXGBE_LINK_SPEED_10GB_FULL)
- ecmd->supported |= SUPPORTED_10000baseT_Full;
+ ecmd->supported |= ixgbe_get_supported_10gtypes(hw);
if (supported_link & IXGBE_LINK_SPEED_1GB_FULL)
ecmd->supported |= SUPPORTED_1000baseT_Full;
if (supported_link & IXGBE_LINK_SPEED_100_FULL)
- ecmd->supported |= SUPPORTED_100baseT_Full;
+ ecmd->supported |= ixgbe_isbackplane(hw->phy.media_type) ?
+ SUPPORTED_1000baseKX_Full :
+ SUPPORTED_1000baseT_Full;
+ /* default advertised speed if phy.autoneg_advertised isn't set */
+ ecmd->advertising = ecmd->supported;
/* set the advertised speeds */
if (hw->phy.autoneg_advertised) {
+ ecmd->advertising = 0;
if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_100_FULL)
ecmd->advertising |= ADVERTISED_100baseT_Full;
if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_10GB_FULL)
- ecmd->advertising |= ADVERTISED_10000baseT_Full;
- if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_1GB_FULL)
- ecmd->advertising |= ADVERTISED_1000baseT_Full;
+ ecmd->advertising |= ecmd->supported & ADVRTSD_MSK_10G;
+ if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_1GB_FULL) {
+ if (ecmd->supported & SUPPORTED_1000baseKX_Full)
+ ecmd->advertising |= ADVERTISED_1000baseKX_Full;
+ else
+ ecmd->advertising |= ADVERTISED_1000baseT_Full;
+ }
} else {
- /* default modes in case phy.autoneg_advertised isn't set */
- if (supported_link & IXGBE_LINK_SPEED_10GB_FULL)
- ecmd->advertising |= ADVERTISED_10000baseT_Full;
- if (supported_link & IXGBE_LINK_SPEED_1GB_FULL)
- ecmd->advertising |= ADVERTISED_1000baseT_Full;
- if (supported_link & IXGBE_LINK_SPEED_100_FULL)
- ecmd->advertising |= ADVERTISED_100baseT_Full;
-
if (hw->phy.multispeed_fiber && !autoneg) {
if (supported_link & IXGBE_LINK_SPEED_10GB_FULL)
ecmd->advertising = ADVERTISED_10000baseT_Full;
--
2.5.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [net-next 5/9] ixgbe: Clean up redundancy in hw_enc_features
2015-12-25 5:29 [net-next 0/9][pull request] 10GbE Intel Wired LAN Driver Updates 2015-12-24 Jeff Kirsher
` (3 preceding siblings ...)
2015-12-25 5:29 ` [net-next 4/9] ixgbe: report correct media type for KR, KX and KX4 interfaces Jeff Kirsher
@ 2015-12-25 5:29 ` Jeff Kirsher
2015-12-25 5:29 ` [net-next 6/9] ixgbe: fix RSS limit for X550 Jeff Kirsher
` (4 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Jeff Kirsher @ 2015-12-25 5:29 UTC (permalink / raw)
To: davem; +Cc: Mark Rustad, netdev, nhorman, sassmann, jogreene, Jeff Kirsher
From: Mark Rustad <mark.d.rustad@intel.com>
Clean up minor redundancy in the setting of hw_enc_features that
makes it appears that X550 uniquely has more encapsulation features
than other devices. The driver only supports one more feature, so
make it look that way. No longer set NETIF_F_SG since that is set
by the register_netdev call. Thanks to Alex Duyck for noticing this
slight confusion.
Reported-by: Alexander Duyck <aduyck@mirantis.com>
Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index c5c0fb4..ea9537d 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -9015,8 +9015,7 @@ skip_sriov:
netdev->vlan_features |= NETIF_F_IPV6_CSUM;
netdev->vlan_features |= NETIF_F_SG;
- netdev->hw_enc_features |= NETIF_F_SG | NETIF_F_IP_CSUM |
- NETIF_F_IPV6_CSUM;
+ netdev->hw_enc_features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM;
netdev->priv_flags |= IFF_UNICAST_FLT;
netdev->priv_flags |= IFF_SUPP_NOFCS;
@@ -9025,9 +9024,7 @@ skip_sriov:
switch (adapter->hw.mac.type) {
case ixgbe_mac_X550:
case ixgbe_mac_X550EM_x:
- netdev->hw_enc_features |= NETIF_F_RXCSUM |
- NETIF_F_IP_CSUM |
- NETIF_F_IPV6_CSUM;
+ netdev->hw_enc_features |= NETIF_F_RXCSUM;
break;
default:
break;
--
2.5.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [net-next 6/9] ixgbe: fix RSS limit for X550
2015-12-25 5:29 [net-next 0/9][pull request] 10GbE Intel Wired LAN Driver Updates 2015-12-24 Jeff Kirsher
` (4 preceding siblings ...)
2015-12-25 5:29 ` [net-next 5/9] ixgbe: Clean up redundancy in hw_enc_features Jeff Kirsher
@ 2015-12-25 5:29 ` Jeff Kirsher
2015-12-25 5:29 ` [net-next 7/9] ixgbe: Correct X550EM_x revision check Jeff Kirsher
` (3 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Jeff Kirsher @ 2015-12-25 5:29 UTC (permalink / raw)
To: davem; +Cc: Emil Tantilov, netdev, nhorman, sassmann, jogreene, Jeff Kirsher
From: Emil Tantilov <emil.s.tantilov@intel.com>
X550 allows for up to 64 RSS queues, but the driver can have max
of 63 (-1 MSIX vector for link).
On systems with >= 64 CPUs the driver will set the redirection table
for all 64 queues which will result in packets being dropped.
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
index f4c9a42..4b9156c 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
@@ -317,7 +317,7 @@ enum ixgbe_ring_f_enum {
};
#define IXGBE_MAX_RSS_INDICES 16
-#define IXGBE_MAX_RSS_INDICES_X550 64
+#define IXGBE_MAX_RSS_INDICES_X550 63
#define IXGBE_MAX_VMDQ_INDICES 64
#define IXGBE_MAX_FDIR_INDICES 63 /* based on q_vector limit */
#define IXGBE_MAX_FCOE_INDICES 8
--
2.5.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [net-next 7/9] ixgbe: Correct X550EM_x revision check
2015-12-25 5:29 [net-next 0/9][pull request] 10GbE Intel Wired LAN Driver Updates 2015-12-24 Jeff Kirsher
` (5 preceding siblings ...)
2015-12-25 5:29 ` [net-next 6/9] ixgbe: fix RSS limit for X550 Jeff Kirsher
@ 2015-12-25 5:29 ` Jeff Kirsher
2015-12-25 5:29 ` [net-next 8/9] ixgbe: fix write to VLVFB in ixgbe_clear_vf_vlans() Jeff Kirsher
` (2 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Jeff Kirsher @ 2015-12-25 5:29 UTC (permalink / raw)
To: davem; +Cc: Mark Rustad, netdev, nhorman, sassmann, jogreene, Jeff Kirsher
From: Mark Rustad <mark.d.rustad@intel.com>
The X550EM_x revision check needs to check a value, not just a bit.
Use a mask and check the value. Also remove the redundant check
inside the ixgbe_enter_lplu_t_x550em, because it can only be called
when both the mac type and revision check pass.
Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 2 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 9 +++------
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
index 06add27..5f53cc6 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
@@ -3520,7 +3520,7 @@ struct ixgbe_info {
#define IXGBE_FUSES0_GROUP(_i) (0x11158 + ((_i) * 4))
#define IXGBE_FUSES0_300MHZ BIT(5)
-#define IXGBE_FUSES0_REV1 BIT(6)
+#define IXGBE_FUSES0_REV_MASK (3 << 6)
#define IXGBE_KRM_PORT_CAR_GEN_CTRL(P) ((P) ? 0x8010 : 0x4010)
#define IXGBE_KRM_LINK_CTRL_1(P) ((P) ? 0x820C : 0x420C)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
index f4ef0d1..87aca3f 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
@@ -1857,10 +1857,6 @@ static s32 ixgbe_enter_lplu_t_x550em(struct ixgbe_hw *hw)
u32 save_autoneg;
bool link_up;
- /* SW LPLU not required on later HW revisions. */
- if (IXGBE_FUSES0_REV1 & IXGBE_READ_REG(hw, IXGBE_FUSES0_GROUP(0)))
- return 0;
-
/* If blocked by MNG FW, then don't restart AN */
if (ixgbe_check_reset_blocked(hw))
return 0;
@@ -2000,8 +1996,9 @@ static s32 ixgbe_init_phy_ops_X550em(struct ixgbe_hw *hw)
ixgbe_setup_internal_phy_t_x550em;
/* setup SW LPLU only for first revision */
- if (!(IXGBE_FUSES0_REV1 & IXGBE_READ_REG(hw,
- IXGBE_FUSES0_GROUP(0))))
+ if (hw->mac.type == ixgbe_mac_X550EM_x &&
+ !(IXGBE_READ_REG(hw, IXGBE_FUSES0_GROUP(0)) &
+ IXGBE_FUSES0_REV_MASK))
phy->ops.enter_lplu = ixgbe_enter_lplu_t_x550em;
phy->ops.handle_lasi = ixgbe_handle_lasi_ext_t_x550em;
--
2.5.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [net-next 8/9] ixgbe: fix write to VLVFB in ixgbe_clear_vf_vlans()
2015-12-25 5:29 [net-next 0/9][pull request] 10GbE Intel Wired LAN Driver Updates 2015-12-24 Jeff Kirsher
` (6 preceding siblings ...)
2015-12-25 5:29 ` [net-next 7/9] ixgbe: Correct X550EM_x revision check Jeff Kirsher
@ 2015-12-25 5:29 ` Jeff Kirsher
2015-12-25 15:33 ` Tantilov, Emil S
2015-12-25 5:29 ` [net-next 9/9] ixgbe: Fix bugs " Jeff Kirsher
2015-12-26 4:34 ` [net-next 0/9][pull request] 10GbE Intel Wired LAN Driver Updates 2015-12-24 David Miller
9 siblings, 1 reply; 12+ messages in thread
From: Jeff Kirsher @ 2015-12-25 5:29 UTC (permalink / raw)
To: davem; +Cc: Emil Tantilov, netdev, nhorman, sassmann, jogreene, Jeff Kirsher
From: Emil Tantilov <emil.s.tantilov@intel.com>
Fix the write to the VLVFB register in ixgbe_clear_vf_vlans() where
word is the actual offset of the register and not the index for the
IXGBE_VLVFB macro.
This was causing PCI AER errors on my system.
Fixes: 4c7f35f679f592804736f9303051257de2c9f021
("ixgbe: Clean stale VLANs when changing port VLAN or resetting")
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
index eeff3d0..fd918da 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
@@ -640,7 +640,7 @@ update_vlvf:
IXGBE_WRITE_REG(hw, IXGBE_VLVF(i), 0);
update_vlvfb:
/* clear pool bits */
- IXGBE_WRITE_REG(hw, IXGBE_VLVFB(word), vlvfb);
+ IXGBE_WRITE_REG(hw, word, vlvfb);
}
}
--
2.5.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [net-next 9/9] ixgbe: Fix bugs in ixgbe_clear_vf_vlans()
2015-12-25 5:29 [net-next 0/9][pull request] 10GbE Intel Wired LAN Driver Updates 2015-12-24 Jeff Kirsher
` (7 preceding siblings ...)
2015-12-25 5:29 ` [net-next 8/9] ixgbe: fix write to VLVFB in ixgbe_clear_vf_vlans() Jeff Kirsher
@ 2015-12-25 5:29 ` Jeff Kirsher
2015-12-26 4:34 ` [net-next 0/9][pull request] 10GbE Intel Wired LAN Driver Updates 2015-12-24 David Miller
9 siblings, 0 replies; 12+ messages in thread
From: Jeff Kirsher @ 2015-12-25 5:29 UTC (permalink / raw)
To: davem; +Cc: Alexander Duyck, netdev, nhorman, sassmann, jogreene,
Jeff Kirsher
From: Alexander Duyck <aduyck@mirantis.com>
When I had rewritten the code for ixgbe_clear_vf_vlans() it looks like I
had transitioned back and forth between using word as an offset and using
word as a register offset. As a result I honestly don't see how the code
was working before other than the fact that resetting the VLANs on the VF
like didn't do much to clear them.
Another issue found is that the mask was using a divide instead of a
modulus. As a result the mask bit was incorrectly being set to either bit
0 or 1 based on the value of the VF being tested. As a result the wrong
VFs were having their VLANs cleared if they were enabled.
I have updated the code so that word represents the offset in the array.
This way we can use the modulus and xor operations and they will make sense
instead of being performed on a 4 byte aligned value.
I replaced the statement "(word % 2) ^ 1" with "~word % 2" in order to
reduce the line length as the line exceeded 80 characters with the register
name inserted. The two should be equivalent so the change should be safe.
Reported-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
index fd918da..c817103 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
@@ -593,11 +593,11 @@ static void ixgbe_clear_vf_vlans(struct ixgbe_adapter *adapter, u32 vf)
/* post increment loop, covers VLVF_ENTRIES - 1 to 0 */
for (i = IXGBE_VLVF_ENTRIES; i--;) {
- u32 word = IXGBE_VLVFB(i * 2 + vf / 32);
u32 bits[2], vlvfb, vid, vfta, vlvf;
- u32 mask = 1 << (vf / 32);
+ u32 word = i * 2 + vf / 32;
+ u32 mask = 1 << (vf % 32);
- vlvfb = IXGBE_READ_REG(hw, word);
+ vlvfb = IXGBE_READ_REG(hw, IXGBE_VLVFB(word));
/* if our bit isn't set we can skip it */
if (!(vlvfb & mask))
@@ -608,7 +608,7 @@ static void ixgbe_clear_vf_vlans(struct ixgbe_adapter *adapter, u32 vf)
/* create 64b mask to chedk to see if we should clear VLVF */
bits[word % 2] = vlvfb;
- bits[(word % 2) ^ 1] = IXGBE_READ_REG(hw, word ^ 1);
+ bits[~word % 2] = IXGBE_READ_REG(hw, IXGBE_VLVFB(word ^ 1));
/* if promisc is enabled, PF will be present, leave VFTA */
if (adapter->flags2 & IXGBE_FLAG2_VLAN_PROMISC) {
--
2.5.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* RE: [net-next 8/9] ixgbe: fix write to VLVFB in ixgbe_clear_vf_vlans()
2015-12-25 5:29 ` [net-next 8/9] ixgbe: fix write to VLVFB in ixgbe_clear_vf_vlans() Jeff Kirsher
@ 2015-12-25 15:33 ` Tantilov, Emil S
0 siblings, 0 replies; 12+ messages in thread
From: Tantilov, Emil S @ 2015-12-25 15:33 UTC (permalink / raw)
To: Kirsher, Jeffrey T, davem@davemloft.net
Cc: netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
jogreene@redhat.com, Alexander Duyck
>-----Original Message-----
>From: Kirsher, Jeffrey T
>Sent: Thursday, December 24, 2015 9:30 PM
>To: davem@davemloft.net
>Cc: Tantilov, Emil S; netdev@vger.kernel.org; nhorman@redhat.com;
>sassmann@redhat.com; jogreene@redhat.com; Kirsher, Jeffrey T
>Subject: [net-next 8/9] ixgbe: fix write to VLVFB in ixgbe_clear_vf_vlans()
>
>From: Emil Tantilov <emil.s.tantilov@intel.com>
>
>Fix the write to the VLVFB register in ixgbe_clear_vf_vlans() where
>word is the actual offset of the register and not the index for the
>IXGBE_VLVFB macro.
>
>This was causing PCI AER errors on my system.
>
>Fixes: 4c7f35f679f592804736f9303051257de2c9f021
>("ixgbe: Clean stale VLANs when changing port VLAN or resetting")
>
>Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
>Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
>Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>---
> drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
>b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
>index eeff3d0..fd918da 100644
>--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
>+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
>@@ -640,7 +640,7 @@ update_vlvf:
> IXGBE_WRITE_REG(hw, IXGBE_VLVF(i), 0);
> update_vlvfb:
> /* clear pool bits */
>- IXGBE_WRITE_REG(hw, IXGBE_VLVFB(word), vlvfb);
>+ IXGBE_WRITE_REG(hw, word, vlvfb);
> }
> }
>
>--
>2.5.0
Alex submitted another patch for this function that should've been
used instead as it also resolves an issue with the mask.
Thanks,
Emil
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [net-next 0/9][pull request] 10GbE Intel Wired LAN Driver Updates 2015-12-24
2015-12-25 5:29 [net-next 0/9][pull request] 10GbE Intel Wired LAN Driver Updates 2015-12-24 Jeff Kirsher
` (8 preceding siblings ...)
2015-12-25 5:29 ` [net-next 9/9] ixgbe: Fix bugs " Jeff Kirsher
@ 2015-12-26 4:34 ` David Miller
9 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2015-12-26 4:34 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, nhorman, sassmann, jogreene, john.ronciak
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Thu, 24 Dec 2015 21:29:47 -0800
> This series contains updates to ixgbe and ixgbevf.
Looks like patch #8 needs an update, so I'll wait for your
respin of this series.
Thanks.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2015-12-26 4:34 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-25 5:29 [net-next 0/9][pull request] 10GbE Intel Wired LAN Driver Updates 2015-12-24 Jeff Kirsher
2015-12-25 5:29 ` [net-next 1/9] ixgbevf: Fix handling of NAPI budget when multiple queues are enabled per vector Jeff Kirsher
2015-12-25 5:29 ` [net-next 2/9] ixgbevf: minor cleanups for ixgbevf_set_itr() Jeff Kirsher
2015-12-25 5:29 ` [net-next 3/9] ixgbe: add support for QSFP PHY types in ixgbe_get_settings() Jeff Kirsher
2015-12-25 5:29 ` [net-next 4/9] ixgbe: report correct media type for KR, KX and KX4 interfaces Jeff Kirsher
2015-12-25 5:29 ` [net-next 5/9] ixgbe: Clean up redundancy in hw_enc_features Jeff Kirsher
2015-12-25 5:29 ` [net-next 6/9] ixgbe: fix RSS limit for X550 Jeff Kirsher
2015-12-25 5:29 ` [net-next 7/9] ixgbe: Correct X550EM_x revision check Jeff Kirsher
2015-12-25 5:29 ` [net-next 8/9] ixgbe: fix write to VLVFB in ixgbe_clear_vf_vlans() Jeff Kirsher
2015-12-25 15:33 ` Tantilov, Emil S
2015-12-25 5:29 ` [net-next 9/9] ixgbe: Fix bugs " Jeff Kirsher
2015-12-26 4:34 ` [net-next 0/9][pull request] 10GbE Intel Wired LAN Driver Updates 2015-12-24 David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).