lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 6 May 2009 15:04:32 +0300
From:	"Eilon Greenstein" <eilong@...adcom.com>
To:	"Stanislaw Gruszka" <sgruszka@...hat.com>
cc:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH 2/3] bnx2x: assure we release PHY lock only when is
 taken

On Wed, 2009-05-06 at 02:22 -0700, Stanislaw Gruszka wrote:
> Signed-off-by: Stanislaw Gruszka <sgruszka@...hat.com>
> ---
>  drivers/net/bnx2x_main.c |    9 +++++----
>  1 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
> index ff2d9f6..5bd42db 100644
> --- a/drivers/net/bnx2x_main.c
> +++ b/drivers/net/bnx2x_main.c
> @@ -2585,10 +2585,11 @@ static void bnx2x_attn_int_asserted(struct bnx2x *bp, u32 asserted)
>  	REG_WR(bp, hc_addr, asserted);
>  
>  	/* now set back the mask */
> -	if (asserted & ATTN_NIG_FOR_FUNC) {
> -		REG_WR(bp, nig_int_mask_addr, nig_mask);
> -		bnx2x_release_phy_lock(bp);
> -	}
> +	if (asserted & ATTN_HARD_WIRED_MASK)
> +		if (asserted & ATTN_NIG_FOR_FUNC) {
Here are the constants values:
#define ATTN_HARD_WIRED_MASK		0xff00
#define ATTN_NIG_FOR_FUNC		(1L << 8)
So as you can see, there is no need for the extra "if".

Thanks for the patch - but we should not apply it.

> +			REG_WR(bp, nig_int_mask_addr, nig_mask);
> +			bnx2x_release_phy_lock(bp);
> +		}
>  }
>  
>  static inline void bnx2x_attn_int_deasserted0(struct bnx2x *bp, u32 attn)


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

Powered by Openwall GNU/*/Linux Powered by OpenVZ