1
0
Fork 0
alistair23-linux/drivers/ntb
Logan Gunthorpe d0af43b474 NTB: Fix the default port and peer numbers for legacy drivers
[ Upstream commit fc8b086d9d ]

When the commit adding ntb_default_port_number() and
ntb_default_peer_port_number()  entered the kernel there was no
users of it so it was impossible to tell what the API needed.

When a user finally landed a year later (ntb_pingpong) there were
more NTB topologies were created and no consideration was considered
to how other drivers had changed.

Now that there is a user it can be fixed to provide a sensible default
for the legacy drivers that do not implement ntb_{peer_}port_number().
Seeing ntb_pingpong doesn't check error codes returning EINVAL was also
not sensible.

Patches for ntb_pingpong and ntb_perf follow (which are broken
otherwise) to support hardware that doesn't have port numbers. This is
important not only to not break support with existing drivers but for
the cross link topology which, due to its perfect symmetry, cannot
assign unique port numbers to each side.

Fixes: 1e5301196a ("NTB: Add indexed ports NTB API")
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Acked-by: Allen Hubbe <allenbh@gmail.com>
Tested-by: Alexander Fomichev <fomichev.ru@gmail.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-24 17:50:18 +02:00
..
hw NTB: fix IDT Kconfig typos/spellos 2019-09-23 17:20:40 -04:00
test NTB: ntb_pingpong: Choose doorbells based on port number 2020-06-24 17:50:18 +02:00
Kconfig New feature to add support for NTB virtual MSI interrupts, the ability 2019-07-21 09:46:59 -07:00
Makefile New feature to add support for NTB virtual MSI interrupts, the ability 2019-07-21 09:46:59 -07:00
core.c NTB: Fix the default port and peer numbers for legacy drivers 2020-06-24 17:50:18 +02:00
msi.c NTB/msi: remove incorrect MODULE defines 2019-08-05 15:42:27 -04:00
ntb_transport.c NTB: ntb_transport: remove redundant assignment to rc 2019-09-23 17:20:40 -04:00