Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3504291pxb; Mon, 4 Apr 2022 19:06:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNgjoLVp72OePTcnc3gur6MxDFRVa6T5qtBBbGAWAqwOUwN8/GLBi3J+pFFFl7kNxEhVNj X-Received: by 2002:a17:90a:f011:b0:1c7:1800:a86d with SMTP id bt17-20020a17090af01100b001c71800a86dmr1304136pjb.175.1649124389172; Mon, 04 Apr 2022 19:06:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649124389; cv=none; d=google.com; s=arc-20160816; b=RT8QoRFnwCGsaCMdhFGr5Ef3wVa1kdXHoPLzZho/awiLHAVeD5h4mXHvvF9OO90xc6 DtTa2XVvVap2aO5NQFnZpaiRxd6rAIkZ493dXaz5BSjUfmTFMK7acUaM10z9ZtZUiCd4 82tw+kEX+5xbd9nR1eIAPhW6uLHAMDPtG+EHpB/hDUYEvzKawm3qzvwcMSAg+If+Rwvt zrZfdhHG6Amd6JogjC8sMM4jW7xZ/27IwWfOxahHEm8pRfT3T54un5GWYEveRWaQ7SSH BIt6CYqYVTYp6QlJlFxKK3B6uyHkniv9c8sr9pJvnxLWd1EYIwttYcm6shfUZqb9wbSu uo8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:reply-to :in-reply-to:references:mime-version:dkim-signature; bh=cx+RJURoxzmz6/wuPgC4V8H/9N6lIL2L6CRUr8zV5PU=; b=Xw0lIuCJ8nHRvO/5ykCsluoadxnC3JU0rfl725DsaaXV/1cVk/bRxk2H1R6Ishi9Hn pWBLg+6XZE1HPSZiG2F5fSWpFlsyW54YF76xUuuuwFQnpRF0ZkkzgU90cAAqy1/tX7e9 ZNhscSAbeEPpI64x9cxx7HwW0IqtMRwUCGGEH0p2yJGxjP/xNzQPinzOGWiWIQUoo0AP pRt8V1ATsTS7tM9Y6j+gfPd/cTKjHg5+Efbk2+a/8BHGGwIIoaNOLA6bQvGKscuMVR2g xJ6UqoKwSUetNKMg3YMyJXvaS72QMbB7UK1NqAHAR+rGGZxROi+Eu1NUqerEThMrCKKr jovQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="lU0hiw/4"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id v1-20020a637a01000000b003816043f125si12801226pgc.794.2022.04.04.19.06.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 19:06:29 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="lU0hiw/4"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A4C872261F1; Mon, 4 Apr 2022 17:29:02 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240554AbiDBFCc (ORCPT + 99 others); Sat, 2 Apr 2022 01:02:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231346AbiDBFC3 (ORCPT ); Sat, 2 Apr 2022 01:02:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3FA717665D; Fri, 1 Apr 2022 22:00:37 -0700 (PDT) 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 664EA60B8D; Sat, 2 Apr 2022 05:00:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BBBFDC34112; 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-f54.google.com with SMTP id i10so4483142vsr.6; Fri, 01 Apr 2022 22:00:36 -0700 (PDT) X-Gm-Message-State: AOAM532HSIwI/AikuvPYcJ+yX49OB13HL9G/FUyUVlNtu5cDuXrL1IjC 98SJ8xqOsQNXp3Zuc6YCD6N9Q+KFycGJggT6FaA= 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> Reply-To: wens@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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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