dp: rx: mst: Set number of ports in link address struct when exposing a port.

Previously, the number of ports was only being set when setting an input port.
If there are multiple input ports, the number of ports wasn't being accurately
reflected.

The user application was required to update the number of ports when setting a
downstream port.
This is now done within the driver.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
This commit is contained in:
Andrei-Liviu Simion 2015-04-15 18:17:31 -07:00 committed by Nava kishore Manne
parent 9508faa033
commit 9ba2fb9a30

View file

@ -2410,6 +2410,9 @@ void XDp_RxMstExposePort(XDp *InstancePtr, u8 PortNum, u8 Expose)
else if (InstancePtr->RxInstance.Topology.LinkAddressInfo.NumPorts) {
InstancePtr->RxInstance.Topology.LinkAddressInfo.NumPorts--;
}
XDp_WriteReg(InstancePtr->Config.BaseAddr, XDP_RX_SINK_COUNT,
InstancePtr->RxInstance.Topology.LinkAddressInfo.NumPorts);
}
/******************************************************************************/
@ -2500,11 +2503,6 @@ void XDp_RxMstSetInputPort(XDp *InstancePtr, u8 PortNum,
Branch->Guid[3] = PortOverride->Guid[3];
}
/* Make sure that the branch device is accounted for. */
if (InstancePtr->RxInstance.Topology.LinkAddressInfo.NumPorts == 0) {
InstancePtr->RxInstance.Topology.LinkAddressInfo.NumPorts = 1;
}
XDp_RxMstExposePort(InstancePtr, PortNum, 1);
}