Skip to content
Commit cb004c28 authored by Arindam Nath's avatar Arindam Nath Committed by Jon Mason
Browse files

NTB: Fix access to link status and control register



The design of AMD NTB implementation is such that
NTB primary acts as an endpoint device and NTB
secondary is an endpoint device behind a combination
of Switch Upstream and Switch Downstream. Considering
that, the link status and control register needs to
be accessed differently based on the NTB topology.

So in the case of NTB secondary, we first get the
pointer to the Switch Downstream device for the NTB
device. Then we get the pointer to the Switch Upstream
device. Once we have that, we read the Link Status
and Control register to get the correct status of
link at the secondary.

In the case of NTB primary, simply reading the Link
Status and Control register of the NTB device itself
will suffice.

Suggested-by: default avatarJiasen Lin <linjiasen@hygon.cn>
Signed-off-by: default avatarArindam Nath <arindam.nath@amd.com>
Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
parent 8ad1a2f3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment