Skip to content
Commit a944ccc3 authored by Joey Zhang's avatar Joey Zhang Committed by Jon Mason
Browse files

ntb_hw_switchtec: Fix setup MW with failure bug



Switchtec does not support setting multiple MWs simultaneously. The
driver takes a hardware lock to ensure that two peers are not doing this
simultaneously and it fails if someone else takes the lock. In most
cases, this is fine as clients only setup the MWs once on one side of
the link.

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 it's memory
windows on the link up event.

To fix this we ensure do the entire initialization in a work queue and
signal the client once it's done.

Signed-off-by: default avatarJoey Zhang <joey.zhang@microchip.com>
Signed-off-by: default avatarWesley Sheng <wesley.sheng@microchip.com>
Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
parent f0f43e76
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment