devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Murali Karicheri <m-karicheri2@ti.com>
To: robh+dt@kernel.org, mark.rutland@arm.com, ssantosh@kernel.org,
	malat@debian.org, w-kwok2@ti.com, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, davem@davemloft.net,
	netdev@vger.kernel.org
Subject: [net-next PATCH v3 07/11] net: netcp: ethss: map vlan priorities to zero flow
Date: Mon, 2 Apr 2018 10:37:57 -0400	[thread overview]
Message-ID: <1522679881-25643-8-git-send-email-m-karicheri2@ti.com> (raw)
In-Reply-To: <1522679881-25643-1-git-send-email-m-karicheri2@ti.com>

The driver currently support only vlan priority zero. So map the
vlan priorities to zero flow in hardware.

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
---
 drivers/net/ethernet/ti/netcp_ethss.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/net/ethernet/ti/netcp_ethss.c b/drivers/net/ethernet/ti/netcp_ethss.c
index ab6c918..33d70d4 100644
--- a/drivers/net/ethernet/ti/netcp_ethss.c
+++ b/drivers/net/ethernet/ti/netcp_ethss.c
@@ -600,6 +600,7 @@ struct gbe_port_regs {
 struct gbe_port_regs_ofs {
 	u16	port_vlan;
 	u16	tx_pri_map;
+	u16     rx_pri_map;
 	u16	sa_lo;
 	u16	sa_hi;
 	u16	ts_ctl;
@@ -2300,6 +2301,13 @@ static int gbe_slave_open(struct gbe_intf *gbe_intf)
 	gbe_sgmii_rtreset(priv, slave, false);
 	gbe_port_config(priv, slave, priv->rx_packet_max);
 	gbe_set_slave_mac(slave, gbe_intf);
+	/* For NU & 2U switch, map the vlan priorities to zero
+	 * as we only configure to use priority 0
+	 */
+	if (IS_SS_ID_MU(priv))
+		writel(HOST_TX_PRI_MAP_DEFAULT,
+		       GBE_REG_ADDR(slave, port_regs, rx_pri_map));
+
 	/* enable forwarding */
 	cpsw_ale_control_set(priv->ale, slave->port_num,
 			     ALE_PORT_STATE, ALE_PORT_STATE_FORWARD);
@@ -3001,6 +3009,7 @@ static int init_slave(struct gbe_priv *gbe_dev, struct gbe_slave *slave,
 		/* Initialize  slave port register offsets */
 		GBENU_SET_REG_OFS(slave, port_regs, port_vlan);
 		GBENU_SET_REG_OFS(slave, port_regs, tx_pri_map);
+		GBENU_SET_REG_OFS(slave, port_regs, rx_pri_map);
 		GBENU_SET_REG_OFS(slave, port_regs, sa_lo);
 		GBENU_SET_REG_OFS(slave, port_regs, sa_hi);
 		GBENU_SET_REG_OFS(slave, port_regs, ts_ctl);
-- 
1.9.1

  parent reply	other threads:[~2018-04-02 14:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-02 14:37 [net-next PATCH v3 00/11] Add support for netcp driver on K2G SoC Murali Karicheri
2018-04-02 14:37 ` [net-next PATCH v3 01/11] soc: ti: K2G: enhancement to support QMSS in K2G NAVSS Murali Karicheri
2018-04-09 21:12   ` Rob Herring
2018-04-02 14:37 ` [net-next PATCH v3 02/11] soc: ti: K2G: provide APIs to support driver probe deferral Murali Karicheri
2018-04-02 14:37 ` [net-next PATCH v3 03/11] net: netcp: ethss: use macro for checking ss_version consistently Murali Karicheri
2018-04-02 14:37 ` [net-next PATCH v3 04/11] net: netcp: ethss: make call to gbe_sgmii_config() conditional Murali Karicheri
2018-04-02 14:37 ` [net-next PATCH v3 05/11] net: netcp: ethss: add support for handling sgmii link interface Murali Karicheri
2018-04-02 14:37 ` [net-next PATCH v3 06/11] net: netcp: ethss: use rgmii link status for 2u cpsw hardware Murali Karicheri
2018-04-02 14:37 ` Murali Karicheri [this message]
2018-04-02 14:37 ` [net-next PATCH v3 08/11] net: netcp: ethss: re-use stats handling code for 2u hardware Murali Karicheri
2018-04-02 14:37 ` [net-next PATCH v3 09/11] net: netcp: ethss: use of_get_phy_mode() to support different RGMII modes Murali Karicheri
2018-04-02 14:38 ` [net-next PATCH v3 10/11] Revert "net: netcp: remove dead code from the driver" Murali Karicheri
2018-04-02 14:38 ` [net-next PATCH v3 11/11] net: netcp: support probe deferral Murali Karicheri
2018-04-02 14:40 ` [net-next PATCH v3 00/11] Add support for netcp driver on K2G SoC David Miller
2018-04-02 15:07   ` Murali Karicheri

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=1522679881-25643-8-git-send-email-m-karicheri2@ti.com \
    --to=m-karicheri2@ti.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=malat@debian.org \
    --cc=mark.rutland@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=ssantosh@kernel.org \
    --cc=w-kwok2@ti.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).