]> git.baikalelectronics.ru Git - kernel.git/commit
NTB: Ensure ntb_mw_get_align() is only called when the link is up
authorLogan Gunthorpe <logang@deltatee.com>
Thu, 3 Aug 2017 18:19:44 +0000 (12:19 -0600)
committerJon Mason <jdmason@kudzu.us>
Sun, 19 Nov 2017 01:37:11 +0000 (20:37 -0500)
commitbfc0fd8b78f0d8f6f808d08fefce1fcb627cff80
treec42e292a6364558658a70ce27eb623e138d81ba6
parent93ce6dfe99bdbf2db42c748ab49a067ef8027515
NTB: Ensure ntb_mw_get_align() is only called when the link is up

With Switchtec hardware it's impossible to get the alignment parameters
for a peer's memory window until the peer's driver has configured its
windows. Strictly speaking, the link doesn't have to be up for this,
but the link being up is the only way the client can tell that
the other side has been configured.

This patch converts ntb_transport and ntb_perf to use this function after
the link goes up. This simplifies these clients slightly because they
no longer have to store the alignment parameters. It also tweaks
ntb_tool so that peer_mw_trans will print zero if it is run before
the link goes up.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Acked-by: Allen Hubbe <Allen.Hubbe@dell.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
drivers/ntb/ntb_transport.c
drivers/ntb/test/ntb_perf.c
drivers/ntb/test/ntb_tool.c