]> Gentwo Git Trees - linux/.git/commit
NTB: epf: Allow arbitrary BAR mapping
authorJerome Brunet <jbrunet@baylibre.com>
Wed, 2 Jul 2025 16:48:33 +0000 (18:48 +0200)
committerJon Mason <jdmason@kudzu.us>
Mon, 22 Sep 2025 13:35:21 +0000 (09:35 -0400)
commit5ad865862a0fd349163243e1834ed98ba9b81905
tree32f6695b98c0aca20ea9f0053c466821dff71a40
parent3db835dd8f9a78e9709cb48b77d89b41792e9281
NTB: epf: Allow arbitrary BAR mapping

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>
drivers/ntb/hw/epf/ntb_hw_epf.c