From: Madalin Bucur <madalin.bucur@nxp.com>
To: <netdev@vger.kernel.org>
Cc: linuxppc-dev@lists.ozlabs.org, davem@davemloft.net,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] dpaa_eth: Initialize CGR structure before init
Date: Wed, 4 Jan 2017 13:21:30 +0200 [thread overview]
Message-ID: <1483528890-8621-3-git-send-email-madalin.bucur@nxp.com> (raw)
In-Reply-To: <1483528890-8621-1-git-send-email-madalin.bucur@nxp.com>
From: Roy Pledge <roy.pledge@nxp.com>
The QBMan CGR options needs to be zeroed before calling the init
function
Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
---
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
index 77517aa..c9b7ad6 100644
--- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
+++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
@@ -733,6 +733,7 @@ static int dpaa_eth_cgr_init(struct dpaa_priv *priv)
priv->cgr_data.cgr.cb = dpaa_eth_cgscn;
/* Enable Congestion State Change Notifications and CS taildrop */
+ memset(&initcgr, 0, sizeof(initcgr));
initcgr.we_mask = cpu_to_be16(QM_CGR_WE_CSCN_EN | QM_CGR_WE_CS_THRES);
initcgr.cgr.cscn_en = QM_CGR_EN;
@@ -2422,6 +2423,7 @@ static int dpaa_ingress_cgr_init(struct dpaa_priv *priv)
}
/* Enable CS TD, but disable Congestion State Change Notifications. */
+ memset(&initcgr, 0, sizeof(initcgr));
initcgr.we_mask = cpu_to_be16(QM_CGR_WE_CS_THRES);
initcgr.cgr.cscn_en = QM_CGR_EN;
cs_th = DPAA_INGRESS_CS_THRESHOLD;
--
2.1.0
next prev parent reply other threads:[~2017-01-04 11:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-04 11:21 [PATCH 0/2] dpaa_eth: a couple of fixes Madalin Bucur
2017-01-04 11:21 ` [PATCH 1/2] dpaa_eth: cleanup after init_phy() failure Madalin Bucur
2017-01-04 11:21 ` Madalin Bucur [this message]
2017-01-04 18:45 ` [PATCH 0/2] dpaa_eth: a couple of fixes 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=1483528890-8621-3-git-send-email-madalin.bucur@nxp.com \
--to=madalin.bucur@nxp.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=netdev@vger.kernel.org \
/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