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.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1-hardware/+/21717 )
Change subject: icE1usb fw: Include error status + frame number in Rx USB header
......................................................................
icE1usb fw: Include error status + frame number in Rx USB header
Change-Id: Ie0688647c56ebfc2e08de44f8ec569e1c2cd6a28
---
M firmware/ice40-riscv/icE1usb/usb_e1.c
1 file changed, 5 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware refs/changes/17/21717/1
diff --git a/firmware/ice40-riscv/icE1usb/usb_e1.c b/firmware/ice40-riscv/icE1usb/usb_e1.c
index 6bcb1b4..e9daa39 100644
--- a/firmware/ice40-riscv/icE1usb/usb_e1.c
+++ b/firmware/ice40-riscv/icE1usb/usb_e1.c
@@ -14,6 +14,7 @@
#include "console.h"
#include "misc.h"
+#include "e1.h"
struct {
bool running; /* are we running (transceiving USB data)? */
@@ -75,7 +76,9 @@
while ((usb_ep_regs[2].in.bd[bdi].csr & USB_BD_STATE_MSK) != USB_BD_STATE_RDY_DATA)
{
uint32_t ptr = usb_ep_regs[2].in.bd[bdi].ptr;
+ uint32_t errmask = e1_get_and_clear_errors();
uint32_t hdr;
+ unsigned int pos;
/* Error check */
if ((usb_ep_regs[2].in.bd[bdi].csr & USB_BD_STATE_MSK) == USB_BD_STATE_DONE_ERR)
@@ -93,10 +96,10 @@
else if (!n)
break;
- n = e1_rx_need_data((ptr >> 2) + 1, n, NULL);
+ n = e1_rx_need_data((ptr >> 2) + 1, n, &pos);
/* Write header */
- hdr = 0x616b00b5;
+ hdr = (4 << 28) | ((errmask & 0xff) << 8) | (pos & 0xff);
usb_data_write(ptr, &hdr, 4);
/* Resubmit */
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/21717
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: Ie0688647c56ebfc2e08de44f8ec569e1c2cd6a28
Gerrit-Change-Number: 21717
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201214/0d096a75/attachment.htm>