diff options
author | Marian-Cristian Rotariu <marian.rotariu@freescale.com> | 2015-01-15 15:02:48 (GMT) |
---|---|---|
committer | Olivia Yin <r63875@freescale.com> | 2015-01-26 10:36:22 (GMT) |
commit | fa2b857e85998a6843c1a6843446ff00067fa3a4 (patch) | |
tree | 3c45e7fd44d8eed9657f59fa5a4e1f43bcaf117a /drivers/net | |
parent | 6619b8b55796cdf0cec04b66a71288edd3057229 (diff) | |
download | linux-fsl-qoriq-fa2b857e85998a6843c1a6843446ff00067fa3a4.tar.xz |
dpaa_eth: add VSP compatibility for eth ports
This patch provides compatibility for the Ethernet driver ports with the VSP
capability. Until now, the FMan ports managed by the Ethernet driver were not
able to properly configure VSP because of the buffer layout of the FMan ports
used.
When VSPs are not enabled, the RX and TX path buffer layout are different, the
Ethernet driver maintains separate buffer layouts for transmission and
reception. When VSPs are enabled on a certain FMan port, the buffer layouts for
Rx and Tx should be the same, the same buffer layout being used inside a
storage profile.
In order to bypass this the VSP capability is disabled on the Tx path by setting
ContextB to 0 in the FQ descriptor of the queues that are transmitting the
frames to the Tx port.
Change-Id: Ie29b8a0fe8b0b9c2344658f8e4a35e0392b6bf8e
Signed-off-by: Marian-Cristian Rotariu <marian.rotariu@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/25613
Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/freescale/dpa/dpaa_eth_common.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth_common.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth_common.c index 32684d2..5738160 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_eth_common.c +++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth_common.c @@ -1215,6 +1215,8 @@ int dpa_fq_init(struct dpa_fq *dpa_fq, bool td_enable) fq = &dpa_fq->fq_base; if (dpa_fq->init) { + memset(&initfq, 0, sizeof(initfq)); + initfq.we_mask = QM_INITFQ_WE_FQCTRL; /* FIXME: why would we want to keep an empty FQ in cache? */ initfq.fqd.fq_ctrl = QM_FQCTRL_PREFERINCACHE; @@ -1276,9 +1278,11 @@ int dpa_fq_init(struct dpa_fq *dpa_fq, bool td_enable) /* ContextA: OVOM=1 (use contextA2 bits instead of ICAD) * A2V=1 (contextA A2 field is valid) * A0V=1 (contextA A0 field is valid) + * B0V=1 (contextB field is valid) * ContextA A2: EBD=1 (deallocate buffers inside FMan) + * ContextB B0(ASPID): 0 (absolute Virtual Storage ID) */ - initfq.fqd.context_a.hi = 0x1a000000; + initfq.fqd.context_a.hi = 0x1e000000; initfq.fqd.context_a.lo = 0x80000000; } } |