aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2015-04-28 05:34:21 -0400
committerDavid S. Miller <davem@davemloft.net>2015-04-29 14:48:35 -0400
commitd9b9e860cef1d904832bc6e92e444adfeabe49e9 (patch)
tree8c90aa1104f25ca2a1496a541c4f5986c0c97335
parent3f300ff41d89fe9674b8dbab950ba2572639ee8d (diff)
bnx2x: mark LRO as a fixed disabled feature if disable_tpa is set
If disable_tpa is set, remove NETIF_F_LRO from hw_features, so ethtool sees it as "off [fixed]". Note that setting the NETIF_F_LRO bit in dev->features in the 'else' branch is not needed, because the bit was already set by bnx2x_init_dev(). Then the check for disable_tpa in in bnx2x_fix_features() becomes unnecessary. Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c4
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c2
2 files changed, 1 insertions, 5 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index 3558a36b1c2d..dcdbd00d0259 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -4834,10 +4834,6 @@ netdev_features_t bnx2x_fix_features(struct net_device *dev,
4834 features &= ~NETIF_F_GRO; 4834 features &= ~NETIF_F_GRO;
4835 } 4835 }
4836 4836
4837 /* Note: do not disable SW GRO in kernel when HW GRO is off */
4838 if (bp->disable_tpa)
4839 features &= ~NETIF_F_LRO;
4840
4841 return features; 4837 return features;
4842} 4838}
4843 4839
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index b9f85fccb419..2d067c937bd1 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -12108,10 +12108,10 @@ static int bnx2x_init_bp(struct bnx2x *bp)
12108 /* Set TPA flags */ 12108 /* Set TPA flags */
12109 if (bp->disable_tpa) { 12109 if (bp->disable_tpa) {
12110 bp->flags &= ~(TPA_ENABLE_FLAG | GRO_ENABLE_FLAG); 12110 bp->flags &= ~(TPA_ENABLE_FLAG | GRO_ENABLE_FLAG);
12111 bp->dev->hw_features &= ~NETIF_F_LRO;
12111 bp->dev->features &= ~NETIF_F_LRO; 12112 bp->dev->features &= ~NETIF_F_LRO;
12112 } else { 12113 } else {
12113 bp->flags |= (TPA_ENABLE_FLAG | GRO_ENABLE_FLAG); 12114 bp->flags |= (TPA_ENABLE_FLAG | GRO_ENABLE_FLAG);
12114 bp->dev->features |= NETIF_F_LRO;
12115 } 12115 }
12116 12116
12117 if (CHIP_IS_E1(bp)) 12117 if (CHIP_IS_E1(bp))