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: <56F524FB.5080202@cogentembedded.com>
Date:	Fri, 25 Mar 2016 14:46:03 +0300
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Corcodel Marian <asd@...ian1000.go.ro>, netdev@...r.kernel.org
Cc:	Francois Romieu <romieu@...zoreil.com>
Subject: Re: [PATCH net-next v3.16]r8169: Implement definitions from
 linux/mii.h header

Hello.

On 3/25/2016 1:25 PM, Corcodel Marian wrote:

>   Add definitions from mii and inhibit 0 to advertise.
>
> Signed-off-by: Corcodel Marian <asd@...ian1000.go.ro>
> ---
>   drivers/net/ethernet/realtek/r8169.c | 22 ++++++----------------
>   1 file changed, 6 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
> index a57b650..a450656 100644
> --- a/drivers/net/ethernet/realtek/r8169.c
> +++ b/drivers/net/ethernet/realtek/r8169.c
> @@ -1679,29 +1679,19 @@ static int rtl8169_set_speed_xmii(struct net_device *dev,
>   		int auto_nego;
>
>   		auto_nego = rtl_readphy(tp, MII_ADVERTISE);
> -		auto_nego &= ~(ADVERTISE_10HALF | ADVERTISE_10FULL |
> -				ADVERTISE_100HALF | ADVERTISE_100FULL);
> -
> -		if (adv & ADVERTISED_10baseT_Half)
> -			auto_nego |= ADVERTISE_10HALF;
> -		if (adv & ADVERTISED_10baseT_Full)
> -			auto_nego |= ADVERTISE_10FULL;
> -		if (adv & ADVERTISED_100baseT_Half)
> -			auto_nego |= ADVERTISE_100HALF;
> -		if (adv & ADVERTISED_100baseT_Full)
> -			auto_nego |= ADVERTISE_100FULL;
> +		auto_nego &= ~(0 | ADVERTISE_10HALF | ADVERTISE_10FULL |

    ORing with 0 doesn't change the result.

> +				ADVERTISE_100HALF | ADVERTISE_100FULL |
> +				ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM);
>
> +		auto_nego |= ethtool_adv_to_mii_adv_t(adv);
>   		auto_nego |= ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM;
>
>   		giga_ctrl = rtl_readphy(tp, MII_CTRL1000);
> -		giga_ctrl &= ~(ADVERTISE_1000FULL | ADVERTISE_1000HALF);
> +		giga_ctrl &= ~(0 | ADVERTISE_1000FULL | ADVERTISE_1000HALF);

    Likewise.

[...]

MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ