Change in simtrace2[master]: card_emu: improve reset detection conditions
laforge has submitted this change. ( https://gerrit.osmocom.org/c/simtrace2/+/23641 ) Change subject: card_emu: improve reset detection conditions .. card_emu: improve reset detection conditions * enter ISO_S_WAIT_RST when RST is asserted * enter ISO_S_WAIT_ATR only when we RST is released while in state ISO_S_WAIT_RST Change-Id: I620333aa8d45561a8028b948955a27f667b58406 --- M firmware/libcommon/source/card_emu.c 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/firmware/libcommon/source/card_emu.c b/firmware/libcommon/source/card_emu.c index c5e4cfa..216ffe3 100644 --- a/firmware/libcommon/source/card_emu.c +++ b/firmware/libcommon/source/card_emu.c @@ -1102,7 +1102,7 @@ case CARD_IO_RST: if (active == 0 && ch->in_reset) { TRACE_INFO("%u: RST released\r\n", ch->num); - if (ch->vcc_active && ch->clocked) { + if (ch->vcc_active && ch->clocked && ch->state == ISO_S_WAIT_RST) { /* enable the TC/ETU counter once reset has been released */ tc_etu_enable(ch->tc_chan); /* prepare to send the ATR */ @@ -1113,6 +1113,7 @@ TRACE_INFO("%u: RST asserted\r\n", ch->num); card_handle_reset(ch); chg_mask |= CEMU_STATUS_F_RESET_ACTIVE; + card_set_state(ch, ISO_S_WAIT_RST); } ch->in_reset = active; break; -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/23641 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I620333aa8d45561a8028b948955a27f667b58406 Gerrit-Change-Number: 23641 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: tsaitgaist Gerrit-MessageType: merged
Change in simtrace2[master]: card_emu: improve reset detection conditions
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/simtrace2/+/23641 ) Change subject: card_emu: improve reset detection conditions .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/23641 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I620333aa8d45561a8028b948955a27f667b58406 Gerrit-Change-Number: 23641 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: tsaitgaist Gerrit-Comment-Date: Thu, 08 Apr 2021 21:28:20 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in simtrace2[master]: card_emu: improve reset detection conditions
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/simtrace2/+/23641 to look at the new patch set (#2). Change subject: card_emu: improve reset detection conditions .. card_emu: improve reset detection conditions * enter ISO_S_WAIT_RST when RST is asserted * enter ISO_S_WAIT_ATR only when we RST is released while in state ISO_S_WAIT_RST Change-Id: I620333aa8d45561a8028b948955a27f667b58406 --- M firmware/libcommon/source/card_emu.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/41/23641/2 -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/23641 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I620333aa8d45561a8028b948955a27f667b58406 Gerrit-Change-Number: 23641 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
Change in simtrace2[master]: card_emu: improve reset detection conditions
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/simtrace2/+/23641 ) Change subject: card_emu: improve reset detection conditions .. card_emu: improve reset detection conditions * enter ISO_S_WAIT_RST when RST is asserted * enter ISO_S_WAIT_ATR only when we RST is released while in state ISO_S_WAIT_RST Change-Id: I620333aa8d45561a8028b948955a27f667b58406 --- M firmware/libcommon/source/card_emu.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/41/23641/1 diff --git a/firmware/libcommon/source/card_emu.c b/firmware/libcommon/source/card_emu.c index c5e4cfa..216ffe3 100644 --- a/firmware/libcommon/source/card_emu.c +++ b/firmware/libcommon/source/card_emu.c @@ -1102,7 +1102,7 @@ case CARD_IO_RST: if (active == 0 && ch->in_reset) { TRACE_INFO("%u: RST released\r\n", ch->num); - if (ch->vcc_active && ch->clocked) { + if (ch->vcc_active && ch->clocked && ch->state == ISO_S_WAIT_RST) { /* enable the TC/ETU counter once reset has been released */ tc_etu_enable(ch->tc_chan); /* prepare to send the ATR */ @@ -1113,6 +1113,7 @@ TRACE_INFO("%u: RST asserted\r\n", ch->num); card_handle_reset(ch); chg_mask |= CEMU_STATUS_F_RESET_ACTIVE; + card_set_state(ch, ISO_S_WAIT_RST); } ch->in_reset = active; break; -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/23641 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I620333aa8d45561a8028b948955a27f667b58406 Gerrit-Change-Number: 23641 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-CC: Jenkins Builder Gerrit-MessageType: newchange