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]
Message-ID: <558C0641.4000904@cogentembedded.com>
Date:	Thu, 25 Jun 2015 16:46:41 +0300
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Yuval Mintz <Yuval.Mintz@...gic.com>, davem@...emloft.net,
	netdev@...r.kernel.org
CC:	Ariel.Elior@...gic.com
Subject: Re: [PATCH net 6/9] bnx2x: Fix self-test for 20g devices

Hello.

On 06/25/2015 03:19 PM, Yuval Mintz wrote:

> 20g-capable devices are not configured properly for self-test, using
> 10g as their speed which cause the link indication to remain down and
> fail the internal loopback test.

> Signed-off-by: Yuval Mintz <Yuval.Mintz@...gic.com>
> Signed-off-by: Ariel Elior <Ariel.Elior@...gic.com>
> ---
>   drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 12 ++++++++----
>   1 file changed, 8 insertions(+), 4 deletions(-)

> diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
> index c1033a5..3df03bb 100644
> --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
> +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
> @@ -2347,12 +2347,16 @@ int bnx2x_initial_phy_init(struct bnx2x *bp, int load_mode)
>   		if (load_mode == LOAD_DIAG) {
>   			struct link_params *lp = &bp->link_params;
>   			lp->loopback_mode = LOOPBACK_XGXS;
> -			/* do PHY loopback at 10G speed, if possible */
> -			if (lp->req_line_speed[cfx_idx] < SPEED_10000) {
> +			/* Prefer doing PHY loopback at highest speed */
> +			if (lp->req_line_speed[cfx_idx] < SPEED_20000) {
>   				if (lp->speed_cap_mask[cfx_idx] &
> -				    PORT_HW_CFG_SPEED_CAPABILITY_D0_10G)
> +				    PORT_HW_CFG_SPEED_CAPABILITY_D0_20G)
>   					lp->req_line_speed[cfx_idx] =
> -					SPEED_10000;
> +					SPEED_20000;

    I would have added one more tab here.

> +				else if (lp->speed_cap_mask[cfx_idx] &
> +					    PORT_HW_CFG_SPEED_CAPABILITY_D0_10G)

    This line should have been started right under 'lp'.

> +						lp->req_line_speed[cfx_idx] =

    This line is indented too much.

> +						SPEED_10000;

    This line seems alright.

WBR, Sergei

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