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: <c8f4f203-b2b6-81ba-2c79-85501a640948@gmail.com>
Date:   Sat, 20 Oct 2018 17:51:42 +0200
From:   Heiner Kallweit <hkallweit1@...il.com>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     Florian Fainelli <f.fainelli@...il.com>,
        LABBE Corentin <clabbe@...libre.com>, davem@...emloft.net,
        fugang.duan@....com, linux-kernel@...r.kernel.org,
        netdev@...r.kernel.org
Subject: Re: [PATCH] net: ethernet: fec: Add missing SPEED_

On 20.10.2018 17:39, Andrew Lunn wrote:
>>>> I have patched by adding:
>>>> phy_remove_link_mode(phy_dev, ETHTOOL_LINK_MODE_Asym_Pause_BIT);
>>
>> Instead of programmatically removing the feature bit it should be
>> possible to do this in the PHY driver configuration. See also
>> this part of phy_probe().
>>
>> 	if (phydrv->features & (SUPPORTED_Pause | SUPPORTED_Asym_Pause)) {
>> 		phydev->supported &= ~(SUPPORTED_Pause | SUPPORTED_Asym_Pause);
>> 		phydev->supported |= phydrv->features &
>> 				     (SUPPORTED_Pause | SUPPORTED_Asym_Pause);
>> 	} else {
>> 		phydev->supported |= SUPPORTED_Pause | SUPPORTED_Asym_Pause;
>> 	}
> 
> Sorry for the late reply. Been on vacation.
> 
> I need to check the datasheet, but it seems like the KSZ9021 does not
> support asym pause. Using the above code is the correct way to solve
> this problem. Look at the bcm63xx.c:bcm63xx_config_init() which does
> this.
> 
I dare to dispute here ;) Above code snippet from phy_probe() will
(try to) set also SUPPORTED_Asym_Pause, because phydrv->features
doesn't include any of the two pause flags.
The statement in bcm63xx_config_init you refer to seems to be a
no-op to me therefore.

I'd say the correct way is to change the PHY config like this:
.features	= PHY_BASIC_FEATURES | SUPPORTED_Pause;
It's exactly the use case the code snippet above covers.

I think the bcm63xx driver would need to be changed.

> I will cook up a patch.
> 
>   Andrew
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ