<p>tnt <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-e1-hardware/+/24472">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  tnt: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">fw/icE1usb: Adapt the CDC descriptors to new structure from no2usb<br><br>Those are actually disabled right now, but since the submodule got<br>updated and the protocol struct/defines changed, this updates them<br>anyway so you can uncommend/enable them without causing a build<br>failure<br><br>Signed-off-by: Sylvain Munaut <tnt@246tNt.com><br>Change-Id: I1895702eac9c6c392f24327b12f9ba3651e3249a<br>---<br>M firmware/ice40-riscv/icE1usb/usb_desc_app.c<br>1 file changed, 22 insertions(+), 20 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/firmware/ice40-riscv/icE1usb/usb_desc_app.c b/firmware/ice40-riscv/icE1usb/usb_desc_app.c</span><br><span>index 153d70e..544ac23 100644</span><br><span>--- a/firmware/ice40-riscv/icE1usb/usb_desc_app.c</span><br><span>+++ b/firmware/ice40-riscv/icE1usb/usb_desc_app.c</span><br><span>@@ -6,6 +6,7 @@</span><br><span>  */</span><br><span> </span><br><span> #include <no2usb/usb_proto.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <no2usb/usb_cdc_proto.h></span><br><span> #include <no2usb/usb_dfu_proto.h></span><br><span> #include <no2usb/usb.h></span><br><span> </span><br><span>@@ -13,6 +14,8 @@</span><br><span> #define num_elem(a) (sizeof(a) / sizeof(a[0]))</span><br><span> </span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+usb_cdc_union_desc_def(1);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> static const struct {</span><br><span>      /* Configuration */</span><br><span>  struct usb_conf_desc conf;</span><br><span>@@ -43,10 +46,9 @@</span><br><span> #if 0</span><br><span>     struct {</span><br><span>             struct usb_intf_desc intf_ctl;</span><br><span style="color: hsl(0, 100%, 40%);">-          struct usb_cs_intf_hdr_desc cs_intf_hdr;</span><br><span style="color: hsl(0, 100%, 40%);">-                struct usb_cs_intf_acm_desc cs_intf_acm;</span><br><span style="color: hsl(0, 100%, 40%);">-                struct usb_cs_intf_union_desc cs_intf_union;</span><br><span style="color: hsl(0, 100%, 40%);">-            uint8_t cs_intf_union_slave;</span><br><span style="color: hsl(120, 100%, 40%);">+          struct usb_cdc_hdr_desc cdc_hdr;</span><br><span style="color: hsl(120, 100%, 40%);">+              struct usb_cdc_acm_desc cdc_acm;</span><br><span style="color: hsl(120, 100%, 40%);">+              struct usb_cdc_union_desc__1 cdc_union;</span><br><span>              struct usb_ep_desc ep_ctl;</span><br><span>           struct usb_intf_desc intf_data;</span><br><span>              struct usb_ep_desc ep_data_out;</span><br><span>@@ -174,30 +176,30 @@</span><br><span>                      .bInterfaceNumber       = 1,</span><br><span>                         .bAlternateSetting      = 0,</span><br><span>                         .bNumEndpoints          = 1,</span><br><span style="color: hsl(0, 100%, 40%);">-                    .bInterfaceClass        = 0x02,</span><br><span style="color: hsl(0, 100%, 40%);">-                 .bInterfaceSubClass     = 0x02,</span><br><span style="color: hsl(120, 100%, 40%);">+                       .bInterfaceClass        = USB_CLS_CDC_CONTROL,</span><br><span style="color: hsl(120, 100%, 40%);">+                        .bInterfaceSubClass     = USB_CDC_SCLS_ACM,</span><br><span>                  .bInterfaceProtocol     = 0x00,</span><br><span>                      .iInterface             = 6,</span><br><span>                 },</span><br><span style="color: hsl(0, 100%, 40%);">-              .cs_intf_hdr = {</span><br><span style="color: hsl(0, 100%, 40%);">-                        .bLength                = sizeof(struct usb_cs_intf_hdr_desc),</span><br><span style="color: hsl(0, 100%, 40%);">-                  .bDescriptorType        = USB_DT_CS_INTF,</span><br><span style="color: hsl(0, 100%, 40%);">-                       .bDescriptorsubtype     = 0x00,</span><br><span style="color: hsl(120, 100%, 40%);">+               .cdc_hdr = {</span><br><span style="color: hsl(120, 100%, 40%);">+                  .bLength                = sizeof(struct usb_cdc_hdr_desc),</span><br><span style="color: hsl(120, 100%, 40%);">+                    .bDescriptorType        = USB_CS_DT_INTF,</span><br><span style="color: hsl(120, 100%, 40%);">+                     .bDescriptorsubtype     = USB_CDC_DST_HEADER,</span><br><span>                        .bcdCDC                 = 0x0110,</span><br><span>            },</span><br><span style="color: hsl(0, 100%, 40%);">-              .cs_intf_acm = {</span><br><span style="color: hsl(0, 100%, 40%);">-                        .bLength                = sizeof(struct usb_cs_intf_acm_desc),</span><br><span style="color: hsl(0, 100%, 40%);">-                  .bDescriptorType        = USB_DT_CS_INTF,</span><br><span style="color: hsl(0, 100%, 40%);">-                       .bDescriptorsubtype     = 0x02,</span><br><span style="color: hsl(120, 100%, 40%);">+               .cdc_acm = {</span><br><span style="color: hsl(120, 100%, 40%);">+                  .bLength                = sizeof(struct usb_cdc_acm_desc),</span><br><span style="color: hsl(120, 100%, 40%);">+                    .bDescriptorType        = USB_CS_DT_INTF,</span><br><span style="color: hsl(120, 100%, 40%);">+                     .bDescriptorsubtype     = USB_CDC_DST_ACM,</span><br><span>                   .bmCapabilities         = 0x02,</span><br><span>              },</span><br><span style="color: hsl(0, 100%, 40%);">-              .cs_intf_union = {</span><br><span style="color: hsl(0, 100%, 40%);">-                      .bLength                = sizeof(struct usb_cs_intf_union_desc) + 1,</span><br><span style="color: hsl(0, 100%, 40%);">-                    .bDescriptorType        = USB_DT_CS_INTF,</span><br><span style="color: hsl(0, 100%, 40%);">-                       .bDescriptorsubtype     = 0x06,</span><br><span style="color: hsl(120, 100%, 40%);">+               .cdc_union = {</span><br><span style="color: hsl(120, 100%, 40%);">+                        .bLength                = sizeof(struct usb_cdc_union_desc) + 1,</span><br><span style="color: hsl(120, 100%, 40%);">+                      .bDescriptorType        = USB_CS_DT_INTF,</span><br><span style="color: hsl(120, 100%, 40%);">+                     .bDescriptorsubtype     = USB_CDC_DST_UNION,</span><br><span>                         .bMasterInterface       = 1,</span><br><span style="color: hsl(120, 100%, 40%);">+                  .bSlaveInterface        = { 2 },</span><br><span>             },</span><br><span style="color: hsl(0, 100%, 40%);">-              .cs_intf_union_slave = 2,</span><br><span>            .ep_ctl = {</span><br><span>                  .bLength                = sizeof(struct usb_ep_desc),</span><br><span>                        .bDescriptorType        = USB_DT_EP,</span><br><span>@@ -212,7 +214,7 @@</span><br><span>                   .bInterfaceNumber       = 2,</span><br><span>                         .bAlternateSetting      = 0,</span><br><span>                         .bNumEndpoints          = 2,</span><br><span style="color: hsl(0, 100%, 40%);">-                    .bInterfaceClass        = 0x0a,</span><br><span style="color: hsl(120, 100%, 40%);">+                       .bInterfaceClass        = USB_CLS_CDC_DATA,</span><br><span>                  .bInterfaceSubClass     = 0x00,</span><br><span>                      .bInterfaceProtocol     = 0x00,</span><br><span>                      .iInterface             = 7,</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-e1-hardware/+/24472">change 24472</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-e1-hardware/+/24472"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-e1-hardware </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I1895702eac9c6c392f24327b12f9ba3651e3249a </div>
<div style="display:none"> Gerrit-Change-Number: 24472 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: tnt <tnt@246tNt.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: tnt <tnt@246tNt.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>