net/enetfec: fix restart

Queue reset is missing in restart because of which
IO cannot work on device restart.

This patch fixes the issue by resetting the queues on
device restart.

Fixes: b84fdd39638b ("net/enetfec: support UIO")
Cc: stable@dpdk.org

Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
This commit is contained in:
Apeksha Gupta 2022-10-07 08:57:29 +05:30 committed by Ferruh Yigit
parent 05500852af
commit d64e9cfe97

View File

@ -54,6 +54,7 @@ enetfec_restart(struct rte_eth_dev *dev)
uint32_t rcntl = OPT_FRAME_SIZE | 0x04;
uint32_t ecntl = ENETFEC_ETHEREN;
uint32_t val;
int i;
/* Clear any outstanding interrupt. */
writel(0xffffffff, (uint8_t *)fep->hw_baseaddr_v + ENETFEC_EIR);
@ -149,6 +150,9 @@ enetfec_restart(struct rte_eth_dev *dev)
/* And last, enable the transmit and receive processing */
rte_write32(rte_cpu_to_le_32(ecntl),
(uint8_t *)fep->hw_baseaddr_v + ENETFEC_ECR);
for (i = 0; i < fep->max_rx_queues; i++)
rte_write32(0, fep->rx_queues[i]->bd.active_reg_desc);
rte_delay_us(10);
}