Spdk/lib/vmd
Konrad Sztyber 6c3fdade83 vmd: reset root port config before enumeration
The root ports might have been configured by some other driver (e.g.
Linux kernel) prior to loading the SPDK one, so we need to clear it.  We
need to before the scanning process, as it's depth-first, so when
scanning the initial root ports, the latter ones might still be using
stale configuration.  This can lead to two bridges having the same
secondary/subordinate bus configuration, meaning that their config space
would map to the same memory area, which, of course, isn't correct.

This has manifested in issue #2413, where two root ports were configured
to use the same secondary bus.  This caused an endpoint device to be
enumerated twice on two different root ports, with the first instance
being broken once the second port was configured by the SPDK driver.

Fixes #2413

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I5ce0931a84c1d23ccadb93fe39e8155ff1281474
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11863
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Tom Nabarro <tom.nabarro@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-03-10 16:45:18 +00:00
..
led.c lib/vmd: LED management support 2019-10-24 17:04:04 +00:00
Makefile so_ver: increase all major versions 2022-01-31 15:29:56 +00:00
spdk_vmd.map lib/vmd: add a map file. 2020-05-14 10:37:14 +00:00
vmd_spec.h vmd: update for changes in IceLake platform 2021-08-31 08:39:37 +00:00
vmd.c vmd: reset root port config before enumeration 2022-03-10 16:45:18 +00:00
vmd.h vmd: update for changes in IceLake platform 2021-08-31 08:39:37 +00:00