Spdk/lib/vmd
Konrad Sztyber 91aee82d74 vmd: use config_bus_number when resetting root ports
The config_bus_number is an offset within the config space reserved for
the devices behind the VMD, while bus_number refers to the actual bus
number assigned by VMD that depend on the VMCAP and VMCONFIG registers.
So, to access the mapped config space we have to use config_bus_number.

We didn't do that when resetting root ports', which could lead to
segfaults if these values were different, as we'd access unmapped
memory.

Fixes #2451

Change-Id: I4e7bbb81400462284014565099bec98f6171c8c9
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12208
Reviewed-by: Tom Nabarro <tom.nabarro@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-04-11 07:44:23 +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: use config_bus_number when resetting root ports 2022-04-11 07:44:23 +00:00
vmd.h vmd: update for changes in IceLake platform 2021-08-31 08:39:37 +00:00