devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, devicetree@vger.kernel.org,
	cernekee@gmail.com, mark.rutland@arm.com, romieu@fr.zoreil.com,
	Florian Fainelli <f.fainelli@gmail.com>
Subject: [PATCH net-next v5 02/10] net: phy: update port type for MoCA PHYs
Date: Thu, 13 Feb 2014 16:08:43 -0800	[thread overview]
Message-ID: <1392336531-28875-3-git-send-email-f.fainelli@gmail.com> (raw)
In-Reply-To: <1392336531-28875-1-git-send-email-f.fainelli@gmail.com>

MoCA PHYs are using coaxial (BNC-like) connectors, update the
transceiver port type when replying to ethtool.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
Changes in v5:
- respin due to the CONFIG_OF dependency fix

Changes in v4:
- respin due to the Kconfig dependency fix

Changes in v1, v2 and v3:
- rebased against latest net-next/master

 drivers/net/phy/phy.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index fc918b6..643b5d6 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -305,7 +305,10 @@ int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd)
 
 	ethtool_cmd_speed_set(cmd, phydev->speed);
 	cmd->duplex = phydev->duplex;
-	cmd->port = PORT_MII;
+	if (phydev->interface == PHY_INTERFACE_MODE_MOCA)
+		cmd->port = PORT_BNC;
+	else
+		cmd->port = PORT_MII;
 	cmd->phy_address = phydev->addr;
 	cmd->transceiver = phy_is_internal(phydev) ?
 		XCVR_INTERNAL : XCVR_EXTERNAL;
-- 
1.8.3.2

  parent reply	other threads:[~2014-02-14  0:08 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-14  0:08 [PATCH net-next v5 00/10] Support for the Broadcom GENET driver Florian Fainelli
2014-02-14  0:08 ` [PATCH net-next v5 01/10] net: phy: add MoCA PHY type Florian Fainelli
2014-02-14  0:08 ` Florian Fainelli [this message]
2014-02-14  0:08 ` [PATCH net-next v5 03/10] net: phy: broadcom: extract register definitions Florian Fainelli
2014-02-14  0:08 ` [PATCH net-next v5 04/10] net: phy: add Broadcom BCM7xxx internal PHY driver Florian Fainelli
2014-02-14  0:08 ` [PATCH net-next v5 05/10] net: bcmgenet: add driver definitions and private structure Florian Fainelli
2014-02-14  0:08 ` [PATCH net-next v5 06/10] net: bcmgenet: add main driver file Florian Fainelli
2014-02-14  0:08 ` [PATCH net-next v5 07/10] net: bcmgenet: add MDIO routines Florian Fainelli
2014-02-14  0:08 ` [PATCH net-next v5 09/10] Documentation: add Device tree bindings for Broadcom GENET Florian Fainelli
2014-02-14 10:19   ` Mark Rutland
2014-02-14 17:36     ` Florian Fainelli
2014-02-17 23:10   ` Sergei Shtylyov
2014-02-17 22:18     ` Florian Fainelli
2014-02-14  0:08 ` [PATCH net-next v5 10/10] MAINTAINERS: add entry for the Broadcom GENET driver Florian Fainelli
2014-02-14 21:37   ` Sergei Shtylyov
     [not found] ` <1392336531-28875-1-git-send-email-f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-02-14  0:08   ` [PATCH net-next v5 08/10] net: bcmgenet: hook into the build system Florian Fainelli
2014-02-14  5:29   ` [PATCH net-next v5 00/10] Support for the Broadcom GENET driver David Miller
2014-02-14  7:07     ` Florian Fainelli
2014-02-14  9:19       ` Richard Cochran
2014-02-16 18:34         ` Florian Fainelli
2014-02-18  7:37           ` Richard Cochran

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=1392336531-28875-3-git-send-email-f.fainelli@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=cernekee@gmail.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=romieu@fr.zoreil.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).