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] [thread-next>] [day] [month] [year] [list]
Message-ID: <0a4e999a-05de-4395-a3bf-c4566ee0161e@CMEXHTCAS2.ad.emulex.com>
Date:	Wed, 5 Mar 2014 21:34:36 +0000
From:	Ajit Khaparde <Ajit.Khaparde@...lex.Com>
To:	Ivan Vecera <ivecera@...hat.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:	Sathya Perla <Sathya.Perla@...lex.Com>,
	Subramanian Seetharaman <subbu.seetharaman@...lex.com>,
	"sergei.shtylyov@...entembedded.com" 
	<sergei.shtylyov@...entembedded.com>
Subject: RE: [PATCH net-next v2] be2net: do external loopback test only when
 it is requested

> -----Original Message-----
> From: Ivan Vecera [mailto:ivecera@...hat.com]
> Sent: Wednesday, March 05, 2014 4:54 AM
> To: netdev@...r.kernel.org
> Cc: Sathya Perla; Subramanian Seetharaman; Ajit Khaparde;
> sergei.shtylyov@...entembedded.com
> Subject: [PATCH net-next v2] be2net: do external loopback test only when it
> is requested
> 
> v2: remove unnecessary braces from all 'loopback' if-blocks (thx Sergei)
> 
> Cc: sathya.perla@...lex.com
> Cc: subbu.seetharaman@...lex.com
> Cc: ajit.khaparde@...lex.com
> Cc: sergei.shtylyov@...entembedded.com
> 
> Signed-off-by: Ivan Vecera <ivecera@...hat.com>
Acked-by: Ajit Khaparde <ajit.khaparde@...lex.com> 

> ---
>  drivers/net/ethernet/emulex/benet/be_ethtool.c | 16 +++++++++-------
>  1 file changed, 9 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/net/ethernet/emulex/benet/be_ethtool.c
> b/drivers/net/ethernet/emulex/benet/be_ethtool.c
> index cf09d8f..66759b6 100644
> --- a/drivers/net/ethernet/emulex/benet/be_ethtool.c
> +++ b/drivers/net/ethernet/emulex/benet/be_ethtool.c
> @@ -802,16 +802,18 @@ be_self_test(struct net_device *netdev, struct
> ethtool_test *test, u64 *data)
> 
>  	if (test->flags & ETH_TEST_FL_OFFLINE) {
>  		if (be_loopback_test(adapter, BE_MAC_LOOPBACK,
> -						&data[0]) != 0) {
> +				     &data[0]) != 0)
>  			test->flags |= ETH_TEST_FL_FAILED;
> -		}
> +
>  		if (be_loopback_test(adapter, BE_PHY_LOOPBACK,
> -						&data[1]) != 0) {
> -			test->flags |= ETH_TEST_FL_FAILED;
> -		}
> -		if (be_loopback_test(adapter,
> BE_ONE_PORT_EXT_LOOPBACK,
> -						&data[2]) != 0) {
> +				     &data[1]) != 0)
>  			test->flags |= ETH_TEST_FL_FAILED;
> +
> +		if (test->flags & ETH_TEST_FL_EXTERNAL_LB) {
> +			if (be_loopback_test(adapter,
> BE_ONE_PORT_EXT_LOOPBACK,
> +					     &data[2]) != 0)
> +				test->flags |= ETH_TEST_FL_FAILED;
> +			test->flags |= ETH_TEST_FL_EXTERNAL_LB_DONE;
>  		}
>  	}
> 
> --
> 1.8.3.2

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