From: Andrew Lunn <andrew@lunn.ch>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
kernel@pengutronix.de, linux-kernel@vger.kernel.org,
linux-usb@vger.kernel.org, netdev@vger.kernel.org,
paskripkin@gmail.com
Subject: Re: [PATCH net-next v1 4/4] net: usb: asix: suspend internal PHY if external is used
Date: Thu, 10 Mar 2022 20:19:34 +0100 [thread overview]
Message-ID: <YipPRtJSlSh6YLHY@lunn.ch> (raw)
In-Reply-To: <20220310114434.3465481-4-o.rempel@pengutronix.de>
On Thu, Mar 10, 2022 at 12:44:34PM +0100, Oleksij Rempel wrote:
> In case external PHY is used, we need to take care of internal PHY.
> Since there are no methods to disable this PHY from the MAC side, we
> need to suspend it.
> This we reduce electrical noise (PHY is continuing to send FLPs) and power
> consumption by 0,22W.
>
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
> drivers/net/usb/asix.h | 3 +++
> drivers/net/usb/asix_devices.c | 16 +++++++++++++++-
> 2 files changed, 18 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/usb/asix.h b/drivers/net/usb/asix.h
> index 072760d76a72..8a087205355d 100644
> --- a/drivers/net/usb/asix.h
> +++ b/drivers/net/usb/asix.h
> @@ -158,6 +158,8 @@
> #define AX_EEPROM_MAGIC 0xdeadbeef
> #define AX_EEPROM_LEN 0x200
>
> +#define AX_INTERNAL_PHY_ADDR 0x10
> +
> /* This structure cannot exceed sizeof(unsigned long [5]) AKA 20 bytes */
> struct asix_data {
> u8 multi_filter[AX_MCAST_FILTER_SIZE];
> @@ -183,6 +185,7 @@ struct asix_common_private {
> struct asix_rx_fixup_info rx_fixup_info;
> struct mii_bus *mdio;
> struct phy_device *phydev;
> + struct phy_device *phydev_int;
> u16 phy_addr;
> bool embd_phy;
> u8 chipcode;
> diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c
> index fb617eb551bb..2c63fbe32ca2 100644
> --- a/drivers/net/usb/asix_devices.c
> +++ b/drivers/net/usb/asix_devices.c
> @@ -679,6 +679,20 @@ static int ax88772_init_phy(struct usbnet *dev)
>
> phy_attached_info(priv->phydev);
>
> + if (priv->embd_phy)
> + return 0;
Minor nit pick: There appears to be some inconsistency with internal
and embedded. I think they are meant to mean the same thing? Maybe
replace internal with embedded in this patch?
The rest looks O.K.
Andrew
next prev parent reply other threads:[~2022-03-10 19:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-10 11:44 [PATCH net-next v1 1/4] net: usb: asix: unify ax88772_resume code Oleksij Rempel
2022-03-10 11:44 ` [PATCH net-next v1 2/4] net: usb: asix: store chipid to avoid reading it on reset Oleksij Rempel
2022-03-10 11:44 ` [PATCH net-next v1 3/4] net: usb: asix: make use of mdiobus_get_phy and phy_connect_direct Oleksij Rempel
2022-03-10 11:44 ` [PATCH net-next v1 4/4] net: usb: asix: suspend internal PHY if external is used Oleksij Rempel
2022-03-10 19:19 ` Andrew Lunn [this message]
2022-03-10 20:43 ` 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=YipPRtJSlSh6YLHY@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=hkallweit1@gmail.com \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=paskripkin@gmail.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).