[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220401214158.7346bd62@kernel.org>
Date: Fri, 1 Apr 2022 21:41:58 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Chen-Yu Tsai <wens@...nel.org>
Cc: Giuseppe Cavallaro <peppe.cavallaro@...com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Jose Abreu <joabreu@...opsys.com>,
"David S. Miller" <davem@...emloft.net>,
Paolo Abeni <pabeni@...hat.com>, Chen-Yu Tsai <wens@...e.org>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
netdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org,
Russell King <rmk+kernel@...linux.org.uk>
Subject: Re: [PATCH RESEND2] net: stmmac: Fix unset max_speed difference
between DT and non-DT platforms
On Fri, 1 Apr 2022 02:48:32 +0800 Chen-Yu Tsai wrote:
> From: Chen-Yu Tsai <wens@...e.org>
>
> In commit 9cbadf094d9d ("net: stmmac: support max-speed device tree
> property"), when DT platforms don't set "max-speed", max_speed is set to
> -1; for non-DT platforms, it stays the default 0.
>
> Prior to commit eeef2f6b9f6e ("net: stmmac: Start adding phylink support"),
> the check for a valid max_speed setting was to check if it was greater
> than zero. This commit got it right, but subsequent patches just checked
> for non-zero, which is incorrect for DT platforms.
>
> In commit 92c3807b9ac3 ("net: stmmac: convert to phylink_get_linkmodes()")
> the conversion switched completely to checking for non-zero value as a
> valid value, which caused 1000base-T to stop getting advertised by
> default.
>
> Instead of trying to fix all the checks, simply leave max_speed alone if
> DT property parsing fails.
>
> Fixes: 9cbadf094d9d ("net: stmmac: support max-speed device tree property")
> Fixes: 92c3807b9ac3 ("net: stmmac: convert to phylink_get_linkmodes()")
> Signed-off-by: Chen-Yu Tsai <wens@...e.org>
> Acked-by: Russell King (Oracle) <rmk+kernel@...linux.org.uk>
> ---
>
> Resend2: CC Srinivas at Linaro instead of ST. Collected Russell's ack.
> Resend: added Srinivas (author of first fixed commit) to CC list.
>
> This was first noticed on ROC-RK3399-PC, and also observed on ROC-RK3328-CC.
> The fix was tested on ROC-RK3328-CC and Libre Computer ALL-H5-ALL-CC.
This patch got marked Changes Requested in pw, but I can't see why,
so I went on a limb and applied it. LMK if that was a mistake,
otherwise its commit c21cabb0fd0b ("net: stmmac: Fix unset max_speed
difference between DT and non-DT platforms") in net.
Powered by blists - more mailing lists