Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Ioana Ciornei <ciorneiioana@gmail.com>
To: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org
Cc: laurentiu.tudor@nxp.com, Ioana Ciornei <ioana.ciornei@nxp.com>
Subject: [PATCH net-next 4/8] dpaa2-switch: no need to check link state right after ndo_open
Date: Tue,  3 Aug 2021 19:57:41 +0300	[thread overview]
Message-ID: <20210803165745.138175-5-ciorneiioana@gmail.com> (raw)
In-Reply-To: <20210803165745.138175-1-ciorneiioana@gmail.com>

From: Ioana Ciornei <ioana.ciornei@nxp.com>

The call to dpaa2_switch_port_link_state_update is a leftover from the
time when on DPAA2 platforms the PHYs were started at boot time so when
an ifconfig was issued on the associated interface, the link status
needed to be checked directly from the ndo_open() callback.  This is not
needed anymore since we are now properly integrated with the PHY layer
thus a link interrupt will come directly from the PHY eventually without
the need to call the sync function.
Fix this up by removing the call to dpaa2_switch_port_link_state_update.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
---
 .../net/ethernet/freescale/dpaa2/dpaa2-switch.c    | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
index 36a6cfe9eaeb..aad7f9abfa93 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
@@ -692,23 +692,9 @@ static int dpaa2_switch_port_open(struct net_device *netdev)
 		return err;
 	}
 
-	/* sync carrier state */
-	err = dpaa2_switch_port_link_state_update(netdev);
-	if (err) {
-		netdev_err(netdev,
-			   "dpaa2_switch_port_link_state_update err %d\n", err);
-		goto err_carrier_sync;
-	}
-
 	dpaa2_switch_enable_ctrl_if_napi(ethsw);
 
 	return 0;
-
-err_carrier_sync:
-	dpsw_if_disable(port_priv->ethsw_data->mc_io, 0,
-			port_priv->ethsw_data->dpsw_handle,
-			port_priv->idx);
-	return err;
 }
 
 static int dpaa2_switch_port_stop(struct net_device *netdev)
-- 
2.31.1


  parent reply	other threads:[~2021-08-03 17:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-03 16:57 [PATCH net-next 0/8] dpaa2-switch: integrate the MAC endpoint support Ioana Ciornei
2021-08-03 16:57 ` [PATCH net-next 1/8] dpaa2-switch: request all interrupts sources on the DPSW Ioana Ciornei
2021-08-03 16:57 ` [PATCH net-next 2/8] dpaa2-switch: use the port index in the IRQ handler Ioana Ciornei
2021-08-03 16:57 ` [PATCH net-next 3/8] dpaa2-switch: do not enable the DPSW at probe time Ioana Ciornei
2021-08-03 16:57 ` Ioana Ciornei [this message]
2021-08-03 16:57 ` [PATCH net-next 5/8] bus: fsl-mc: extend fsl_mc_get_endpoint() to pass interface ID Ioana Ciornei
2021-08-03 16:57 ` [PATCH net-next 6/8] dpaa2-switch: integrate the MAC endpoint support Ioana Ciornei
2021-08-03 16:57 ` [PATCH net-next 7/8] dpaa2-switch: add a prefix to HW ethtool stats Ioana Ciornei
2021-08-03 16:57 ` [PATCH net-next 8/8] dpaa2-switch: export MAC statistics in ethtool Ioana Ciornei
2021-08-04  9:00 ` [PATCH net-next 0/8] dpaa2-switch: integrate the MAC endpoint support patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210803165745.138175-5-ciorneiioana@gmail.com \
    --to=ciorneiioana@gmail.com \
    --cc=davem@davemloft.net \
    --cc=ioana.ciornei@nxp.com \
    --cc=kuba@kernel.org \
    --cc=laurentiu.tudor@nxp.com \
    --cc=netdev@vger.kernel.org \
    --subject='Re: [PATCH net-next 4/8] dpaa2-switch: no need to check link state right after ndo_open' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).