linux/drivers/ntb/hw
Jerome Brunet 1c1fcba64e NTB: epf: Allow arbitrary BAR mapping
[ Upstream commit 5ad865862a ]

The NTB epf host driver assumes the BAR number associated with a memory
window is just incremented from the BAR number associated with MW1. This
seems to have been enough so far but this is not really how the endpoint
side work and the two could easily become mis-aligned.

ntb_epf_mw_to_bar() even assumes that the BAR number is the memory window
index + 2, which means the function only returns a proper result if BAR_2
is associated with MW1.

Instead, fully describe and allow arbitrary NTB BAR mapping.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-11-13 15:34:34 -05:00
..
amd ntb_hw_amd: Add NTB PCI ID for new gen CPU 2025-05-02 07:59:20 +02:00
epf NTB: epf: Allow arbitrary BAR mapping 2025-11-13 15:34:34 -05:00
idt ntb: reduce stack usage in idt_scan_mws 2025-05-02 07:59:20 +02:00
intel ntb: intel: Fix using link status DB's 2025-04-10 14:39:32 +02:00
mscc ntb_hw_switchtec: Fix shift-out-of-bounds in switchtec_ntb_mw_set_trans 2025-04-10 14:39:32 +02:00
Kconfig NTB: Add support for EPF PCI Non-Transparent Bridge 2021-02-23 14:12:53 -06:00
Makefile NTB: Add support for EPF PCI Non-Transparent Bridge 2021-02-23 14:12:53 -06:00