Netdev List
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: "Sean Nyekjær" <sean.nyekjaer@prevas.dk>, "Andrew Lunn" <andrew@lunn.ch>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH v1] net: phy: micrel: add KSZ8795 ethernet switch
Date: Thu, 26 Jan 2017 10:36:17 -0800	[thread overview]
Message-ID: <3098087b-f58b-c1c3-34be-d14aa1818e7e@gmail.com> (raw)
In-Reply-To: <732c14ff-f0cf-67d5-bcf9-cbbf9a4391b3@prevas.dk>

On 01/26/2017 09:51 AM, Sean Nyekjær wrote:
> 
> 
> On 2017-01-23 16:12, Andrew Lunn wrote:
>> On Mon, Jan 23, 2017 at 08:58:46AM +0100, Sean Nyekjaer wrote:
>>> This is add support for the PHYs in the KSZ8795 5port managed switch.
>>>
>>> It will allow to detect the link between the switch and the soc
>>> and uses the same read_status functions as the KSZ8873MLL switch.
>>>
>>> This ethernet switch have unfortunately the same phy id as KSZ8051.
>>>
>>> Signed-off-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
>>> ---
>>>   drivers/net/phy/micrel.c   | 14 ++++++++++++++
>>>   include/linux/micrel_phy.h |  2 ++
>>>   2 files changed, 16 insertions(+)
>>>
>>> diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
>>> index ea92d524d5a8..fa158ae5115b 100644
>>> --- a/drivers/net/phy/micrel.c
>>> +++ b/drivers/net/phy/micrel.c
>>> @@ -1014,6 +1014,20 @@ static struct phy_driver ksphy_driver[] = {
>>>       .get_stats    = kszphy_get_stats,
>>>       .suspend    = genphy_suspend,
>>>       .resume        = genphy_resume,
>>> +}, {
>>> +    .phy_id        = PHY_ID_KSZ8795,
>>> +    .phy_id_mask    = MICREL_PHY_ID_MASK,
>>> +    .name        = "Micrel KSZ8795 Switch",
>> This name is confusing. You are adding support for the PHYs embedded
>> in the switch, not the switch itself. The phylib has no idea these
>> PHYs are inside a switch. It does not matter. It is just a PHY. Please
>> drop the word "Switch".
>>
>> Thanks
>>     Andrew
> Okay i'll understand :-)
> I remove the word "Switch" from the commit message and phy name.
> The rest is okay?
> What is generally being done when to phy's have the same id, micrel have
> done this many times...

You need unique names, we have a case like that in
drivers/net/phy/bcm7xxx.c for the 7439 PHY where it exists with two
different IDs, so the first one is named "Broadcom BCM7439" and the
second one is named "Broadcom BCM7439 (2)", feel free to adopt the same
convention, or something else.

The rest of your patch is okay.
-- 
Florian

      parent reply	other threads:[~2017-01-26 18:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-23  7:58 [PATCH v1] net: phy: micrel: add KSZ8795 ethernet switch Sean Nyekjaer
2017-01-23 15:12 ` Andrew Lunn
2017-01-26 17:51   ` Sean Nyekjær
2017-01-26 18:12     ` Andrew Lunn
2017-01-27  7:42       ` Sean Nyekjær
2017-01-26 18:36     ` Florian Fainelli [this message]

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=3098087b-f58b-c1c3-34be-d14aa1818e7e@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=netdev@vger.kernel.org \
    --cc=sean.nyekjaer@prevas.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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