Attention is currently required from: jolly.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35076?usp=email )
Change subject: soft_uart: fix pulling a small number of Tx bits
......................................................................
Patch Set 2:
(1 comment)
File src/core/soft_uart.c:
https://gerrit.osmocom.org/c/libosmocore/+/35076/comment/eb99f9e8_f228bc72
PS1, Line 283: osmo_soft_uart_tx_ubits
> Ack, thanks! Will do. I think for `n_ubits == 0` we should just return early.
Done here: https://gerrit.osmocom.org/c/libosmocore/+/35083.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35076?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I454c8786697a6f2389d56b350e6e20ca953fe859
Gerrit-Change-Number: 35076
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Comment-Date: Tue, 21 Nov 2023 13:34:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: jolly <andreas(a)eversberg.eu>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: fixeria.
Hello Jenkins Builder, jolly, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/35066?usp=email
to look at the new patch set (#5).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
The change is no longer submittable: Verified is unsatisfied now.
Change subject: soft_uart: fix handling of num_data_bits < 8
......................................................................
soft_uart: fix handling of num_data_bits < 8
Change-Id: Ife13b1f2d9063ba7253d01523ca9ecb15e9eaf07
Related: OS#4396
---
M src/core/soft_uart.c
M tests/soft_uart/soft_uart_test.ok
2 files changed, 17 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/66/35066/5
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35066?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ife13b1f2d9063ba7253d01523ca9ecb15e9eaf07
Gerrit-Change-Number: 35066
Gerrit-PatchSet: 5
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: fixeria, jolly, laforge.
Hello Jenkins Builder, jolly, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/35046?usp=email
to look at the new patch set (#7).
The following approvals got outdated and were removed:
Code-Review+2 by laforge, Verified+1 by Jenkins Builder
The change is no longer submittable: Code-Review and Verified are unsatisfied now.
Change subject: soft_uart: add unit tests for the receiver and transmitter
......................................................................
soft_uart: add unit tests for the receiver and transmitter
Change-Id: Icdfa0c644548964d37940c32dc9dcfcfc53c3a19
Related: OS#4396
---
M tests/Makefile.am
A tests/soft_uart/soft_uart_test.c
A tests/soft_uart/soft_uart_test.ok
M tests/testsuite.at
4 files changed, 460 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/46/35046/7
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35046?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Icdfa0c644548964d37940c32dc9dcfcfc53c3a19
Gerrit-Change-Number: 35046
Gerrit-PatchSet: 7
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: fixeria, jolly.
Hello Jenkins Builder, jolly, laforge, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/35065?usp=email
to look at the new patch set (#5).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
The change is no longer submittable: Verified is unsatisfied now.
Change subject: soft_uart: fix Rx buffer flushing logic in suart_rx_ch()
......................................................................
soft_uart: fix Rx buffer flushing logic in suart_rx_ch()
Whenever we encounter a parity and/or a framing error, we should
call the .rx_cb() immediately, even if this was the first
character in the receive buffer.
Change-Id: I73fab1a5c196d2dbdfe98b0c20d8dadbd22f4f64
Related: OS#4396
---
M src/core/soft_uart.c
M tests/soft_uart/soft_uart_test.ok
2 files changed, 33 insertions(+), 11 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/65/35065/5
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35065?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I73fab1a5c196d2dbdfe98b0c20d8dadbd22f4f64
Gerrit-Change-Number: 35065
Gerrit-PatchSet: 5
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/35083?usp=email )
Change subject: soft_uart: check n_bits against 0 in osmo_soft_uart_tx_ubits()
......................................................................
soft_uart: check n_bits against 0 in osmo_soft_uart_tx_ubits()
Currently calling this function with n_ubits == 0 would result in
requesting one character from the application (via the .tx_cb()),
but not actually transmitting anything. Make it return early.
Change-Id: Icbf99a9f2f6fa64dd71a5f37922f9001577c6c97
Related: OS#4396
---
M src/core/soft_uart.c
1 file changed, 18 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/83/35083/1
diff --git a/src/core/soft_uart.c b/src/core/soft_uart.c
index e0f0780..4fffaee 100644
--- a/src/core/soft_uart.c
+++ b/src/core/soft_uart.c
@@ -24,6 +24,7 @@
#include <stdint.h>
#include <errno.h>
+#include <osmocom/core/utils.h>
#include <osmocom/core/timer.h>
#include <osmocom/core/soft_uart.h>
@@ -286,6 +287,9 @@
size_t n_frame_bits, n_chars;
struct msgb *msg = NULL;
+ if (OSMO_UNLIKELY(n_ubits == 0))
+ return -EINVAL;
+
/* calculate UART frame size for the effective config */
n_frame_bits = 1 + cfg->num_data_bits + cfg->num_stop_bits;
if (cfg->parity_mode != OSMO_SUART_PARITY_NONE)
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35083?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Icbf99a9f2f6fa64dd71a5f37922f9001577c6c97
Gerrit-Change-Number: 35083
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: fixeria, laforge.
Hello Jenkins Builder, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/35074?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Code-Review+1 by laforge, Verified+1 by Jenkins Builder
Change subject: soft_uart: demonstrate a problem with osmo_soft_uart_tx_ubits()
......................................................................
soft_uart: demonstrate a problem with osmo_soft_uart_tx_ubits()
As can be seen, pulling a small number of bits at a time (smaller
than a single UART frame would fit into) results in calling the
.tx_cb() with a msgb having no room at all, and thus pulling the
stop bits instead of the actual data.
Change-Id: Icfee378f0fdc5e32fe9ce0afab5f75bc278653a9
Related: OS#4396
---
M tests/soft_uart/soft_uart_test.c
M tests/soft_uart/soft_uart_test.ok
2 files changed, 123 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/74/35074/3
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35074?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Icfee378f0fdc5e32fe9ce0afab5f75bc278653a9
Gerrit-Change-Number: 35074
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset