]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
dpaa2-switch: do not enable the DPSW at probe time
authorIoana Ciornei <ioana.ciornei@nxp.com>
Tue, 3 Aug 2021 16:57:40 +0000 (19:57 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Sep 2021 11:42:07 +0000 (13:42 +0200)
[ Upstream commit 042ad90ca7ce70f35dc5efd5b2043d2f8aceb12a ]

We should not enable the switch interfaces at probe time since this is
trigged by the open callback. Remove the call dpsw_enable() which does
exactly this.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c

index 58964d22cb17d2507a7bb62e45f8e1249f82c697..e3a3499ba7a232a99d25244e7f79dadbcbf444a7 100644 (file)
@@ -3231,12 +3231,6 @@ static int dpaa2_switch_probe(struct fsl_mc_device *sw_dev)
                               &ethsw->fq[i].napi, dpaa2_switch_poll,
                               NAPI_POLL_WEIGHT);
 
-       err = dpsw_enable(ethsw->mc_io, 0, ethsw->dpsw_handle);
-       if (err) {
-               dev_err(ethsw->dev, "dpsw_enable err %d\n", err);
-               goto err_free_netdev;
-       }
-
        /* Setup IRQs */
        err = dpaa2_switch_setup_irqs(sw_dev);
        if (err)