Change in osmo-ccid-firmware[master]: iso7816_fsm: ignore RX_SINGLE events during transmit

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Wed Sep 2 16:15:38 UTC 2020


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/19948 )


Change subject: iso7816_fsm: ignore RX_SINGLE events during transmit
......................................................................

iso7816_fsm: ignore RX_SINGLE events during transmit

When logging is enabled, we get a lot of LOGL_ERROR events
about RX_SINGLE events not being permitted.  This is not very
useful in debugging, so suppress those error messages.

Change-Id: I7aec5fb2eaa76076e1bd0c6b8e8d09dc840c3630
---
M ccid_common/iso7816_fsm.c
1 file changed, 6 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/48/19948/1

diff --git a/ccid_common/iso7816_fsm.c b/ccid_common/iso7816_fsm.c
index 02e7c0d..ffb5b05 100644
--- a/ccid_common/iso7816_fsm.c
+++ b/ccid_common/iso7816_fsm.c
@@ -1218,6 +1218,8 @@
 	struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi);
 	OSMO_ASSERT(fi->fsm == &tpdu_fsm);
 	switch (event) {
+	case ISO7816_E_RX_SINGLE:
+		return;
 	case ISO7816_E_TX_COMPL:
 
 		card_uart_set_rx_threshold(ip->uart, 1);
@@ -1307,6 +1309,8 @@
 	struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi);
 
 	switch (event) {
+	case ISO7816_E_RX_SINGLE:
+		return;
 	case ISO7816_E_TX_COMPL:
 		card_uart_set_rx_threshold(ip->uart, 1);
 		card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 1);
@@ -1484,7 +1488,7 @@
 	},
 	[TPDU_S_TX_HDR] = {
 		.name = "TX_HDR",
-		.in_event_mask = S(ISO7816_E_TX_COMPL),
+		.in_event_mask = S(ISO7816_E_TX_COMPL) | S(ISO7816_E_RX_SINGLE),
 		.out_state_mask = S(TPDU_S_INIT) |
 				  S(TPDU_S_PROCEDURE),
 		.action = tpdu_s_tx_hdr_action,
@@ -1503,7 +1507,7 @@
 	},
 	[TPDU_S_TX_REMAINING] = {
 		.name = "TX_REMAINING",
-		.in_event_mask = S(ISO7816_E_TX_COMPL),
+		.in_event_mask = S(ISO7816_E_TX_COMPL) | S(ISO7816_E_RX_SINGLE),
 		.out_state_mask = S(TPDU_S_INIT) |
 				  S(TPDU_S_SW1),
 		.action = tpdu_s_tx_remaining_action,

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/19948
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I7aec5fb2eaa76076e1bd0c6b8e8d09dc840c3630
Gerrit-Change-Number: 19948
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200902/57f9984d/attachment.htm>


More information about the gerrit-log mailing list