lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YipPRtJSlSh6YLHY@lunn.ch>
Date:   Thu, 10 Mar 2022 20:19:34 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Oleksij Rempel <o.rempel@...gutronix.de>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Russell King <linux@...linux.org.uk>, kernel@...gutronix.de,
        linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
        netdev@...r.kernel.org, paskripkin@...il.com
Subject: Re: [PATCH net-next v1 4/4] net: usb: asix: suspend internal PHY if
 external is used

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@...gutronix.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ