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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5548FC4332F for ; Fri, 25 Nov 2022 10:25:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229489AbiKYKZW (ORCPT ); Fri, 25 Nov 2022 05:25:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229753AbiKYKZS (ORCPT ); Fri, 25 Nov 2022 05:25:18 -0500 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C745F209AE; Fri, 25 Nov 2022 02:25:17 -0800 (PST) Received: from canpemm500007.china.huawei.com (unknown [172.30.72.53]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4NJWBF3vkKzJnw0; Fri, 25 Nov 2022 18:21:57 +0800 (CST) Received: from [10.174.179.215] (10.174.179.215) by canpemm500007.china.huawei.com (7.192.104.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 25 Nov 2022 18:25:14 +0800 Subject: Re: [PATCH 5.10 000/149] 5.10.156-rc1 review To: Arnd Bergmann , Naresh Kamboju , Greg Kroah-Hartman CC: , , , Linus Torvalds , Andrew Morton , Guenter Roeck , , , , Pavel Machek , Jon Hunter , Florian Fainelli , Sudip Mukherjee , , , Netdev , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , =?UTF-8?Q?Daniel_D=c3=adaz?= References: <20221123084557.945845710@linuxfoundation.org> From: YueHaibing Message-ID: <23b0fa9c-d041-8c56-ec4b-04991fa340d4@huawei.com> Date: Fri, 25 Nov 2022 18:25:13 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.179.215] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To canpemm500007.china.huawei.com (7.192.104.62) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/11/25 18:02, Arnd Bergmann wrote: > On Fri, Nov 25, 2022, at 09:05, Naresh Kamboju wrote: >> On Fri, 25 Nov 2022 at 12:57, Greg Kroah-Hartman wrote: >>> On Thu, Nov 24, 2022 at 09:17:36PM +0530, Naresh Kamboju wrote: >>>> >>>> Daniel bisected this reported problem and found the first bad commit, >>>> >>>> YueHaibing >>>> net: broadcom: Fix BCMGENET Kconfig >>> >>> But that is in 5.10.155, 5.15.79, 6.0.9, and 6.1-rc5. It is not new to >>> this -rc release. >> >> It started from 5.10.155 and this is only seen on 5.10 and other >> branches 5.15, 6.0 and mainline are looking good. > > I think the original patch is wrong and should be fixed upstream. > The backported patch in question is a one-line Kconfig change doing It seems lts 5.10 do not contain commit e5f31552674e ("ethernet: fix PTP_1588_CLOCK dependencies"), there is not PTP_1588_CLOCK_OPTIONAL option. > > diff --git a/drivers/net/ethernet/broadcom/Kconfig b/drivers/net/ethernet/broadcom/Kconfig > index f4e1ca68d831..55dfdb34e37b 100644 > --- a/drivers/net/ethernet/broadcom/Kconfig > +++ b/drivers/net/ethernet/broadcom/Kconfig > @@ -77,7 +77,7 @@ config BCMGENET > select BCM7XXX_PHY > select MDIO_BCM_UNIMAC > select DIMLIB > - select BROADCOM_PHY if ARCH_BCM2835 > + select BROADCOM_PHY if (ARCH_BCM2835 && PTP_1588_CLOCK_OPTIONAL) > help > This driver supports the built-in Ethernet MACs found in the > Broadcom BCM7xxx Set Top Box family chipset. > > which fixes the build on kernels that contain 99addbe31f55 ("net: > broadcom: Select BROADCOM_PHY for BCMGENET") and enable > BCMGENET=y but PTP_1588_CLOCK_OPTIONAL=m, which otherwise > leads to a link failure. > > The patch unfortunately solves it by replacing it with a runtime > failure by no longer linking in the PHY driver (as found by Naresh). > > I think the correct fix would be to propagate the dependency down > to BCMGENET: > > diff --git a/drivers/net/ethernet/broadcom/Kconfig b/drivers/net/ethernet/broadcom/Kconfig > index f4e1ca68d831..f4ca0c6c0f51 100644 > --- a/drivers/net/ethernet/broadcom/Kconfig > +++ b/drivers/net/ethernet/broadcom/Kconfig > @@ -71,6 +71,7 @@ config BCM63XX_ENET > config BCMGENET > tristate "Broadcom GENET internal MAC support" > depends on HAS_IOMEM > + depends on PTP_1588_CLOCK_OPTIONAL || !ARCH_BCM2835 > select MII > select PHYLIB > select FIXED_PHY > > With this change, the broken config is no longer possible, instead > forcing BCMGENET to be =m when building for ARCH_BCM2835 with > PTP_1588_CLOCK=m. > > Arnd > . >