From: Florian Fainelli <f.fainelli@gmail.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, andrew@lunn.ch, rmk+kernel@armlinux.org.uk,
vivien.didelot@savoirfairelinux.com,
Florian Fainelli <f.fainelli@gmail.com>
Subject: [PATCH net-next 5/5] net: phy: phylink: Report MoCA as PORT_BNC
Date: Thu, 30 Nov 2017 11:57:44 -0800 [thread overview]
Message-ID: <20171130195744.17743-6-f.fainelli@gmail.com> (raw)
In-Reply-To: <20171130195744.17743-1-f.fainelli@gmail.com>
Similarly to what PHYLIB already does, make sure that
PHY_INTERFACE_MODE_MOCA is reported as PORT_BNC.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/phy/phylink.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index 0a8fd9aa1a19..20c48fbebdfb 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -525,7 +525,10 @@ struct phylink *phylink_create(struct net_device *ndev, struct device_node *np,
pl->netdev = ndev;
pl->phy_state.interface = iface;
pl->link_interface = iface;
- pl->link_port = PORT_MII;
+ if (iface == PHY_INTERFACE_MODE_MOCA)
+ pl->link_port = PORT_BNC;
+ else
+ pl->link_port = PORT_MII;
pl->link_config.interface = iface;
pl->link_config.pause = MLO_PAUSE_AN;
pl->link_config.speed = SPEED_UNKNOWN;
--
2.14.3
prev parent reply other threads:[~2017-11-30 19:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-30 19:57 [PATCH net-next 0/5] PHYLINK preparatory patches for DSA Florian Fainelli
2017-11-30 19:57 ` [PATCH net-next 1/5] net: phy: phylink: Allow specifying PHY device flags Florian Fainelli
2017-11-30 19:57 ` [PATCH net-next 2/5] net: phy: phylink: Use PHY device interface if N/A Florian Fainelli
2017-11-30 19:57 ` [PATCH net-next 3/5] net: phy: phylink: Demote error message to debug Florian Fainelli
2017-11-30 23:26 ` Russell King - ARM Linux
2017-11-30 23:36 ` Florian Fainelli
2017-11-30 19:57 ` [PATCH net-next 4/5] net: phy: phylink: Allow setting a custom link state callback Florian Fainelli
2017-11-30 19:57 ` 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=20171130195744.17743-6-f.fainelli@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=rmk+kernel@armlinux.org.uk \
--cc=vivien.didelot@savoirfairelinux.com \
/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;
as well as URLs for NNTP newsgroup(s).