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]
Date:   Thu, 9 Feb 2023 04:07:11 +0000
From:   <Arun.Ramadoss@...rochip.com>
To:     <olteanv@...il.com>, <UNGLinuxDriver@...rochip.com>,
        <vivien.didelot@...il.com>, <andrew@...n.ch>,
        <f.fainelli@...il.com>, <kuba@...nel.org>, <wei.fang@....com>,
        <edumazet@...gle.com>, <pabeni@...hat.com>,
        <o.rempel@...gutronix.de>, <Woojung.Huh@...rochip.com>,
        <davem@...emloft.net>, <hkallweit1@...il.com>
CC:     <linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>,
        <kernel@...gutronix.de>
Subject: Re: [PATCH net-next v6 1/9] net: dsa: microchip: enable EEE support

Hi Oleksij,
On Wed, 2023-02-08 at 11:32 +0100, Oleksij Rempel wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
> 
> Some of KSZ9477 family switches provides EEE support. 

nit: If you can elaborate what are the chip supports will be good. 

> To enable it, we
> just need to register set_mac_eee/set_mac_eee handlers and validate
> supported chip version and port.
> 
> Signed-off-by: Oleksij Rempel <o.rempel@...gutronix.de>
> Reviewed-by: Andrew Lunn <andrew@...n.ch>
> ---
>  drivers/net/dsa/microchip/ksz_common.c | 65
> ++++++++++++++++++++++++++
>  1 file changed, 65 insertions(+)
> 
> diff --git a/drivers/net/dsa/microchip/ksz_common.c
> b/drivers/net/dsa/microchip/ksz_common.c
> index 46becc0382d6..0a2d78253d17 100644
> --- a/drivers/net/dsa/microchip/ksz_common.c
> +++ b/drivers/net/dsa/microchip/ksz_common.c
> @@ -2673,6 +2673,69 @@ static int ksz_max_mtu(struct dsa_switch *ds,
> int port)
>         return -EOPNOTSUPP;
>  }
> 
> +static int ksz_get_mac_eee(struct dsa_switch *ds, int port,
> +                          struct ethtool_eee *e)
> +{
> +       int ret;
> +
> +       ret = ksz_validate_eee(ds, port);
> +       if (ret)
> +               return ret;
> +
> +       /* There is no documented control of Tx LPI configuration. */
> +       e->tx_lpi_enabled = true;

Blank line before comment will increase readability.

> +       /* There is no documented control of Tx LPI timer. According
> to tests
> +        * Tx LPI timer seems to be set by default to minimal value.
> +        */
> +       e->tx_lpi_timer = 0;

for lpi_enabled, you have used true and for lpi_timer you have used 0.
It can be consistent either true/false or 1/0. 

> +
> +       return 0;
> +}
> +
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ