pcie: msi: fix MSI-X fallback to MSI
When enabling MSI & MSI-X, the code seemed to handle fallback to MSI
when MSI-X is not available, but the logic uses MSI-X even if not
available and the MSI path never gets used.
Fixes: a2491b321e
("drivers/pcie: Add support for MSI-X")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
parent
f9c3ade883
commit
72bb75a360
|
@ -125,11 +125,9 @@ uint8_t pcie_msi_vectors_allocate(pcie_bdf_t bdf,
|
|||
|
||||
base_msix = pcie_get_cap(bdf, PCIE_MSIX_CAP_ID);
|
||||
if (base_msix != 0U) {
|
||||
msi = false;
|
||||
base = base_msix;
|
||||
}
|
||||
|
||||
msi = false;
|
||||
base = base_msix;
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_PCIE_MSI_X)) {
|
||||
|
@ -279,9 +277,10 @@ bool pcie_msi_enable(pcie_bdf_t bdf,
|
|||
if ((base_msix != 0U) && (base != 0U)) {
|
||||
disable_msi(bdf, base);
|
||||
}
|
||||
|
||||
msi = false;
|
||||
base = base_msix;
|
||||
if ((base_msix != 0U)) {
|
||||
msi = false;
|
||||
base = base_msix;
|
||||
}
|
||||
}
|
||||
|
||||
if (base == 0U) {
|
||||
|
|
Loading…
Reference in a new issue