On 31.03.2019 17:05, Heiner Kallweit wrote:
> On 31.03.2019 16:58, Andrew Lunn wrote:
>>> - In auto-neg case, skip populating lp_advertising if we
>>> don't have a link. This avoids quite some unnecessary
>>> MDIO reads in case of phylib polling mode.
>>
>> Hi Heiner
>>
>> Could it be that we d
From: Heiner Kallweit
Date: Sat, 30 Mar 2019 10:22:45 +0100
> This patch improves few aspects of genphy_read_status():
>
> - Don't initialize lpagb, it's not needed.
>
> - Move initializing phydev->speed et al before the if clause.
>
> - In auto-neg case, skip populating lp_advertising if we
>
On Sun, Mar 31, 2019 at 04:59:13PM +0200, Heiner Kallweit wrote:
> On 31.03.2019 16:52, Andrew Lunn wrote:
> >> - if (AUTONEG_ENABLE == phydev->autoneg) {
> >> + if (phydev->autoneg == AUTONEG_ENABLE && phydev->link) {
> >
> > Hi Heiner
> >
> > I don't necessary agree with placing the constant
On 31.03.2019 16:58, Andrew Lunn wrote:
>> - In auto-neg case, skip populating lp_advertising if we
>> don't have a link. This avoids quite some unnecessary
>> MDIO reads in case of phylib polling mode.
>
> Hi Heiner
>
> Could it be that we don't have a link because what the partner is
> adve
On 31.03.2019 16:52, Andrew Lunn wrote:
>> -if (AUTONEG_ENABLE == phydev->autoneg) {
>> +if (phydev->autoneg == AUTONEG_ENABLE && phydev->link) {
>
> Hi Heiner
>
> I don't necessary agree with placing the constant first in the
> comparison, but it is best practice not to change it when ma
> - In auto-neg case, skip populating lp_advertising if we
> don't have a link. This avoids quite some unnecessary
> MDIO reads in case of phylib polling mode.
Hi Heiner
Could it be that we don't have a link because what the partner is
advertising does not intersect with what we are advertisi
> - if (AUTONEG_ENABLE == phydev->autoneg) {
> + if (phydev->autoneg == AUTONEG_ENABLE && phydev->link) {
Hi Heiner
I don't necessary agree with placing the constant first in the
comparison, but it is best practice not to change it when making
additions. It makes it a little bit harder to
This patch improves few aspects of genphy_read_status():
- Don't initialize lpagb, it's not needed.
- Move initializing phydev->speed et al before the if clause.
- In auto-neg case, skip populating lp_advertising if we
don't have a link. This avoids quite some unnecessary
MDIO reads in case