lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e8a0b66d-4b13-3c07-6ba8-cec40a6c4422@gmail.com>
Date:   Tue, 29 Nov 2022 11:12:31 -0800
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Arnd Bergmann <arnd@...db.de>, Jakub Kicinski <kuba@...nel.org>,
        Richard Cochran <richardcochran@...il.com>
Cc:     YueHaibing <yuehaibing@...wei.com>,
        "David S . Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Paolo Abeni <pabeni@...hat.com>,
        Naresh Kamboju <naresh.kamboju@...aro.org>,
        Netdev <netdev@...r.kernel.org>, linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH] net: broadcom: Add PTP_1588_CLOCK_OPTIONAL dependency for
 BCMGENET under ARCH_BCM2835

On 11/29/22 03:58, Arnd Bergmann wrote:
> [Florian's broadcom.com address bounces, adding him to Cc
> with his gmail address]

Yes, because it's not a valid email address :) it's either lastname, or 
first.lastname.

> 
> On Tue, Nov 29, 2022, at 12:56, Arnd Bergmann wrote:
>> On Tue, Nov 29, 2022, at 04:18, Jakub Kicinski wrote:
>>> On Fri, 25 Nov 2022 19:50:03 +0800 YueHaibing wrote:
>>>> diff --git a/drivers/net/ethernet/broadcom/Kconfig b/drivers/net/ethernet/broadcom/Kconfig
>>>> index 55dfdb34e37b..f4ca0c6c0f51 100644
>>>> --- a/drivers/net/ethernet/broadcom/Kconfig
>>>> +++ b/drivers/net/ethernet/broadcom/Kconfig
>>>> @@ -71,13 +71,14 @@ 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
>>>>   	select BCM7XXX_PHY
>>>>   	select MDIO_BCM_UNIMAC
>>>>   	select DIMLIB
>>>> -	select BROADCOM_PHY if (ARCH_BCM2835 && PTP_1588_CLOCK_OPTIONAL)
>>>> +	select BROADCOM_PHY if ARCH_BCM2835
>>>>   	help
>>>>   	  This driver supports the built-in Ethernet MACs found in the
>>>>   	  Broadcom BCM7xxx Set Top Box family chipset.
>>>
>>> What's the code path that leads to the failure? I want to double check
>>> that the driver is handling the PTP registration return codes correctly.
>>> IIUC this is a source of misunderstandings in the PTP API.
>>>
>>> Richard, here's the original report:
>>> https://lore.kernel.org/all/CA+G9fYvKfbJHcMZtybf_0Ru3+6fKPg9HwWTOhdCLrOBXMaeG1A@mail.gmail.com
>>
>> The original report was for a different bug that resulted in the
>> BROADCOM_PHY driver not being selectable at all.
>>
>> The remaining problem here is this configuration:
>>
>> CONFIG_ARM=y
>> CONFIG_BCM2835=y
>> CONFIG_BCMGENET=y
>> CONFIG_PTP_1588_CLOCK=m
>> CONFIG_PTP_1588_CLOCK_OPTIONAL=m
>> CONFIG_BROADCOM_PHY=m
>>
>> In this case, BCMGENET should 'select BROADCOM_PHY' to make the
>> driver work correctly, but fails to do this because of the
>> dependency. During early boot, this means it cannot access the
>> PHY because that is in a loadable module, despite commit
>> 99addbe31f55 ("net: broadcom: Select BROADCOM_PHY for BCMGENET")
>> trying to ensure that it could.

I don't believe this is the failure mechanism because there is always a 
fallback to the Generic PHY driver, the issue is that we have configured 
a specific RGMII mode in the Device Tree that is acted on by both the 
Ethernet MAC and the PHY in a way that is electrically incompatible 
unless the proper PHY driver is also enabled such that the RGMII mode is 
enabled on the PHY side.
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ