<p>Kévin Redon has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/13056">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">fix ASFv4 USB stack<br><br>this ASFv4 USB library change fixes USB transfer.<br>two transfer-size issues existed:<br>- on multi-packet transfer if the last packet was less than the<br>USB transfer packet size, the packet would be received but not<br>acknowledged<br>- during normal transfer the packet size of a previous packet set<br>the size of the current packet, ignoring the actual transfer size<br><br>Change-Id: I4209072ee808f0e246bcd5e86917dcf1d213c26b<br>---<br>M sysmoOCTSIM/hpl/usb/hpl_usb.c<br>1 file changed, 1 insertion(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/56/13056/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/sysmoOCTSIM/hpl/usb/hpl_usb.c b/sysmoOCTSIM/hpl/usb/hpl_usb.c</span><br><span>index b5efe6c..eec9728 100644</span><br><span>--- a/sysmoOCTSIM/hpl/usb/hpl_usb.c</span><br><span>+++ b/sysmoOCTSIM/hpl/usb/hpl_usb.c</span><br><span>@@ -1135,6 +1135,7 @@</span><br><span>                 /* Short packet. */</span><br><span>          ept->flags.bits.need_zlp = 0;</span><br><span>             ept->trans_count += last_trans;</span><br><span style="color: hsl(120, 100%, 40%);">+            _usbd_ep_set_out_trans(epn, 0, ept->size, 0);</span><br><span>     } else {</span><br><span>             /* Full packets. */</span><br><span>          ept->trans_count += trans_size;</span><br><span>@@ -1154,9 +1155,6 @@</span><br><span>                           if (trans_next > ept->size) {</span><br><span>                                  if (trans_next > USB_D_DEV_TRANS_MAX) {</span><br><span>                                           trans_next = USB_D_DEV_TRANS_MAX;</span><br><span style="color: hsl(0, 100%, 40%);">-                                       } else {</span><br><span style="color: hsl(0, 100%, 40%);">-                                                /* Must expect multiple of ep size. */</span><br><span style="color: hsl(0, 100%, 40%);">-                                          trans_next -= trans_next & size_mask;</span><br><span>                                    }</span><br><span>                            } else if (trans_next < ept->size) {</span><br><span>                                   /* Last un-aligned packet should be cached. */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/13056">change 13056</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/13056"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ccid-firmware </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I4209072ee808f0e246bcd5e86917dcf1d213c26b </div>
<div style="display:none"> Gerrit-Change-Number: 13056 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Kévin Redon <kredon@sysmocom.de> </div>