Hi Grygorii
Too much code, but I've tried pass thru.
Probably expectation the devlink to be reviewed, but several
common replies that should be reflected in non RFC v.
On Fri, Jun 21, 2019 at 09:13:09PM +0300, Grygorii Strashko wrote:
From: Ilias Apalodimas <ilias.apalodimas@xxxxxxxxxx>
Part 1:
Introduce basic CPSW dual_mac driver (cpsw_new.c) which is operating in
dual-emac mode by default, thus working as 2 individual network interfaces.
Main differences from legacy CPSW driver are:
- optimized promiscuous mode: The P0_UNI_FLOOD (both ports) is enabled in
addition to ALLMULTI (current port) instead of ALE_BYPASS. So, Ports in
promiscuous mode will keep possibility of mcast and vlan filtering, which
is provides significant benefits when ports are joined to the same bridge,
but without enabling "switch" mode, or to different bridges.
- learning disabled on ports as it make not too much sense for
 segregated ports - no forwarding in HW.
- enabled basic support for devlink.
ÂÂÂÂdevlink dev show
ÂÂÂÂÂÂÂ platform/48484000.ethernet_switch
ÂÂÂÂdevlink dev param show
ÂÂÂÂ platform/48484000.ethernet_switch:
ÂÂÂÂname ale_bypass type driver-specific
ÂÂÂÂ values:
ÂÂÂÂÂÂÂ cmode runtime value false
- "ale_bypass" devlink driver parameter allows to enable
ALE_CONTROL(4).BYPASS mode for debug purposes.
- updated DT bindings.
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@xxxxxxxxxx>
Signed-off-by: Murali Karicheri <m-karicheri2@xxxxxx>
+
+ÂÂÂ /* setup host port priority mapping */
+ÂÂÂ writel_relaxed(CPDMA_TX_PRIORITY_MAP,
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ &cpsw->host_port_regs->cpdma_tx_pri_map);
+ÂÂÂ writel_relaxed(0, &cpsw->host_port_regs->cpdma_rx_chan_map);
----
+---
+ÂÂÂ /* disable priority elevation */
+ÂÂÂ writel_relaxed(0, &cpsw->regs->ptype);
+
+ÂÂÂ /* enable statistics collection only on all ports */
+ÂÂÂ writel_relaxed(0x7, &cpsw->regs->stat_port_en);
+
+ÂÂÂ /* Enable internal fifo flow control */
+ÂÂÂ writel(0x7, &cpsw->regs->flow_control);
Would be nice to do the same in old driver.
I mean moving it from ndo_open
Also were thoughts about this.