DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] dma/idxd: add reset in the init routine
@ 2023-08-11  2:10 Frank Du
  2023-08-14 15:37 ` Bruce Richardson
  0 siblings, 1 reply; 3+ messages in thread
From: Frank Du @ 2023-08-11  2:10 UTC (permalink / raw)
  To: Bruce Richardson, Kevin Laatz; +Cc: dev

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 <frank.du@intel.com>
---
 drivers/dma/idxd/idxd_pci.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/dma/idxd/idxd_pci.c b/drivers/dma/idxd/idxd_pci.c
index 3696c7f452..a78889a7ef 100644
--- a/drivers/dma/idxd/idxd_pci.c
+++ b/drivers/dma/idxd/idxd_pci.c
@@ -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 */
-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] dma/idxd: add reset in the init routine
  2023-08-11  2:10 [PATCH] dma/idxd: add reset in the init routine Frank Du
@ 2023-08-14 15:37 ` Bruce Richardson
  2023-10-17  9:42   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Bruce Richardson @ 2023-08-14 15:37 UTC (permalink / raw)
  To: Frank Du; +Cc: Kevin Laatz, dev

On Fri, Aug 11, 2023 at 10:10:54AM +0800, Frank Du wrote:
> 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 <frank.du@intel.com>
> ---
>  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 <bruce.richardson@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] dma/idxd: add reset in the init routine
  2023-08-14 15:37 ` Bruce Richardson
@ 2023-10-17  9:42   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2023-10-17  9:42 UTC (permalink / raw)
  To: Frank Du; +Cc: Kevin Laatz, dev, Bruce Richardson

14/08/2023 17:37, Bruce Richardson:
> On Fri, Aug 11, 2023 at 10:10:54AM +0800, Frank Du wrote:
> > 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 <frank.du@intel.com>
> > ---
> >  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 <bruce.richardson@intel.com>

Applied, thanks.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-10-17  9:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-11  2:10 [PATCH] dma/idxd: add reset in the init routine Frank Du
2023-08-14 15:37 ` Bruce Richardson
2023-10-17  9:42   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).