mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Oleksij Rempel <o.rempel@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Oleksij Rempel <o.rempel@pengutronix.de>
Subject: [PATCH v1 3/3] net: dsa: sja1105: fall back to default speed configuration if no link was detected
Date: Thu, 16 Mar 2023 14:42:09 +0100	[thread overview]
Message-ID: <20230316134209.4068801-3-o.rempel@pengutronix.de> (raw)
In-Reply-To: <20230316134209.4068801-1-o.rempel@pengutronix.de>

Rather than generating an error, revert to the default link
configuration. Some configuration is performed during the port pre-enable
sequence.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
 drivers/net/sja1105.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/sja1105.c b/drivers/net/sja1105.c
index 693730f96c..328e5a6369 100644
--- a/drivers/net/sja1105.c
+++ b/drivers/net/sja1105.c
@@ -2778,8 +2778,7 @@ static void sja1105_adjust_link(struct eth_device *edev)
 		mac[port].speed =
 			priv->dcfg->port_speed[SJA1105_SPEED_10MBPS];
 	} else {
-		dev_err(priv->dev, "Invalid PHY speed %d on port %d\n",
-			phy->speed, port);
+		mac[port].speed = priv->dcfg->port_speed[SJA1105_SPEED_AUTO];
 		return;
 	}
 
-- 
2.30.2




  parent reply	other threads:[~2023-03-16 13:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-16 13:42 [PATCH v1 1/3] net: dsa: add adjust_link support Oleksij Rempel
2023-03-16 13:42 ` [PATCH v1 2/3] net: dsa: sja1105: move port enable to adjust link code Oleksij Rempel
2023-03-16 13:42 ` Oleksij Rempel [this message]
2023-03-21  8:09 ` [PATCH v1 1/3] net: dsa: add adjust_link support Sascha Hauer

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=20230316134209.4068801-3-o.rempel@pengutronix.de \
    --to=o.rempel@pengutronix.de \
    --cc=barebox@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox