[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200327142815.GG11004@lunn.ch>
Date: Fri, 27 Mar 2020 15:28:15 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Florinel Iordache <florinel.iordache@....com>
Cc: davem@...emloft.net, netdev@...r.kernel.org, f.fainelli@...il.com,
hkallweit1@...il.com, linux@...linux.org.uk,
devicetree@...r.kernel.org, linux-doc@...r.kernel.org,
robh+dt@...nel.org, mark.rutland@....com, kuba@...nel.org,
corbet@....net, shawnguo@...nel.org, leoyang.li@....com,
madalin.bucur@....nxp.com, ioana.ciornei@....com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 6/9] net: phy: add backplane kr driver support
> +/* Read AN Link Status */
> +static int is_an_link_up(struct phy_device *bpphy)
> +{
> + struct backplane_phy_info *bp_phy = bpphy->priv;
> + int ret, val = 0;
> +
> + mutex_lock(&bp_phy->bpphy_lock);
> +
> + /* Read twice because Link_Status is LL (Latched Low) bit */
> + val = phy_read_mmd(bpphy, MDIO_MMD_AN, bp_phy->bp_dev.mdio.an_status);
> + val = phy_read_mmd(bpphy, MDIO_MMD_AN, bp_phy->bp_dev.mdio.an_status);
> +
> + mutex_unlock(&bp_phy->bpphy_lock);
How does this mutex interact with phydev->lock? It appears both are
trying to do the same thing, serialise access to the PHY hardware.
Andrew
Powered by blists - more mailing lists