Changpeng Liu 76e1ac04c7 env/dpdk: fix the PCI detach error in secondary process
DPDK will report error when detaching the PCI device in secondary
process, because SPDK will return -1 in `pci_device_fini`, so
here we will reset the `attached` flag before that.

Also return the errno instead of -1.

Change-Id: I3efa4d97ceab504215faeb9d3d80a694bdd6014c
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7944
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
2021-10-22 00:36:41 +00:00
..
2021-02-05 14:43:47 +00:00
2021-10-20 07:22:22 +00:00
2021-09-03 08:08:20 +00:00
2021-02-05 14:43:47 +00:00
2021-10-21 21:25:53 +00:00
2021-10-07 09:25:48 +00:00
2021-06-22 23:42:02 +00:00