Skip to content

Commit 0fbb0f2

Browse files
Roy Pledgedavem330
authored andcommitted
dpaa_eth: Initialize CGR structure before init
The QBMan CGR options needs to be zeroed before calling the init function Signed-off-by: Roy Pledge <roy.pledge@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 3fe61f0 commit 0fbb0f2

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎drivers/net/ethernet/freescale/dpaa/dpaa_eth.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,7 @@ static int dpaa_eth_cgr_init(struct dpaa_priv *priv)
733733
priv->cgr_data.cgr.cb = dpaa_eth_cgscn;
734734

735735
/* Enable Congestion State Change Notifications and CS taildrop */
736+
memset(&initcgr, 0, sizeof(initcgr));
736737
initcgr.we_mask = cpu_to_be16(QM_CGR_WE_CSCN_EN | QM_CGR_WE_CS_THRES);
737738
initcgr.cgr.cscn_en = QM_CGR_EN;
738739

@@ -2422,6 +2423,7 @@ static int dpaa_ingress_cgr_init(struct dpaa_priv *priv)
24222423
}
24232424

24242425
/* Enable CS TD, but disable Congestion State Change Notifications. */
2426+
memset(&initcgr, 0, sizeof(initcgr));
24252427
initcgr.we_mask = cpu_to_be16(QM_CGR_WE_CS_THRES);
24262428
initcgr.cgr.cscn_en = QM_CGR_EN;
24272429
cs_th = DPAA_INGRESS_CS_THRESHOLD;

0 commit comments

Comments
 (0)