LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jose Abreu <Jose.Abreu@synopsys.com>
To: netdev@vger.kernel.org
Cc: Joao Pinto <Joao.Pinto@synopsys.com>,
	Jose Abreu <Jose.Abreu@synopsys.com>,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	Alexandre Torgue <alexandre.torgue@st.com>,
	Jose Abreu <Jose.Abreu@synopsys.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH net-next 6/8] net: phylink: Test if MAC/PCS support Autoneg
Date: Mon,  9 Mar 2020 09:36:25 +0100	[thread overview]
Message-ID: <001bd169362fa564d515d423ca6d42640a35df6a.1583742616.git.Jose.Abreu@synopsys.com> (raw)
In-Reply-To: <cover.1583742615.git.Jose.Abreu@synopsys.com>
In-Reply-To: <cover.1583742615.git.Jose.Abreu@synopsys.com>

We may have cases where MAC or PCS do not support Autoneg. Check if it
is supported after validate callback is called.

Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com>

---
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Cc: Jose Abreu <joabreu@synopsys.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Heiner Kallweit <hkallweit1@gmail.com>
Cc: netdev@vger.kernel.org
Cc: linux-stm32@st-md-mailman.stormreply.com
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/net/phy/phylink.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index 47f4ce02d7bc..19db68d74cb4 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -340,6 +340,9 @@ static int phylink_parse_mode(struct phylink *pl, struct fwnode_handle *fwnode)
 				    "failed to validate link configuration for in-band status\n");
 			return -EINVAL;
 		}
+
+		/* Check if MAC/PCS also supports Autoneg. */
+		pl->link_config.an_enabled = phylink_test(pl->supported, Autoneg);
 	}
 
 	return 0;
-- 
2.7.4


  parent reply	other threads:[~2020-03-09  8:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-09  8:36 [PATCH net-next 0/8] net: Add support for Synopsys DesignWare XPCS Jose Abreu
2020-03-09  8:36 ` [PATCH net-next 1/8] net: stmmac: selftests: Do not fail if PHY is not attached Jose Abreu
2020-03-09  8:36 ` [PATCH net-next 2/8] net: stmmac: Switch to linkmode_and()/linkmode_andnot() Jose Abreu
2020-03-09  8:36 ` [PATCH net-next 3/8] net: stmmac: Fallback to dev_fwnode() if needed Jose Abreu
2020-03-09  8:36 ` [PATCH net-next 4/8] net: stmmac: Use resolved link config in mac_link_up() Jose Abreu
2020-03-09  8:36 ` [PATCH net-next 5/8] net: phylink: Add missing Backplane speeds Jose Abreu
2020-03-09  8:36 ` Jose Abreu [this message]
2020-03-09  8:36 ` [PATCH net-next 7/8] net: phy: Add Synopsys DesignWare XPCS MDIO module Jose Abreu
2020-06-05 17:10   ` Russell King - ARM Linux admin
2020-06-09 14:24     ` Jose Abreu
2020-03-09  8:36 ` [PATCH net-next 8/8] net: stmmac: Integrate it with DesignWare XPCS Jose Abreu
2020-03-10  3:13 ` [PATCH net-next 0/8] net: Add support for Synopsys " 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=001bd169362fa564d515d423ca6d42640a35df6a.1583742616.git.Jose.Abreu@synopsys.com \
    --to=jose.abreu@synopsys.com \
    --cc=Joao.Pinto@synopsys.com \
    --cc=alexandre.torgue@st.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux@armlinux.org.uk \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    --subject='Re: [PATCH net-next 6/8] net: phylink: Test if MAC/PCS support Autoneg' \
    /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

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).