public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: "Vlad Zolotarov" <vladz@broadcom•com>
To: "Michal Schmidt" <mschmidt@redhat•com>
Cc: "netdev@vger•kernel.org" <netdev@vger•kernel.org>,
	"Dmitry Kravkov" <dmitry@broadcom•com>,
	"Eilon Greenstein" <eilong@broadcom•com>,
	"mirqus@gmail•com" <mirqus@gmail•com>
Subject: Re: [PATCH 1/3] bnx2x: remove TPA_ENABLE_FLAG
Date: Wed, 31 Aug 2011 18:16:30 +0300	[thread overview]
Message-ID: <201108311816.30468.vladz@broadcom.com> (raw)
In-Reply-To: <1314802836-9862-2-git-send-email-mschmidt@redhat.com>

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

  reply	other threads:[~2011-08-31 15:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-31 15:00 [PATCH 0/3 net-next] bnx2x: VLAN stripping toggle and a small cleanup Michal Schmidt
2011-08-31 15:00 ` [PATCH 1/3] bnx2x: remove TPA_ENABLE_FLAG Michal Schmidt
2011-08-31 15:16   ` Vlad Zolotarov [this message]
2011-08-31 15:58     ` Michal Schmidt
2011-08-31 16:13       ` Vladislav Zolotarov
2011-08-31 18:05         ` Michał Mirosław
2011-09-01  8:37           ` Vladislav Zolotarov
2011-09-01  9:37             ` Michał Mirosław
2011-09-01 10:52               ` Vladislav Zolotarov
2011-08-31 16:55     ` Michal Schmidt
2011-08-31 15:00 ` [PATCH 2/3] bnx2x: do not set NETIF_F_LRO in bnx2x_init_bp Michal Schmidt
2011-08-31 15:00 ` [PATCH 3/3] bnx2x: expose HW RX VLAN stripping toggle Michal Schmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201108311816.30468.vladz@broadcom.com \
    --to=vladz@broadcom$(echo .)com \
    --cc=dmitry@broadcom$(echo .)com \
    --cc=eilong@broadcom$(echo .)com \
    --cc=mirqus@gmail$(echo .)com \
    --cc=mschmidt@redhat$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox