netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, andrew@lunn.ch, vivien.didelot@gmail.com,
	f.fainelli@gmail.com, antoine.tenart@bootlin.com,
	alexandre.belloni@bootlin.com, UNGLinuxDriver@microchip.com,
	alexandru.marginean@nxp.com, claudiu.manoil@nxp.com,
	madalin.bucur@oss.nxp.com, radu-andrei.bulie@nxp.com,
	fido_max@inbox.ru
Subject: [PATCH v4 net-next 06/11] net: mscc: ocelot: disable flow control on NPI interface
Date: Mon, 13 Jul 2020 19:57:06 +0300	[thread overview]
Message-ID: <20200713165711.2518150-7-olteanv@gmail.com> (raw)
In-Reply-To: <20200713165711.2518150-1-olteanv@gmail.com>

From: Vladimir Oltean <vladimir.oltean@nxp.com>

The Ocelot switches do not support flow control on Ethernet interfaces
where a DSA tag must be added. If pause frames are enabled, they will be
encapsulated in the DSA tag just like regular frames, and the DSA master
will not recognize them.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
---
Changes in v4:
None.

Changes in v3:
None.

Changes in v2:
None.

 drivers/net/ethernet/mscc/ocelot.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c
index aca805b9c0b3..2a44305912d2 100644
--- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -1401,6 +1401,10 @@ void ocelot_configure_cpu(struct ocelot *ocelot, int npi,
 				    extraction);
 		ocelot_fields_write(ocelot, npi, SYS_PORT_MODE_INCL_INJ_HDR,
 				    injection);
+
+		/* Disable transmission of pause frames */
+		ocelot_rmw_rix(ocelot, 0, SYS_PAUSE_CFG_PAUSE_ENA,
+			       SYS_PAUSE_CFG, npi);
 	}
 
 	/* Enable CPU port module */
-- 
2.25.1


  parent reply	other threads:[~2020-07-13 16:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-13 16:57 [PATCH v4 net-next 00/11] New DSA driver for VSC9953 Seville switch Vladimir Oltean
2020-07-13 16:57 ` [PATCH v4 net-next 01/11] net: mscc: ocelot: convert port registers to regmap Vladimir Oltean
2020-07-13 16:57 ` [PATCH v4 net-next 02/11] soc: mscc: ocelot: add MII registers description Vladimir Oltean
2020-07-13 16:57 ` [PATCH v4 net-next 03/11] net: mscc: ocelot: convert QSYS_SWITCH_PORT_MODE and SYS_PORT_MODE to regfields Vladimir Oltean
2020-07-13 16:57 ` [PATCH v4 net-next 04/11] net: dsa: felix: create a template for the DSA tags on xmit Vladimir Oltean
2020-07-13 16:57 ` [PATCH v4 net-next 05/11] net: mscc: ocelot: split writes to pause frame enable bit and to thresholds Vladimir Oltean
2020-07-13 16:57 ` Vladimir Oltean [this message]
2020-07-13 16:57 ` [PATCH v4 net-next 07/11] net: mscc: ocelot: convert SYS_PAUSE_CFG register access to regfield Vladimir Oltean
2020-07-13 16:57 ` [PATCH v4 net-next 08/11] net: mscc: ocelot: extend watermark encoding function Vladimir Oltean
2020-07-13 16:57 ` [PATCH v4 net-next 09/11] net: dsa: felix: move probing to felix_vsc9959.c Vladimir Oltean
2020-07-13 16:57 ` [PATCH v4 net-next 10/11] net: dsa: felix: introduce support for Seville VSC9953 switch Vladimir Oltean
2020-07-13 16:57 ` [PATCH v4 net-next 11/11] docs: devicetree: add bindings for Seville DSA switch inside Felix driver Vladimir Oltean
2020-07-14  0:40 ` [PATCH v4 net-next 00/11] New DSA driver for VSC9953 Seville switch David Miller

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=20200713165711.2518150-7-olteanv@gmail.com \
    --to=olteanv@gmail.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=alexandru.marginean@nxp.com \
    --cc=andrew@lunn.ch \
    --cc=antoine.tenart@bootlin.com \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=fido_max@inbox.ru \
    --cc=madalin.bucur@oss.nxp.com \
    --cc=netdev@vger.kernel.org \
    --cc=radu-andrei.bulie@nxp.com \
    --cc=vivien.didelot@gmail.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).