Commit 7d72d594 authored by Maciej Lipinski's avatar Maciej Lipinski

Prevent re-entring UNCALIBRATED from SLAVE when WR slave port connects to nonWR port

Set the parentDetect flag to NOT_WR_PARENT only if we think
that the parent is WR_PARENT, i.e. thsi flag is not set in
case that parentDetection=PD_NO_DETECTION because that means
we already know whether we are speaking with WR guy or not.
Previously, this condition was parentDetection!=PD_NOT_WR_PARENT
and there was some trashing when WR slave port was speaking
to nonWR port. This is because parentDetection=PD_NO_DETECTION
was set and then parentDetection=PD_NOT_WR_PARENT was re-set
which cause the slave to go back to UNCALIBRATED from SLAVE.
parent 10315b89
......@@ -205,7 +205,17 @@ static int wr_bmca_s1( struct pp_instance * ppi,
}
}
} else {
if ( newParentDectected && wrp->parentDetection!=PD_NOT_WR_PARENT ) {
/* set the parentDetect flag to NOT_WR_PARENT only if we think
that the parent is WR_PARENT, i.e. thsi flag is not set in
case that parentDetection=PD_NO_DETECTION because that means
we already know whether we are speaking with WR guy or not.
Previously, this condition was parentDetection!=PD_NOT_WR_PARENT
and there was some trashing when WR slave port was speaking
to nonWR port. This is because parentDetection=PD_NO_DETECTION
was set and then parentDetection=PD_NOT_WR_PARENT was re-set
which cause the slave to go back to UNCALIBRATED from SLAVE.
*/
if ( newParentDectected && wrp->parentDetection==PD_WR_PARENT ) {
wrp->parentDetection=PD_NOT_WR_PARENT;
}
wr_flags=0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment