Hi Felipe,
> > +
> > + /* handle the case where we have to send a zero packet */
> > + if ((epnum & 1) && ur->zero &&
> > + (ur->length % ep0->endpoint.maxpacket == 0)) {
> > + int ret;
> > +
> > + ret = dwc3_ep0_start_trans(dwc, epnum, dwc->ctrl_req_addr,
> 0,
> > + DWC3_TRBCTL_CONTROL_DATA);
> > + WARN_ON(ret < 0);
> > + dwc->ep0_zlp_sent = 1;
> > + return;
> > + }
>
> note that this causes a slight bug. Code expects to receive a
> NRDY_STATUS, but we're sending another CONTROL_DATA which means we will
> receive XFER_COMPLETE_DATA.
Even if ep0_next_event is set to DWC3_EP0_NRDY_STATUS at the beginning of
this function, in case of ZLP it will be reset back to DWC3_EP0_COMPLETE in
dwc3_ep0_start_trans(). So there is no mismatch between what code expects
to receive and actual event. Did I miss something?
>
> It's only working because Control(Data) lost its XferNotReady handling
> due to a silicon bug we found. If someone ever patches that handler,
> this will be a hard-to-track problem.
>
Thank you
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html