From 2e41c56e32c67bd3e3232443f6048d1533cdc40f Mon Sep 17 00:00:00 2001 From: Vladislav Zolotarov Date: Wed, 17 Feb 2010 02:03:40 +0000 Subject: [PATCH] --- yaml --- r: 184293 b: refs/heads/master c: d43a7e67ae2f911765b3d5b6cbb85221a9ffd0a4 h: refs/heads/master i: 184291: a93f9433cf58b0c2f059433788ac3570fd021ca1 v: v3 --- [refs] | 2 +- trunk/drivers/net/bnx2x_main.c | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index cfd69d6df011..3eefa80174e4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f1e1a199f3a68a32cf86095b3650d761ee8798b9 +refs/heads/master: d43a7e67ae2f911765b3d5b6cbb85221a9ffd0a4 diff --git a/trunk/drivers/net/bnx2x_main.c b/trunk/drivers/net/bnx2x_main.c index 16685a153c10..ccdc3fe13414 100644 --- a/trunk/drivers/net/bnx2x_main.c +++ b/trunk/drivers/net/bnx2x_main.c @@ -9968,12 +9968,14 @@ static int bnx2x_set_flags(struct net_device *dev, u32 data) /* TPA requires Rx CSUM offloading */ if ((data & ETH_FLAG_LRO) && bp->rx_csum) { - if (!(dev->features & NETIF_F_LRO)) { - dev->features |= NETIF_F_LRO; - bp->flags |= TPA_ENABLE_FLAG; - changed = 1; - } - + if (!disable_tpa) { + if (!(dev->features & NETIF_F_LRO)) { + dev->features |= NETIF_F_LRO; + bp->flags |= TPA_ENABLE_FLAG; + changed = 1; + } + } else + rc = -EINVAL; } else if (dev->features & NETIF_F_LRO) { dev->features &= ~NETIF_F_LRO; bp->flags &= ~TPA_ENABLE_FLAG;