Change in osmo-e1d[master]: update ice1usb_proto.h to current master

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

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

laforge gerrit-no-reply at lists.osmocom.org
Sat Jan 1 14:39:46 UTC 2022


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-e1d/+/26705 )

Change subject: update ice1usb_proto.h to current master
......................................................................

update ice1usb_proto.h to current master

Copy from firmware source code repo at
https://git.osmocom.org/osmo-e1-hardware/tree/firmware/ice40-riscv/icE1usb/ice1usb_proto.h
as of d376b2e852fbf26a60ac4d6f66e54bb85f0b7204

Change-Id: I8f7b9462482421993e3516aa9d0794bb8076b65b
---
M src/ice1usb_proto.h
M src/usb.c
2 files changed, 16 insertions(+), 9 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/src/ice1usb_proto.h b/src/ice1usb_proto.h
index 5f5f31c..71f7236 100644
--- a/src/ice1usb_proto.h
+++ b/src/ice1usb_proto.h
@@ -1,7 +1,14 @@
-#pragma once
+/*
+ * ice1usb_proto.h
+ *
+ * Copyright (C) 2020  Harald Welte <laforge at osmocom.org>
+ * SPDX-License-Identifier: MIT
+ *
+ * Header file describing the USB protocol between the icE1usb firmware and the host
+ * software (currently really only osmo-e1d)
+ */
 
-/* Header file describing the USB protocol between the icE1usb firmware and the host
- * software (currently really only osmo-e1d) */
+#pragma once
 
 /***********************************************************************
  * Control Endpoint / Device Requests
@@ -75,12 +82,12 @@
  ***********************************************************************/
 
 enum ice1usb_irq_type {
-	ICE1USB_IRQQ_T_ERRCNT		= 1,
+	ICE1USB_IRQ_T_ERRCNT		= 1,
 };
 
 /* Ensue ro keep those in sync with e1.h */
 #define ICE1USB_ERR_F_ALIGN_ERR	0x01
-#define ICE1USB_ERR_F_TICK_ERR	0x02
+#define ICE1USB_ERR_F_LOS	0x02
 
 struct ice1usb_irq_err {
 	/* 16-bit little-endian counters */
diff --git a/src/usb.c b/src/usb.c
index 3ec793f..0e08a9f 100644
--- a/src/usb.c
+++ b/src/usb.c
@@ -330,10 +330,10 @@
 			errcnt->flags & ICE1USB_ERR_F_ALIGN_ERR ? "LOST" : "REGAINED");
 	}
 
-	if ((errcnt->flags & ICE1USB_ERR_F_TICK_ERR) != (last->flags & ICE1USB_ERR_F_TICK_ERR)) {
+	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_TICK_ERR ? "LOST" : "REGAINED");
-		if (errcnt->flags & ICE1USB_ERR_F_TICK_ERR)
+			errcnt->flags & ICE1USB_ERR_F_LOS ? "LOST" : "REGAINED");
+		if (errcnt->flags & ICE1USB_ERR_F_LOS)
 			line_ctr_add(line, LINE_CTR_LOS, 1);
 	}
 
@@ -351,7 +351,7 @@
 	}
 
 	switch (irq->type) {
-	case ICE1USB_IRQQ_T_ERRCNT:
+	case ICE1USB_IRQ_T_ERRCNT:
 		if (xfer->actual_length < sizeof(*irq)) {
 			LOGPLI(line, DE1D, LOGL_ERROR, "Short ERRCNT interrupt: %u<%zu\n",
 				xfer->actual_length, sizeof(*irq));

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

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I8f7b9462482421993e3516aa9d0794bb8076b65b
Gerrit-Change-Number: 26705
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20220101/bbf3d75f/attachment.htm>


More information about the gerrit-log mailing list