net/enetc: fix SMMU unhandled context fault
First configure ring with BDs properly then enable the ring. Fixes: 469c6111a799 ("net/enetc: enable Rx and Tx") Cc: stable@dpdk.org Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
This commit is contained in:
parent
fa45fda827
commit
63c34c299a
@ -492,15 +492,15 @@ enetc_setup_rxbdr(struct enetc_hw *hw, struct enetc_bdr *rx_ring,
|
|||||||
ENETC_RTBLENR_LEN(rx_ring->bd_count));
|
ENETC_RTBLENR_LEN(rx_ring->bd_count));
|
||||||
|
|
||||||
rx_ring->mb_pool = mb_pool;
|
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 +
|
rx_ring->rcir = (void *)((size_t)hw->reg +
|
||||||
ENETC_BDR(RX, idx, ENETC_RBCIR));
|
ENETC_BDR(RX, idx, ENETC_RBCIR));
|
||||||
enetc_refill_rx_ring(rx_ring, (enetc_bd_unused(rx_ring)));
|
enetc_refill_rx_ring(rx_ring, (enetc_bd_unused(rx_ring)));
|
||||||
buf_size = (uint16_t)(rte_pktmbuf_data_room_size(rx_ring->mb_pool) -
|
buf_size = (uint16_t)(rte_pktmbuf_data_room_size(rx_ring->mb_pool) -
|
||||||
RTE_PKTMBUF_HEADROOM);
|
RTE_PKTMBUF_HEADROOM);
|
||||||
enetc_rxbdr_wr(hw, idx, ENETC_RBBSR, buf_size);
|
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
|
static int
|
||||||
|
Loading…
x
Reference in New Issue
Block a user