From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B3BEFC433FE for ; Thu, 31 Mar 2022 18:48:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Wo+mc5Fh2eQHlkqdvEmqROO8ItxS9FRDkchPe2KA8Pk=; b=upZZeVT5RSzbF2 bxSMLuXwIV2Se0m5YXqkhMPDoPz/UZMLj/DR+vAaPEIseMhTJwkIVRpAbFlSxBwAsoc2lhKDkRWk3 z+jryz7dbByD0DD4Ctc0xBbL3Z5SFKuRLnwttCSiAVkqGZXsgo8nUdKzm3MeET8iFY4robg/Ea4Ih 3ukORpUrVZE7nry2L+Ia2KfA8IesR+gxP5MQ8416snUkC2XpN20AFqA8XZluL38QMJKA8QdwQvE3J ooGkFKZubeGwXhfF8vYUTiTlipt/UvogOIQ7oH8xJ8fO37xttOUh3W2x9pCnPAzU1awrIT/20LJXB MqY5dnP5AnG1WJvwVbbA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nZzpQ-003H2S-8v; Thu, 31 Mar 2022 18:47:28 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nZzpF-003GVZ-D4 for linux-arm-kernel@lists.infradead.org; Thu, 31 Mar 2022 18:47:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Xf4dx+kb6mltbt/ukOIdVaBYUv4mOnK0nMAdAcvT3t4=; b=r8b5T+EEyUL9WNCmLx5J5hC8n2 OLPmiU/H5JiehkOmfyg8K1M5f5zuQ6d325rz3Z9ZvRpO/QoFxYOqe+nrQoTS1gtCyctthLA/rBZiC ZRrsdoSY4mAQzH73CsgM8HmDHfM8DNhO2JwC7kxN2J4wzKd6nLeN6Cx+gJKaA8jlL3jni5s79YDnc l1yWRemhS/PTbxZJDQ38Nbc4nER4NJKO4nIWoplseX51mkblN+arfisGpg2iRIEcv7NG+sYMdG4BV 2m0XMX4jMwDyCE5c/Xjlc2sWzb1qAGWQK/F5g98SfbOhLUDBOnW5jmqB9jWoqFcOIEMjCp8s5DV3s MwYyF6Ww==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:58072) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nZzn9-0005Ct-VE; Thu, 31 Mar 2022 19:45:07 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1nZzn9-0007s2-1n; Thu, 31 Mar 2022 19:45:07 +0100 Date: Thu, 31 Mar 2022 19:45:07 +0100 From: "Russell King (Oracle)" To: Chen-Yu Tsai Cc: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Chen-Yu Tsai , Srinivas Kandagatla , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RESEND] net: stmmac: Fix unset max_speed difference between DT and non-DT platforms Message-ID: References: <20220331184145.14242-1-wens@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220331184145.14242-1-wens@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220331_114717_470651_5981302F X-CRM114-Status: GOOD ( 14.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Apr 01, 2022 at 02:41:45AM +0800, Chen-Yu Tsai wrote: > From: Chen-Yu Tsai > > 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 Acked-by: Russell King (Oracle) -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel