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] [day] [month] [year] [list]
Message-ID: <d4ddf75c-3355-daee-b1d1-8db02675507a@samsung.com>
Date:   Tue, 12 May 2020 08:00:12 +0200
From:   Marek Szyprowski <m.szyprowski@...sung.com>
To:     Florian Fainelli <f.fainelli@...il.com>, netdev@...r.kernel.org
Cc:     nsaenzjulienne@...e.de, wahrenst@....net,
        "David S. Miller" <davem@...emloft.net>,
        Thomas Gleixner <tglx@...utronix.de>,
        Tal Gilboa <talgi@...lanox.com>,
        Michael Chan <michael.chan@...adcom.com>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        Andy Gospodarek <gospo@...adcom.com>,
        Randy Dunlap <rdunlap@...radead.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net] net: broadcom: Imply BROADCOM_PHY for BCMGENET

Hi Florian,

On 11.05.2020 20:19, Florian Fainelli wrote:
> On 5/11/2020 12:21 AM, Marek Szyprowski wrote:
>> On 09.05.2020 00:32, Florian Fainelli wrote:
>>> The GENET controller on the Raspberry Pi 4 (2711) is typically
>>> interfaced with an external Broadcom PHY via a RGMII electrical
>>> interface. To make sure that delays are properly configured at the PHY
>>> side, ensure that we get a chance to have the dedicated Broadcom PHY
>>> driver (CONFIG_BROADCOM_PHY) enabled for this to happen.
>>>
>>> Fixes: 402482a6a78e ("net: bcmgenet: Clear ID_MODE_DIS in EXT_RGMII_OOB_CTRL when not needed")
>>> Reported-by: Marek Szyprowski <m.szyprowski@...sung.com>
>>> Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
>>> ---
>>> David,
>>>
>>> I would like Marek to indicate whether he is okay or not with this
>>> change. Thanks!
>> It is better. It fixes the default values for ARM 32bit
>> bcm2835_defconfig and ARM 64bit defconfig, so you can add:
>>
>> Tested-by: Marek Szyprowski <m.szyprowski@...sung.com>
>>
>> There is still an issue there. In case of ARM 64bit, when Genet driver
>> is configured as a module, BROADCOM_PHY is also set to module. When I
>> changed Genet to be built-in, BROADCOM_PHY stayed selected as module.
> OK.
>
>> This case doesn't work, as Genet driver is loaded much earlier than the
>> rootfs/initrd/etc is available, thus broadcom phy driver is not loaded
>> at all. It looks that some kind of deferred probe is missing there.
> In the absence of a specific PHY driver the Generic PHY driver gets used
> instead. This is a valid situation as I described in my other email
> because the boot loader/firmware could have left the PHY properly
> configured with the expected RGMII delays and configuration such that
> Linux does not need to be aware of anything. I suppose we could change
> the GENET driver when running on the 2711 platform to reject the PHY
> driver being "Generic PHY" on the premise that a specialized driver
> should be used instead, but that seems a bit too restrictive IMHO.
>
> Do you prefer a "select BROADCOM_PHY if ARCH_BCM2835" then?

Yes. It solves the issue after switching Genet to be built-in without 
the need to change the CONFIG_BROADCOM_PHY.

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ