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 49D2EC433F5 for ; Sat, 2 Apr 2022 04:43:17 +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:MIME-Version:References:In-Reply-To: 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=Br6tAe+5RxsJIEezn5PrMwdl2YnO+owxglyPtAMnUIg=; b=tA0cU5r0XFfKXz Jd6iU0B4hY7PFPjqz6jc0gjXR2JgIWulA/YevP9jWikY7sWIKv9WSdJIWNHljPxogiqLGKwQTs57h rgk2Cw0FIbB/V4FI6WOXBc9jzWchIcC3sC5M0Uzxn1wu1ZTzwviEPKgUotnMyOMva5+k234kyMCVQ BB3oEFv59/jXVhOHxoK8ODUlohXYYihf83L+EA/Q1Ob5h75ndvLWiBwYyAE8PWPd5YuGFRUZI9TtM RVo0bYlRWKXUCkNSI085NT93ouTkw7Yr+1dRx/O/cPq9MHO86u+U1wcgR5t2T/Wx/U5N0sjk1K4gH fH9A5zsnr8crTP+U+MKg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1naVaP-007xPr-L0; Sat, 02 Apr 2022 04:42:05 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1naVaL-007xPB-R6 for linux-arm-kernel@lists.infradead.org; Sat, 02 Apr 2022 04:42:03 +0000 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 5C2E660B10; Sat, 2 Apr 2022 04:42:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 211B8C340EC; Sat, 2 Apr 2022 04:42:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648874520; bh=AzLgAuzRNBRAOdspDj61I0XCgtewRY+rH2B0NSOl6VA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=JA0eHd50KJdwsMRw7rUatj0KDIw390Mr/6jV9svpoQn1axyWHVDwFS6V8v8zGo103 5PpISDOUEAxU15XZcBFKbInEtuhu8M6o99wUTRfjJvTTQt/ajYh2nkWDbPrzZxK67h 1ipdXJzJADUvVNJKcGLdjkliUl1owXZPIjL9mTf42VfvkcfjybrdFnffa2vv3MEBJk Lwt7MhvRmLG4/fx+rT+RoUMUavewp810I+8hMATUs9sxT3QDnw/gX+UR0bLrNA92hr bNDEbVLcBiu/RrgEurXbXcJ4/zTsRxj55S64a02E1uk7QcySc2VgA3JqqPaEHrWddS S64LAPy1PBpuA== Date: Fri, 1 Apr 2022 21:41:58 -0700 From: Jakub Kicinski To: Chen-Yu Tsai Cc: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Paolo Abeni , Chen-Yu Tsai , Srinivas Kandagatla , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Russell King Subject: Re: [PATCH RESEND2] net: stmmac: Fix unset max_speed difference between DT and non-DT platforms Message-ID: <20220401214158.7346bd62@kernel.org> In-Reply-To: <20220331184832.16316-1-wens@kernel.org> References: <20220331184832.16316-1-wens@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220401_214201_966732_9C6DA7FC X-CRM114-Status: GOOD ( 18.26 ) 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, 1 Apr 2022 02:48:32 +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) > --- > > 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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel