<p>Harald Welte <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/12909">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">fix USB transfer<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>transfer with a combination of partial or full USB single packet,<br>USB multi-packet, max transfer, and control endpoint sizes was<br>successfully tested (in bytes): 4, 32, 64, 128, 129, 512, 516,<br>544, 576, 640, 641, 1024, 1028<br><br>Change-Id: Ic4e64168e865362e12e0b76386f964895b8b6c20<br>---<br>M 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;"><span>diff --git a/hpl/usb/hpl_usb.c b/hpl/usb/hpl_usb.c</span><br><span>index 6bf09ab..cc6cc41 100644</span><br><span>--- a/hpl/usb/hpl_usb.c</span><br><span>+++ b/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/12909">change 12909</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/12909"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-asf4-dfu </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ic4e64168e865362e12e0b76386f964895b8b6c20 </div>
<div style="display:none"> Gerrit-Change-Number: 12909 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Kévin Redon <kredon@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>