dp: tx: Modified waiting on AUX reply to operate on REPLY_STATUS.

AUX reply now makes use of the REPLY_STATUS register rather than
INTERRUPT_STATUS. It seems that INTERRUPT_STATUS may be updated before
REPLY_STATUS gets updated, resulting in a race condition.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
This commit is contained in:
Andrei-Liviu Simion 2015-02-09 13:36:14 -07:00 committed by Nava kishore Manne
parent 9b8536c1aa
commit 11f81b0d62

View file

@ -3044,15 +3044,19 @@ static u32 XDp_TxAuxWaitReply(XDp *InstancePtr)
while (0 < Timeout) {
Status = XDp_ReadReg(InstancePtr->Config.BaseAddr,
XDP_TX_INTERRUPT_STATUS);
XDP_TX_REPLY_STATUS);
/* Check for a timeout. */
if (Status & XDP_TX_INTERRUPT_STATUS_REPLY_TIMEOUT_MASK) {
/* Check for error. */
if (Status & XDP_TX_REPLY_STATUS_REPLY_ERROR_MASK) {
return XST_ERROR_COUNT_MAX;
}
/* Check for a reply. */
if (Status & XDP_TX_INTERRUPT_STATUS_REPLY_RECEIVED_MASK) {
if ((Status & XDP_TX_REPLY_STATUS_REPLY_RECEIVED_MASK) &&
!(Status &
XDP_TX_REPLY_STATUS_REQUEST_IN_PROGRESS_MASK) &&
!(Status &
XDP_TX_REPLY_STATUS_REPLY_IN_PROGRESS_MASK)) {
return XST_SUCCESS;
}