linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jose Abreu <Jose.Abreu@synopsys.com>
To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Cc: Jose Abreu <Jose.Abreu@synopsys.com>,
	Joao Pinto <Joao.Pinto@synopsys.com>,
	"David S . Miller" <davem@davemloft.net>,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	Alexandre Torgue <alexandre.torgue@st.com>
Subject: [PATCH net-next v2 02/10] net: stmmac: Do not try to enable PHY EEE if MAC does not support it
Date: Fri, 28 Jun 2019 09:29:13 +0200	[thread overview]
Message-ID: <11ce47fad073cb45254d779e7338446f03edb2c0.1561706801.git.joabreu@synopsys.com> (raw)
In-Reply-To: <cover.1561706800.git.joabreu@synopsys.com>
In-Reply-To: <cover.1561706800.git.joabreu@synopsys.com>

Do not enable EEE feature in the PHY if MAC does not support it.

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Cc: Joao Pinto <jpinto@synopsys.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 91f24b63ea16..0b1900bf4e9e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -896,7 +896,7 @@ static void stmmac_mac_link_up(struct phylink_config *config,
 	struct stmmac_priv *priv = netdev_priv(to_net_dev(config->dev));
 
 	stmmac_mac_set(priv, priv->ioaddr, true);
-	if (phy) {
+	if (phy && priv->dma_cap.eee) {
 		priv->eee_active = phy_init_eee(phy, 1) >= 0;
 		priv->eee_enabled = stmmac_eee_init(priv);
 		stmmac_set_eee_pls(priv, priv->hw, true);
-- 
2.7.4


  parent reply	other threads:[~2019-06-28  7:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-28  7:29 [PATCH net-next v2 00/10] net: stmmac: 10GbE using XGMAC Jose Abreu
2019-06-28  7:29 ` [PATCH net-next v2 01/10] net: stmmac: dwxgmac: Enable EDMA by default Jose Abreu
2019-06-28  7:29 ` Jose Abreu [this message]
2019-06-28  7:29 ` [PATCH net-next v2 03/10] net: stmmac: Decrease default RX Watchdog value Jose Abreu
2019-06-28  7:29 ` [PATCH net-next v2 04/10] net: stmmac: dwxgmac: Fix the undefined burst setting Jose Abreu
2019-06-28  7:29 ` [PATCH net-next v2 05/10] net: stmmac: Add the missing speeds that XGMAC supports Jose Abreu
2019-06-28  7:29 ` [PATCH net-next v2 06/10] net: stmmac: Do not disable interrupts when cleaning TX Jose Abreu
2019-06-28 19:08   ` Willem de Bruijn
2019-07-01 10:15     ` Jose Abreu
2019-07-01 12:23       ` Willem de Bruijn
2019-06-28  7:29 ` [PATCH net-next v2 07/10] net: stmmac: Enable support for > 32 Bits addressing in XGMAC Jose Abreu
2019-06-28  7:29 ` [PATCH net-next v2 08/10] net: stmmac: Update RX Tail Pointer to last free entry Jose Abreu
2019-06-28  7:29 ` [PATCH net-next v2 09/10] net: stmmac: Only disable interrupts if NAPI is scheduled Jose Abreu
2019-06-28  7:29 ` [PATCH net-next v2 10/10] net: stmmac: Update Kconfig entry Jose Abreu
2019-06-28 16:24 ` [PATCH net-next v2 00/10] net: stmmac: 10GbE using XGMAC David Miller
2019-07-01 10:19   ` Jose Abreu
2019-07-01 17:46     ` 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=11ce47fad073cb45254d779e7338446f03edb2c0.1561706801.git.joabreu@synopsys.com \
    --to=jose.abreu@synopsys.com \
    --cc=Joao.Pinto@synopsys.com \
    --cc=alexandre.torgue@st.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.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).