lkml.org 
[lkml]   [2023]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v1] net: phy: adin: Add flags to disable enhanced link detection
    On Tue, Feb 28, 2023 at 09:40:56AM -0500, Ken Sloat wrote:
    > Enhanced link detection is an ADI PHY feature that allows for earlier
    > detection of link down if certain signal conditions are met. This
    > feature is for the most part enabled by default on the PHY. This is
    > not suitable for all applications and breaks the IEEE standard as
    > explained in the ADI datasheet.
    >
    > To fix this, add override flags to disable enhanced link detection
    > for 1000BASE-T and 100BASE-TX respectively by clearing any related
    > feature enable bits.
    >
    > This new feature was tested on an ADIN1300 but according to the
    > datasheet applies equally for 100BASE-TX on the ADIN1200.
    >
    > Signed-off-by: Ken Sloat <ken.s@variscite.com>
    Hi Ken

    > +static int adin_config_fld_en(struct phy_device *phydev)

    Could we have a better name please. I guess it means Fast Link Down,
    but the commit messages talks about Enhanced link detection. This
    function is also not enabling fast link down, but disabling it, so _en
    seems wrong.

    > +{
    > + struct device *dev = &phydev->mdio.dev;
    > + int reg;
    > +
    > + reg = phy_read_mmd(phydev, MDIO_MMD_VEND1, ADIN1300_FLD_EN_REG);
    > + if (reg < 0)
    > + return reg;
    > +
    > + if (device_property_read_bool(dev, "adi,disable-fld-1000base-t"))

    You need to document these two properties in the device tree binding.

    Please also take a read of
    https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html#netdev-faq

    Andrew

    \
     
     \ /
      Last update: 2023-03-27 00:38    [W:4.676 / U:0.188 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site