From: Oleksij Rempel <o.rempel@pengutronix.de>
To: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: kernel@pengutronix.de, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, Lukas Wunner <lukas@wunner.de>
Subject: Re: [PATCH net-next v1 1/1] net: asix: add optional flow control support
Date: Fri, 24 Jun 2022 10:03:37 +0200 [thread overview]
Message-ID: <20220624080337.GA14396@pengutronix.de> (raw)
In-Reply-To: <20220624080208.3143093-1-o.rempel@pengutronix.de>
On Fri, Jun 24, 2022 at 10:02:07AM +0200, Oleksij Rempel wrote:
> Add optional flow control support with respect to the link partners
> abilities.
>
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
This is a net-next patch, depending on other net patch:
https://lore.kernel.org/all/20220624075139.3139300-2-o.rempel@pengutronix.de/
> ---
> drivers/net/usb/asix_common.c | 10 ++++++++++
> drivers/net/usb/asix_devices.c | 2 ++
> 2 files changed, 12 insertions(+)
>
> diff --git a/drivers/net/usb/asix_common.c b/drivers/net/usb/asix_common.c
> index b4a1b7abcfc9..c9df7cd8daae 100644
> --- a/drivers/net/usb/asix_common.c
> +++ b/drivers/net/usb/asix_common.c
> @@ -420,6 +420,8 @@ void asix_adjust_link(struct net_device *netdev)
> u16 mode = 0;
>
> if (phydev->link) {
> + bool tx_pause, rx_pause;
> +
> mode = AX88772_MEDIUM_DEFAULT;
>
> if (phydev->duplex == DUPLEX_HALF)
> @@ -427,6 +429,14 @@ void asix_adjust_link(struct net_device *netdev)
>
> if (phydev->speed != SPEED_100)
> mode &= ~AX_MEDIUM_PS;
> +
> + phy_get_pause(phydev, &tx_pause, &rx_pause);
> +
> + if (rx_pause)
> + mode |= AX_MEDIUM_RFC;
> +
> + if (tx_pause)
> + mode |= AX_MEDIUM_TFC;
> }
>
> asix_write_medium_mode(dev, mode, 0);
> diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c
> index 5b5eb630c4b7..1bb12bbc34bf 100644
> --- a/drivers/net/usb/asix_devices.c
> +++ b/drivers/net/usb/asix_devices.c
> @@ -677,6 +677,8 @@ static int ax88772_init_phy(struct usbnet *dev)
> phy_suspend(priv->phydev);
> priv->phydev->mac_managed_pm = 1;
>
> + phy_support_asym_pause(priv->phydev);
> +
> phy_attached_info(priv->phydev);
>
> if (priv->embd_phy)
> --
> 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 |
next prev parent reply other threads:[~2022-06-24 8:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-24 8:02 [PATCH net-next v1 1/1] net: asix: add optional flow control support Oleksij Rempel
2022-06-24 8:03 ` Oleksij Rempel [this message]
2022-06-24 17:23 ` Jakub Kicinski
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=20220624080337.GA14396@pengutronix.de \
--to=o.rempel@pengutronix.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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 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.