Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9A5E7C433F5 for ; Thu, 19 May 2022 13:20:23 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0423083D61; Thu, 19 May 2022 15:20:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="uCHsjkvp"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 980CC83C2F; Thu, 19 May 2022 15:20:18 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6E5BC83C2F for ; Thu, 19 May 2022 15:20:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9D7D76146B; Thu, 19 May 2022 13:20:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E19B2C385AA; Thu, 19 May 2022 13:20:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652966413; bh=M0tQjiL5WfohCjywDr6YYJbc/BnJy2JqUOh1/s9gFLc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uCHsjkvpRFcXxI8OgOUo7f3a7PIJXNjR7YVeom0thMHAuyWmwwn7+PB/38yF0X1nA GYY/R3VrN2V28kKOFRW2iTlpIRv4vM8xshxbXNnd1nbUIDEhHXBqiQm84JRvq3Kx/l QixEZUO+sV3Vr8FZUN8IKElt7y1MX1ssi3x0C5wzjedSZlGeU7RRSw9J3Oq2zl4Tm0 om4ZZ/4FMEbLG6bfbUUdQm7tUmCgR5cz9ROUv62/+J3vKxaGyFc5Mbe77VKAgNLUAp 7So3OfaFUfAk3525hnqVodg3Wun2FmWoUeVK7ZqAIKU6VUoJz8d/K3prSGBkcWrwq6 FQt1buM2lNcbg== Received: by pali.im (Postfix) id 0430D810; Thu, 19 May 2022 15:20:09 +0200 (CEST) Date: Thu, 19 May 2022 15:20:09 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Vladimir Oltean Cc: Ramon Fried , Stefan Roese , Marek =?utf-8?B?QmVow7pu?= , "u-boot@lists.denx.de" Subject: Re: [PATCH] phy: Fix phy_string_for_interface() function Message-ID: <20220519132009.qfemnuijj7sryapi@pali> References: <20220519124912.1995-1-pali@kernel.org> <20220519130342.rqwo354kv66hqghk@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220519130342.rqwo354kv66hqghk@skbuf> User-Agent: NeoMutt/20180716 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean On Thursday 19 May 2022 13:03:43 Vladimir Oltean wrote: > On Thu, May 19, 2022 at 02:49:12PM +0200, Pali Rohár wrote: > > Commit c677fb1e3196 ("phy: Move PHY_INTERFACE_MODE_NA to the beginning of > > the enum definition") broke function phy_string_for_interface(). And > > therefore completely broke support for 2500base-x mode in Armada 3720 > > comphy driver. > > > > Since that commit function phy_string_for_interface() returns constant > > value PHY_INTERFACE_MODE_NA because PHY_INTERFACE_MODE_NA from moved from > > end to the beginning. > > > > Previous value of PHY_INTERFACE_MODE_NA was PHY_INTERFACE_MODE_MAX-1. So > > change phy_string_for_interface() code to check upper bound via previous > > value. > > > > This patch fixes 2500base-x mode on Armada 3720 > > > > Fixes: c677fb1e3196 ("phy: Move PHY_INTERFACE_MODE_NA to the beginning of the enum definition") > > Signed-off-by: Pali Rohár > > --- > > Ramon, can you please apply this patch, since people are hitting the issue? > https://patchwork.ozlabs.org/project/uboot/patch/20220510224910.12553-1-tharvey@gateworks.com/ Ou, I did not know that this patch is already on ML.