From: Florian Fainelli <f.fainelli@gmail•com>
To: Woojung.Huh@microchip•com, davem@davemloft•net
Cc: netdev@vger•kernel.org, opendmb@gmail•com
Subject: Re: [PATCH net-next 2/3] lan78xx: setting phy features in phy driver
Date: Wed, 10 Feb 2016 20:05:47 -0800 [thread overview]
Message-ID: <56BC089B.6090309@gmail.com> (raw)
In-Reply-To: <9235D6609DB808459E95D78E17F2E43D404ABB4D@CHN-SV-EXMX02.mchp-main.com>
On 10/02/2016 15:18, Woojung.Huh@microchip•com wrote:
>>> +static int lan88xx_config_init(struct phy_device *phydev)
>>> +{
>>> + phydev->supported &= phydev->drv->features;
>>> + phydev->advertising &= phydev->drv->features;
>>
>> This looks suspicious, phy_probe() takes the driver supported features
>> and assigns it to phydev->supported, and phydev->advertising, is not
>> that working somehow?
>>
>> genphy_config_init() does look at the current MII_BMRS value to
>> determine what is supported by the PHY, and masks it in
>> phydev->supported, so that could indeed be an issue if we had not had a
>> change to mask with the supported modes before.
>>
>> I think we need more explanation here as to what kind of bug you may
>> have been observing, there could be one.
>
> SUPPORTED_Pause & SUPPORTED_Asym_Pause set at phydev->features are removed by genphy_config_init().
> As you pointed, it may be better to modify genphy_config_init() than each driver's config_init routine.
I see, that is definitively a bug, we should not clear these bits if the
Ethernet MAC driver asked for them.
next prev parent reply other threads:[~2016-02-11 4:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-10 21:13 [PATCH net-next 2/3] lan78xx: setting phy features in phy driver Woojung.Huh
2016-02-10 22:59 ` Florian Fainelli
2016-02-10 23:18 ` Woojung.Huh
2016-02-11 4:05 ` Florian Fainelli [this message]
2016-02-11 15:17 ` Woojung.Huh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56BC089B.6090309@gmail.com \
--to=f.fainelli@gmail$(echo .)com \
--cc=Woojung.Huh@microchip$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=netdev@vger$(echo .)kernel.org \
--cc=opendmb@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox