Skip to content

Redundant steps removal and bug fix of ntb_hw_switchtec

Wesley Sheng linux-pci lkml ntb 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Changed since v1 from the cover letter

- It's a resend of v1

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3ntb_hw_switchtec: Remove redundant steps of switchtec_ntb_reinit_peer() functiondrivers/ntb/hw/mscc/ntb_hw_switchtec.c+7 -40 replies
2/3ntb_hw_switchtec: Skip unnecessary re-setup of shared memory window for crosslink casedrivers/ntb/hw/mscc/ntb_hw_switchtec.c+3 -00 replies
3/3ntb_hw_switchtec: Fix setup MW with failure bugdrivers/ntb/hw/mscc/ntb_hw_switchtec.c+39 -270 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchLogan Gunthorpe
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] Redundant steps removal and bug fix of ntb_hw_switchtec

Hi, Everyone,

This patch series remove redundant steps and fix one bug of the ntb_hw_switchtec module.

When a re-initialization is caused by a link event, the driver will re-setup the shared memory windows. But at that time, the shared memory is still valid, and it's unnecessary to free, reallocate and then initialize it again. Remove these redundant steps.

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 re-setup of shared memory window for that case.

Switchtec does not support setting multiple MWs simultaneously. However, there's a race condition when a re-initialization is caused by a link event, the driver will re-setup the shared memory window asynchronously and this races with the client setting up its memory windows on the link up event. Fix this by ensure do the entire initialization in a work queue and signal the client once it's done.

Regard,
Wesley

--

Changed since v1:
- It's a resend of v1

--

Joey Zhang (2):
ntb_hw_switchtec: Remove redundant steps of
switchtec_ntb_reinit_peer() function
ntb_hw_switchtec: Fix setup MW with failure bug

Wesley Sheng (1):
ntb_hw_switchtec: Skip unnecessary re-setup of shared memory window
for crosslink case

 drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 80 +++++++++++++++++++++-------------
 1 file changed, 49 insertions(+), 31 deletions(-)
Signature · 1 line
2.7.4