All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	David Miller <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: [PATCH net-next 1/5] net: phy: aquantia: remove false 5G and 10G speed ability for AQCS109
Date: Fri, 22 Feb 2019 23:48:14 +0100	[thread overview]
Message-ID: <7aa35fce-b420-1637-8fb0-6b2cbae24d71@gmail.com> (raw)
In-Reply-To: <4ae20155-367d-4b11-63f9-28580b7cf1cb@gmail.com>

AQCS109 belongs to a family of PHY's where certain members don't
support 5G or 10G. However for all members of the family the chip
reports 10G and 5G capability. Therefore remove the not supported
modes for AQCS109.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/net/phy/aquantia.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c
index 34be44d00..9661ef4b4 100644
--- a/drivers/net/phy/aquantia.c
+++ b/drivers/net/phy/aquantia.c
@@ -152,6 +152,15 @@ static int aqr_read_status(struct phy_device *phydev)
 	return 0;
 }
 
+static int aqcs109_config_init(struct phy_device *phydev)
+{
+	/* AQCS109 belongs to a chip family partially supporting 10G and 5G.
+	 * PMA speed ability bits are the same for all members of the family,
+	 * AQCS109 however supports speeds up to 2.5G only.
+	 */
+	return phy_set_max_speed(phydev, SPEED_2500);
+}
+
 static struct phy_driver aqr_driver[] = {
 {
 	PHY_ID_MATCH_MODEL(PHY_ID_AQ1202),
@@ -208,6 +217,7 @@ static struct phy_driver aqr_driver[] = {
 	.name		= "Aquantia AQCS109",
 	.aneg_done	= genphy_c45_aneg_done,
 	.get_features	= genphy_c45_pma_read_abilities,
+	.config_init	= aqcs109_config_init,
 	.config_aneg    = aqr_config_aneg,
 	.config_intr	= aqr_config_intr,
 	.ack_interrupt	= aqr_ack_interrupt,
-- 
2.20.1



  reply	other threads:[~2019-02-22 22:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-22 22:45 [PATCH net-next 0/5] net: phy: aquantia: improve and extend driver Heiner Kallweit
2019-02-22 22:48 ` Heiner Kallweit [this message]
2019-02-22 22:49 ` [PATCH net-next 2/5] net: phy: aquantia: add support for auto-negotiation configuration Heiner Kallweit
2019-02-22 23:00   ` Florian Fainelli
2019-02-22 22:50 ` [PATCH net-next 3/5] net: phy: don't change modes we don't care about in genphy_c45_read_lpa Heiner Kallweit
2019-02-22 22:51 ` [PATCH net-next 4/5] net: phy: add genphy_c45_read_status Heiner Kallweit
2019-02-22 22:52 ` [PATCH net-next 5/5] net: phy: aquantia: use genphy_c45_read_status Heiner Kallweit
2019-02-23 22:12 ` [PATCH net-next 0/5] net: phy: aquantia: improve and extend driver David Miller

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=7aa35fce-b420-1637-8fb0-6b2cbae24d71@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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.