All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: netdev@vger.kernel.org
Cc: andrew@lunn.ch, rmk+kernel@armlinux.org.uk, davem@davemloft.net,
	Florian Fainelli <f.fainelli@gmail.com>
Subject: [PATCH RFC net-next 2/3] net: phy: sfp: Issue warning when using Generic PHY driver(s)
Date: Tue,  6 Nov 2018 15:29:12 -0800	[thread overview]
Message-ID: <20181106232913.17216-3-f.fainelli@gmail.com> (raw)
In-Reply-To: <20181106232913.17216-1-f.fainelli@gmail.com>

1000BaseT SFP modules typically include an Ethernet PHY device, and
while the Generic PHY driver will be able to bind to it, it usually will
not work at all without a specialized PHY driver. Issue a warning in
that case to help toubleshoot things.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/net/phy/sfp.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c
index fd8bb998ae52..228205d8ce84 100644
--- a/drivers/net/phy/sfp.c
+++ b/drivers/net/phy/sfp.c
@@ -1203,6 +1203,9 @@ static void sfp_sm_probe_phy(struct sfp *sfp)
 	}
 
 	sfp->mod_phy = phy;
+	if (phy_driver_is_genphy(phy) || phy_driver_is_genphy_10g(phy))
+		dev_warn(sfp->dev, "Using Generic PHY driver with a SFP!\n");
+
 	phy_start(phy);
 }
 
-- 
2.17.1

  parent reply	other threads:[~2018-11-07  8:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-06 23:29 [PATCH RFC net-next 0/3] net: phy: sfp: Warn when using generic PHY driver Florian Fainelli
2018-11-06 23:29 ` [PATCH RFC net-next 1/3] net: phy: Add helpers to determine if PHY driver is generic Florian Fainelli
2018-11-06 23:29 ` Florian Fainelli [this message]
2018-11-06 23:29 ` [PATCH RFC net-next 3/3] net: phy: Default MARVELL_PHY to the value of SFP Florian Fainelli
2018-11-06 23:38 ` [PATCH RFC net-next 0/3] net: phy: sfp: Warn when using generic PHY driver David Miller
2018-11-06 23:42   ` Florian Fainelli
2018-11-07  0:03   ` Russell King - ARM Linux
2018-11-07  0:09     ` Florian Fainelli
2018-11-07  0:34       ` Russell King - ARM Linux
2018-11-07  0:51         ` Florian Fainelli
2018-11-07  0:59           ` Andrew Lunn

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=20181106232913.17216-3-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 \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.