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: <20220208170432.6578540b@thinkpad>
Date:   Tue, 8 Feb 2022 17:04:32 +0100
From:   Marek BehĂșn <kabel@...nel.org>
To:     Holger Brunck <holger.brunck@...achienergy.com>
Cc:     netdev@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
        Jakub Kicinski <kuba@...nel.org>
Subject: Re: [v4] dsa: mv88e6xxx: make serdes SGMII/Fiber tx amplitude
 configurable

On Tue,  8 Feb 2022 10:44:55 +0100
Holger Brunck <holger.brunck@...achienergy.com> wrote:

> @@ -3011,6 +3014,22 @@ static int mv88e6xxx_setup_port(struct mv88e6xxx_chip *chip, int port)
>  			return err;
>  	}
>  
> +	if (chip->info->ops->serdes_set_tx_p2p_amplitude) {
> +		dp = dsa_to_port(ds, port);
> +		if (dp)
> +			phy_handle =  of_parse_phandle(dp->dn, "phy-handle", 0);

two spaces after '=' operator, only one needed

> +		if (phy_handle &&
> +		    !of_property_read_u32(phy_handle,
> +					  "tx-p2p-microvolt",
> +					  &tx_amp)) {
> +			err = mv88e6352_serdes_set_tx_p2p_amplitude(chip, port,
> +								    tx_amp);
> +			if (err)
> +				return err;
> +		}

you need to decrease reference of the phy_handle you just got with
of_parse_phandle:

  if (phy_handle)
    of_node_put(phy_handle);

> +	}
> +

> +struct mv88e6352_serdes_p2p_to_val {
> +	int mv;
> +	u16 regval;
> +};
> +
> +static struct mv88e6352_serdes_p2p_to_val mv88e6352_serdes_p2p_to_val[] = {
> +	/* Mapping of configurable mikrovolt values to the register value */
> +	{ 14000, 0},
> +	{ 112000, 1},
> +	{ 210000, 2},
> +	{ 308000, 3},
> +	{ 406000, 4},
> +	{ 504000, 5},
> +	{ 602000, 6},
> +	{ 700000, 7},

add spaces before ending '}'


Marek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ