mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v1 1/3] net: dsa: add adjust_link support
Date: Tue, 21 Mar 2023 09:09:57 +0100	[thread overview]
Message-ID: <20230321080957.GD7446@pengutronix.de> (raw)
In-Reply-To: <20230316134209.4068801-1-o.rempel@pengutronix.de>

On Thu, Mar 16, 2023 at 02:42:07PM +0100, Oleksij Rempel wrote:
> The required functionality is essential for cable hot plugging or
> asynchronous link detection. In its current state, DSA will only operate
> if the cable was connected prior to booting.
> 
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
>  drivers/net/dsa.c | 4 ++--
>  include/dsa.h     | 1 +
>  2 files changed, 3 insertions(+), 2 deletions(-)

Applied, thanks

Sascha

> 
> diff --git a/drivers/net/dsa.c b/drivers/net/dsa.c
> index 793bbbb4f1..9c21564876 100644
> --- a/drivers/net/dsa.c
> +++ b/drivers/net/dsa.c
> @@ -104,8 +104,8 @@ static int dsa_port_start(struct eth_device *edev)
>  			return ret;
>  	}
>  
> -	ret = phy_device_connect(edev, ds->slave_mii_bus, dp->index, NULL, 0,
> -				 interface);
> +	ret = phy_device_connect(edev, ds->slave_mii_bus, dp->index,
> +				 ops->adjust_link, 0, interface);
>  	if (ret)
>  		return ret;
>  
> diff --git a/include/dsa.h b/include/dsa.h
> index e823bac0a7..527941c269 100644
> --- a/include/dsa.h
> +++ b/include/dsa.h
> @@ -55,6 +55,7 @@ struct dsa_switch_ops {
>  
>  	int (*phy_read)(struct dsa_switch *ds, int port, int regnum);
>  	int (*phy_write)(struct dsa_switch *ds, int port, int regnum, u16 val);
> +	void (*adjust_link)(struct eth_device *dev);
>  };
>  
>  struct dsa_port {
> -- 
> 2.30.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



      parent reply	other threads:[~2023-03-21  8:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-16 13:42 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 ` [PATCH v1 3/3] net: dsa: sja1105: fall back to default speed configuration if no link was detected Oleksij Rempel
2023-03-21  8:09 ` Sascha Hauer [this message]

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=20230321080957.GD7446@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=o.rempel@pengutronix.de \
    /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