diff mbox series

[02/13] net/enetc: fix SMMU unhandled context fault

Message ID 1554745507-15089-3-git-send-email-g.singh@nxp.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers show
Series ENETC PMD basic features and bug fixes | expand

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Gagandeep Singh April 8, 2019, 11:22 a.m. UTC
First configure ring with BDs properly then enable
the ring.

Fixes: 469c6111a799 ("net/enetc: enable Rx and Tx")
Cc: g.singh@nxp.com

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
 drivers/net/enetc/enetc_ethdev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c
index 7a9a97d..f1807b9 100644
--- a/drivers/net/enetc/enetc_ethdev.c
+++ b/drivers/net/enetc/enetc_ethdev.c
@@ -492,15 +492,15 @@  static int enetc_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id,
 		       ENETC_RTBLENR_LEN(rx_ring->bd_count));
 
 	rx_ring->mb_pool = mb_pool;
-	/* enable ring */
-	enetc_rxbdr_wr(hw, idx, ENETC_RBMR, ENETC_RBMR_EN);
-	enetc_rxbdr_wr(hw, idx, ENETC_RBPIR, 0);
 	rx_ring->rcir = (void *)((size_t)hw->reg +
 			ENETC_BDR(RX, idx, ENETC_RBCIR));
 	enetc_refill_rx_ring(rx_ring, (enetc_bd_unused(rx_ring)));
 	buf_size = (uint16_t)(rte_pktmbuf_data_room_size(rx_ring->mb_pool) -
 		   RTE_PKTMBUF_HEADROOM);
 	enetc_rxbdr_wr(hw, idx, ENETC_RBBSR, buf_size);
+	/* enable ring */
+	enetc_rxbdr_wr(hw, idx, ENETC_RBMR, ENETC_RBMR_EN);
+	enetc_rxbdr_wr(hw, idx, ENETC_RBPIR, 0);
 }
 
 static int