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 8D85FC433F5 for ; Sat, 2 Apr 2022 05:02:12 +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:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date :From:In-Reply-To:References:MIME-Version:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LSzbf9dseU0Pye1UFmDPyPiXvSNsUnViDkgbowCpjbs=; b=HWtWlC2H4Rddbg pNG+pz+A1yCbky6TRiRlnas4ed7STRZZYnQ//Socsee4TD78bObir+VdUK27h6sVImrwG0HWUJ2Xi ELIUrNZdeKnUv1TN1VaBY0e/dhxCS1/W7XY6RduwM1H5Rz/M9Tc4TPENjpav2xhHEqIbJRgb5B5SG MMinwSoeF5dBHfu4PsXCCL3Yn2EtJA0SVtKKHlOgK7HN1NKWjmWLPofk52pRnXIvnA4PQpdc+veS+ mVfTHg4Mn872SDLl+CBmEx8dLPt+uPKpFWo7bZ/zOB1tjHY7kSIdJl2Wji58v5TSBn/ndQ7tZloWx 0WCpA5JN1Df3gjNIAEyg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1naVsS-007zCu-NX; Sat, 02 Apr 2022 05:00:44 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1naVsO-007zBQ-Hg for linux-arm-kernel@lists.infradead.org; Sat, 02 Apr 2022 05:00:42 +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 ams.source.kernel.org (Postfix) with ESMTPS id 18728B8268A for ; Sat, 2 Apr 2022 05:00:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4909C34110 for ; Sat, 2 Apr 2022 05:00:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648875636; bh=Hz7kYmvNHLmUo+Fbdi0YWMcptfDXOGSuYlcfxuUkStc=; h=References:In-Reply-To:Reply-To:From:Date:Subject:To:Cc:From; b=lU0hiw/4HgFogs4Ag8R004CYeWmnJbioSL+0u13uzyw6ZsGgrruW/dybMTuqMZkmg jmuLe0dIwFkdsYNbfryNalUZBA3dAa9ELbzvCHftsOKfQQGOH7xuaqlwNGZ0ewuIn/ Hb062xB37iPEQ63gB3HAEw3rqfRM3XZEziVXjAdrrgkwv0qfsGIBxLlCbb1g8QRaQZ 5cv3J4Hio5BlMUQ0FAQFxRIrILLqp/5kfKVU1/jp34lqIVuMWzGFldTxPawcUvvCET hRJeH2Qz/YLGTeDTDomGhJNzeVSdlynNIyIWbCrvUtxg6WHfKhI0HHzoKgofa9t+lx 32pqv/RITubDA== Received: by mail-vs1-f50.google.com with SMTP id k15so4456567vsr.11 for ; Fri, 01 Apr 2022 22:00:36 -0700 (PDT) X-Gm-Message-State: AOAM5320mSIQ8GR/2A2zqjAefpX62VcyoT1kFbkgXtGRGMICSTXmelCQ AhxIobW7xrT6cHiZzsFg47wpBRdmU+STA1UqWIg= X-Google-Smtp-Source: ABdhPJycmGstAuCXAQsD2Nsc99K3qy+1EqIeB5p1HI2zgeQm3shBqWqwPW/yuzIYB8e5JHRRSrZwLuoSs2Jc5fvfGlc= X-Received: by 2002:a67:c383:0:b0:327:2c5:d483 with SMTP id s3-20020a67c383000000b0032702c5d483mr1957242vsj.42.1648875635613; Fri, 01 Apr 2022 22:00:35 -0700 (PDT) MIME-Version: 1.0 References: <20220331184832.16316-1-wens@kernel.org> <20220401214158.7346bd62@kernel.org> In-Reply-To: <20220401214158.7346bd62@kernel.org> From: Chen-Yu Tsai Date: Sat, 2 Apr 2022 13:00:36 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH RESEND2] net: stmmac: Fix unset max_speed difference between DT and non-DT platforms To: Jakub Kicinski Cc: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Paolo Abeni , Srinivas Kandagatla , netdev , linux-arm-kernel , linux-kernel , Russell King X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220401_220040_915655_5F459477 X-CRM114-Status: GOOD ( 24.06 ) 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: , Reply-To: wens@kernel.org 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 Sat, Apr 2, 2022 at 12:42 PM Jakub Kicinski wrote: > > 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. I don't remember anyone asking for any changes. Thanks ChenYu _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel