summaryrefslogtreecommitdiffstats
path: root/drivers/ntb/hw/mscc/ntb_hw_switchtec.c
diff options
context:
space:
mode:
authorWesley Sheng <wesley.sheng@microchip.com>2019-06-06 09:09:43 +0200
committerJon Mason <jdmason@kudzu.us>2019-06-13 14:59:28 +0200
commitf0f43e766bdb314b3816ac891fb18cea5de4123d (patch)
tree02cc455e30d399117a3cf80e08b1244362cbabb8 /drivers/ntb/hw/mscc/ntb_hw_switchtec.c
parentntb_hw_switchtec: Remove redundant steps of switchtec_ntb_reinit_peer() function (diff)
downloadlinux-f0f43e766bdb314b3816ac891fb18cea5de4123d.tar.xz
linux-f0f43e766bdb314b3816ac891fb18cea5de4123d.zip
ntb_hw_switchtec: Skip unnecessary re-setup of shared memory window for crosslink case
In case of NTB crosslink topology, the setting of shared memory window in the virtual partition doesn't reset on peer's reboot. So skip the unnecessary re-setup of shared memory window for that case. Signed-off-by: Wesley Sheng <wesley.sheng@microchip.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
Diffstat (limited to 'drivers/ntb/hw/mscc/ntb_hw_switchtec.c')
-rw-r--r--drivers/ntb/hw/mscc/ntb_hw_switchtec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/ntb/hw/mscc/ntb_hw_switchtec.c b/drivers/ntb/hw/mscc/ntb_hw_switchtec.c
index c408b7adeaa6..a26e3d0cf457 100644
--- a/drivers/ntb/hw/mscc/ntb_hw_switchtec.c
+++ b/drivers/ntb/hw/mscc/ntb_hw_switchtec.c
@@ -1459,6 +1459,9 @@ static int switchtec_ntb_reinit_peer(struct switchtec_ntb *sndev)
{
int rc;
+ if (crosslink_is_enabled(sndev))
+ return 0;
+
dev_info(&sndev->stdev->dev, "reinitialize shared memory window\n");
rc = config_rsvd_lut_win(sndev, sndev->mmio_peer_ctrl, 0,
sndev->self_partition,