diff options
author | Jack Yu <jackcwyu@google.com> | 2021-03-17 12:34:56 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-03-17 12:34:56 +0000 |
commit | ac73d4cae967b0e893abaae833d45ae8d67cdc27 (patch) | |
tree | 22eff552c31a8c41334f1d1b6ac2435cd7056ff7 | |
parent | 5334154d62a17d4572f2cf40f13c125ec462fd28 (diff) | |
parent | 0db3435b68bd4b82365b12145ff89c7e881c2132 (diff) | |
download | secure_element-temp_ab_7272582.tar.gz |
Enable SE HAL logs am: f347274761 am: 0db3435b68temp_ab_7272582
Original change: https://android-review.googlesource.com/c/platform/hardware/st/secure_element/+/1635919
Change-Id: I1a048dfd8e27a349abd1fad43eb7baac7c4bfdb6
-rw-r--r-- | ese-spi-driver/SpiLayerComm.cc | 2 | ||||
-rw-r--r-- | ese-spi-driver/StEseApi.cc | 7 | ||||
-rw-r--r-- | ese-spi-driver/T1protocol.cc | 16 |
3 files changed, 13 insertions, 12 deletions
diff --git a/ese-spi-driver/SpiLayerComm.cc b/ese-spi-driver/SpiLayerComm.cc index 3139e80..a922234 100644 --- a/ese-spi-driver/SpiLayerComm.cc +++ b/ese-spi-driver/SpiLayerComm.cc @@ -271,7 +271,7 @@ int SpiLayerComm_waitForResponse(Tpdu* respTpdu, int nBwt) { unsigned int elapsedTimeInMs = Utils_getElapsedTimeInMs(startTime, currentTime); if (elapsedTimeInMs > maxWaitingTime) { - STLOG_HAL_D("BWT timed out after %d ms before receiving a valid NAD", + STLOG_HAL_E("BWT timed out after %d ms before receiving a valid NAD", elapsedTimeInMs); return -2; } diff --git a/ese-spi-driver/StEseApi.cc b/ese-spi-driver/StEseApi.cc index 894c190..e7c25d9 100644 --- a/ese-spi-driver/StEseApi.cc +++ b/ese-spi-driver/StEseApi.cc @@ -182,8 +182,8 @@ retry: if ((rc == -2) && (retry_count < 3)) { retry_count++; - STLOG_HAL_E(" %s ESE - resync was needed, resend the whole frame\n", - __FUNCTION__); + STLOG_HAL_E(" %s ESE - resync was needed, resend the whole frame retry" + " = %d\n", __FUNCTION__, retry_count); pCmdlen = pCmd->len; CmdPart = pCmd->p_data; goto retry; @@ -206,7 +206,8 @@ retry: (StEse_data*)pRsp, I_block); if ((rc == -2) && (retry_count < 3)) { retry_count++; - STLOG_HAL_E(" %s ESE - resync was needed, resend\n", __FUNCTION__); + STLOG_HAL_E(" %s ESE - resync was needed, resend retry = %d\n", + __FUNCTION__, retry_count); pCmdlen = pCmd->len; CmdPart = pCmd->p_data; goto retry; diff --git a/ese-spi-driver/T1protocol.cc b/ese-spi-driver/T1protocol.cc index 551f2a2..c955a37 100644 --- a/ese-spi-driver/T1protocol.cc +++ b/ese-spi-driver/T1protocol.cc @@ -477,7 +477,7 @@ void T1protocol_processRBlock(Tpdu* originalCmdTpdu, // retransmission of the original IBlock, otherwise do resend request. if (T1protocol_isSequenceNumberOk(originalCmdTpdu, lastRespTpduReceived) == true) { - STLOG_HAL_D("%s : Need retransmissiom :", __func__); + STLOG_HAL_E("%s : Need retransmissiom :", __func__); if (gOriginalCmd == S_IFS_REQ) { gNextCmd = S_IFS_REQ; } else { @@ -695,22 +695,22 @@ bool T1protocol_isSequenceNumberOk(Tpdu* originalTpdu, Tpdu* respTpdu) { void T1protocol_updateRecoveryStatus() { switch (recoveryStatus) { case RECOVERY_STATUS_OK: - STLOG_HAL_D("recoveryStatus: OK -> RESEND 1"); + STLOG_HAL_E("recoveryStatus: OK -> RESEND 1"); recoveryStatus = RECOVERY_STATUS_RESEND_1; break; case RECOVERY_STATUS_RESEND_1: - STLOG_HAL_D("recoveryStatus: RESEND 1 -> RESYNC 1"); + STLOG_HAL_E("recoveryStatus: RESEND 1 -> RESYNC 1"); recoveryStatus = RECOVERY_STATUS_RESYNC_1; break; case RECOVERY_STATUS_RESYNC_1: - STLOG_HAL_D("recoveryStatus: RESYNC 1 -> WARM RESET"); + STLOG_HAL_E("recoveryStatus: RESYNC 1 -> WARM RESET"); recoveryStatus = RECOVERY_STATUS_WARM_RESET; break; case RECOVERY_STATUS_WARM_RESET: - STLOG_HAL_D("recoveryStatus: WARM_RESET (recovery completed)"); + STLOG_HAL_E("recoveryStatus: WARM_RESET (recovery completed)"); recoveryStatus = RECOVERY_STATUS_KO; break; } @@ -969,7 +969,7 @@ int T1protocol_handleTpduResponse(Tpdu* originalCmdTpdu, Tpdu* lastCmdTpduSent, // If the last transmission ends without response from the slave, do // recovery mechanism. if (*bytesRead == 0) { - STLOG_HAL_D("bytesRead = 0 -> Going into recovery."); + STLOG_HAL_E("bytesRead = 0 -> Going into recovery."); rc = T1protocol_doRecovery(); return rc; } @@ -977,7 +977,7 @@ int T1protocol_handleTpduResponse(Tpdu* originalCmdTpdu, Tpdu* lastCmdTpduSent, // Check the consistency of the last received tpdu rc = T1protocol_checkTpduConsistency(lastCmdTpduSent, lastRespTpduReceived); if (rc < 0) { - STLOG_HAL_D("%s : TPDU consistency check failed -> Going into recovery.", + STLOG_HAL_E("%s : TPDU consistency check failed -> Going into recovery.", __func__); rc = T1protocol_doRecovery(); return rc; @@ -1135,7 +1135,7 @@ int T1protocol_transcieveApduPart(uint8_t* cmdApduPart, uint8_t cmdLength, StEse_data pRes; memset(&pRes, 0x00, sizeof(StEse_data)); - STLOG_HAL_D("%s : Enter", __func__); + STLOG_HAL_E("%s : Enter cmdLength = 0x%02X", __func__, cmdLength); // Form the cmdTpdu according to the cmdApduPart, cmdLength and isLast // fields. |