Skip to content

Commit 65c4506

Browse files
Murali Karicheridavem330
authored andcommitted
net: netcp: ethss: map vlan priorities to zero flow
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> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 7771f2b commit 65c4506

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

drivers/net/ethernet/ti/netcp_ethss.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,7 @@ struct gbe_port_regs {
602602
struct gbe_port_regs_ofs {
603603
u16 port_vlan;
604604
u16 tx_pri_map;
605+
u16 rx_pri_map;
605606
u16 sa_lo;
606607
u16 sa_hi;
607608
u16 ts_ctl;
@@ -2304,6 +2305,13 @@ static int gbe_slave_open(struct gbe_intf *gbe_intf)
23042305
gbe_sgmii_rtreset(priv, slave, false);
23052306
gbe_port_config(priv, slave, priv->rx_packet_max);
23062307
gbe_set_slave_mac(slave, gbe_intf);
2308+
/* For NU & 2U switch, map the vlan priorities to zero
2309+
* as we only configure to use priority 0
2310+
*/
2311+
if (IS_SS_ID_MU(priv))
2312+
writel(HOST_TX_PRI_MAP_DEFAULT,
2313+
GBE_REG_ADDR(slave, port_regs, rx_pri_map));
2314+
23072315
/* enable forwarding */
23082316
cpsw_ale_control_set(priv->ale, slave->port_num,
23092317
ALE_PORT_STATE, ALE_PORT_STATE_FORWARD);
@@ -3005,6 +3013,7 @@ static int init_slave(struct gbe_priv *gbe_dev, struct gbe_slave *slave,
30053013
/* Initialize slave port register offsets */
30063014
GBENU_SET_REG_OFS(slave, port_regs, port_vlan);
30073015
GBENU_SET_REG_OFS(slave, port_regs, tx_pri_map);
3016+
GBENU_SET_REG_OFS(slave, port_regs, rx_pri_map);
30083017
GBENU_SET_REG_OFS(slave, port_regs, sa_lo);
30093018
GBENU_SET_REG_OFS(slave, port_regs, sa_hi);
30103019
GBENU_SET_REG_OFS(slave, port_regs, ts_ctl);

0 commit comments

Comments
 (0)