dma/idxd: add reset in the init routine
Subsystems (2)
PATCH 1/1 dma/idxd: add reset in the init routine
Fix for windows, no one reset the dev to a clear status. In Linux, kernel driver will reset during the prob.
Signed-off-by Frank Du <[email protected]>
--- drivers/dma/idxd/idxd_pci.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/dma/idxd/idxd_pci.c +8 -0
@@ -196,6 +196,14 @@ init_pci_device(struct rte_pci_device *dev, struct idxd_dmadev *idxd, pci->portals = dev->mem_resource[2 ].addr; pci->wq_cfg_sz = (pci->regs->wqcap >>24 ) &0x0F ; +/* reset */ + idxd->u.pci = pci; + err_code =idxd_pci_dev_command (idxd, idxd_reset_device); +if (err_code) { +IDXD_PMD_ERR ("Error reset device: code %#x" , err_code); + goto err; + } +/* sanity check device status */ if (pci->regs->gensts &GENSTS_DEV_STATE_MASK ) {/* need function-level-reset (FLR) or is enabled */
Signature · 1 line
2.34.1
Quoted 8 lines · Frank Du
Fix for windows, no one reset the dev to a clear status. In Linux, kernel driver will reset during the prob.
Signed-off-by Frank Du <[email protected]>--- drivers/dma/idxd/idxd_pci.c | 8 ++++++++ 1 file changed, 8 insertions(+)
Ran some sanity tests on Linux and saw no issues.
Acked-by Bruce Richardson <[email protected]>
Thomas Monjalon
Applied14/08/2023 17:37, Bruce Richardson:
Quoted 12 lines · Frank Du
Quoted 8 lines
Fix for windows, no one reset the dev to a clear status. In Linux, kernel driver will reset during the prob.
Signed-off-by Frank Du <[email protected]>--- drivers/dma/idxd/idxd_pci.c | 8 ++++++++ 1 file changed, 8 insertions(+)Ran some sanity tests on Linux and saw no issues.
Acked-by Bruce Richardson <[email protected]>
Applied, thanks.