Subject: Re: [PATCH 1/3] bnx2x: remove TPA_ENABLE_FLAG

From: "Vlad Zolotarov" <[email-masked]>
Date: Wed, 31 Aug 2011 18:16:30 +0300

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))