Commit 2d55a960 authored by Jean-Claude BAU's avatar Jean-Claude BAU

Improve WR handshake in case of failure

parent adc08e73
......@@ -40,7 +40,7 @@ int wr_calibrated(struct pp_instance *ppi, void *buf, int len, int new_state)
(wrp->wrMode == WR_SLAVE)) {
wrp->next_state = WRS_WR_LINK_ON;
} else {
pp_diag(ppi, ext, 1, "WR: Invalid msgId(%d) received. CALIBRATE/WR_MODE_ON was expected\n",wrMsgId);
pp_diag(ppi, ext, 1, "WR: Invalid msgId(x%04x) received. CALIBRATE/WR_MODE_ON was expected\n",wrMsgId);
wr_handshake_fail(ppi);
}
return 0;
......
......@@ -34,7 +34,7 @@ int wr_locked(struct pp_instance *ppi, void *buf, int len, int new_state)
if ( wrMsgId == CALIBRATE ) {
wrp->next_state= WRS_RESP_CALIB_REQ;
} else {
pp_diag(ppi, ext, 1, "WR: Invalid msgId(%d) received. CALIBRATE was expected\n",wrMsgId);
pp_diag(ppi, ext, 1, "WR: Invalid msgId(x%04x) received. CALIBRATE was expected\n",wrMsgId);
wr_handshake_fail(ppi);
}
return 0;
......
......@@ -34,7 +34,7 @@ int wr_m_lock(struct pp_instance *ppi, void *buf, int len, int new_state)
if (wrMsgId == LOCKED) {
wrp->next_state = WRS_CALIBRATION;
} else {
pp_diag(ppi, ext, 1, "WR: Invalid msgId(%d) received. LOCKED was expected\n",wrMsgId);
pp_diag(ppi, ext, 1, "WR: Invalid msgId(x%04x) received. LOCKED was expected\n",wrMsgId);
wr_handshake_fail(ppi);
}
return 0;
......
......@@ -36,7 +36,7 @@ int wr_present(struct pp_instance *ppi, void *buf, int len, int new_state)
if ( wrMsgId == LOCK ) {
wrp->next_state = WRS_S_LOCK;
} else {
pp_diag(ppi, ext, 1, "WR: Invalid msgId(%d) received. LOCK was expected\n",wrMsgId);
pp_diag(ppi, ext, 1, "WR: Invalid msgId(x%04x) received. LOCK was expected\n",wrMsgId);
wr_handshake_fail(ppi);
}
return 0;
......
......@@ -36,7 +36,7 @@ int wr_resp_calib_req(struct pp_instance *ppi, void *buf, int len, int new_state
WRS_WR_LINK_ON :
WRS_CALIBRATION;
} else {
pp_diag(ppi, ext, 1, "WR: Invalid msgId(%d) received. CALIBRATED was expected\n",wrMsgId);
pp_diag(ppi, ext, 1, "WR: Invalid msgId(x%04x) received. CALIBRATED was expected\n",wrMsgId);
wr_handshake_fail(ppi);
}
return 0;
......
......@@ -23,7 +23,7 @@ int wr_s_lock(struct pp_instance *ppi, void *buf, int len, int new_state)
} else {
int poll_ret = WRH_OPER()->locking_poll(ppi);
if (poll_ret == WRH_SPLL_READY) {
if (poll_ret == WRH_SPLL_LOCKED) {
wrp->next_state = WRS_LOCKED;
return 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