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 94506C433F5 for ; Thu, 31 Mar 2022 18:48:32 +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=QnElk0q4tjdwi1MoVJWGzzGTbZUYS/C3EBw0Zbmch1A=; b=RaPHxtfoTINZ63 smjSdkwF+yS2BwjLca40f7Gv2YDOugavfaj2kJ2ZLhNkE1sTadJlVIYgsH3irX4CtfVBunFYnKYIG /1ALiWWbAfsFpWaSC+6ul0wq8vRsA8pMj/a2wGnv+DhbL5xpg32OemNxKwDJXRLFXRrBhEI/FrD6g UJ7Ha/43QI3VP641RcxqgnbZOwzUQTu+7hfkAFMgPTifCp46BQEgrORVADztNzi2TGeLBX5jmueZm PXiKrYcPEgR1Uc4bBqOwEhZLg2GAc0onN6fuVf+4P75BAd7/WkIYc/nBVtrG88zw5pEXa8HS7XodM 4hWGY9hxm3TzKZDkmQrg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nZzpG-003H1E-Fk; Thu, 31 Mar 2022 18:47:18 +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 1nZzpC-003GUM-Mf for linux-arm-kernel@lists.infradead.org; Thu, 31 Mar 2022 18:47:16 +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=l5Za89XufRVMoXWzTHqu1+JIk2bJtPxePB/E1tQlqeg=; b=fxH+ppUa9P02Ibmw/erIDWbMZw UCMgrKDDQz7tY5RsESoCgiwTkRIbqkVjU6SewdfM7PX2lB65upgzJjdFziEQRxntXo7gKFfzfRT8b hy2NxzCyCn2qh8vIjnMcWjn8WpdoQZiKsfJzf02qkyNeM5/JazA9mDuKQUb68zUgrylC2aauii08F p+urwvF378clcP77ZVrRDJeqEtZLMu4Z2fwTQopMfGPAXiHcZmYnr+R6QItvwaZu5u7BpaCtztEBO OGqQ8YgcveoiG/C0qMpouw6B9Rv3YGV8a2/xVSLeZ5VIL5D7o5Iycf7DssXBfr3H9jJAgUD99xJAT ImNRK6Tw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:58070) 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 1nZzmj-0005Ci-L4; Thu, 31 Mar 2022 19:44:41 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1nZzmZ-0007rv-UA; Thu, 31 Mar 2022 19:44:31 +0100 Date: Thu, 31 Mar 2022 19:44:31 +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 , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: stmmac: Fix unset max_speed difference between DT and non-DT platforms Message-ID: References: <20220331171827.12483-1-wens@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220331171827.12483-1-wens@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220331_114714_768432_1B9AC2E4 X-CRM114-Status: GOOD ( 13.53 ) 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 01:18:27AM +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. Sounds like it's got to complicated... > 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. And this kind of proves that point - if deleting code fixes it... 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