[L] Change in osmo-iuh[master]: ranap_common: Implement support for missing procedures

2024-05-15 Thread tnt
Attention is currently required from: daniel, neels, pespin, tnt.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/36787?usp=email )

Change subject: ranap_common: Implement support for missing procedures
..


Patch Set 2: Code-Review+1

(4 comments)

Patchset:

PS1:
> I don't really understand what this is about TBH, just doing a quick read of 
> the code for "unexpecte […]
Done


Patchset:

PS2:
Looks logical to me.


File src/ranap_common_ran.c:

https://gerrit.osmocom.org/c/osmo-iuh/+/36787/comment/69e96e8c_19bd53ac
PS1, Line 196: static int 
ran_ranap_rx_unsuccessful_msg_co(RANAP_SuccessfulOutcome_t *imsg, ranap_message 
*message)
> ran_ranap_rx_unsuccessful_msg_co takes a RANAP_SuccessfulOutcome_t as param 
> and not some RANAP_Unsuc […]
Done


https://gerrit.osmocom.org/c/osmo-iuh/+/36787/comment/300fccd4_2fecee0b
PS1, Line 247:  rc = 
ran_ranap_rx_unsuccessful_msg_co(>choice.successfulOutcome, message);
> Not pdu->choice. […]
Done



--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/36787?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: I7dea74102da8b610ff2a310c5814f5c89f08e7a6
Gerrit-Change-Number: 36787
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-Reviewer: tnt 
Gerrit-Attention: neels 
Gerrit-Attention: tnt 
Gerrit-Attention: pespin 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Wed, 15 May 2024 15:15:45 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: tnt 
Gerrit-MessageType: comment


[L] Change in osmo-iuh[master]: ranap_common: Implement support for missing procedures

2024-05-15 Thread tnt
Attention is currently required from: daniel, laforge, neels.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/36787?usp=email )

Change subject: ranap_common: Implement support for missing procedures
..


Patch Set 1:

(3 comments)

Patchset:

PS1:
I don't really understand what this is about TBH, just doing a quick read of 
the code for "unexpected" things and this seemed a bit weird to me, feel free 
to ignore if this is how it should be ...


File src/ranap_common_ran.c:

https://gerrit.osmocom.org/c/osmo-iuh/+/36787/comment/050f4484_42ff9ca5
PS1, Line 196: static int 
ran_ranap_rx_unsuccessful_msg_co(RANAP_SuccessfulOutcome_t *imsg, ranap_message 
*message)
ran_ranap_rx_unsuccessful_msg_co takes a RANAP_SuccessfulOutcome_t as param and 
not some RANAP_UnsuccessfulOutcome_t


https://gerrit.osmocom.org/c/osmo-iuh/+/36787/comment/38ab628c_4d80622b
PS1, Line 247:  rc = 
ran_ranap_rx_unsuccessful_msg_co(>choice.successfulOutcome, message);
Not pdu->choice.unsuccessfulOutcome ?



--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/36787?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: I7dea74102da8b610ff2a310c5814f5c89f08e7a6
Gerrit-Change-Number: 36787
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-CC: tnt 
Gerrit-Attention: neels 
Gerrit-Attention: laforge 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Wed, 15 May 2024 15:04:43 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in osmo-e1-hardware[master]: icE1usb fw: Automatically report alarm condition to remote peer

2024-05-08 Thread tnt
tnt has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36687?usp=email )

Change subject: icE1usb fw: Automatically report alarm condition to remote peer
..

icE1usb fw: Automatically report alarm condition to remote peer

Signed-off-by: Sylvain Munaut 
Change-Id: I5ccf6b92f7be512bad3dda42caaee5f7eabf3ca3
---
M firmware/ice40-riscv/icE1usb/e1.c
1 file changed, 16 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  tnt: Looks good to me, approved
  laforge: Looks good to me, but someone else must approve
  manawyrm: Looks good to me, but someone else must approve




diff --git a/firmware/ice40-riscv/icE1usb/e1.c 
b/firmware/ice40-riscv/icE1usb/e1.c
index 17c1786..80b3aea 100644
--- a/firmware/ice40-riscv/icE1usb/e1.c
+++ b/firmware/ice40-riscv/icE1usb/e1.c
@@ -646,6 +646,12 @@
e1->errors.flags &= ~E1_ERR_F_RAI;
}

+   /* If we have any local alarm, make sure to notify remote side */
+   if (e1->errors.flags & (E1_ERR_F_LOS | E1_ERR_F_AIS | 
E1_ERR_F_ALIGN_ERR))
+   e1_regs->tx.csr = e1->tx.cr.val | E1_TX_CR_ALARM;
+   else
+   e1_regs->tx.csr = e1->tx.cr.val;
+
/* Update leds */
_e1_update_leds(port);


--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36687?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: I5ccf6b92f7be512bad3dda42caaee5f7eabf3ca3
Gerrit-Change-Number: 36687
Gerrit-PatchSet: 3
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: manawyrm 
Gerrit-Reviewer: roox 
Gerrit-Reviewer: tnt 
Gerrit-MessageType: merged


[M] Change in osmo-e1-hardware[master]: icE1usb fw: Rework the way LEDs are used and updated

2024-05-08 Thread tnt
tnt has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36686?usp=email )

Change subject: icE1usb fw: Rework the way LEDs are used and updated
..

icE1usb fw: Rework the way LEDs are used and updated

Signed-off-by: Sylvain Munaut 
Change-Id: Ib3215a676716cc60e27c5857e4559135928a8cf7
---
M firmware/ice40-riscv/icE1usb/e1.c
1 file changed, 91 insertions(+), 15 deletions(-)

Approvals:
  laforge: Looks good to me, but someone else must approve
  manawyrm: Looks good to me, but someone else must approve
  Jenkins Builder: Verified
  tnt: Looks good to me, approved




diff --git a/firmware/ice40-riscv/icE1usb/e1.c 
b/firmware/ice40-riscv/icE1usb/e1.c
index 6baee16..17c1786 100644
--- a/firmware/ice40-riscv/icE1usb/e1.c
+++ b/firmware/ice40-riscv/icE1usb/e1.c
@@ -270,6 +270,11 @@
} linemon;

struct e1_error_count errors;
+
+   struct {
+   enum e1_platform_led_state green;
+   enum e1_platform_led_state yellow;
+   } led;
 };

 static struct e1_state g_e1[NUM_E1_PORTS];
@@ -326,6 +331,76 @@
}
 }

+static void
+_e1_update_leds(int port)
+{
+   struct e1_state *e1 = _get_state(port);
+
+   enum e1_platform_led_state green;
+   enum e1_platform_led_state yellow;
+
+   /*
+* GreenYellow  Condition
+* OFF  /   LOS
+* BLINKOFF LOF
+* BLINKON  LOF + AIS
+* ON   OFF ALIGNED
+* ON   ON  ALIGNED + RAI
+*/
+
+   /* Compute expected state */
+   if (e1->errors.flags & E1_ERR_F_LOS) {
+   green  = E1P_LED_ST_OFF;
+   yellow = E1P_LED_ST_OFF;
+   } else if (e1->errors.flags & E1_ERR_F_ALIGN_ERR) {
+   green  = E1P_LED_ST_BLINK;
+   yellow = (e1->errors.flags & E1_ERR_F_AIS) ? E1P_LED_ST_ON : 
E1P_LED_ST_OFF;
+   } else {
+   green  = E1P_LED_ST_ON;
+   yellow = (e1->errors.flags & E1_ERR_F_RAI) ? E1P_LED_ST_ON : 
E1P_LED_ST_OFF;
+   }
+
+   /* Update actual leds */
+   if (e1->led.green != green)
+   e1_platform_led_set(port, E1P_LED_GREEN, green);
+
+   if (e1->led.yellow != yellow)
+   e1_platform_led_set(port, E1P_LED_YELLOW, yellow);
+
+   e1->led.green  = green;
+   e1->led.yellow = yellow;
+
+   /* Update the shared RGB led */
+   if (port == (NUM_E1_PORTS - 1))
+   {
+   static bool c_ok = true,  c_flow = false;
+   booln_ok = false, n_flow = false;
+
+   for (int port=0; porterrors.flags & E1_ERR_F_ALIGN_ERR);
+   n_flow |= (e1->rx.state != IDLE);
+   n_flow |= (e1->tx.state != IDLE);
+   }
+
+   if (n_ok != c_ok) {
+   if (n_ok)
+   led_color(0, 48, 0); // Green
+   else
+   led_color(48, 0, 0); // Red
+   }
+
+   if (n_flow != c_flow) {
+   led_blink(n_flow, 200, 1000);
+   led_breathe(n_flow, 100, 200);
+   }
+
+   c_ok   = n_ok;
+   c_flow = n_flow;
+   }
+}
+
 void
 e1_init(int port, uint16_t rx_cr, uint16_t tx_cr)
 {
@@ -490,13 +565,10 @@
}

if (rai_possible) {
-   if (rai_received) {
+   if (rai_received)
e1->errors.flags |= E1_ERR_F_RAI;
-   e1_platform_led_set(port, E1P_LED_YELLOW, 
E1P_LED_ST_ON);
-   } else {
+   else
e1->errors.flags &= ~E1_ERR_F_RAI;
-   e1_platform_led_set(port, E1P_LED_YELLOW, 
E1P_LED_ST_OFF);
-   }
}

return tot_frames;
@@ -561,10 +633,8 @@
uint32_t bd;
unsigned int ofs;

-   /* HACK: LED link status */
+   /* Update error flags */
if (e1_regs->rx.csr & E1_RX_SR_ALIGNED) {
-   e1_platform_led_set(port, E1P_LED_GREEN, E1P_LED_ST_ON);
-   led_color(0, 48, 0);
e1->errors.flags &= ~(
E1_ERR_F_LOS |
E1_ERR_F_AIS |
@@ -572,14 +642,13 @@
E1_ERR_F_ALIGN_ERR
);
} else {
-   e1_platform_led_set(port, E1P_LED_GREEN, E1P_LED_ST_BLINK);
-   e1_platform_led_set(port, E1P_LED_YELLOW, E1P_LED_ST_OFF);
-   led_color(48, 0, 0);
e1->errors.flags |=  E1_ERR_F_ALIGN_ERR;
e1->errors.flags &= ~E1_ERR_F_RAI;
-   /* TODO: completely off if rx tick counter not incrementing */
}

+   /* Update leds */
+   _e1_u

[M] Change in osmo-e1-hardware[master]: icE1usb fw: Implement E1 line monitor task

2024-05-08 Thread tnt
tnt has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36684?usp=email )

Change subject: icE1usb fw: Implement E1 line monitor task
..

icE1usb fw: Implement E1 line monitor task

The results are not used yet, just collected ...

Signed-off-by: Sylvain Munaut 
Change-Id: Id310b65b7cd83c3bbae90ecd4a82b09a3989d91f
---
M firmware/ice40-riscv/icE1usb/e1.c
M firmware/ice40-riscv/icE1usb/e1.h
M firmware/ice40-riscv/icE1usb/usb_e1.c
3 files changed, 72 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  manawyrm: Looks good to me, but someone else must approve
  jolly: Looks good to me, but someone else must approve
  laforge: Looks good to me, but someone else must approve
  tnt: Looks good to me, approved




diff --git a/firmware/ice40-riscv/icE1usb/e1.c 
b/firmware/ice40-riscv/icE1usb/e1.c
index 5e4fa33..1582cec 100644
--- a/firmware/ice40-riscv/icE1usb/e1.c
+++ b/firmware/ice40-riscv/icE1usb/e1.c
@@ -16,6 +16,7 @@

 #include "dma.h"
 #include "led.h" // FIXME
+#include "misc.h"
 #include "utils.h"


@@ -260,6 +261,14 @@
enum e1_pipe_state state;
} tx;

+   struct {
+   uint16_t rx_pulse;
+   uint16_t rx_sample;
+   uint16_t rx_one;
+
+   uint16_t _val;
+   } linemon;
+
struct e1_error_count errors;
 };

@@ -696,6 +705,53 @@
 }

 void
+e1_linemon_update(void)
+{
+   static int cycle = -1;
+
+   /* Initial boot */
+   if (cycle == -1) {
+   e1_tick_sel(TICK_RX_PULSE);
+   cycle = 0;
+   return;
+   }
+
+   /* Current cycle ? */
+   switch (cycle) {
+   /* Read initial values */
+   case 0:
+   case 2:
+   case 4:
+   for (int port=0; portrx.csr, e1_regs->tx.csr);
printf("InF: Rx %d / Tx %d\n", e1->rx.in_flight, e1->tx.in_flight);
printf("Sta: Rx %d / Tx %d\n", e1->rx.state, e1->tx.state);
+   printf("Tck: P %d / S %d / O %d\n",
+   e1->linemon.rx_pulse, e1->linemon.rx_sample, 
e1->linemon.rx_one);

e1f_debug(>rx.fifo, "Rx FIFO");
e1f_debug(>tx.fifo, "Tx FIFO");
diff --git a/firmware/ice40-riscv/icE1usb/e1.h 
b/firmware/ice40-riscv/icE1usb/e1.h
index 0ed43c4..883e1ec 100644
--- a/firmware/ice40-riscv/icE1usb/e1.h
+++ b/firmware/ice40-riscv/icE1usb/e1.h
@@ -15,6 +15,7 @@
 void e1_stop(int port);

 void e1_poll(int port);
+void e1_linemon_update(void);
 void e1_debug_print(int port, bool data);

 void e1_rx_config(int port, uint16_t cr);
diff --git a/firmware/ice40-riscv/icE1usb/usb_e1.c 
b/firmware/ice40-riscv/icE1usb/usb_e1.c
index 18d8516..843aeef 100644
--- a/firmware/ice40-riscv/icE1usb/usb_e1.c
+++ b/firmware/ice40-riscv/icE1usb/usb_e1.c
@@ -433,6 +433,7 @@


 static struct usb_fn_drv _e1_drv = {
+   .sof= e1_linemon_update,
.set_conf   = _e1_set_conf,
.set_intf   = _e1_set_intf,
.get_intf   = _e1_get_intf,

--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36684?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: Id310b65b7cd83c3bbae90ecd4a82b09a3989d91f
Gerrit-Change-Number: 36684
Gerrit-PatchSet: 3
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: manawyrm 
Gerrit-Reviewer: roox 
Gerrit-Reviewer: tnt 
Gerrit-MessageType: merged


[S] Change in osmo-e1-hardware[master]: icE1usb fw: Add AIS error flag and fill it along with LOS from linemon

2024-05-08 Thread tnt
tnt has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36685?usp=email )

Change subject: icE1usb fw: Add AIS error flag and fill it along with LOS from 
linemon
..

icE1usb fw: Add AIS error flag and fill it along with LOS from linemon

Now that we monitor low level line status, we can fill in a proper
LOS signal along with the newly introduced AIS flag

Signed-off-by: Sylvain Munaut 
Change-Id: Ied28b6b3da74f6a63a007fae889b571cc2c1e835
---
M firmware/ice40-riscv/icE1usb/e1.c
M firmware/ice40-riscv/icE1usb/e1.h
M firmware/ice40-riscv/icE1usb/ice1usb_proto.h
3 files changed, 46 insertions(+), 2 deletions(-)

Approvals:
  laforge: Looks good to me, but someone else must approve
  Jenkins Builder: Verified
  tnt: Looks good to me, approved
  manawyrm: Looks good to me, but someone else must approve




diff --git a/firmware/ice40-riscv/icE1usb/e1.c 
b/firmware/ice40-riscv/icE1usb/e1.c
index 1582cec..6baee16 100644
--- a/firmware/ice40-riscv/icE1usb/e1.c
+++ b/firmware/ice40-riscv/icE1usb/e1.c
@@ -565,12 +565,18 @@
if (e1_regs->rx.csr & E1_RX_SR_ALIGNED) {
e1_platform_led_set(port, E1P_LED_GREEN, E1P_LED_ST_ON);
led_color(0, 48, 0);
-   e1->errors.flags &= ~(E1_ERR_F_LOS|E1_ERR_F_ALIGN_ERR);
+   e1->errors.flags &= ~(
+   E1_ERR_F_LOS |
+   E1_ERR_F_AIS |
+   E1_ERR_F_RAI |
+   E1_ERR_F_ALIGN_ERR
+   );
} else {
e1_platform_led_set(port, E1P_LED_GREEN, E1P_LED_ST_BLINK);
e1_platform_led_set(port, E1P_LED_YELLOW, E1P_LED_ST_OFF);
led_color(48, 0, 0);
-   e1->errors.flags |= E1_ERR_F_ALIGN_ERR;
+   e1->errors.flags |=  E1_ERR_F_ALIGN_ERR;
+   e1->errors.flags &= ~E1_ERR_F_RAI;
/* TODO: completely off if rx tick counter not incrementing */
}

@@ -748,7 +754,30 @@

/* Next cycle */
if (++cycle == 6)
+   {
+   /* We did one full cycle of data, update our local flags */
+   for (int port=0; portlinemon.rx_pulse < 16) {
+   /* No pulse ?  -> LOS */
+   e1->errors.flags |=  E1_ERR_F_LOS;
+   e1->errors.flags &= ~E1_ERR_F_AIS;
+   } else {
+   /* We have "some" pulses, so somone is talking 
*/
+   e1->errors.flags &= ~E1_ERR_F_LOS;
+
+   /* If it's mostly ones, consider it AIS */
+   if (e1->linemon.rx_one > 2040)
+   e1->errors.flags |=  E1_ERR_F_AIS;
+   else
+   e1->errors.flags &= ~E1_ERR_F_AIS;
+   }
+   }
+
+   /* Start over */
cycle = 0;
+   }
 }

 void
diff --git a/firmware/ice40-riscv/icE1usb/e1.h 
b/firmware/ice40-riscv/icE1usb/e1.h
index 883e1ec..1e8e747 100644
--- a/firmware/ice40-riscv/icE1usb/e1.h
+++ b/firmware/ice40-riscv/icE1usb/e1.h
@@ -35,6 +35,7 @@
 #define E1_ERR_F_ALIGN_ERR 0x01
 #define E1_ERR_F_LOS   0x02
 #define E1_ERR_F_RAI   0x04
+#define E1_ERR_F_AIS   0x08

 struct e1_error_count {
uint16_t crc;
diff --git a/firmware/ice40-riscv/icE1usb/ice1usb_proto.h 
b/firmware/ice40-riscv/icE1usb/ice1usb_proto.h
index 8cf8439..8bc8fbb 100644
--- a/firmware/ice40-riscv/icE1usb/ice1usb_proto.h
+++ b/firmware/ice40-riscv/icE1usb/ice1usb_proto.h
@@ -143,6 +143,7 @@
 #define ICE1USB_ERR_F_ALIGN_ERR0x01
 #define ICE1USB_ERR_F_LOS  0x02
 #define ICE1USB_ERR_F_RAI  0x04
+#define ICE1USB_ERR_F_AIS  0x08
 
 struct ice1usb_irq_err {
/* 16-bit little-endian counters */

--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36685?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: Ied28b6b3da74f6a63a007fae889b571cc2c1e835
Gerrit-Change-Number: 36685
Gerrit-PatchSet: 3
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: manawyrm 
Gerrit-Reviewer: roox 
Gerrit-Reviewer: tnt 
Gerrit-MessageType: merged


[S] Change in osmo-e1-hardware[master]: icE1usb fw: Automatically report alarm condition to remote peer

2024-05-08 Thread tnt
Attention is currently required from: jolly, roox.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36687?usp=email )

Change subject: icE1usb fw: Automatically report alarm condition to remote peer
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36687?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: I5ccf6b92f7be512bad3dda42caaee5f7eabf3ca3
Gerrit-Change-Number: 36687
Gerrit-PatchSet: 3
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: manawyrm 
Gerrit-Reviewer: roox 
Gerrit-Reviewer: tnt 
Gerrit-Attention: roox 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Wed, 08 May 2024 18:43:51 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-e1-hardware[master]: icE1usb fw: Rework the way LEDs are used and updated

2024-05-08 Thread tnt
Attention is currently required from: jolly, roox.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36686?usp=email )

Change subject: icE1usb fw: Rework the way LEDs are used and updated
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36686?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: Ib3215a676716cc60e27c5857e4559135928a8cf7
Gerrit-Change-Number: 36686
Gerrit-PatchSet: 3
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: manawyrm 
Gerrit-Reviewer: roox 
Gerrit-Reviewer: tnt 
Gerrit-Attention: roox 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Wed, 08 May 2024 18:43:45 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-e1-hardware[master]: icE1usb fw: Add AIS error flag and fill it along with LOS from linemon

2024-05-08 Thread tnt
Attention is currently required from: jolly, roox.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36685?usp=email )

Change subject: icE1usb fw: Add AIS error flag and fill it along with LOS from 
linemon
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36685?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: Ied28b6b3da74f6a63a007fae889b571cc2c1e835
Gerrit-Change-Number: 36685
Gerrit-PatchSet: 3
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: manawyrm 
Gerrit-Reviewer: roox 
Gerrit-Reviewer: tnt 
Gerrit-Attention: roox 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Wed, 08 May 2024 18:43:11 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-e1-hardware[master]: icE1usb fw: Implement E1 line monitor task

2024-05-08 Thread tnt
Attention is currently required from: roox.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36684?usp=email )

Change subject: icE1usb fw: Implement E1 line monitor task
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36684?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: Id310b65b7cd83c3bbae90ecd4a82b09a3989d91f
Gerrit-Change-Number: 36684
Gerrit-PatchSet: 3
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: manawyrm 
Gerrit-Reviewer: roox 
Gerrit-Reviewer: tnt 
Gerrit-Attention: roox 
Gerrit-Comment-Date: Wed, 08 May 2024 18:43:01 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-sgsn[master]: gmm: mmctx_timer_stop(): warn about timer not running

2024-05-04 Thread tnt
Attention is currently required from: fixeria.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/36699?usp=email )

Change subject: gmm: mmctx_timer_stop(): warn about timer not running
..


Patch Set 1: Code-Review+1

(1 comment)

Patchset:

PS1:
Why does it happen at all ?
Is there anyway to prevent it from happening in the first place ?
Not a blocker, just wondering ...



--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/36699?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I56ecad9d8f1049974b0896f6d0e7fc61580155ec
Gerrit-Change-Number: 36699
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: tnt 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Sat, 04 May 2024 17:24:12 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-sgsn[master]: gmm: cosmetic: fix preprocessor macro formatting

2024-05-04 Thread tnt
Attention is currently required from: fixeria.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/36698?usp=email )

Change subject: gmm: cosmetic: fix preprocessor macro formatting
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/36698?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I77171d65db23794d8fd9872e0cc4d6f3b50dda0d
Gerrit-Change-Number: 36698
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: tnt 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Sat, 04 May 2024 17:22:43 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in ...osmo-python-tests[master]: fix "SyntaxWarning: invalid escape sequence '\('"

2024-05-04 Thread tnt
Attention is currently required from: fixeria.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/python/osmo-python-tests/+/36707?usp=email )

Change subject: fix "SyntaxWarning: invalid escape sequence '\('"
..


Patch Set 1: Code-Review+2


--
To view, visit 
https://gerrit.osmocom.org/c/python/osmo-python-tests/+/36707?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Change-Id: I7a9f546dc7cdf9bc250516a58f35b50b46017dc3
Gerrit-Change-Number: 36707
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Reviewer: tnt 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Sat, 04 May 2024 17:21:37 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in dahdi-linux[master]: icE1usb: Configure the RX mode according to CRC4 mode

2024-05-01 Thread tnt
Attention is currently required from: laforge.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/dahdi-linux/+/36655?usp=email )

Change subject: icE1usb: Configure the RX mode according to CRC4 mode
..


Patch Set 2:

(1 comment)

Patchset:

PS2:
> just to be clear: this will not break backwards compatibility between new 
> DAHDI driver and old firmw […]
No, it will do the exact same thing as before.
In the old firmware the 'rx mode' does nothing.



--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/36655?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: Ic9da7d2a32f9aa9bf5de296dc4885eeaf56b138e
Gerrit-Change-Number: 36655
Gerrit-PatchSet: 2
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Wed, 01 May 2024 12:57:19 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


[M] Change in dahdi-linux[master]: strlcpy() was removed with linux kernel commit d26270061ae6 use strsc...

2024-05-01 Thread tnt
Attention is currently required from: roox.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/dahdi-linux/+/36697?usp=email )

Change subject: strlcpy() was removed with linux kernel commit d26270061ae6 use 
strscpy() instead.
..


Patch Set 1: Verified+1 Code-Review+1

(1 comment)

Patchset:

PS1:
Manually added verify since build failures on linus master only are unrelated 
to the change.



--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/36697?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: I5beb8dfadf2d240b04e69822721b3360aa81d782
Gerrit-Change-Number: 36697
Gerrit-PatchSet: 1
Gerrit-Owner: roox 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: tnt 
Gerrit-Attention: roox 
Gerrit-Comment-Date: Wed, 01 May 2024 08:08:03 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in dahdi-linux[master]: strlcpy() was removed with linux kernel commit d26270061ae6 use strsc...

2024-05-01 Thread tnt
Attention is currently required from: roox.

tnt has removed a vote from this change. ( 
https://gerrit.osmocom.org/c/dahdi-linux/+/36697?usp=email )


Change subject: strlcpy() was removed with linux kernel commit d26270061ae6 use 
strscpy() instead.
..


Removed Verified-1 by Jenkins Builder (102)
--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/36697?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: I5beb8dfadf2d240b04e69822721b3360aa81d782
Gerrit-Change-Number: 36697
Gerrit-PatchSet: 1
Gerrit-Owner: roox 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: roox 
Gerrit-MessageType: deleteVote


[S] Change in osmo-e1-hardware[master]: icE1usb fw: e1_tick_read() for rx and tx

2024-04-30 Thread tnt
tnt has abandoned this change. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/21772?usp=email )

Change subject: icE1usb fw: e1_tick_read() for rx and tx
..


Abandoned

The hardware counters changed, this is no longer applicable.
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/21772?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: I8dd6765f27cdf5ab21ccb8290002c44eef67f96f
Gerrit-Change-Number: 21772
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: abandon


[M] Change in osmo-e1-hardware[master]: gateware: Rework the low-level line state monitoring ticks

2024-04-30 Thread tnt
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36679?usp=email

to look at the new patch set (#3).

The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder


Change subject: gateware: Rework the low-level line state monitoring ticks
..

gateware: Rework the low-level line state monitoring ticks

The 'tick' system was meant to allow the firmware to monitor the
low level state of the line, beyong just "not aligned", but it was
never really useful in the present state.

Now we have more tick source available (but only one can be measured
at the same time). More specifically, the firmware can monitor the
presence/absence of raw pulses (LOS condition), it can also monitor
the number of '1' pulses to detect an AIS signals, or simply the rate
of RX pulses (to tune the local oscillator to incoming signal rate).

Signed-off-by: Sylvain Munaut 
Change-Id: I31fa8a717a26643f1b6ca5644bee1d8c41a2512e
---
M gateware/common/rtl/soc_base.v
M gateware/cores/no2e1
M gateware/e1-tracer/doc/mem-map.md
M gateware/e1-tracer/rtl/misc.v
M gateware/e1-tracer/rtl/top.v
M gateware/icE1usb-proto/doc/mem-map.md
M gateware/icE1usb-proto/rtl/misc.v
M gateware/icE1usb-proto/rtl/top.v
M gateware/icE1usb/doc/mem-map.md
M gateware/icE1usb/rtl/misc.v
M gateware/icE1usb/rtl/top.v
11 files changed, 176 insertions(+), 65 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware 
refs/changes/79/36679/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36679?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: I31fa8a717a26643f1b6ca5644bee1d8c41a2512e
Gerrit-Change-Number: 36679
Gerrit-PatchSet: 3
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset


[S] Change in osmo-e1-hardware[master]: gateware/cores: Update no2e1

2024-04-30 Thread tnt
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36677?usp=email

to look at the new patch set (#3).

The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder


Change subject: gateware/cores: Update no2e1
..

gateware/cores: Update no2e1

This pulls in the support for non-crc4 framing modes and
also setting the Sa bits (for osmo-v5)

Signed-off-by: Sylvain Munaut 
Change-Id: Ica1bbaa052988f5b7e71c7fa51f87eb0bfea6f67
---
M gateware/cores/no2e1
1 file changed, 14 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware 
refs/changes/77/36677/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36677?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: Ica1bbaa052988f5b7e71c7fa51f87eb0bfea6f67
Gerrit-Change-Number: 36677
Gerrit-PatchSet: 3
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset


[S] Change in osmo-e1-hardware[master]: gateware/cores: Update no2e1

2024-04-30 Thread tnt
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36677?usp=email

to look at the new patch set (#2).

The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder


Change subject: gateware/cores: Update no2e1
..

gateware/cores: Update no2e1

This pulls in the support for non-crc4 framing modes and
also setting the Sa bits (for osmo-v5)

Signed-off-by: Sylvain Munaut 
Change-Id: Ica1bbaa052988f5b7e71c7fa51f87eb0bfea6f67
---
M gateware/cores/no2e1
1 file changed, 14 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware 
refs/changes/77/36677/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36677?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: Ica1bbaa052988f5b7e71c7fa51f87eb0bfea6f67
Gerrit-Change-Number: 36677
Gerrit-PatchSet: 2
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset


[M] Change in osmo-e1-hardware[master]: gateware: Rework the low-level line state monitoring ticks

2024-04-30 Thread tnt
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36679?usp=email

to look at the new patch set (#2).

The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder


Change subject: gateware: Rework the low-level line state monitoring ticks
..

gateware: Rework the low-level line state monitoring ticks

The 'tick' system was meant to allow the firmware to monitor the
low level state of the line, beyong just "not aligned", but it was
never really useful in the present state.

Now we have more tick source available (but only one can be measured
at the same time). More specifically, the firmware can monitor the
presence/absence of raw pulses (LOS condition), it can also monitor
the number of '1' pulses to detect an AIS signals, or simply the rate
of RX pulses (to tune the local oscillator to incoming signal rate).

Signed-off-by: Sylvain Munaut 
Change-Id: I31fa8a717a26643f1b6ca5644bee1d8c41a2512e
---
M gateware/common/rtl/soc_base.v
M gateware/cores/no2e1
M gateware/e1-tracer/doc/mem-map.md
M gateware/e1-tracer/rtl/misc.v
M gateware/e1-tracer/rtl/top.v
M gateware/icE1usb-proto/doc/mem-map.md
M gateware/icE1usb-proto/rtl/misc.v
M gateware/icE1usb-proto/rtl/top.v
M gateware/icE1usb/doc/mem-map.md
M gateware/icE1usb/rtl/misc.v
M gateware/icE1usb/rtl/top.v
11 files changed, 176 insertions(+), 65 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware 
refs/changes/79/36679/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36679?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: I31fa8a717a26643f1b6ca5644bee1d8c41a2512e
Gerrit-Change-Number: 36679
Gerrit-PatchSet: 2
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset


[M] Change in dahdi-linux[master]: icE1usb: Configure the RX mode according to CRC4 mode

2024-04-30 Thread tnt
tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/dahdi-linux/+/36655?usp=email )

Change subject: icE1usb: Configure the RX mode according to CRC4 mode
..


Patch Set 1: Verified+1

(1 comment)

Patchset:

PS1: 
Mark as verified since build failure is vs linux master and unrelated



--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/36655?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: Ic9da7d2a32f9aa9bf5de296dc4885eeaf56b138e
Gerrit-Change-Number: 36655
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-Comment-Date: Tue, 30 Apr 2024 11:21:32 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in dahdi-linux[master]: icE1usb: Configure the RX mode according to CRC4 mode

2024-04-30 Thread tnt
tnt has removed a vote from this change. ( 
https://gerrit.osmocom.org/c/dahdi-linux/+/36655?usp=email )


Change subject: icE1usb: Configure the RX mode according to CRC4 mode
..


Removed -Verified by Jenkins Builder (102)
--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/36655?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: Ic9da7d2a32f9aa9bf5de296dc4885eeaf56b138e
Gerrit-Change-Number: 36655
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: deleteVote


[M] Change in dahdi-linux[master]: icE1usb: Configure the RX mode according to CRC4 mode

2024-04-30 Thread tnt
tnt has removed a vote from this change. ( 
https://gerrit.osmocom.org/c/dahdi-linux/+/36655?usp=email )


Change subject: icE1usb: Configure the RX mode according to CRC4 mode
..


Removed Verified-1 by Jenkins Builder (102)
-- 
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/36655?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: Ic9da7d2a32f9aa9bf5de296dc4885eeaf56b138e
Gerrit-Change-Number: 36655
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: deleteVote


[S] Change in dahdi-linux[master]: icE1usb: Show accumulated error count from GPSDO state in sysfs

2024-04-30 Thread tnt
tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/dahdi-linux/+/36695?usp=email )

Change subject: icE1usb: Show accumulated error count from GPSDO state in sysfs
..


Patch Set 1: Verified+1

(1 comment)

Patchset:

PS1:
Mark as verified since build failure is vs linux master and unrelated



--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/36695?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: Idc4ff2a3a7411df758a432fc4c6fe5a88963b626
Gerrit-Change-Number: 36695
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: tnt 
Gerrit-Comment-Date: Tue, 30 Apr 2024 11:21:03 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in dahdi-linux[master]: icE1usb: Show accumulated error count from GPSDO state in sysfs

2024-04-30 Thread tnt
Attention is currently required from: tnt.

tnt has removed a vote from this change. ( 
https://gerrit.osmocom.org/c/dahdi-linux/+/36695?usp=email )


Change subject: icE1usb: Show accumulated error count from GPSDO state in sysfs
..


Removed -Verified by Jenkins Builder (102)
--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/36695?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: Idc4ff2a3a7411df758a432fc4c6fe5a88963b626
Gerrit-Change-Number: 36695
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: tnt 
Gerrit-MessageType: deleteVote


[S] Change in dahdi-linux[master]: icE1usb: Show accumulated error count from GPSDO state in sysfs

2024-04-30 Thread tnt
Attention is currently required from: tnt.

tnt has removed a vote from this change. ( 
https://gerrit.osmocom.org/c/dahdi-linux/+/36695?usp=email )


Change subject: icE1usb: Show accumulated error count from GPSDO state in sysfs
..


Removed Verified-1 by Jenkins Builder (102)
--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/36695?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: Idc4ff2a3a7411df758a432fc4c6fe5a88963b626
Gerrit-Change-Number: 36695
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: tnt 
Gerrit-MessageType: deleteVote


[S] Change in dahdi-linux[master]: icE1usb: Report BLUE alarm when receiving AIS

2024-04-30 Thread tnt
tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/dahdi-linux/+/36694?usp=email )

Change subject: icE1usb: Report BLUE alarm when receiving AIS
..


Patch Set 1: Verified+1

(1 comment)

Patchset:

PS1:
Mark as verified since build failure is vs linux master and unrelated



--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/36694?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: I75ae15d3b8e13ca6b82a20209ee9ca163a729020
Gerrit-Change-Number: 36694
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: tnt 
Gerrit-Comment-Date: Tue, 30 Apr 2024 11:20:38 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in dahdi-linux[master]: icE1usb: Report BLUE alarm when receiving AIS

2024-04-30 Thread tnt
Attention is currently required from: tnt.

tnt has removed a vote from this change. ( 
https://gerrit.osmocom.org/c/dahdi-linux/+/36694?usp=email )


Change subject: icE1usb: Report BLUE alarm when receiving AIS
..


Removed Verified-1 by Jenkins Builder (102)
--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/36694?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: I75ae15d3b8e13ca6b82a20209ee9ca163a729020
Gerrit-Change-Number: 36694
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: tnt 
Gerrit-MessageType: deleteVote


[S] Change in dahdi-linux[master]: icE1usb: Fix "typo" in ALL_RY_ALARMS

2024-04-30 Thread tnt
tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/dahdi-linux/+/36692?usp=email )

Change subject: icE1usb: Fix "typo" in ALL_RY_ALARMS
..


Patch Set 1: Verified+1

(1 comment)

Patchset:

PS1:
Mark as verified since build failure is vs linux master and unrelated



--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/36692?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: Ib0ef30f629d3e463871a0ee3ab6b0b94cb511804
Gerrit-Change-Number: 36692
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: tnt 
Gerrit-Comment-Date: Tue, 30 Apr 2024 11:19:47 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in dahdi-linux[master]: icE1usb: Fix "typo" in ALL_RY_ALARMS

2024-04-30 Thread tnt
Attention is currently required from: tnt.

tnt has removed a vote from this change. ( 
https://gerrit.osmocom.org/c/dahdi-linux/+/36692?usp=email )


Change subject: icE1usb: Fix "typo" in ALL_RY_ALARMS
..


Removed Verified-1 by Jenkins Builder (102)
--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/36692?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: Ib0ef30f629d3e463871a0ee3ab6b0b94cb511804
Gerrit-Change-Number: 36692
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: tnt 
Gerrit-MessageType: deleteVote


[S] Change in dahdi-linux[master]: icE1usb: Update ice1usb_proto.h

2024-04-30 Thread tnt
tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/dahdi-linux/+/36693?usp=email )

Change subject: icE1usb: Update ice1usb_proto.h
..


Patch Set 1: Verified+1

(1 comment)

Patchset:

PS1:
Mark as verified since build failure is vs linux master and unrelated



--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/36693?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: I17a1bbf27cfb423ba09146e2cc57b585d511ec49
Gerrit-Change-Number: 36693
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: tnt 
Gerrit-Comment-Date: Tue, 30 Apr 2024 11:19:21 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in dahdi-linux[master]: icE1usb: Update ice1usb_proto.h

2024-04-30 Thread tnt
Attention is currently required from: tnt.

tnt has removed a vote from this change. ( 
https://gerrit.osmocom.org/c/dahdi-linux/+/36693?usp=email )


Change subject: icE1usb: Update ice1usb_proto.h
..


Removed Verified-1 by Jenkins Builder (102)
--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/36693?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: I17a1bbf27cfb423ba09146e2cc57b585d511ec49
Gerrit-Change-Number: 36693
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: tnt 
Gerrit-MessageType: deleteVote


[S] Change in dahdi-linux[master]: icE1usb: Use ICE1USB_TX_MODE_TS0_CRC4_E to set E bits automatically

2024-04-30 Thread tnt
tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/dahdi-linux/+/36654?usp=email )

Change subject: icE1usb: Use ICE1USB_TX_MODE_TS0_CRC4_E to set E bits 
automatically
..


Patch Set 1: Verified+1

(1 comment)

Patchset:

PS1:
Mark as verified since build failure is vs linux master and unrelated



--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/36654?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: Iea936a6c908ef5e175be3090a8fbcafaeb5a0aed
Gerrit-Change-Number: 36654
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-Comment-Date: Tue, 30 Apr 2024 11:18:48 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in dahdi-linux[master]: icE1usb: Use ICE1USB_TX_MODE_TS0_CRC4_E to set E bits automatically

2024-04-30 Thread tnt
Attention is currently required from: tnt.

tnt has removed a vote from this change. ( 
https://gerrit.osmocom.org/c/dahdi-linux/+/36654?usp=email )


Change subject: icE1usb: Use ICE1USB_TX_MODE_TS0_CRC4_E to set E bits 
automatically
..


Removed Verified-1 by Jenkins Builder (102)
--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/36654?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: Iea936a6c908ef5e175be3090a8fbcafaeb5a0aed
Gerrit-Change-Number: 36654
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Attention: tnt 
Gerrit-MessageType: deleteVote


[M] Change in dahdi-linux[master]: icE1usb: Configure the RX mode according to CRC4 mode

2024-04-30 Thread tnt
tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/dahdi-linux/+/36655?usp=email )

Change subject: icE1usb: Configure the RX mode according to CRC4 mode
..


Patch Set 1:

(2 comments)

Patchset:

PS1:
Tested now that it behaves as I expect.


PS1:
> Note that I don't have a working DADHI setup ATM, so don't merge until I 
> either get to try this, or  […]
Done



--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/36655?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: Ic9da7d2a32f9aa9bf5de296dc4885eeaf56b138e
Gerrit-Change-Number: 36655
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 30 Apr 2024 11:12:19 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: tnt 
Gerrit-MessageType: comment


[S] Change in dahdi-linux[master]: icE1usb: Update ice1usb_proto.h

2024-04-30 Thread tnt
tnt has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/dahdi-linux/+/36693?usp=email )


Change subject: icE1usb: Update ice1usb_proto.h
..

icE1usb: Update ice1usb_proto.h

Change-Id: I17a1bbf27cfb423ba09146e2cc57b585d511ec49
Signed-off-by: Sylvain Munaut 
---
M drivers/dahdi/icE1usb/ice1usb_proto.h
1 file changed, 18 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/dahdi-linux refs/changes/93/36693/1

diff --git a/drivers/dahdi/icE1usb/ice1usb_proto.h 
b/drivers/dahdi/icE1usb/ice1usb_proto.h
index 3170d55..ee1c307 100644
--- a/drivers/dahdi/icE1usb/ice1usb_proto.h
+++ b/drivers/dahdi/icE1usb/ice1usb_proto.h
@@ -16,8 +16,14 @@

 /*! returns a bit-mask of optional device capabilities (see enum 
e1usb_dev_capability) */
 #define ICE1USB_DEV_GET_CAPABILITIES   0x01
+
+/*! returns a string describing the firmware version */
 #define ICE1USB_DEV_GET_FW_BUILD   0x02

+/*! performs an I2C register access (read/write depends on direction) */
+#define ICE1USB_DEV_I2C_REG_ACCESS 0x10
+
+
 enum e1usb_dev_capability {
/*! Does this board have a GPS-DO */
ICE1USB_DEV_CAP_GPSDO,
@@ -65,6 +71,7 @@
uint8_t mode;   /*!< Current configured operating mode 
*/
struct e1usb_gpsdo_tune tune;   /*!< Current VCXO tuning values */
uint32_t freq_est;  /*!< Latest frequency estimate 
measurement */
+   int16_t  err_acc;   /*!< Accumulated error (since fw 
icE1usb-fw-0.3 commit cfb8b0b7) */
 } __attribute__((packed));


@@ -136,6 +143,7 @@
 #define ICE1USB_ERR_F_ALIGN_ERR0x01
 #define ICE1USB_ERR_F_LOS  0x02
 #define ICE1USB_ERR_F_RAI  0x04
+#define ICE1USB_ERR_F_AIS  0x08

 struct ice1usb_irq_err {
/* 16-bit little-endian counters */

--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/36693?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: I17a1bbf27cfb423ba09146e2cc57b585d511ec49
Gerrit-Change-Number: 36693
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-MessageType: newchange


[S] Change in dahdi-linux[master]: icE1usb: Show accumulated error count from GPSDO state in sysfs

2024-04-30 Thread tnt
tnt has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/dahdi-linux/+/36695?usp=email )


Change subject: icE1usb: Show accumulated error count from GPSDO state in sysfs
..

icE1usb: Show accumulated error count from GPSDO state in sysfs

Change-Id: Idc4ff2a3a7411df758a432fc4c6fe5a88963b626
Signed-off-by: Sylvain Munaut 
---
M drivers/dahdi/icE1usb/icE1usb.c
1 file changed, 24 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/dahdi-linux refs/changes/95/36695/1

diff --git a/drivers/dahdi/icE1usb/icE1usb.c b/drivers/dahdi/icE1usb/icE1usb.c
index 867b4f2..a861515 100644
--- a/drivers/dahdi/icE1usb/icE1usb.c
+++ b/drivers/dahdi/icE1usb/icE1usb.c
@@ -1119,6 +1119,18 @@

 static DEVICE_ATTR(gpsdo_freq_est, 0444, e1u_gpsdo_freq_est_show, NULL);

+static ssize_t e1u_gpsdo_err_acc_show(struct device *dev,
+   struct device_attribute *attr, char 
*buf)
+{
+   struct ice1usb_gpsdo *e1d = dev_get_drvdata(dev);
+   int rc = e1u_update_gpsdo(e1d);
+   if (rc < 0)
+   return rc;
+   return sprintf(buf, "%d\n", (int)e1d->gpsdo_status.err_acc);
+}
+
+static DEVICE_ATTR(gpsdo_err_acc, 0444, e1u_gpsdo_err_acc_show, NULL);
+
 static ssize_t e1u_fw_build_show(struct device *dev,
 struct device_attribute *attr, char *buf)
 {
@@ -1138,6 +1150,7 @@
device_create_file(>usb_intf->dev, _attr_gpsdo_tune_coarse);
device_create_file(>usb_intf->dev, _attr_gpsdo_tune_fine);
device_create_file(>usb_intf->dev, _attr_gpsdo_freq_est);
+   device_create_file(>usb_intf->dev, _attr_gpsdo_err_acc);
device_create_file(>usb_intf->dev, _attr_fw_build);
 }

@@ -1150,6 +1163,7 @@
device_remove_file(>usb_intf->dev, _attr_gpsdo_tune_coarse);
device_remove_file(>usb_intf->dev, _attr_gpsdo_tune_fine);
device_remove_file(>usb_intf->dev, _attr_gpsdo_freq_est);
+   device_remove_file(>usb_intf->dev, _attr_gpsdo_err_acc);
device_remove_file(>usb_intf->dev, _attr_fw_build);
 }


--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/36695?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: Idc4ff2a3a7411df758a432fc4c6fe5a88963b626
Gerrit-Change-Number: 36695
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-MessageType: newchange


[S] Change in dahdi-linux[master]: icE1usb: Report BLUE alarm when receiving AIS

2024-04-30 Thread tnt
tnt has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/dahdi-linux/+/36694?usp=email )


Change subject: icE1usb: Report BLUE alarm when receiving AIS
..

icE1usb: Report BLUE alarm when receiving AIS

Change-Id: I75ae15d3b8e13ca6b82a20209ee9ca163a729020
Signed-off-by: Sylvain Munaut 
---
M drivers/dahdi/icE1usb/icE1usb.c
1 file changed, 13 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/dahdi-linux refs/changes/94/36694/1

diff --git a/drivers/dahdi/icE1usb/icE1usb.c b/drivers/dahdi/icE1usb/icE1usb.c
index 1656b3a..867b4f2 100644
--- a/drivers/dahdi/icE1usb/icE1usb.c
+++ b/drivers/dahdi/icE1usb/icE1usb.c
@@ -591,7 +591,7 @@
memcpy(>last_err, err, sizeof(ieu->last_err));
 }

-#define ALL_RY_ALARMS (DAHDI_ALARM_RED | DAHDI_ALARM_YELLOW | \
+#define ALL_RY_ALARMS (DAHDI_ALARM_RED | DAHDI_ALARM_YELLOW | DAHDI_ALARM_BLUE 
| \
   DAHDI_ALARM_LFA | DAHDI_ALARM_LMFA | DAHDI_ALARM_LOS)

 /* interrupt EP completes: Process and resubmit */
@@ -621,6 +621,8 @@
alarms |= DAHDI_ALARM_RED | DAHDI_ALARM_LFA | 
DAHDI_ALARM_LMFA;
if (err->flags & ICE1USB_ERR_F_RAI)
alarms |= DAHDI_ALARM_YELLOW;
+   if (err->flags & ICE1USB_ERR_F_AIS)
+   alarms |= DAHDI_ALARM_BLUE;
ieu->dahdi.span.alarms &= ~ALL_RY_ALARMS;
ieu->dahdi.span.alarms |= alarms;
dahdi_alarm_notify(>dahdi.span);

--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/36694?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: I75ae15d3b8e13ca6b82a20209ee9ca163a729020
Gerrit-Change-Number: 36694
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-MessageType: newchange


[S] Change in dahdi-linux[master]: icE1usb: Fix "typo" in ALL_RY_ALARMS

2024-04-30 Thread tnt
tnt has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/dahdi-linux/+/36692?usp=email )


Change subject: icE1usb: Fix "typo" in ALL_RY_ALARMS
..

icE1usb: Fix "typo" in ALL_RY_ALARMS

Obviously it's the DADHDI constant that should be used, not the
ICE1USB one ...

Change-Id: Ib0ef30f629d3e463871a0ee3ab6b0b94cb511804
Signed-off-by: Sylvain Munaut 
---
M drivers/dahdi/icE1usb/icE1usb.c
1 file changed, 14 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/dahdi-linux refs/changes/92/36692/1

diff --git a/drivers/dahdi/icE1usb/icE1usb.c b/drivers/dahdi/icE1usb/icE1usb.c
index 06ec443..1656b3a 100644
--- a/drivers/dahdi/icE1usb/icE1usb.c
+++ b/drivers/dahdi/icE1usb/icE1usb.c
@@ -592,7 +592,7 @@
 }

 #define ALL_RY_ALARMS (DAHDI_ALARM_RED | DAHDI_ALARM_YELLOW | \
-  DAHDI_ALARM_LFA | DAHDI_ALARM_LMFA | ICE1USB_ERR_F_LOS)
+  DAHDI_ALARM_LFA | DAHDI_ALARM_LMFA | DAHDI_ALARM_LOS)

 /* interrupt EP completes: Process and resubmit */
 static void ice1usb_irq_complete(struct urb *urb)

--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/36692?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: Ib0ef30f629d3e463871a0ee3ab6b0b94cb511804
Gerrit-Change-Number: 36692
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-MessageType: newchange


[S] Change in osmo-e1d[master]: ctl: When setting Sa bits, other bits must remain set to '1'

2024-04-30 Thread tnt
tnt has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-e1d/+/36691?usp=email )


Change subject: ctl: When setting Sa bits, other bits must remain set to '1'
..

ctl: When setting Sa bits, other bits must remain set to '1'

Some of the other bits will be used 'as-is'.
For instance the bit 0 (MSB) will be copied from this if operating
in nocrc4 mode.

Signed-off-by: Sylvain Munaut 
Change-Id: Id482c6a114e7bf051d157e81038f015e9d26fa99
---
M src/ctl.c
1 file changed, 22 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/91/36691/1

diff --git a/src/ctl.c b/src/ctl.c
index 331f2ad..e63589b 100644
--- a/src/ctl.c
+++ b/src/ctl.c
@@ -452,11 +452,14 @@
return 0;
}

-   line->ts0.tx_frame = ((sa_bits & 0x80) >> 7) | /* Bit 7 -> Sa8 */
-((sa_bits & 0x40) >> 5) | /* Bit 6 -> Sa7 */
-((sa_bits & 0x01) << 2) | /* Bit 0 -> Sa6 */
-((sa_bits & 0x20) >> 2) | /* Bit 5 -> Sa5 */
-(sa_bits & 0x10); /* Bit 4 -> Sa4 */
+   line->ts0.tx_frame = (
+   ((sa_bits & 0x80) >> 7) | /* Bit 7 -> Sa8 */
+   ((sa_bits & 0x40) >> 5) | /* Bit 6 -> Sa7 */
+   ((sa_bits & 0x01) << 2) | /* Bit 0 -> Sa6 */
+   ((sa_bits & 0x20) >> 2) | /* Bit 5 -> Sa5 */
+   (sa_bits & 0x10)| /* Bit 4 -> Sa4 */
+   0xe0
+   );

return 0;
 }

--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/36691?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: Id482c6a114e7bf051d157e81038f015e9d26fa99
Gerrit-Change-Number: 36691
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-MessageType: newchange


[S] Change in osmo-e1d[master]: iCE1usb: Transmit AIS events to clients

2024-04-30 Thread tnt
tnt has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-e1d/+/36690?usp=email )


Change subject: iCE1usb: Transmit AIS events to clients
..

iCE1usb: Transmit AIS events to clients

Signed-off-by: Sylvain Munaut 
Change-Id: I4a35a2ab2537cbc9ecec381ab5078c1b08067925
---
M src/usb.c
1 file changed, 22 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/90/36690/1

diff --git a/src/usb.c b/src/usb.c
index e4ba6c0..bb1a294 100644
--- a/src/usb.c
+++ b/src/usb.c
@@ -420,6 +420,18 @@
}
}

+   if ((errcnt->flags & ICE1USB_ERR_F_AIS) != (last->flags & 
ICE1USB_ERR_F_AIS)) {
+   LOGPLI(line, DE1D, LOGL_ERROR, "AIS (BLUE) %s\n",
+   errcnt->flags & ICE1USB_ERR_F_AIS ? "PRESENT" : 
"ABSENT");
+   if (errcnt->flags & ICE1USB_ERR_F_AIS) {
+   osmo_e1dp_server_event(line->intf->e1d->srv, 
E1DP_EVT_AIS_ON,
+  line->intf->id, line->id, 0, 
NULL, 0);
+   } else {
+   osmo_e1dp_server_event(line->intf->e1d->srv, 
E1DP_EVT_AIS_OFF,
+  line->intf->id, line->id, 0, 
NULL, 0);
+   }
+   }
+
if ((errcnt->flags & ICE1USB_ERR_F_RAI) != (last->flags & 
ICE1USB_ERR_F_RAI)) {
LOGPLI(line, DE1D, LOGL_ERROR, "Remote Alarm (YELLOW) %s\n",
errcnt->flags & ICE1USB_ERR_F_RAI ? "PRESENT" : 
"ABSENT");

--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/36690?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I4a35a2ab2537cbc9ecec381ab5078c1b08067925
Gerrit-Change-Number: 36690
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-MessageType: newchange


[S] Change in osmo-e1d[master]: iCE1usb: Transmit LOS events to clients

2024-04-30 Thread tnt
tnt has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-e1d/+/36689?usp=email )


Change subject: iCE1usb: Transmit LOS events to clients
..

iCE1usb: Transmit LOS events to clients

Signed-off-by: Sylvain Munaut 
Change-Id: I8822d24c25f8ba0bb70e9f717ca04dbf0e656e71
---
M src/usb.c
1 file changed, 17 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/89/36689/1

diff --git a/src/usb.c b/src/usb.c
index 3b77b94..e4ba6c0 100644
--- a/src/usb.c
+++ b/src/usb.c
@@ -410,8 +410,14 @@
if ((errcnt->flags & ICE1USB_ERR_F_LOS) != (last->flags & 
ICE1USB_ERR_F_LOS)) {
LOGPLI(line, DE1D, LOGL_ERROR, "Rx Clock %s\n",
errcnt->flags & ICE1USB_ERR_F_LOS ? "LOST" : 
"REGAINED");
-   if (errcnt->flags & ICE1USB_ERR_F_LOS)
+   if (errcnt->flags & ICE1USB_ERR_F_LOS) {
line_ctr_add(line, LINE_CTR_LOS, 1);
+   osmo_e1dp_server_event(line->intf->e1d->srv, 
E1DP_EVT_LOS_ON,
+  line->intf->id, line->id, 0, 
NULL, 0);
+   } else {
+   osmo_e1dp_server_event(line->intf->e1d->srv, 
E1DP_EVT_LOS_OFF,
+  line->intf->id, line->id, 0, 
NULL, 0);
+   }
}

if ((errcnt->flags & ICE1USB_ERR_F_RAI) != (last->flags & 
ICE1USB_ERR_F_RAI)) {

--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/36689?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I8822d24c25f8ba0bb70e9f717ca04dbf0e656e71
Gerrit-Change-Number: 36689
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-MessageType: newchange


[M] Change in osmo-e1d[master]: iCE1usb: Add support to configure CRC4 mode for TX/RX

2024-04-30 Thread tnt
Attention is currently required from: laforge, tnt.

Hello Jenkins Builder, laforge,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-e1d/+/36653?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: iCE1usb: Add support to configure CRC4 mode for TX/RX
..

iCE1usb: Add support to configure CRC4 mode for TX/RX

Signed-off-by: Sylvain Munaut 
Change-Id: I9b627a9617af4ae9ed98214d672c7d0391f801eb
---
M src/e1d.h
M src/usb.c
M src/vty.c
3 files changed, 82 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/53/36653/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/36653?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I9b627a9617af4ae9ed98214d672c7d0391f801eb
Gerrit-Change-Number: 36653
Gerrit-PatchSet: 3
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Attention: laforge 
Gerrit-Attention: tnt 
Gerrit-MessageType: newpatchset


[S] Change in osmo-e1d[master]: Update ice1usb_proto.h

2024-04-30 Thread tnt
tnt has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-e1d/+/36688?usp=email )


Change subject: Update ice1usb_proto.h
..

Update ice1usb_proto.h

Signed-off-by: Sylvain Munaut 
Change-Id: I8e041b3d94723eba9d3d30b9f03815d46dacf995
---
M src/ice1usb_proto.h
1 file changed, 17 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/88/36688/1

diff --git a/src/ice1usb_proto.h b/src/ice1usb_proto.h
index 54b91ab..ee1c307 100644
--- a/src/ice1usb_proto.h
+++ b/src/ice1usb_proto.h
@@ -16,8 +16,14 @@

 /*! returns a bit-mask of optional device capabilities (see enum 
e1usb_dev_capability) */
 #define ICE1USB_DEV_GET_CAPABILITIES   0x01
+
+/*! returns a string describing the firmware version */
 #define ICE1USB_DEV_GET_FW_BUILD   0x02

+/*! performs an I2C register access (read/write depends on direction) */
+#define ICE1USB_DEV_I2C_REG_ACCESS 0x10
+
+
 enum e1usb_dev_capability {
/*! Does this board have a GPS-DO */
ICE1USB_DEV_CAP_GPSDO,
@@ -137,6 +143,7 @@
 #define ICE1USB_ERR_F_ALIGN_ERR0x01
 #define ICE1USB_ERR_F_LOS  0x02
 #define ICE1USB_ERR_F_RAI  0x04
+#define ICE1USB_ERR_F_AIS  0x08

 struct ice1usb_irq_err {
/* 16-bit little-endian counters */

--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/36688?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I8e041b3d94723eba9d3d30b9f03815d46dacf995
Gerrit-Change-Number: 36688
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-MessageType: newchange


[M] Change in osmo-e1-hardware[master]: icE1usb fw: Rework the way LEDs are used and updated

2024-04-30 Thread tnt
tnt has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36686?usp=email )


Change subject: icE1usb fw: Rework the way LEDs are used and updated
..

icE1usb fw: Rework the way LEDs are used and updated

Signed-off-by: Sylvain Munaut 
Change-Id: Ib3215a676716cc60e27c5857e4559135928a8cf7
---
M firmware/ice40-riscv/icE1usb/e1.c
1 file changed, 91 insertions(+), 15 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware 
refs/changes/86/36686/1

diff --git a/firmware/ice40-riscv/icE1usb/e1.c 
b/firmware/ice40-riscv/icE1usb/e1.c
index 6baee16..17c1786 100644
--- a/firmware/ice40-riscv/icE1usb/e1.c
+++ b/firmware/ice40-riscv/icE1usb/e1.c
@@ -270,6 +270,11 @@
} linemon;

struct e1_error_count errors;
+
+   struct {
+   enum e1_platform_led_state green;
+   enum e1_platform_led_state yellow;
+   } led;
 };

 static struct e1_state g_e1[NUM_E1_PORTS];
@@ -326,6 +331,76 @@
}
 }

+static void
+_e1_update_leds(int port)
+{
+   struct e1_state *e1 = _get_state(port);
+
+   enum e1_platform_led_state green;
+   enum e1_platform_led_state yellow;
+
+   /*
+* GreenYellow  Condition
+* OFF  /   LOS
+* BLINKOFF LOF
+* BLINKON  LOF + AIS
+* ON   OFF ALIGNED
+* ON   ON  ALIGNED + RAI
+*/
+
+   /* Compute expected state */
+   if (e1->errors.flags & E1_ERR_F_LOS) {
+   green  = E1P_LED_ST_OFF;
+   yellow = E1P_LED_ST_OFF;
+   } else if (e1->errors.flags & E1_ERR_F_ALIGN_ERR) {
+   green  = E1P_LED_ST_BLINK;
+   yellow = (e1->errors.flags & E1_ERR_F_AIS) ? E1P_LED_ST_ON : 
E1P_LED_ST_OFF;
+   } else {
+   green  = E1P_LED_ST_ON;
+   yellow = (e1->errors.flags & E1_ERR_F_RAI) ? E1P_LED_ST_ON : 
E1P_LED_ST_OFF;
+   }
+
+   /* Update actual leds */
+   if (e1->led.green != green)
+   e1_platform_led_set(port, E1P_LED_GREEN, green);
+
+   if (e1->led.yellow != yellow)
+   e1_platform_led_set(port, E1P_LED_YELLOW, yellow);
+
+   e1->led.green  = green;
+   e1->led.yellow = yellow;
+
+   /* Update the shared RGB led */
+   if (port == (NUM_E1_PORTS - 1))
+   {
+   static bool c_ok = true,  c_flow = false;
+   booln_ok = false, n_flow = false;
+
+   for (int port=0; porterrors.flags & E1_ERR_F_ALIGN_ERR);
+   n_flow |= (e1->rx.state != IDLE);
+   n_flow |= (e1->tx.state != IDLE);
+   }
+
+   if (n_ok != c_ok) {
+   if (n_ok)
+   led_color(0, 48, 0); // Green
+   else
+   led_color(48, 0, 0); // Red
+   }
+
+   if (n_flow != c_flow) {
+   led_blink(n_flow, 200, 1000);
+   led_breathe(n_flow, 100, 200);
+   }
+
+   c_ok   = n_ok;
+   c_flow = n_flow;
+   }
+}
+
 void
 e1_init(int port, uint16_t rx_cr, uint16_t tx_cr)
 {
@@ -490,13 +565,10 @@
}

if (rai_possible) {
-   if (rai_received) {
+   if (rai_received)
e1->errors.flags |= E1_ERR_F_RAI;
-   e1_platform_led_set(port, E1P_LED_YELLOW, 
E1P_LED_ST_ON);
-   } else {
+   else
e1->errors.flags &= ~E1_ERR_F_RAI;
-   e1_platform_led_set(port, E1P_LED_YELLOW, 
E1P_LED_ST_OFF);
-   }
}

return tot_frames;
@@ -561,10 +633,8 @@
uint32_t bd;
unsigned int ofs;

-   /* HACK: LED link status */
+   /* Update error flags */
if (e1_regs->rx.csr & E1_RX_SR_ALIGNED) {
-   e1_platform_led_set(port, E1P_LED_GREEN, E1P_LED_ST_ON);
-   led_color(0, 48, 0);
e1->errors.flags &= ~(
E1_ERR_F_LOS |
E1_ERR_F_AIS |
@@ -572,14 +642,13 @@
E1_ERR_F_ALIGN_ERR
);
} else {
-   e1_platform_led_set(port, E1P_LED_GREEN, E1P_LED_ST_BLINK);
-   e1_platform_led_set(port, E1P_LED_YELLOW, E1P_LED_ST_OFF);
-   led_color(48, 0, 0);
e1->errors.flags |=  E1_ERR_F_ALIGN_ERR;
e1->errors.flags &= ~E1_ERR_F_RAI;
-   /* TODO: completely off if rx tick counter not incrementing */
}

+   /* Update leds */
+   _e1_update_leds(port);
+
/* Active ? */
if ((e1->rx.state == IDLE) &&am

[S] Change in osmo-e1-hardware[master]: icE1usb fw: Always define NUM_E1_PORTS in Makefile

2024-04-30 Thread tnt
tnt has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36681?usp=email )


Change subject: icE1usb fw: Always define NUM_E1_PORTS in Makefile
..

icE1usb fw: Always define NUM_E1_PORTS in Makefile

So that it's available without having to include the USB include ...

Signed-off-by: Sylvain Munaut 
Change-Id: I0b434cef7a662c19e5f48072285c013e8c02e254
---
M firmware/ice40-riscv/icE1usb/Makefile
M firmware/ice40-riscv/icE1usb/usb_desc_ids.h
2 files changed, 14 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware 
refs/changes/81/36681/1

diff --git a/firmware/ice40-riscv/icE1usb/Makefile 
b/firmware/ice40-riscv/icE1usb/Makefile
index f385408..5fcd1f7 100644
--- a/firmware/ice40-riscv/icE1usb/Makefile
+++ b/firmware/ice40-riscv/icE1usb/Makefile
@@ -19,6 +19,8 @@

 ifeq ($(SINGLE_CHANNEL),1)
 CFLAGS += -DNUM_E1_PORTS=1
+else
+CFLAGS += -DNUM_E1_PORTS=2
 endif
 
 NO2USB_FW_VERSION=0
diff --git a/firmware/ice40-riscv/icE1usb/usb_desc_ids.h 
b/firmware/ice40-riscv/icE1usb/usb_desc_ids.h
index df0331e..b9a7032 100644
--- a/firmware/ice40-riscv/icE1usb/usb_desc_ids.h
+++ b/firmware/ice40-riscv/icE1usb/usb_desc_ids.h
@@ -7,10 +7,6 @@

 #pragma once

-#ifndef NUM_E1_PORTS
-# define NUM_E1_PORTS 2
-#endif
-
 #define USB_INTF_E1(p) (0 + (p))
 #define USB_INTF_GPS_CDC_CTL   (NUM_E1_PORTS + 0)
 #define USB_INTF_GPS_CDC_DATA  (NUM_E1_PORTS + 1)

--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36681?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: I0b434cef7a662c19e5f48072285c013e8c02e254
Gerrit-Change-Number: 36681
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-MessageType: newchange


[S] Change in osmo-e1-hardware[master]: icE1usb fw: Automatically report alarm condition to remote peer

2024-04-30 Thread tnt
tnt has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36687?usp=email )


Change subject: icE1usb fw: Automatically report alarm condition to remote peer
..

icE1usb fw: Automatically report alarm condition to remote peer

Signed-off-by: Sylvain Munaut 
Change-Id: I5ccf6b92f7be512bad3dda42caaee5f7eabf3ca3
---
M firmware/ice40-riscv/icE1usb/e1.c
1 file changed, 16 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware 
refs/changes/87/36687/1

diff --git a/firmware/ice40-riscv/icE1usb/e1.c 
b/firmware/ice40-riscv/icE1usb/e1.c
index 17c1786..80b3aea 100644
--- a/firmware/ice40-riscv/icE1usb/e1.c
+++ b/firmware/ice40-riscv/icE1usb/e1.c
@@ -646,6 +646,12 @@
e1->errors.flags &= ~E1_ERR_F_RAI;
}

+   /* If we have any local alarm, make sure to notify remote side */
+   if (e1->errors.flags & (E1_ERR_F_LOS | E1_ERR_F_AIS | 
E1_ERR_F_ALIGN_ERR))
+   e1_regs->tx.csr = e1->tx.cr.val | E1_TX_CR_ALARM;
+   else
+   e1_regs->tx.csr = e1->tx.cr.val;
+
/* Update leds */
_e1_update_leds(port);


--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36687?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: I5ccf6b92f7be512bad3dda42caaee5f7eabf3ca3
Gerrit-Change-Number: 36687
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-MessageType: newchange


[S] Change in osmo-e1-hardware[master]: icE1usb fw: Add AIS error flag and fill it along with LOS from linemon

2024-04-30 Thread tnt
tnt has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36685?usp=email )


Change subject: icE1usb fw: Add AIS error flag and fill it along with LOS from 
linemon
..

icE1usb fw: Add AIS error flag and fill it along with LOS from linemon

Now that we monitor low level line status, we can fill in a proper
LOS signal along with the newly introduced AIS flag

Signed-off-by: Sylvain Munaut 
Change-Id: Ied28b6b3da74f6a63a007fae889b571cc2c1e835
---
M firmware/ice40-riscv/icE1usb/e1.c
M firmware/ice40-riscv/icE1usb/e1.h
M firmware/ice40-riscv/icE1usb/ice1usb_proto.h
3 files changed, 46 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware 
refs/changes/85/36685/1

diff --git a/firmware/ice40-riscv/icE1usb/e1.c 
b/firmware/ice40-riscv/icE1usb/e1.c
index 1582cec..6baee16 100644
--- a/firmware/ice40-riscv/icE1usb/e1.c
+++ b/firmware/ice40-riscv/icE1usb/e1.c
@@ -565,12 +565,18 @@
if (e1_regs->rx.csr & E1_RX_SR_ALIGNED) {
e1_platform_led_set(port, E1P_LED_GREEN, E1P_LED_ST_ON);
led_color(0, 48, 0);
-   e1->errors.flags &= ~(E1_ERR_F_LOS|E1_ERR_F_ALIGN_ERR);
+   e1->errors.flags &= ~(
+   E1_ERR_F_LOS |
+   E1_ERR_F_AIS |
+   E1_ERR_F_RAI |
+   E1_ERR_F_ALIGN_ERR
+   );
} else {
e1_platform_led_set(port, E1P_LED_GREEN, E1P_LED_ST_BLINK);
e1_platform_led_set(port, E1P_LED_YELLOW, E1P_LED_ST_OFF);
led_color(48, 0, 0);
-   e1->errors.flags |= E1_ERR_F_ALIGN_ERR;
+   e1->errors.flags |=  E1_ERR_F_ALIGN_ERR;
+   e1->errors.flags &= ~E1_ERR_F_RAI;
/* TODO: completely off if rx tick counter not incrementing */
}

@@ -748,7 +754,30 @@

/* Next cycle */
if (++cycle == 6)
+   {
+   /* We did one full cycle of data, update our local flags */
+   for (int port=0; portlinemon.rx_pulse < 16) {
+   /* No pulse ?  -> LOS */
+   e1->errors.flags |=  E1_ERR_F_LOS;
+   e1->errors.flags &= ~E1_ERR_F_AIS;
+   } else {
+   /* We have "some" pulses, so somone is talking 
*/
+   e1->errors.flags &= ~E1_ERR_F_LOS;
+
+   /* If it's mostly ones, consider it AIS */
+   if (e1->linemon.rx_one > 2040)
+   e1->errors.flags |=  E1_ERR_F_AIS;
+   else
+   e1->errors.flags &= ~E1_ERR_F_AIS;
+   }
+   }
+
+   /* Start over */
cycle = 0;
+   }
 }

 void
diff --git a/firmware/ice40-riscv/icE1usb/e1.h 
b/firmware/ice40-riscv/icE1usb/e1.h
index 883e1ec..1e8e747 100644
--- a/firmware/ice40-riscv/icE1usb/e1.h
+++ b/firmware/ice40-riscv/icE1usb/e1.h
@@ -35,6 +35,7 @@
 #define E1_ERR_F_ALIGN_ERR 0x01
 #define E1_ERR_F_LOS   0x02
 #define E1_ERR_F_RAI   0x04
+#define E1_ERR_F_AIS   0x08

 struct e1_error_count {
uint16_t crc;
diff --git a/firmware/ice40-riscv/icE1usb/ice1usb_proto.h 
b/firmware/ice40-riscv/icE1usb/ice1usb_proto.h
index 8cf8439..8bc8fbb 100644
--- a/firmware/ice40-riscv/icE1usb/ice1usb_proto.h
+++ b/firmware/ice40-riscv/icE1usb/ice1usb_proto.h
@@ -143,6 +143,7 @@
 #define ICE1USB_ERR_F_ALIGN_ERR0x01
 #define ICE1USB_ERR_F_LOS  0x02
 #define ICE1USB_ERR_F_RAI  0x04
+#define ICE1USB_ERR_F_AIS  0x08

 struct ice1usb_irq_err {
/* 16-bit little-endian counters */

--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36685?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: Ied28b6b3da74f6a63a007fae889b571cc2c1e835
Gerrit-Change-Number: 36685
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-MessageType: newchange


[M] Change in osmo-e1-hardware[master]: icE1usb fw: Implement E1 line monitor task

2024-04-30 Thread tnt
tnt has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36684?usp=email )


Change subject: icE1usb fw: Implement E1 line monitor task
..

icE1usb fw: Implement E1 line monitor task

The results are not used yet, just collected ...

Signed-off-by: Sylvain Munaut 
Change-Id: Id310b65b7cd83c3bbae90ecd4a82b09a3989d91f
---
M firmware/ice40-riscv/icE1usb/e1.c
M firmware/ice40-riscv/icE1usb/e1.h
M firmware/ice40-riscv/icE1usb/usb_e1.c
3 files changed, 72 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware 
refs/changes/84/36684/1

diff --git a/firmware/ice40-riscv/icE1usb/e1.c 
b/firmware/ice40-riscv/icE1usb/e1.c
index 5e4fa33..1582cec 100644
--- a/firmware/ice40-riscv/icE1usb/e1.c
+++ b/firmware/ice40-riscv/icE1usb/e1.c
@@ -16,6 +16,7 @@

 #include "dma.h"
 #include "led.h" // FIXME
+#include "misc.h"
 #include "utils.h"


@@ -260,6 +261,14 @@
enum e1_pipe_state state;
} tx;

+   struct {
+   uint16_t rx_pulse;
+   uint16_t rx_sample;
+   uint16_t rx_one;
+
+   uint16_t _val;
+   } linemon;
+
struct e1_error_count errors;
 };

@@ -696,6 +705,53 @@
 }

 void
+e1_linemon_update(void)
+{
+   static int cycle = -1;
+
+   /* Initial boot */
+   if (cycle == -1) {
+   e1_tick_sel(TICK_RX_PULSE);
+   cycle = 0;
+   return;
+   }
+
+   /* Current cycle ? */
+   switch (cycle) {
+   /* Read initial values */
+   case 0:
+   case 2:
+   case 4:
+   for (int port=0; portrx.csr, e1_regs->tx.csr);
printf("InF: Rx %d / Tx %d\n", e1->rx.in_flight, e1->tx.in_flight);
printf("Sta: Rx %d / Tx %d\n", e1->rx.state, e1->tx.state);
+   printf("Tck: P %d / S %d / O %d\n",
+   e1->linemon.rx_pulse, e1->linemon.rx_sample, 
e1->linemon.rx_one);

e1f_debug(>rx.fifo, "Rx FIFO");
e1f_debug(>tx.fifo, "Tx FIFO");
diff --git a/firmware/ice40-riscv/icE1usb/e1.h 
b/firmware/ice40-riscv/icE1usb/e1.h
index 0ed43c4..883e1ec 100644
--- a/firmware/ice40-riscv/icE1usb/e1.h
+++ b/firmware/ice40-riscv/icE1usb/e1.h
@@ -15,6 +15,7 @@
 void e1_stop(int port);

 void e1_poll(int port);
+void e1_linemon_update(void);
 void e1_debug_print(int port, bool data);

 void e1_rx_config(int port, uint16_t cr);
diff --git a/firmware/ice40-riscv/icE1usb/usb_e1.c 
b/firmware/ice40-riscv/icE1usb/usb_e1.c
index 18d8516..843aeef 100644
--- a/firmware/ice40-riscv/icE1usb/usb_e1.c
+++ b/firmware/ice40-riscv/icE1usb/usb_e1.c
@@ -433,6 +433,7 @@


 static struct usb_fn_drv _e1_drv = {
+   .sof= e1_linemon_update,
.set_conf   = _e1_set_conf,
.set_intf   = _e1_set_intf,
.get_intf   = _e1_get_intf,

--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36684?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: Id310b65b7cd83c3bbae90ecd4a82b09a3989d91f
Gerrit-Change-Number: 36684
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-MessageType: newchange


[S] Change in osmo-e1-hardware[master]: icE1usb fw: Use NUM_E1_PORTS in e1.c

2024-04-30 Thread tnt
tnt has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36683?usp=email )


Change subject: icE1usb fw: Use NUM_E1_PORTS in e1.c
..

icE1usb fw: Use NUM_E1_PORTS in e1.c

Signed-off-by: Sylvain Munaut 
Change-Id: Id69b4429a67ccb8834fee26b83839539a5ad8b31
---
M firmware/ice40-riscv/icE1usb/e1.c
1 file changed, 13 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware 
refs/changes/83/36683/1

diff --git a/firmware/ice40-riscv/icE1usb/e1.c 
b/firmware/ice40-riscv/icE1usb/e1.c
index bfc042e..5e4fa33 100644
--- a/firmware/ice40-riscv/icE1usb/e1.c
+++ b/firmware/ice40-riscv/icE1usb/e1.c
@@ -263,13 +263,13 @@
struct e1_error_count errors;
 };

-static struct e1_state g_e1[2];
+static struct e1_state g_e1[NUM_E1_PORTS];


 static volatile struct e1_core *
 _get_regs(int port)
 {
-   if ((port < 0) || (port > 1))
+   if ((port < 0) || (port >= NUM_E1_PORTS))
panic("_get_regs invalid port %d", port);
return _regs_base[port];
 }
@@ -277,7 +277,7 @@
 static struct e1_state *
 _get_state(int port)
 {
-   if ((port < 0) || (port > 1))
+   if ((port < 0) || (port >= NUM_E1_PORTS))
panic("_get_state invalid port %d", port);
return _e1[port];
 }

--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36683?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: Id69b4429a67ccb8834fee26b83839539a5ad8b31
Gerrit-Change-Number: 36683
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-MessageType: newchange


[S] Change in osmo-e1-hardware[master]: icE1usb fw: Fix some formatting (tab vs space)

2024-04-30 Thread tnt
tnt has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36682?usp=email )


Change subject: icE1usb fw: Fix some formatting (tab vs space)
..

icE1usb fw: Fix some formatting (tab vs space)

Signed-off-by: Sylvain Munaut 
Change-Id: Id47025320e65a27fc46e9204e050c57d108dab56
---
M firmware/ice40-riscv/icE1usb/usb_e1.c
1 file changed, 12 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware 
refs/changes/82/36682/1

diff --git a/firmware/ice40-riscv/icE1usb/usb_e1.c 
b/firmware/ice40-riscv/icE1usb/usb_e1.c
index 11c7401..18d8516 100644
--- a/firmware/ice40-riscv/icE1usb/usb_e1.c
+++ b/firmware/ice40-riscv/icE1usb/usb_e1.c
@@ -434,8 +434,8 @@

 static struct usb_fn_drv _e1_drv = {
.set_conf   = _e1_set_conf,
-.set_intf   = _e1_set_intf,
-.get_intf   = _e1_get_intf,
+   .set_intf   = _e1_set_intf,
+   .get_intf   = _e1_get_intf,
.ctrl_req   = _e1_ctrl_req,
 };


--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36682?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: Id47025320e65a27fc46e9204e050c57d108dab56
Gerrit-Change-Number: 36682
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-MessageType: newchange


[M] Change in osmo-e1-hardware[master]: gateware: Rework the low-level line state monitoring ticks

2024-04-30 Thread tnt
tnt has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36679?usp=email )


Change subject: gateware: Rework the low-level line state monitoring ticks
..

gateware: Rework the low-level line state monitoring ticks

The 'tick' system was meant to allow the firmware to monitor the
low level state of the line, beyong just "not aligned", but it was
never really useful in the present state.

Now we have more tick source available (but only one can be measured
at the same time). More specifically, the firmware can monitor the
presence/absence of raw pulses (LOS condition), it can also monitor
the number of '1' pulses to detect an AIS signals, or simply the rate
of RX pulses (to tune the local oscillator to incoming signal rate).

Signed-off-by: Sylvain Munaut 
Change-Id: I31fa8a717a26643f1b6ca5644bee1d8c41a2512e
---
M gateware/common/rtl/soc_base.v
M gateware/cores/no2e1
M gateware/e1-tracer/doc/mem-map.md
M gateware/e1-tracer/rtl/misc.v
M gateware/e1-tracer/rtl/top.v
M gateware/icE1usb-proto/doc/mem-map.md
M gateware/icE1usb-proto/rtl/misc.v
M gateware/icE1usb-proto/rtl/top.v
M gateware/icE1usb/doc/mem-map.md
M gateware/icE1usb/rtl/misc.v
M gateware/icE1usb/rtl/top.v
11 files changed, 176 insertions(+), 65 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware 
refs/changes/79/36679/1

diff --git a/gateware/common/rtl/soc_base.v b/gateware/common/rtl/soc_base.v
index 25c4af8..be7766a 100644
--- a/gateware/common/rtl/soc_base.v
+++ b/gateware/common/rtl/soc_base.v
@@ -72,9 +72,8 @@
input  wire [ WB_N-1:0] wb_m_ack,

// Ticks
-   output wire [E1_N-1:0] tick_e1_rx,
-   output wire [E1_N-1:0] tick_e1_tx,
-   output wiretick_usb_sof,
+   output wire [4*E1_N-1:0] tick_e1,
+   output wire  tick_usb_sof,

// Clock / Reset
input  wire clk_sys,
@@ -502,8 +501,7 @@
.wb_cyc  (wb_cyc[7]),
.wb_ack  (wb_ack[7]),
.irq (),
-   .tick_rx (tick_e1_rx),
-   .tick_tx (tick_e1_tx),
+   .mon_tick(tick_e1),
.clk (clk_sys),
.rst (rst_sys)
);
diff --git a/gateware/cores/no2e1 b/gateware/cores/no2e1
index 9a8..82040f1 16
--- a/gateware/cores/no2e1
+++ b/gateware/cores/no2e1
@@ -1 +1 @@
-Subproject commit 9a855cb265a6271a8a43fd3809e7ad6ac040
+Subproject commit 82040f15ec54a6e22d9ad72cdcd72af37f3961dd
diff --git a/gateware/e1-tracer/doc/mem-map.md 
b/gateware/e1-tracer/doc/mem-map.md
index 06cfad0..aa79948 100644
--- a/gateware/e1-tracer/doc/mem-map.md
+++ b/gateware/e1-tracer/doc/mem-map.md
@@ -156,21 +156,43 @@

 Write to this register with bit 2 set will trigger a FPGA reload of the 
selected image.

- E1 tick channel 0/1 (Read Only, addr `0x04` / `0x05`)
+ E1 tick source select (Write Only, addr `0x04`)

 ```text
 
,---,
 |31|30|29|28|27|26|25|24|23|22|21|20|19|18|17|16|15|14|13|12|11|10| 9| 8| 7| 
6| 5| 4| 3| 2| 1| 0|
 
|---|
-|  /|   rx_tick
 |
+| /   |ts[1]|   /  
   |ts[0]|
 
'---'

- * [15:0] - rx_tick
+ * [17:16] - ts[1] : Tick Source for channel 1
+ * [ 1: 0] - ts[0] : Tick Source for channel 0
 ```

-An internal counter is incremented at every bit received by the corresponding 
E1 channel. That
-counter value is then captured at every USB Start-of-Frame packet and the last 
captured value
-made available here.
+Selects the tick source for the counters below for each E1 channel.
+Available sources are :
+
+* `0`: (reserved)
+* `1`: (reserved)
+* `2`: RX Sample, for every bit received
+* `3`: RX One, for every `1` bit received
+
+ E1 tick counters (Read Only, addr `0x04`)
+
+```text
+,---,
+|31|30|29|28|27|26|25|24|23|22|21|20|19|18|17|16|15|14|13|12|11|10| 9| 8| 7| 
6| 5| 4| 3| 2| 1| 0|
+|---|
+|  chan[1]  |   chan[0]
 |
+'---'
+
+ * [31:16] - chan[1] : Tick counter for channel 1
+ * [15: 0] - chan[0] : Tick counter for channel 0
+```
+
+An internal counter is incremented at every E1 tick (tick source selected 
above) for each E1
+channel. That counter value is then capture

[S] Change in osmo-e1-hardware[master]: icE1usb fw: Avoid casting random pointer to struct in set_{rx,tx}_mode

2024-04-30 Thread tnt
tnt has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36676?usp=email )


Change subject: icE1usb fw: Avoid casting random pointer to struct in 
set_{rx,tx}_mode
..

icE1usb fw: Avoid casting random pointer to struct in set_{rx,tx}_mode

There is really no need here, we can use `memcpy` just as well.

Not sure if this was a problem here but newer gcc are annoying
with aliasing rules and such so better safe than sorry.

Signed-off-by: Sylvain Munaut 
Change-Id: I110ee4c014e8cfe058f7fc357decb7ab99e0be64
---
M firmware/ice40-riscv/icE1usb/usb_e1.c
1 file changed, 19 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware 
refs/changes/76/36676/1

diff --git a/firmware/ice40-riscv/icE1usb/usb_e1.c 
b/firmware/ice40-riscv/icE1usb/usb_e1.c
index 328ff3f..11c7401 100644
--- a/firmware/ice40-riscv/icE1usb/usb_e1.c
+++ b/firmware/ice40-riscv/icE1usb/usb_e1.c
@@ -345,27 +345,25 @@
 static bool
 _set_tx_mode_done(struct usb_xfer *xfer)
 {
-   const struct ice1usb_tx_config *cfg = (const struct ice1usb_tx_config 
*) xfer->data;
struct usb_ctrl_req *req = xfer->cb_ctx;
int port = _ifnum2port(req->wIndex);
struct usb_e1_state *usb_e1 = _get_state(port);
printf("set_tx_mode[%d] %02x%02x%02x%02x\r\n", port,
xfer->data[0], xfer->data[1], xfer->data[2], xfer->data[3]);
-   usb_e1->tx_cfg = *cfg;
-   e1_tx_config(port, _tx_config_reg(cfg));
+   memcpy(_e1->tx_cfg, xfer->data, sizeof(struct ice1usb_tx_config));
+   e1_tx_config(port, _tx_config_reg(_e1->tx_cfg));
return true;
 }

 static bool
 _set_rx_mode_done(struct usb_xfer *xfer)
 {
-   const struct ice1usb_rx_config *cfg = (const struct ice1usb_rx_config 
*) xfer->data;
struct usb_ctrl_req *req = xfer->cb_ctx;
int port = _ifnum2port(req->wIndex);
struct usb_e1_state *usb_e1 = _get_state(port);
printf("set_rx_mode[%d] %02x\r\n", port, xfer->data[0]);
-   usb_e1->rx_cfg = *cfg;
-   e1_rx_config(port, _rx_config_reg(cfg));
+   memcpy(_e1->rx_cfg, xfer->data, sizeof(struct ice1usb_rx_config));
+   e1_rx_config(port, _rx_config_reg(_e1->rx_cfg));
return true;
 }


--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36676?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: I110ee4c014e8cfe058f7fc357decb7ab99e0be64
Gerrit-Change-Number: 36676
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-MessageType: newchange


[M] Change in osmo-e1-hardware[master]: fw: Update the helpers in misc.{c,h} for the new tick measurement hw

2024-04-30 Thread tnt
tnt has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36680?usp=email )


Change subject: fw: Update the helpers in misc.{c,h} for the new tick 
measurement hw
..

fw: Update the helpers in misc.{c,h} for the new tick measurement hw

Signed-off-by: Sylvain Munaut 
Change-Id: Ia881fead7a40f773969a016db05bea0a1fa1604f
---
M firmware/ice40-riscv/e1-tracer/misc.c
M firmware/ice40-riscv/e1-tracer/misc.h
M firmware/ice40-riscv/icE1usb/misc.c
M firmware/ice40-riscv/icE1usb/misc.h
4 files changed, 53 insertions(+), 14 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware 
refs/changes/80/36680/1

diff --git a/firmware/ice40-riscv/e1-tracer/misc.c 
b/firmware/ice40-riscv/e1-tracer/misc.c
index c2e0763..6f5c88a 100644
--- a/firmware/ice40-riscv/e1-tracer/misc.c
+++ b/firmware/ice40-riscv/e1-tracer/misc.c
@@ -15,10 +15,11 @@
 struct misc {
uint32_t warmboot;
uint32_t _rsvd0[3];;
-   struct {
-   uint16_t rx;
-   uint16_t _rsvd1;
-   } e1_tick[2];
+   union {
+   uint32_t e1_tick_sel;
+   uint16_t e1_tick[2];
+   };
+   uint32_t _rsvd1;
struct {
uint32_t _rsvd2;
uint32_t now;
@@ -29,10 +30,15 @@


 void
-e1_tick_read(uint16_t *ticks)
+e1_tick_sel(int type)
 {
-   ticks[0] = misc_regs->e1_tick[0].rx;
-   ticks[1] = misc_regs->e1_tick[1].rx;
+   misc_regs->e1_tick_sel = (type << 16) | type;
+}
+
+uint16_t
+e1_tick_read(int port)
+{
+   return misc_regs->e1_tick[port];
 }


diff --git a/firmware/ice40-riscv/e1-tracer/misc.h 
b/firmware/ice40-riscv/e1-tracer/misc.h
index 42dfe51..2944743 100644
--- a/firmware/ice40-riscv/e1-tracer/misc.h
+++ b/firmware/ice40-riscv/e1-tracer/misc.h
@@ -10,6 +10,14 @@
 #include 
 #include 

-void e1_tick_read(uint16_t *ticks);
+enum e1_tick_type {
+   TICK_TX = 0,
+   TICK_RX_PULSE   = 1,
+   TICK_RX_SAMPLE  = 2,
+   TICK_RX_ONE = 3,
+};
+
+void e1_tick_sel(int type);
+uint16_t e1_tick_read(int port);

 void reboot(int fw);
diff --git a/firmware/ice40-riscv/icE1usb/misc.c 
b/firmware/ice40-riscv/icE1usb/misc.c
index b8419aa..1445580 100644
--- a/firmware/ice40-riscv/icE1usb/misc.c
+++ b/firmware/ice40-riscv/icE1usb/misc.c
@@ -21,11 +21,12 @@
uint8_t  _rsvd;
} gpio;
uint32_t e1_led;
-   uint32_t _rsvd;
-   struct {
-   uint16_t rx;
-   uint16_t tx;
-   } e1_tick[2];
+   uint32_t _rsvd0;
+   union {
+   uint32_t e1_tick_sel;
+   uint16_t e1_tick[2];
+   };
+   uint32_t _rsvd1;
struct {
uint32_t pps;
uint32_t now;
@@ -116,10 +117,16 @@
 }


+void
+e1_tick_sel(int type)
+{
+   misc_regs->e1_tick_sel = (type << 16) | type;
+}
+
 uint16_t
 e1_tick_read(int port)
 {
-   return misc_regs->e1_tick[port].tx;
+   return misc_regs->e1_tick[port];
 }


diff --git a/firmware/ice40-riscv/icE1usb/misc.h 
b/firmware/ice40-riscv/icE1usb/misc.h
index b72793f..ca99951 100644
--- a/firmware/ice40-riscv/icE1usb/misc.h
+++ b/firmware/ice40-riscv/icE1usb/misc.h
@@ -34,6 +34,14 @@
 void e1_led_pause(void);
 void e1_led_set(bool enable, uint8_t cfg);

+enum e1_tick_type {
+   TICK_TX = 0,
+   TICK_RX_PULSE   = 1,
+   TICK_RX_SAMPLE  = 2,
+   TICK_RX_ONE = 3,
+};
+
+void e1_tick_sel(int type);
 uint16_t e1_tick_read(int port);

 bool time_elapsed(uint32_t ref, unsigned int tick);

--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36680?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: Ia881fead7a40f773969a016db05bea0a1fa1604f
Gerrit-Change-Number: 36680
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-MessageType: newchange


[S] Change in osmo-e1-hardware[master]: gateware/cores: Update no2e1

2024-04-30 Thread tnt
tnt has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36677?usp=email )


Change subject: gateware/cores: Update no2e1
..

gateware/cores: Update no2e1

This pulls in the support for non-crc4 framing modes and
also setting the Sa bits (for osmo-v5)

Signed-off-by: Sylvain Munaut 
Change-Id: Ica1bbaa052988f5b7e71c7fa51f87eb0bfea6f67
---
M gateware/cores/no2e1
1 file changed, 14 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware 
refs/changes/77/36677/1

diff --git a/gateware/cores/no2e1 b/gateware/cores/no2e1
index 074f293..9a8 16
--- a/gateware/cores/no2e1
+++ b/gateware/cores/no2e1
@@ -1 +1 @@
-Subproject commit 074f293d350a1698de16bf942fb2f5f2d61857cc
+Subproject commit 9a855cb265a6271a8a43fd3809e7ad6ac040

--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36677?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: Ica1bbaa052988f5b7e71c7fa51f87eb0bfea6f67
Gerrit-Change-Number: 36677
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-MessageType: newchange


[S] Change in osmo-e1-hardware[master]: icE1usb fw: Fix OIS -> AIS typo

2024-04-30 Thread tnt
tnt has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36678?usp=email )


Change subject: icE1usb fw: Fix OIS -> AIS typo
..

icE1usb fw: Fix OIS -> AIS typo

Signed-off-by: Sylvain Munaut 
Change-Id: I23f242c31483533adb9cb60b4aac9b95a7b807e8
---
M firmware/ice40-riscv/icE1usb/e1.c
1 file changed, 11 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware 
refs/changes/78/36678/1

diff --git a/firmware/ice40-riscv/icE1usb/e1.c 
b/firmware/ice40-riscv/icE1usb/e1.c
index 6597124..bfc042e 100644
--- a/firmware/ice40-riscv/icE1usb/e1.c
+++ b/firmware/ice40-riscv/icE1usb/e1.c
@@ -309,7 +309,7 @@

/* TX */
if (e1->tx.state == IDLE) {
-   /* "Off" state: We TX only OIS */
+   /* "Off" state: We TX only AIS */
e1->tx.cr.val = (e1->tx.cr.cfg & ~(E1_TX_CR_MODE_MASK | 
E1_TX_CR_ALARM)) | E1_TX_CR_ENABLE | E1_TX_CR_MODE_TRSP;
} else {
/* "On state: Enabled + User config */

--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36678?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: I23f242c31483533adb9cb60b4aac9b95a7b807e8
Gerrit-Change-Number: 36678
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-MessageType: newchange


[M] Change in osmo-e1d[master]: iCE1usb: Add support to configure CRC4 mode for TX/RX

2024-04-29 Thread tnt
Attention is currently required from: laforge.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-e1d/+/36653?usp=email )

Change subject: iCE1usb: Add support to configure CRC4 mode for TX/RX
..


Patch Set 2:

(1 comment)

File src/vty.c:

https://gerrit.osmocom.org/c/osmo-e1d/+/36653/comment/3f4c131a_5d078b0e
PS1, Line 434: framing-tx (no-crc4|crc4)",
> Ack, will change. […]
Done



--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/36653?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I9b627a9617af4ae9ed98214d672c7d0391f801eb
Gerrit-Change-Number: 36653
Gerrit-PatchSet: 2
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Mon, 29 Apr 2024 06:59:18 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: tnt 
Gerrit-MessageType: comment


[M] Change in dahdi-linux[master]: icE1usb: Configure the RX mode according to CRC4 mode

2024-04-28 Thread tnt
tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/dahdi-linux/+/36655?usp=email )

Change subject: icE1usb: Configure the RX mode according to CRC4 mode
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
Note that I don't have a working DADHI setup ATM, so don't merge until I either 
get to try this, or someone else does.



--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/36655?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: Ic9da7d2a32f9aa9bf5de296dc4885eeaf56b138e
Gerrit-Change-Number: 36655
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Sun, 28 Apr 2024 14:39:38 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[M] Change in dahdi-linux[master]: icE1usb: Configure the RX mode according to CRC4 mode

2024-04-28 Thread tnt
tnt has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/dahdi-linux/+/36655?usp=email )


Change subject: icE1usb: Configure the RX mode according to CRC4 mode
..

icE1usb: Configure the RX mode according to CRC4 mode

Previously only the TX side would be configured for CRC4 enable/disable,
because the RX side hardware didn't support a no-CRC4 mode. Now that it's
implemented, make sure to configure it if requested.

Change-Id: Ic9da7d2a32f9aa9bf5de296dc4885eeaf56b138e
Signed-off-by: Sylvain Munaut 
---
M drivers/dahdi/icE1usb/icE1usb.c
1 file changed, 61 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/dahdi-linux refs/changes/55/36655/1

diff --git a/drivers/dahdi/icE1usb/icE1usb.c b/drivers/dahdi/icE1usb/icE1usb.c
index 2262deb..06ec443 100644
--- a/drivers/dahdi/icE1usb/icE1usb.c
+++ b/drivers/dahdi/icE1usb/icE1usb.c
@@ -108,6 +108,7 @@
} ep;
struct {
struct ice1usb_tx_config tx;
+   struct ice1usb_rx_config rx;
} cfg;
/* last received error interrupt */
struct ice1usb_irq_err last_err;
@@ -220,10 +221,23 @@
}
 }

+static const char *rx_mode_str(enum ice1usb_rx_mode rx_mode)
+{
+   switch (rx_mode) {
+   case ICE1USB_RX_MODE_FRAME:
+   return "FRAME";
+   case ICE1USB_RX_MODE_MULTIFRAME:
+   return "MULTIFRAME";
+   default:
+   return "unknown";
+   }
+}
+
+
 #define USB_RT_VEND_IF (USB_TYPE_VENDOR | USB_RECIP_INTERFACE)
 #define USB_RT_VEND_DEV (USB_TYPE_VENDOR | USB_RECIP_DEVICE)

-/* synchronous request, may block up to 1s, only called from process context! 
*/
+/* synchronous requests, may block up to 1s, only called from process context! 
*/
 static int ice1usb_tx_config(struct ice1usb *ieu)
 {
int rc;
@@ -244,6 +258,25 @@
return 0;
 }

+static int ice1usb_rx_config(struct ice1usb *ieu)
+{
+   int rc;
+   uint8_t if_num = ieu->usb_intf->cur_altsetting->desc.bInterfaceNumber;
+
+   ieu_info(ieu, "RX-CONFIG (mode=%s)\n",
+rx_mode_str(ieu->cfg.rx.mode));
+
+   rc = usb_control_msg(ieu->usb_dev, usb_sndctrlpipe(ieu->usb_dev, 0),
+   ICE1USB_INTF_SET_RX_CFG, USB_RT_VEND_IF,
+   0, if_num, >cfg.rx, sizeof(ieu->cfg.rx),
+   USB_CTRL_SET_TIMEOUT);
+   if (rc < 0)
+   return rc;
+   if (rc != sizeof(ieu->cfg.rx))
+   return -EIO;
+   return 0;
+}
+

 /***
  * ISOCHRONOUS transfers
@@ -685,10 +718,13 @@
lc->sync = 0;
}

-   if (span->lineconfig & DAHDI_CONFIG_CRC4)
+   if (span->lineconfig & DAHDI_CONFIG_CRC4) {
ieu->cfg.tx.mode = ICE1USB_TX_MODE_TS0_CRC4_E;
-   else
+   ieu->cfg.rx.mode = ICE1USB_RX_MODE_MULTIFRAME;
+   } else {
ieu->cfg.tx.mode = ICE1USB_TX_MODE_TS0;
+   ieu->cfg.rx.mode = ICE1USB_RX_MODE_FRAME;
+   }

if (lc->sync > 0)
ieu->cfg.tx.timing = ICE1USB_TX_TIME_SRC_REMOTE;
@@ -713,9 +749,16 @@
rc = ice1usb_tx_config(ieu);
if (rc < 0)
return rc;
+   rc = ice1usb_rx_config(ieu);
+   if (rc < 0)
+   return rc;
rc = e1u_d_startup(file, span);
-   } else
+   } else {
rc = ice1usb_tx_config(ieu);
+   if (rc < 0)
+   return rc;
+   rc = ice1usb_rx_config(ieu);
+   }

return rc;
 }

--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/36655?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: Ic9da7d2a32f9aa9bf5de296dc4885eeaf56b138e
Gerrit-Change-Number: 36655
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-MessageType: newchange


[S] Change in dahdi-linux[master]: icE1usb: Use ICE1USB_TX_MODE_TS0_CRC4_E to set E bits automatically

2024-04-28 Thread tnt
tnt has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/dahdi-linux/+/36654?usp=email )


Change subject: icE1usb: Use ICE1USB_TX_MODE_TS0_CRC4_E to set E bits 
automatically
..

icE1usb: Use ICE1USB_TX_MODE_TS0_CRC4_E to set E bits automatically

We want the hardware to take care of the CRC4 error bit autonomously
without us having to do anything ...

Change-Id: Iea936a6c908ef5e175be3090a8fbcafaeb5a0aed
Signed-off-by: Sylvain Munaut 
---
M drivers/dahdi/icE1usb/icE1usb.c
1 file changed, 14 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/dahdi-linux refs/changes/54/36654/1

diff --git a/drivers/dahdi/icE1usb/icE1usb.c b/drivers/dahdi/icE1usb/icE1usb.c
index 7ab751e..2262deb 100644
--- a/drivers/dahdi/icE1usb/icE1usb.c
+++ b/drivers/dahdi/icE1usb/icE1usb.c
@@ -686,7 +686,7 @@
}

if (span->lineconfig & DAHDI_CONFIG_CRC4)
-   ieu->cfg.tx.mode = ICE1USB_TX_MODE_TS0_CRC4;
+   ieu->cfg.tx.mode = ICE1USB_TX_MODE_TS0_CRC4_E;
else
ieu->cfg.tx.mode = ICE1USB_TX_MODE_TS0;


--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/36654?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: Iea936a6c908ef5e175be3090a8fbcafaeb5a0aed
Gerrit-Change-Number: 36654
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-MessageType: newchange


[M] Change in osmo-e1d[master]: iCE1usb: Add support to configure CRC4 mode for TX/RX

2024-04-28 Thread tnt
Attention is currently required from: laforge.

Hello Jenkins Builder, laforge,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-e1d/+/36653?usp=email

to look at the new patch set (#2).

The following approvals got outdated and were removed:
Code-Review+1 by laforge, Verified+1 by Jenkins Builder


Change subject: iCE1usb: Add support to configure CRC4 mode for TX/RX
..

iCE1usb: Add support to configure CRC4 mode for TX/RX

Signed-off-by: Sylvain Munaut 
Change-Id: I9b627a9617af4ae9ed98214d672c7d0391f801eb
---
M src/e1d.h
M src/usb.c
M src/vty.c
3 files changed, 78 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/53/36653/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/36653?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I9b627a9617af4ae9ed98214d672c7d0391f801eb
Gerrit-Change-Number: 36653
Gerrit-PatchSet: 2
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Attention: laforge 
Gerrit-MessageType: newpatchset


[M] Change in osmo-e1d[master]: iCE1usb: Add support to configure CRC4 mode for TX/RX

2024-04-28 Thread tnt
Attention is currently required from: laforge.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-e1d/+/36653?usp=email )

Change subject: iCE1usb: Add support to configure CRC4 mode for TX/RX
..


Patch Set 1:

(1 comment)

File src/vty.c:

https://gerrit.osmocom.org/c/osmo-e1d/+/36653/comment/012c4c7d_0303d0b1
PS1, Line 434: framing-tx (no-crc4|crc4)",
> this could be one command for both rx and tx like "framing (rx|tx) 
> (no-crc4|crc4)". […]
Ack, will change.

I was trying to change it to "framing [(tx|rx)] (no-crc4|crc4)" so that you 
could just do both at once, but that doesn't see to work. Is optional middle 
argument not supported ?



--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/36653?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I9b627a9617af4ae9ed98214d672c7d0391f801eb
Gerrit-Change-Number: 36653
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Sun, 28 Apr 2024 12:19:38 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


[M] Change in osmo-e1d[master]: iCE1usb: Add support to configure CRC4 mode for TX/RX

2024-04-28 Thread tnt
tnt has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-e1d/+/36653?usp=email )


Change subject: iCE1usb: Add support to configure CRC4 mode for TX/RX
..

iCE1usb: Add support to configure CRC4 mode for TX/RX

Signed-off-by: Sylvain Munaut 
Change-Id: I9b627a9617af4ae9ed98214d672c7d0391f801eb
---
M src/e1d.h
M src/usb.c
M src/vty.c
3 files changed, 84 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/53/36653/1

diff --git a/src/e1d.h b/src/e1d.h
index bf1cbdf..55e5415 100644
--- a/src/e1d.h
+++ b/src/e1d.h
@@ -78,6 +78,11 @@
 };
 extern const struct value_string e1_ts_mode_names[];

+enum e1_framing_mode {
+   E1_FRAMING_MODE_CRC4 = 0,
+   E1_FRAMING_MODE_NO_CRC4,
+};
+
 struct e1_ts {
struct e1_line *line;
uint8_t id;
@@ -160,6 +165,14 @@
uint32_t rx_bytes;
} watchdog;

+   /* driver specific data */
+   struct {
+   struct {
+   enum e1_framing_mode tx;
+   enum e1_framing_mode rx;
+   } framing;
+   } usb;
+
void *e1gen_priv;
 };

diff --git a/src/usb.c b/src/usb.c
index 8d431f5..3b77b94 100644
--- a/src/usb.c
+++ b/src/usb.c
@@ -1036,14 +1036,29 @@
goto next_interface;
}

-   /* Create data flows and start the line */
+   /* Configure, create data flows and start the line */

/* all supported devices have an IN endpoint */
+   e1_usb_ctrl_set_rx_cfg(line,
+   (line->usb.framing.rx == E1_FRAMING_MODE_CRC4) ?
+   ICE1USB_RX_MODE_MULTIFRAME :
+   ICE1USB_RX_MODE_FRAME
+   );
+
line_data->flow_in  = e1uf_create(line, e1_usb_xfer_in,  
line_data->ep_in,  4, line_data->pkt_size, 4);
e1uf_start(line_data->flow_in);

/* e1-tracer has no OUT or FEEDBACK endpoint */
if (!is_tracer) {
+   e1_usb_ctrl_set_tx_cfg(line,
+   (line->usb.framing.tx == E1_FRAMING_MODE_CRC4) ?
+   ICE1USB_TX_MODE_TS0_CRC4_E :
+   ICE1USB_TX_MODE_TS0,
+   ICE1USB_TX_TIME_SRC_LOCAL,
+   ICE1USB_TX_EXT_LOOPBACK_OFF,
+   0x00
+   );
+
line_data->flow_out = e1uf_create(line, 
e1_usb_xfer_out, line_data->ep_out, 4, line_data->pkt_size, 4);
e1uf_start(line_data->flow_out);
line_data->flow_fb  = e1uf_create(line, e1_usb_xfer_fb, 
 line_data->ep_fb,  2, 3, 1);
diff --git a/src/vty.c b/src/vty.c
index 5b4ca47..5083153 100644
--- a/src/vty.c
+++ b/src/vty.c
@@ -168,6 +168,12 @@
{ 0, NULL }
 };

+const struct value_string e1_framing_mode_names[] = {
+   { E1_FRAMING_MODE_CRC4,"crc4"},
+   { E1_FRAMING_MODE_NO_CRC4, "no-crc4" },
+   { 0, NULL }
+};
+
 static void vty_dump_line(struct vty *vty, const struct e1_line *line)
 {
unsigned int tn;
@@ -424,12 +430,49 @@
return CMD_SUCCESS;
 }

+DEFUN(cfg_e1d_if_line_framing_tx, cfg_e1d_if_line_framing_tx_cmd,
+   "framing-tx (no-crc4|crc4)",
+   NO_STR "Sets the transmitted E1 framing mode\n")
+{
+   struct e1_line *line = vty->index;
+
+   if (line->intf->drv != E1_DRIVER_USB)
+   return CMD_WARNING;
+
+   enum e1_framing_mode new_mode = get_string_value(e1_framing_mode_names, 
argv[0]);
+   line->usb.framing.tx = new_mode;
+
+   return CMD_SUCCESS;
+
+}
+
+DEFUN(cfg_e1d_if_line_framing_rx, cfg_e1d_if_line_framing_rx_cmd,
+   "framing-rx (no-crc4|crc4)",
+   NO_STR "Sets the expected received E1 framing mode\n")
+{
+   struct e1_line *line = vty->index;
+
+   if (line->intf->drv != E1_DRIVER_USB)
+   return CMD_WARNING;
+
+   enum e1_framing_mode new_mode = get_string_value(e1_framing_mode_names, 
argv[0]);
+   line->usb.framing.rx = new_mode;
+
+   return CMD_SUCCESS;
+}
+
+

 static int config_write_line(struct vty *vty, struct e1_line *line)
 {
vty_out(vty, "  line %u%s", line->id, VTY_NEWLINE);
vty_out(vty, "   mode %s%s", get_value_string(e1_line_mode_names, 
line->mode), VTY_NEWLINE);

+   if (line->intf->drv == E1_DRIVER_USB) {
+   vty_out(vty, "   framing-tx %s%s", 
get_value_string(e1_framing_mode_names, line->usb.framing.tx), VTY_NEWLINE);
+   vty_out(vty, "   framing-rx %s%s", 
get_value_string(e1_framing_mode_names, line->usb.framing.tx), VTY_NEWLINE);
+   

[S] Change in osmo-e1-hardware[master]: icE1usb fw: Ensure alignement of the structure for the usb_data_write

2024-03-07 Thread tnt
tnt has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36186?usp=email )

Change subject: icE1usb fw: Ensure alignement of the structure for the 
usb_data_write
..

icE1usb fw: Ensure alignement of the structure for the usb_data_write

Signed-off-by: Sylvain Munaut 
Change-Id: Id80468ef95bb908cf34b6eeca04c83f1285fd2f5
---
M firmware/ice40-riscv/icE1usb/usb_gps.c
1 file changed, 11 insertions(+), 1 deletion(-)

Approvals:
  tnt: Looks good to me, approved
  Jenkins Builder: Verified
  laforge: Looks good to me, but someone else must approve




diff --git a/firmware/ice40-riscv/icE1usb/usb_gps.c 
b/firmware/ice40-riscv/icE1usb/usb_gps.c
index ad893a5..0fe5c98 100644
--- a/firmware/ice40-riscv/icE1usb/usb_gps.c
+++ b/firmware/ice40-riscv/icE1usb/usb_gps.c
@@ -138,7 +138,7 @@
{
/* Default request */
/* Put as static to work around gcc aliasing bug ... */
-   static struct usb_cdc_notif_serial_state notif = {
+   static struct usb_cdc_notif_serial_state 
__attribute__((aligned(4))) notif = {
.hdr = {
.bmRequestType = USB_REQ_READ | 
USB_REQ_TYPE_CLASS | USB_REQ_RCPT_INTF,
.bRequest  = USB_NOTIF_CDC_SERIAL_STATE,

--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36186?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: Id80468ef95bb908cf34b6eeca04c83f1285fd2f5
Gerrit-Change-Number: 36186
Gerrit-PatchSet: 2
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-MessageType: merged


[S] Change in osmo-e1-hardware[master]: gateware/cores: Update no2usb

2024-03-07 Thread tnt
tnt has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36183?usp=email )

Change subject: gateware/cores: Update no2usb
..

gateware/cores: Update no2usb

Mostly to get firmware code fixes

Need some code adaptation in icE1usb firmware to
remove local usb_cdc_notif_serial_state struct
sine tt's included in no2usb cdc proto header now.

Signed-off-by: Sylvain Munaut 
Change-Id: I13e186627077c57329e4a83da11acc01ca5dce35
---
M firmware/ice40-riscv/icE1usb/usb_gps.c
M gateware/cores/no2usb
2 files changed, 17 insertions(+), 7 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, but someone else must approve
  tnt: Looks good to me, approved




diff --git a/firmware/ice40-riscv/icE1usb/usb_gps.c 
b/firmware/ice40-riscv/icE1usb/usb_gps.c
index e219cf8..db188b1 100644
--- a/firmware/ice40-riscv/icE1usb/usb_gps.c
+++ b/firmware/ice40-riscv/icE1usb/usb_gps.c
@@ -46,12 +46,6 @@
 } g_usb_gps;


-struct usb_cdc_notif_serial_state {
-   struct usb_ctrl_req hdr;
-   uint16_t bits;
-} __attribute__((packed,aligned(4)));
-
-
 static void
 _usb_gps_set_active(bool active)
 {
diff --git a/gateware/cores/no2usb b/gateware/cores/no2usb
index fdf42a6..9a3e752 16
--- a/gateware/cores/no2usb
+++ b/gateware/cores/no2usb
@@ -1 +1 @@
-Subproject commit fdf42a6571a4ae49556626e6fffca1582796f7e8
+Subproject commit 9a3e752eab17c8f12a3a1dd6cf291368eaf3161d

--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36183?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: I13e186627077c57329e4a83da11acc01ca5dce35
Gerrit-Change-Number: 36183
Gerrit-PatchSet: 2
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-MessageType: merged


[S] Change in osmo-e1-hardware[master]: icE1usb fw: Use proper length for struct usb_cdc_notif_serial_state

2024-03-07 Thread tnt
tnt has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36185?usp=email )

Change subject: icE1usb fw: Use proper length for struct 
usb_cdc_notif_serial_state
..

icE1usb fw: Use proper length for struct usb_cdc_notif_serial_state

Signed-off-by: Sylvain Munaut 
Change-Id: I30d451e76ebd192f037653179b6485b2b43b6dbc
---
M firmware/ice40-riscv/icE1usb/usb_gps.c
1 file changed, 15 insertions(+), 4 deletions(-)

Approvals:
  laforge: Looks good to me, but someone else must approve
  Jenkins Builder: Verified
  tnt: Looks good to me, approved




diff --git a/firmware/ice40-riscv/icE1usb/usb_gps.c 
b/firmware/ice40-riscv/icE1usb/usb_gps.c
index db188b1..ad893a5 100644
--- a/firmware/ice40-riscv/icE1usb/usb_gps.c
+++ b/firmware/ice40-riscv/icE1usb/usb_gps.c
@@ -148,6 +148,7 @@
},
.bits = 0x00
};
+   const int notif_len = sizeof(struct usb_cdc_notif_serial_state);

/* Check if PPS occurred */
uint32_t pps_now = time_pps_read();
@@ -159,8 +160,8 @@

/* Queue CD Set */
notif.bits = 1;
-   usb_data_write(ep_regs->bd[0].ptr, , 12);
-   ep_regs->bd[0].csr = USB_BD_STATE_RDY_DATA | 
USB_BD_LEN(10);
+   usb_data_write(ep_regs->bd[0].ptr, , notif_len);
+   ep_regs->bd[0].csr = USB_BD_STATE_RDY_DATA | 
USB_BD_LEN(notif_len);

/* Need to clear in the future */
g_usb_gps.pps.set = true;
@@ -169,8 +170,8 @@
{
/* Queue CD Clear */
notif.bits = 0;
-   usb_data_write(ep_regs->bd[0].ptr, , 12);
-   ep_regs->bd[0].csr = USB_BD_STATE_RDY_DATA | 
USB_BD_LEN(10);
+   usb_data_write(ep_regs->bd[0].ptr, , notif_len);
+   ep_regs->bd[0].csr = USB_BD_STATE_RDY_DATA | 
USB_BD_LEN(notif_len);

/* Cleared */
g_usb_gps.pps.set = false;

--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36185?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: I30d451e76ebd192f037653179b6485b2b43b6dbc
Gerrit-Change-Number: 36185
Gerrit-PatchSet: 2
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-MessageType: merged


[S] Change in osmo-e1-hardware[master]: icE1usb fw: Use proper length for struct usb_cdc_notif_serial_state

2024-03-07 Thread tnt
tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36185?usp=email )

Change subject: icE1usb fw: Use proper length for struct 
usb_cdc_notif_serial_state
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36185?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: I30d451e76ebd192f037653179b6485b2b43b6dbc
Gerrit-Change-Number: 36185
Gerrit-PatchSet: 2
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-Comment-Date: Thu, 07 Mar 2024 10:06:41 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-e1-hardware[master]: gateware/cores: Update no2usb

2024-03-07 Thread tnt
tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36183?usp=email )

Change subject: gateware/cores: Update no2usb
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36183?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: I13e186627077c57329e4a83da11acc01ca5dce35
Gerrit-Change-Number: 36183
Gerrit-PatchSet: 2
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-Comment-Date: Thu, 07 Mar 2024 10:06:34 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-e1-hardware[master]: icE1usb fw: Ensure alignement of the structure for the usb_data_write

2024-03-07 Thread tnt
tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36186?usp=email )

Change subject: icE1usb fw: Ensure alignement of the structure for the 
usb_data_write
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36186?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: Id80468ef95bb908cf34b6eeca04c83f1285fd2f5
Gerrit-Change-Number: 36186
Gerrit-PatchSet: 2
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-Comment-Date: Thu, 07 Mar 2024 10:06:29 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-e1-hardware[master]: icE1usb fw: Remove local usb_cdc_notif_serial_state struct

2024-03-06 Thread tnt
tnt has abandoned this change. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36184?usp=email )

Change subject: icE1usb fw: Remove local usb_cdc_notif_serial_state struct
..


Abandoned

merged into another change
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36184?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: I1788a95eea7db5391f52e36ba4c39c6cddf194ba
Gerrit-Change-Number: 36184
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: abandon


[S] Change in osmo-e1-hardware[master]: gateware/cores: Update no2usb

2024-03-06 Thread tnt
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36183?usp=email

to look at the new patch set (#2).


Change subject: gateware/cores: Update no2usb
..

gateware/cores: Update no2usb

Mostly to get firmware code fixes

Need some code adaptation in icE1usb firmware to
remove local usb_cdc_notif_serial_state struct
sine tt's included in no2usb cdc proto header now.

Signed-off-by: Sylvain Munaut 
Change-Id: I13e186627077c57329e4a83da11acc01ca5dce35
---
M firmware/ice40-riscv/icE1usb/usb_gps.c
M gateware/cores/no2usb
2 files changed, 17 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware 
refs/changes/83/36183/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36183?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: I13e186627077c57329e4a83da11acc01ca5dce35
Gerrit-Change-Number: 36183
Gerrit-PatchSet: 2
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset


[S] Change in osmo-e1-hardware[master]: gateware/cores: Update no2usb

2024-03-06 Thread tnt
tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36183?usp=email )

Change subject: gateware/cores: Update no2usb
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
Fails because it needs some of the following changes to make sense ... expected.



--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36183?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: I13e186627077c57329e4a83da11acc01ca5dce35
Gerrit-Change-Number: 36183
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Wed, 06 Mar 2024 20:02:00 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in osmo-e1-hardware[master]: gateware/cores: Update no2usb

2024-03-06 Thread tnt
Attention is currently required from: tnt.

tnt has removed a vote from this change. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36183?usp=email )


Change subject: gateware/cores: Update no2usb
..


Removed Verified-1 by Jenkins Builder (102)
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36183?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: I13e186627077c57329e4a83da11acc01ca5dce35
Gerrit-Change-Number: 36183
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: tnt 
Gerrit-MessageType: deleteVote


[S] Change in osmo-e1-hardware[master]: icE1usb fw: Remove local usb_cdc_notif_serial_state struct

2024-03-06 Thread tnt
tnt has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36184?usp=email )


Change subject: icE1usb fw: Remove local usb_cdc_notif_serial_state struct
..

icE1usb fw: Remove local usb_cdc_notif_serial_state struct

It's included in no2usb cdc proto header now

Signed-off-by: Sylvain Munaut 
Change-Id: I1788a95eea7db5391f52e36ba4c39c6cddf194ba
---
M firmware/ice40-riscv/icE1usb/usb_gps.c
1 file changed, 12 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware 
refs/changes/84/36184/1

diff --git a/firmware/ice40-riscv/icE1usb/usb_gps.c 
b/firmware/ice40-riscv/icE1usb/usb_gps.c
index e219cf8..db188b1 100644
--- a/firmware/ice40-riscv/icE1usb/usb_gps.c
+++ b/firmware/ice40-riscv/icE1usb/usb_gps.c
@@ -46,12 +46,6 @@
 } g_usb_gps;


-struct usb_cdc_notif_serial_state {
-   struct usb_ctrl_req hdr;
-   uint16_t bits;
-} __attribute__((packed,aligned(4)));
-
-
 static void
 _usb_gps_set_active(bool active)
 {

--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36184?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: I1788a95eea7db5391f52e36ba4c39c6cddf194ba
Gerrit-Change-Number: 36184
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-MessageType: newchange


[S] Change in osmo-e1-hardware[master]: icE1usb fw: Use proper length for struct usb_cdc_notif_serial_state

2024-03-06 Thread tnt
tnt has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36185?usp=email )


Change subject: icE1usb fw: Use proper length for struct 
usb_cdc_notif_serial_state
..

icE1usb fw: Use proper length for struct usb_cdc_notif_serial_state

Signed-off-by: Sylvain Munaut 
Change-Id: I30d451e76ebd192f037653179b6485b2b43b6dbc
---
M firmware/ice40-riscv/icE1usb/usb_gps.c
1 file changed, 15 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware 
refs/changes/85/36185/1

diff --git a/firmware/ice40-riscv/icE1usb/usb_gps.c 
b/firmware/ice40-riscv/icE1usb/usb_gps.c
index db188b1..ad893a5 100644
--- a/firmware/ice40-riscv/icE1usb/usb_gps.c
+++ b/firmware/ice40-riscv/icE1usb/usb_gps.c
@@ -148,6 +148,7 @@
},
.bits = 0x00
};
+   const int notif_len = sizeof(struct usb_cdc_notif_serial_state);

/* Check if PPS occurred */
uint32_t pps_now = time_pps_read();
@@ -159,8 +160,8 @@

/* Queue CD Set */
notif.bits = 1;
-   usb_data_write(ep_regs->bd[0].ptr, , 12);
-   ep_regs->bd[0].csr = USB_BD_STATE_RDY_DATA | 
USB_BD_LEN(10);
+   usb_data_write(ep_regs->bd[0].ptr, , notif_len);
+   ep_regs->bd[0].csr = USB_BD_STATE_RDY_DATA | 
USB_BD_LEN(notif_len);

/* Need to clear in the future */
g_usb_gps.pps.set = true;
@@ -169,8 +170,8 @@
{
/* Queue CD Clear */
notif.bits = 0;
-   usb_data_write(ep_regs->bd[0].ptr, , 12);
-   ep_regs->bd[0].csr = USB_BD_STATE_RDY_DATA | 
USB_BD_LEN(10);
+   usb_data_write(ep_regs->bd[0].ptr, , notif_len);
+   ep_regs->bd[0].csr = USB_BD_STATE_RDY_DATA | 
USB_BD_LEN(notif_len);

/* Cleared */
g_usb_gps.pps.set = false;

--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36185?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: I30d451e76ebd192f037653179b6485b2b43b6dbc
Gerrit-Change-Number: 36185
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-MessageType: newchange


[S] Change in osmo-e1-hardware[master]: icE1usb fw: Ensure alignement of the structure for the usb_data_write

2024-03-06 Thread tnt
tnt has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36186?usp=email )


Change subject: icE1usb fw: Ensure alignement of the structure for the 
usb_data_write
..

icE1usb fw: Ensure alignement of the structure for the usb_data_write

Signed-off-by: Sylvain Munaut 
Change-Id: Id80468ef95bb908cf34b6eeca04c83f1285fd2f5
---
M firmware/ice40-riscv/icE1usb/usb_gps.c
1 file changed, 11 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware 
refs/changes/86/36186/1

diff --git a/firmware/ice40-riscv/icE1usb/usb_gps.c 
b/firmware/ice40-riscv/icE1usb/usb_gps.c
index ad893a5..0fe5c98 100644
--- a/firmware/ice40-riscv/icE1usb/usb_gps.c
+++ b/firmware/ice40-riscv/icE1usb/usb_gps.c
@@ -138,7 +138,7 @@
{
/* Default request */
/* Put as static to work around gcc aliasing bug ... */
-   static struct usb_cdc_notif_serial_state notif = {
+   static struct usb_cdc_notif_serial_state 
__attribute__((aligned(4))) notif = {
.hdr = {
.bmRequestType = USB_REQ_READ | 
USB_REQ_TYPE_CLASS | USB_REQ_RCPT_INTF,
.bRequest  = USB_NOTIF_CDC_SERIAL_STATE,

--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36186?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: Id80468ef95bb908cf34b6eeca04c83f1285fd2f5
Gerrit-Change-Number: 36186
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-MessageType: newchange


[S] Change in osmo-e1-hardware[master]: gateware/cores: Update no2usb

2024-03-06 Thread tnt
tnt has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36183?usp=email )


Change subject: gateware/cores: Update no2usb
..

gateware/cores: Update no2usb

Mostly to get firmware code fixes

Signed-off-by: Sylvain Munaut 
Change-Id: I13e186627077c57329e4a83da11acc01ca5dce35
---
M gateware/cores/no2usb
1 file changed, 13 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware 
refs/changes/83/36183/1

diff --git a/gateware/cores/no2usb b/gateware/cores/no2usb
index fdf42a6..9a3e752 16
--- a/gateware/cores/no2usb
+++ b/gateware/cores/no2usb
@@ -1 +1 @@
-Subproject commit fdf42a6571a4ae49556626e6fffca1582796f7e8
+Subproject commit 9a3e752eab17c8f12a3a1dd6cf291368eaf3161d

--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36183?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: I13e186627077c57329e4a83da11acc01ca5dce35
Gerrit-Change-Number: 36183
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-MessageType: newchange


[S] Change in osmo-e1-hardware[master]: icE1usb fw: Workaround some apparent GCC aliasing bug ...

2024-03-06 Thread tnt
tnt has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36175?usp=email )

Change subject: icE1usb fw: Workaround some apparent GCC aliasing bug ...
..

icE1usb fw: Workaround some apparent GCC aliasing bug ...

If the code is built either :
 * without -flto
 * with -fno-strict-aliasing
 * with that struct as 'static' (so it's not on the stack)

Then all works fine. But in the current situation (without the
patch), GCC seems to think there is some aliasing and just plain
removed the `notif.bits = 1` bit of code in that functions
(no warnings printed ...).

Putting the struct as 'static' is the least awful workaround.

I didn't bother reporting bug upstream, because I can't reproduce
on a small test case and I'm sure I'd just get yelled at and that
the compiler is right for some reason ...

Signed-off-by: Sylvain Munaut 
Change-Id: Ie0a2ce337ce4a9c08c3d27acc4d922a3e5892840
---
M firmware/ice40-riscv/icE1usb/usb_gps.c
1 file changed, 28 insertions(+), 1 deletion(-)

Approvals:
  tnt: Looks good to me, approved
  Jenkins Builder: Verified
  laforge: Looks good to me, but someone else must approve
  manawyrm: Looks good to me, but someone else must approve




diff --git a/firmware/ice40-riscv/icE1usb/usb_gps.c 
b/firmware/ice40-riscv/icE1usb/usb_gps.c
index f2b09b4..e219cf8 100644
--- a/firmware/ice40-riscv/icE1usb/usb_gps.c
+++ b/firmware/ice40-riscv/icE1usb/usb_gps.c
@@ -143,7 +143,8 @@
if ((ep_regs->bd[0].csr & USB_BD_STATE_MSK) != USB_BD_STATE_RDY_DATA)
{
/* Default request */
-   struct usb_cdc_notif_serial_state notif = {
+   /* Put as static to work around gcc aliasing bug ... */
+   static struct usb_cdc_notif_serial_state notif = {
.hdr = {
.bmRequestType = USB_REQ_READ | 
USB_REQ_TYPE_CLASS | USB_REQ_RCPT_INTF,
.bRequest  = USB_NOTIF_CDC_SERIAL_STATE,

--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36175?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: Ie0a2ce337ce4a9c08c3d27acc4d922a3e5892840
Gerrit-Change-Number: 36175
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: manawyrm 
Gerrit-Reviewer: tnt 
Gerrit-MessageType: merged


[S] Change in osmo-e1-hardware[master]: icE1usb fw: Workaround some apparent GCC aliasing bug ...

2024-03-06 Thread tnt
tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36175?usp=email )

Change subject: icE1usb fw: Workaround some apparent GCC aliasing bug ...
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36175?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: Ie0a2ce337ce4a9c08c3d27acc4d922a3e5892840
Gerrit-Change-Number: 36175
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: manawyrm 
Gerrit-Reviewer: tnt 
Gerrit-Comment-Date: Wed, 06 Mar 2024 10:36:39 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-e1-hardware[master]: icE1usb fw: fix usb cdc notification struct attributes

2024-03-06 Thread tnt
tnt has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36174?usp=email )

Change subject: icE1usb fw: fix usb cdc notification struct attributes
..

icE1usb fw: fix usb cdc notification struct attributes

Signed-off-by: Sylvain Munaut 
Change-Id: I7323c335c7cefe30446fb560b9381a3519b65f12
---
M firmware/ice40-riscv/icE1usb/usb_gps.c
1 file changed, 11 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  tnt: Looks good to me, approved
  laforge: Looks good to me, but someone else must approve




diff --git a/firmware/ice40-riscv/icE1usb/usb_gps.c 
b/firmware/ice40-riscv/icE1usb/usb_gps.c
index 7ca89fd..f2b09b4 100644
--- a/firmware/ice40-riscv/icE1usb/usb_gps.c
+++ b/firmware/ice40-riscv/icE1usb/usb_gps.c
@@ -49,7 +49,7 @@
 struct usb_cdc_notif_serial_state {
struct usb_ctrl_req hdr;
uint16_t bits;
-};
+} __attribute__((packed,aligned(4)));


 static void

--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36174?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: I7323c335c7cefe30446fb560b9381a3519b65f12
Gerrit-Change-Number: 36174
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-MessageType: merged


[S] Change in osmo-e1-hardware[master]: icE1usb fw: fix usb cdc notification struct attributes

2024-03-06 Thread tnt
tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36174?usp=email )

Change subject: icE1usb fw: fix usb cdc notification struct attributes
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36174?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: I7323c335c7cefe30446fb560b9381a3519b65f12
Gerrit-Change-Number: 36174
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-Comment-Date: Wed, 06 Mar 2024 10:36:31 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-e1-hardware[master]: icE1usb fw: fix usb cdc notification struct attributes

2024-03-06 Thread tnt
tnt has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36174?usp=email )


Change subject: icE1usb fw: fix usb cdc notification struct attributes
..

icE1usb fw: fix usb cdc notification struct attributes

Signed-off-by: Sylvain Munaut 
Change-Id: I7323c335c7cefe30446fb560b9381a3519b65f12
---
M firmware/ice40-riscv/icE1usb/usb_gps.c
1 file changed, 11 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware 
refs/changes/74/36174/1

diff --git a/firmware/ice40-riscv/icE1usb/usb_gps.c 
b/firmware/ice40-riscv/icE1usb/usb_gps.c
index 7ca89fd..f2b09b4 100644
--- a/firmware/ice40-riscv/icE1usb/usb_gps.c
+++ b/firmware/ice40-riscv/icE1usb/usb_gps.c
@@ -49,7 +49,7 @@
 struct usb_cdc_notif_serial_state {
struct usb_ctrl_req hdr;
uint16_t bits;
-};
+} __attribute__((packed,aligned(4)));


 static void

--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36174?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: I7323c335c7cefe30446fb560b9381a3519b65f12
Gerrit-Change-Number: 36174
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-MessageType: newchange


[S] Change in osmo-e1-hardware[master]: icE1usb fw: Workaround some apparent GCC aliasing bug ...

2024-03-06 Thread tnt
tnt has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36175?usp=email )


Change subject: icE1usb fw: Workaround some apparent GCC aliasing bug ...
..

icE1usb fw: Workaround some apparent GCC aliasing bug ...

If the code is built either :
 * without -flto
 * with -fno-strict-aliasing
 * with that struct as 'static' (so it's not on the stack)

Then all works fine. But in the current situation (without the
patch), GCC seems to think there is some aliasing and just plain
removed the `notif.bits = 1` bit of code in that functions
(no warnings printed ...).

Putting the struct as 'static' is the least awful workaround.

I didn't bother reporting bug upstream, because I can't reproduce
on a small test case and I'm sure I'd just get yelled at and that
the compiler is right for some reason ...

Signed-off-by: Sylvain Munaut 
Change-Id: Ie0a2ce337ce4a9c08c3d27acc4d922a3e5892840
---
M firmware/ice40-riscv/icE1usb/usb_gps.c
1 file changed, 28 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware 
refs/changes/75/36175/1

diff --git a/firmware/ice40-riscv/icE1usb/usb_gps.c 
b/firmware/ice40-riscv/icE1usb/usb_gps.c
index f2b09b4..e219cf8 100644
--- a/firmware/ice40-riscv/icE1usb/usb_gps.c
+++ b/firmware/ice40-riscv/icE1usb/usb_gps.c
@@ -143,7 +143,8 @@
if ((ep_regs->bd[0].csr & USB_BD_STATE_MSK) != USB_BD_STATE_RDY_DATA)
{
/* Default request */
-   struct usb_cdc_notif_serial_state notif = {
+   /* Put as static to work around gcc aliasing bug ... */
+   static struct usb_cdc_notif_serial_state notif = {
.hdr = {
.bmRequestType = USB_REQ_READ | 
USB_REQ_TYPE_CLASS | USB_REQ_RCPT_INTF,
.bRequest  = USB_NOTIF_CDC_SERIAL_STATE,

--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36175?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: Ie0a2ce337ce4a9c08c3d27acc4d922a3e5892840
Gerrit-Change-Number: 36175
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-MessageType: newchange


[M] Change in osmo-e1d[master]: Add command and client function to change transmitted Sa bits

2024-01-19 Thread tnt
Attention is currently required from: jolly.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-e1d/+/35562?usp=email )

Change subject: Add command and client function to change transmitted Sa bits
..


Patch Set 5: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/35562?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I2608af7bbb8092fddd68d4f3bb36b10a1100ce0f
Gerrit-Change-Number: 35562
Gerrit-PatchSet: 5
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Fri, 19 Jan 2024 14:50:54 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-e1d[master]: Indicate framing alignment error as loss of framing signal

2024-01-19 Thread tnt
Attention is currently required from: jolly.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-e1d/+/35559?usp=email )

Change subject: Indicate framing alignment error as loss of framing signal
..


Patch Set 4: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/35559?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: Iaad3adb6afb9e1d8a002fa4a04ba4ab8e51671a3
Gerrit-Change-Number: 35559
Gerrit-PatchSet: 4
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Fri, 19 Jan 2024 14:50:43 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-e1d[master]: Add functions for events from server to client

2024-01-19 Thread tnt
Attention is currently required from: jolly, laforge.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-e1d/+/35558?usp=email )

Change subject: Add functions for events from server to client
..


Patch Set 4: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/35558?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I5ee3268f8349b611c3cf3fa0572dc5eab280ab2e
Gerrit-Change-Number: 35558
Gerrit-PatchSet: 4
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-Attention: jolly 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Fri, 19 Jan 2024 14:50:18 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-e1d[master]: Prevent memory leaks / double free of msgb in proto_clnt.c

2024-01-18 Thread tnt
Attention is currently required from: jolly.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-e1d/+/35609?usp=email )

Change subject: Prevent memory leaks / double free of msgb in proto_clnt.c
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/35609?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: Ic0c4c06ba7c1a405ec3c73100fe9e8476f4f5512
Gerrit-Change-Number: 35609
Gerrit-PatchSet: 2
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Reviewer: tnt 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Thu, 18 Jan 2024 15:34:30 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-e1d[master]: Add command and client function to change transmitted Sa bits

2024-01-18 Thread tnt
Attention is currently required from: jolly.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-e1d/+/35562?usp=email )

Change subject: Add command and client function to change transmitted Sa bits
..


Patch Set 5: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/35562?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I2608af7bbb8092fddd68d4f3bb36b10a1100ce0f
Gerrit-Change-Number: 35562
Gerrit-PatchSet: 5
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Thu, 18 Jan 2024 12:40:30 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-e1d[master]: Indicate framing alignment error as loss of framing signal

2024-01-18 Thread tnt
Attention is currently required from: jolly.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-e1d/+/35559?usp=email )

Change subject: Indicate framing alignment error as loss of framing signal
..


Patch Set 4: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/35559?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: Iaad3adb6afb9e1d8a002fa4a04ba4ab8e51671a3
Gerrit-Change-Number: 35559
Gerrit-PatchSet: 4
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Thu, 18 Jan 2024 12:38:45 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-e1d[master]: Add functions for events from server to client

2024-01-18 Thread tnt
Attention is currently required from: jolly, laforge.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-e1d/+/35558?usp=email )

Change subject: Add functions for events from server to client
..


Patch Set 4: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/35558?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I5ee3268f8349b611c3cf3fa0572dc5eab280ab2e
Gerrit-Change-Number: 35558
Gerrit-PatchSet: 4
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-Attention: jolly 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Thu, 18 Jan 2024 12:37:54 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in libosmo-abis[master]: Add support for sending and receiving Sa bits, as well as some line s...

2024-01-18 Thread tnt
Attention is currently required from: dexter, jolly, laforge.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/35563?usp=email )

Change subject: Add support for sending and receiving Sa bits, as well as some 
line signals
..


Patch Set 4:

(1 comment)

File src/e1_input.c:

https://gerrit.osmocom.org/c/libosmo-abis/+/35563/comment/323e676f_f0357901
PS4, Line 1124: { S_L_INP_LINE_LOF, "LINE-LOF" },
  : { S_L_INP_LINE_NOLOF,   "LINE-NOLOF" },
> do we really want to introduce additional signals here?  As we can see from 
> the existign list of sig […]
Makes sense to me.

Whether you get LOS / LOF / AIS, the result is the same for the application and 
the link is not usable.



--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/35563?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Ie7643693c2daac99f5747591decd60e982b8052a
Gerrit-Change-Number: 35563
Gerrit-PatchSet: 4
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-CC: dexter 
Gerrit-Attention: jolly 
Gerrit-Attention: laforge 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Thu, 18 Jan 2024 09:14:59 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


[M] Change in osmo-e1d[master]: Add command and client function to change transmitted Sa bits

2024-01-16 Thread tnt
Attention is currently required from: jolly.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-e1d/+/35562?usp=email )

Change subject: Add command and client function to change transmitted Sa bits
..


Patch Set 3:

(1 comment)

File src/proto_clnt.c:

https://gerrit.osmocom.org/c/osmo-e1d/+/35562/comment/dae4ff1b_579852b2
PS3, Line 420:  if (msgb_l2len(msgb) != sizeof(struct osmo_e1dp_line_info))
This looks like a cut and paste error.

The command doesn't return a osmo_e1dp_line_info. It returns no data, so size 
of l2 should be 0.

Also I've just noticed that in that error handling path (which we use in other 
places above), we leak the msgb.



--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/35562?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I2608af7bbb8092fddd68d4f3bb36b10a1100ce0f
Gerrit-Change-Number: 35562
Gerrit-PatchSet: 3
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Tue, 16 Jan 2024 07:59:58 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in osmo-e1d[master]: Indicate change in received Sa bits

2024-01-15 Thread tnt
Attention is currently required from: jolly.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-e1d/+/35561?usp=email )

Change subject: Indicate change in received Sa bits
..


Patch Set 3: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/35561?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I4ea2a11e221629a90ed227a0df33576c8607881b
Gerrit-Change-Number: 35561
Gerrit-PatchSet: 3
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Tue, 16 Jan 2024 07:40:22 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-e1d[master]: Indicate remote alarm bit as remote alarm inidication

2024-01-15 Thread tnt
Attention is currently required from: jolly.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-e1d/+/35560?usp=email )

Change subject: Indicate remote alarm bit as remote alarm inidication
..


Patch Set 3: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/35560?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: Id6cd193c71330c350c27e02b3a692d2c7e0b3fbe
Gerrit-Change-Number: 35560
Gerrit-PatchSet: 3
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Tue, 16 Jan 2024 07:39:33 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-e1d[master]: Indicate framing alignment error as loss of framing signal

2024-01-15 Thread tnt
Attention is currently required from: jolly, laforge.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-e1d/+/35559?usp=email )

Change subject: Indicate framing alignment error as loss of framing signal
..


Patch Set 3: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/35559?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: Iaad3adb6afb9e1d8a002fa4a04ba4ab8e51671a3
Gerrit-Change-Number: 35559
Gerrit-PatchSet: 3
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-Attention: jolly 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Tue, 16 Jan 2024 07:38:25 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-e1d[master]: Add functions to events from server to client

2024-01-15 Thread tnt
Attention is currently required from: jolly, laforge.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-e1d/+/35558?usp=email )

Change subject: Add functions to events from server to client
..


Patch Set 3:

(1 comment)

File src/e1d.h:

https://gerrit.osmocom.org/c/osmo-e1d/+/35558/comment/713505c9_380288af
PS1, Line 199:  void *srv;
> It is required for future patches to refer to the server.
Yeah I saw later, but you can still use `struct osmo_e1dp_server *srv` (with 
appropriate pre-declaration of the struct) just to avoid the ugly `void *`.



--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/35558?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I5ee3268f8349b611c3cf3fa0572dc5eab280ab2e
Gerrit-Change-Number: 35558
Gerrit-PatchSet: 3
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-Attention: jolly 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Tue, 16 Jan 2024 07:37:55 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: jolly 
Comment-In-Reply-To: tnt 
Gerrit-MessageType: comment


[M] Change in osmo-e1d[master]: Add new protocol command and events for Sa bits and line states

2024-01-15 Thread tnt
Attention is currently required from: jolly, laforge.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-e1d/+/35557?usp=email )

Change subject: Add new protocol command and events for Sa bits and line states
..


Patch Set 3: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/35557?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I4c20ec19fa3d9cce82c8199b38d173aa272fb07d
Gerrit-Change-Number: 35557
Gerrit-PatchSet: 3
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-Attention: jolly 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Tue, 16 Jan 2024 07:33:25 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-e1d[master]: Indicate change in received Sa bits

2024-01-14 Thread tnt
Attention is currently required from: jolly.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-e1d/+/35561?usp=email )

Change subject: Indicate change in received Sa bits
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/35561?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I4ea2a11e221629a90ed227a0df33576c8607881b
Gerrit-Change-Number: 35561
Gerrit-PatchSet: 1
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Sun, 14 Jan 2024 18:37:01 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-e1d[master]: Indicate remote alarm bit as remote alarm inidication

2024-01-14 Thread tnt
Attention is currently required from: jolly.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-e1d/+/35560?usp=email )

Change subject: Indicate remote alarm bit as remote alarm inidication
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/35560?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: Id6cd193c71330c350c27e02b3a692d2c7e0b3fbe
Gerrit-Change-Number: 35560
Gerrit-PatchSet: 1
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Sun, 14 Jan 2024 18:34:23 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


  1   2   3   4   5   6   7   >