<p>laforge has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-e1d/+/26710">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Add support for icE1usb RAI interrupt error flag<br><br>In osmo-e1-hardware.git Change-Id Ic4f57cf79bd32cf75f81ef3073cb8d4a2d1857d8<br>we added support for passing RAI (remote alarm indication) as a flag via<br>the USB interrupt messages; let's add support for this here.<br><br>osmo-e1d already internally parses TS0 to determine the same<br>information, and we have to keep this for backwards-compatibility with<br>older firmware builds.  But maybe at some future point we can remove<br>our own TS0 scanning code here and rely on the USB device to inform<br>us about remote alarms.<br><br>Change-Id: Ie1994968e792c37f9272b9854547db95a41cab5b<br>---<br>M src/ice1usb_proto.h<br>M src/usb.c<br>2 files changed, 8 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/10/26710/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/ice1usb_proto.h b/src/ice1usb_proto.h</span><br><span>index 71f7236..d0d7304 100644</span><br><span>--- a/src/ice1usb_proto.h</span><br><span>+++ b/src/ice1usb_proto.h</span><br><span>@@ -85,9 +85,10 @@</span><br><span>   ICE1USB_IRQ_T_ERRCNT            = 1,</span><br><span> };</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-/* Ensue ro keep those in sync with e1.h */</span><br><span style="color: hsl(120, 100%, 40%);">+/* Ensue to keep those in sync with e1.h */</span><br><span> #define ICE1USB_ERR_F_ALIGN_ERR       0x01</span><br><span> #define ICE1USB_ERR_F_LOS       0x02</span><br><span style="color: hsl(120, 100%, 40%);">+#define ICE1USB_ERR_F_RAI 0x04</span><br><span> </span><br><span> struct ice1usb_irq_err {</span><br><span>         /* 16-bit little-endian counters */</span><br><span>diff --git a/src/usb.c b/src/usb.c</span><br><span>index 0e08a9f..465aecd 100644</span><br><span>--- a/src/usb.c</span><br><span>+++ b/src/usb.c</span><br><span>@@ -337,6 +337,12 @@</span><br><span>                  line_ctr_add(line, LINE_CTR_LOS, 1);</span><br><span>         }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if ((errcnt->flags & ICE1USB_ERR_F_RAI) != (last->flags & ICE1USB_ERR_F_RAI)) {</span><br><span style="color: hsl(120, 100%, 40%);">+         LOGPLI(line, DE1D, LOGL_ERROR, "Remote Alarm (YELLOW) %s\n",</span><br><span style="color: hsl(120, 100%, 40%);">+                        errcnt->flags & ICE1USB_ERR_F_RAI ? "PRESENT" : "ABSENT");</span><br><span style="color: hsl(120, 100%, 40%);">+         /* don't increment counter here, our TS0 code in mux_demux.c does this */</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>  ld->irq.last_errcnt = *errcnt;</span><br><span> }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-e1d/+/26710">change 26710</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-e1d/+/26710"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-e1d </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ie1994968e792c37f9272b9854547db95a41cab5b </div>
<div style="display:none"> Gerrit-Change-Number: 26710 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>