Attention is currently required from: laforge.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-iuh/+/30085
to look at the new patch set (#3).
Change subject: tests/hnb-test-rua: fix incompat pointer type
......................................................................
tests/hnb-test-rua: fix incompat pointer type
Adjust the first argument of hnb_test_rua_dt_handle_ranap and
hnb_test_rua_cl_handle_ranap to be "void *priv", as it is private user
data.
Fix for:
../../../../src/osmo-iuh/src/tests/hnb-test-rua.c:19:29: error: passing argument 1 of ‘ranap_cn_rx_co’ from incompatible pointer type [-Werror=incompatible-pointer-types]
19 | rc = ranap_cn_rx_co(hnb_test_rua_dt_handle_ranap, hnb, ies.ranaP_Message.buf, ies.ranaP_Message.size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| void (*)(struct hnb_test *, struct ranap_message_s *)
Change-Id: Id930a7f0d3d05cfcc8ba9734dd922de885853c8c
---
M src/tests/hnb-test-layers.h
M src/tests/hnb-test-ranap.c
2 files changed, 6 insertions(+), 8 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/85/30085/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/30085
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: Id930a7f0d3d05cfcc8ba9734dd922de885853c8c
Gerrit-Change-Number: 30085
Gerrit-PatchSet: 3
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset
Attention is currently required from: laforge.
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-iuh/+/30085 )
Change subject: tests/hnb-test-rua: fix incompat pointer type
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
> but why does the type not match in the first place? This looks like some kind of call-back function?
yes, this should be private userdata of a callback function. I'll push two new patches to rename the argument from ctx to priv.
--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/30085
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: Id930a7f0d3d05cfcc8ba9734dd922de885853c8c
Gerrit-Change-Number: 30085
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Mon, 14 Nov 2022 10:48:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: comment
Attention is currently required from: jtavares.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/30137 )
Change subject: client: set the local/remote mode before inserting card
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/30137
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-Change-Id: I7b0640b929e174e8dfdcc86947fa409e4acf338f
Gerrit-Change-Number: 30137
Gerrit-PatchSet: 1
Gerrit-Owner: jtavares <jtavares(a)kvh.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: jtavares <jtavares(a)kvh.com>
Gerrit-Comment-Date: Mon, 14 Nov 2022 10:47:33 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/30140 )
Change subject: bankd: edge detect RESET and VCC indications
......................................................................
bankd: edge detect RESET and VCC indications
- perform edge detection on RESET and VCC client indications to filter
out duplicate resets
- prior to this change, unrelated changes in the client slot status
indication (such as CLK change) could trigger duplicate resets
- these resets could happen in rapid succession and lead to reader
libusb communication errors that lock-up the PC/SC daemon
- a drop in VCC will always induce a cold reset, even if a warm
reset is already in progress.
- overall, this change better matches what the hardware would do
Change-Id: I36d30d176c0a03d97554112ca712d658d986c752
---
M src/bankd/bankd.h
M src/bankd/bankd_main.c
2 files changed, 28 insertions(+), 4 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/bankd/bankd.h b/src/bankd/bankd.h
index 0f94818..e340b5a 100644
--- a/src/bankd/bankd.h
+++ b/src/bankd/bankd.h
@@ -96,6 +96,12 @@
uint8_t atr[MAX_ATR_SIZE];
unsigned int atr_len;
} card;
+
+ /* last known state of the SIM card VCC indication */
+ bool last_vccPresent;
+
+ /* last known state of the SIM card reset indication */
+ bool last_resetActive;
};
/* bankd card reader driver operations */
diff --git a/src/bankd/bankd_main.c b/src/bankd/bankd_main.c
index e184aba..bf7ca82 100644
--- a/src/bankd/bankd_main.c
+++ b/src/bankd/bankd_main.c
@@ -115,6 +115,8 @@
worker->bankd = bankd;
worker->num = i;
worker->ops = &pcsc_driver_ops;
+ worker->last_vccPresent = true; /* allow cold reset should first indication be false */
+ worker->last_resetActive = false; /* allow warm reset should first indication be true */
/* in the initial state, the worker has no client.fd, bank_slot or pcsc handle yet */
@@ -774,10 +776,26 @@
sps->clkActive ? *sps->clkActive ? "ACTIVE" : "INACTIVE" : "NULL");
/* perform cold or warm reset */
- if (sps->vccPresent && *sps->vccPresent == 0)
- rc = worker->ops->reset_card(worker, true);
- else if (sps->resetActive)
- rc = worker->ops->reset_card(worker, false);
+ if (sps->vccPresent && *sps->vccPresent == 0) {
+ /* VCC is not present */
+
+ if (worker->last_vccPresent) {
+ /* falling edge detected on VCC; perform cold reset */
+ rc = worker->ops->reset_card(worker, true);
+ }
+ } else if (sps->resetActive) {
+ if (!worker->last_resetActive) {
+ /* VCC is present (or not reported) and rising edge detected on reset; perform warm reset */
+ rc = worker->ops->reset_card(worker, false);
+ }
+ }
+
+ /* update last known states */
+ if (sps->vccPresent) {
+ worker->last_vccPresent = *sps->vccPresent != 0;
+ }
+
+ worker->last_resetActive = sps->resetActive != 0;
return rc;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/30140
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-Change-Id: I36d30d176c0a03d97554112ca712d658d986c752
Gerrit-Change-Number: 30140
Gerrit-PatchSet: 2
Gerrit-Owner: jtavares <jtavares(a)kvh.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged