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: <36a4299c-6a1a-016d-c563-fb3be4467e79@gmail.com>
Date:   Tue, 16 Feb 2021 15:14:07 -0800
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Nathan Rossi <nathan@...hanrossi.com>
Cc:     Andrew Lunn <andrew@...n.ch>, netdev@...r.kernel.org,
        Nathan Rossi <nathan.rossi@...i.com>,
        Heiner Kallweit <hkallweit1@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>
Subject: Re: [PATCH] of: of_mdio: Handle properties for non-phy mdio devices



On 2/16/2021 2:57 PM, Nathan Rossi wrote:
> On Wed, 17 Feb 2021 at 03:50, Florian Fainelli <f.fainelli@...il.com> wrote:
>>
>>
>>
>> On 2/16/2021 5:06 AM, Andrew Lunn wrote:
>>> On Mon, Feb 15, 2021 at 07:02:18AM +0000, Nathan Rossi wrote:
>>>> From: Nathan Rossi <nathan.rossi@...i.com>
>>>>
>>>> The documentation for MDIO bindings describes the "broken-turn-around",
>>>> "reset-assert-us", and "reset-deassert-us" properties such that any MDIO
>>>> device can define them. Other MDIO devices may require these properties
>>>> in order to correctly function on the MDIO bus.
>>>>
>>>> Enable the parsing and configuration associated with these properties by
>>>> moving the associated OF parsing to a common function
>>>> of_mdiobus_child_parse and use it to apply these properties for both
>>>> PHYs and other MDIO devices.
>>>
>>> Hi Nathan
>>>
>>> What device are you using this with?
>>>
>>> The Marvell Switch driver does its own GPIO reset handling. It has a
>>> better idea when a hardware reset should be applied than what the
>>> phylib core has. It will also poll the EEPROM busy bit after a
>>> reset. How long a pause you need after the reset depends on how full
>>> the EEPROM is.
>>>
>>> And i've never had problems with broken-turn-around with Marvell
>>> switches.
>>
>> The patch does make sense though, Broadcom 53125 switches have a broken
>> turn around and are mdio_device instances, the broken behavior may not
>> show up with all MDIO controllers used to interface though. For the
> 
> Yes the reason we needed this change was to enable broken turn around,
> specifically with a Marvell 88E6390.
> 
>> reset, I would agree with you this is better delegated to the switch
>> driver, given that unlike PHY devices, we have no need to know the
>> mdio_device ID prior to binding the device and the driver together.
>>
>>>
>>> Given the complexity of an Ethernet switch, it is probably better if
>>> it handles its own reset.
> 
> We are not using the reset assert, I included this as part of the
> change to match the existing phy parsing behavior. I can update this
> change to only handle broken turn around, or is it also preferred that
> broken turn around is handled by the e.g. switch driver?

Broken turn around needs to be handled by the core MDIO layer since it
affects what happens to the mdiobus_read() operation, so it is
appropriate to be common to all MDIO and PHY devices. Basically take
your patch but leave the reset handling to the PHY device handling.
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ