lkml.org 
[lkml]   [2019]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.0 053/146] net: dsa: qca8k: remove leftover phy accessors
    Date
    5.0-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Christian Lamparter <chunkeey@gmail.com>

    commit 1eec7151ae0e134bd42e3f128066b2ff8da21393 upstream.

    This belated patch implements Andrew Lunn's request of
    "remove the phy_read() and phy_write() functions."
    <https://lore.kernel.org/patchwork/comment/902734/>

    While seemingly harmless, this causes the switch's user
    port PHYs to get registered twice. This is because the
    DSA subsystem will create a slave mdio-bus not knowing
    that the qca8k_phy_(read|write) accessors operate on
    the external mdio-bus. So the same "bus" gets effectively
    duplicated.

    Cc: stable@vger.kernel.org
    Fixes: 6b93fb46480a ("net-next: dsa: add new driver for qca8xxx family")
    Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/net/dsa/qca8k.c | 18 ------------------
    1 file changed, 18 deletions(-)

    --- a/drivers/net/dsa/qca8k.c
    +++ b/drivers/net/dsa/qca8k.c
    @@ -620,22 +620,6 @@ qca8k_adjust_link(struct dsa_switch *ds,
    qca8k_port_set_status(priv, port, 1);
    }

    -static int
    -qca8k_phy_read(struct dsa_switch *ds, int phy, int regnum)
    -{
    - struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv;
    -
    - return mdiobus_read(priv->bus, phy, regnum);
    -}
    -
    -static int
    -qca8k_phy_write(struct dsa_switch *ds, int phy, int regnum, u16 val)
    -{
    - struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv;
    -
    - return mdiobus_write(priv->bus, phy, regnum, val);
    -}
    -
    static void
    qca8k_get_strings(struct dsa_switch *ds, int port, u32 stringset, uint8_t *data)
    {
    @@ -876,8 +860,6 @@ static const struct dsa_switch_ops qca8k
    .setup = qca8k_setup,
    .adjust_link = qca8k_adjust_link,
    .get_strings = qca8k_get_strings,
    - .phy_read = qca8k_phy_read,
    - .phy_write = qca8k_phy_write,
    .get_ethtool_stats = qca8k_get_ethtool_stats,
    .get_sset_count = qca8k_get_sset_count,
    .get_mac_eee = qca8k_get_mac_eee,

    \
     
     \ /
      Last update: 2019-04-01 20:11    [W:4.025 / U:0.164 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site