summaryrefslogtreecommitdiff
path: root/drivers/ntb/test/ntb_pingpong.c
diff options
context:
space:
mode:
authorDoug Meyer <dmeyer@gigaio.com>2017-10-17 23:22:53 +0300
committerJon Mason <jdmason@kudzu.us>2018-01-29 06:17:22 +0300
commit140eb5227767c6754742020a16d2691222b9c19b (patch)
tree909750d61425a3b94b1427dcb31291fa92b67acc /drivers/ntb/test/ntb_pingpong.c
parentd8a5b80568a9cb66810e75b182018e9edb68e8ff (diff)
downloadlinux-140eb5227767c6754742020a16d2691222b9c19b.tar.xz
NTB: ntb_hw_switchtec: Fix peer BAR bug in switchtec_ntb_init_shared_mw
This resolves a bug which may incorrectly configure the peer host's LUT for shared memory window access. The code was using the local host's first BAR number, rather than the peer hosts's first BAR number, to determine what peer NT control register to program. The bug will cause the Switchtec NTB link to work only if both peers have the same first NTB BAR configured. In all other configurations, the link will not come up, failing silently. When both hosts have the same first BAR, the configuration works only because the first BAR numbers happent to be the same. When the hosts do not have the same first BAR, then the LUT translation will not be configured in the correct peer LUT and will not give the peer the shared memory window access required for the link to operate. Signed-off-by: Doug Meyer <dmeyer@gigaio.com> Reviewed-by: Logan Gunthorpe <logang@deltatee.com> Fixes: 678784a44ae8 ("NTB: switchtec_ntb: Initialize hardware for memory windows") Signed-off-by: Jon Mason <jdmason@kudzu.us>
Diffstat (limited to 'drivers/ntb/test/ntb_pingpong.c')
0 files changed, 0 insertions, 0 deletions