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: <20221004101627.GA30005@duo.ucw.cz>
Date:   Tue, 4 Oct 2022 12:16:27 +0200
From:   Pavel Machek <pavel@...x.de>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        Junxiao Chang <junxiao.chang@...el.com>,
        Voon Weifeng <weifeng.voon@...el.com>,
        Jimmy JS Chen <jimmyjs.chen@...inktech.com>,
        "Looi, Hong Aun" <hong.aun.looi@...el.com>,
        Paolo Abeni <pabeni@...hat.com>,
        Sasha Levin <sashal@...nel.org>, Looi@...r.kernel.org
Subject: Re: [PATCH 5.10 46/52] net: stmmac: power up/down serdes in
 stmmac_open/release

Hi!

> The issue is related with serdes which impacts clock.  There is
> serdes in ADLink I-Pi SMARC board ethernet controller. Please refer to
> commit b9663b7ca6ff78 ("net: stmmac: Enable SERDES power up/down sequence")
> for detial. When issue is reproduced, DMA engine clock is not ready
> because serdes is not powered up.

I don't believe you got the error handling right.

> index 27b7bb64a028..41e71a26b1ad 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -2907,6 +2907,15 @@ static int stmmac_open(struct net_device *dev)
>  		goto init_error;
>  	}
>  
> +	if (priv->plat->serdes_powerup) {
> +		ret = priv->plat->serdes_powerup(dev, priv->plat->bsp_priv);
> +		if (ret < 0) {
> +			netdev_err(priv->dev, "%s: Serdes powerup failed\n",
> +				   __func__);
> +			goto init_error;
> +		}
> +	}

Ok, so serdes is powered up here.

>  	ret = stmmac_hw_setup(dev, true);
>  	if (ret < 0) {
>  		netdev_err(priv->dev, "%s: Hw setup failed\n",

But this goes to init_error, and exits w/o powering serdes down. Error
handling needs to be fixed AFAICT.

Best regards,
								Pavel
--
    echo 'DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk'
    echo 'HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany'

Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ