[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201108311816.30468.vladz@broadcom.com>
Date: Wed, 31 Aug 2011 18:16:30 +0300
From: "Vlad Zolotarov" <vladz@...adcom.com>
To: "Michal Schmidt" <mschmidt@...hat.com>
cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"Dmitry Kravkov" <dmitry@...adcom.com>,
"Eilon Greenstein" <eilong@...adcom.com>,
"mirqus@...il.com" <mirqus@...il.com>
Subject: Re: [PATCH 1/3] bnx2x: remove TPA_ENABLE_FLAG
On Wednesday 31 August 2011 18:00:34 Michal Schmidt wrote:
> if (bnx2x_reload) {
> - if (bp->recovery_state == BNX2X_RECOVERY_DONE)
> + if (bp->recovery_state == BNX2X_RECOVERY_DONE) {
> + /*
> + * Cheat! Normally dev->features will be set after we
> + * return, but that's too late. We need to know how to
> + * configure the NIC when reloading it, so update
> + * the features early.
> + */
> + dev->features = features;
> return bnx2x_reload_if_running(dev);
NACK
This is bogus - what if bnx2x_reload_if_running(dev) (bnx2x_nic_load())
failes? The original dev->features would be lost... Pls., see my latest
response on your previouse patch series thread.
thanks,
vlad
> + }
> /* else: bnx2x_nic_load() will be called at end of recovery */
> }
>
> diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
> b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index e7b584b..fd32c04
> 100644
> --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
> +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
> @@ -9757,13 +9757,10 @@ static int __devinit bnx2x_init_bp(struct bnx2x
> *bp) bp->multi_mode = multi_mode;
>
> /* Set TPA flags */
> - if (disable_tpa) {
> - bp->flags &= ~TPA_ENABLE_FLAG;
> + if (disable_tpa)
> bp->dev->features &= ~NETIF_F_LRO;
> - } else {
> - bp->flags |= TPA_ENABLE_FLAG;
> + else
> bp->dev->features |= NETIF_F_LRO;
> - }
> bp->disable_tpa = disable_tpa;
>
> if (CHIP_IS_E1(bp))
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists