RE: [PATCH] usb: dwc3: ep0: fix delayed status is queued too early

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: linux-usb-owner@xxxxxxxxxxxxxxx [mailto:linux-usb-owner@xxxxxxxxxxxxxxx] On Behalf Of Alan Stern
> Sent: Thursday, May 08, 2014 10:40 AM
> 
> On Thu, 8 May 2014, Felipe Balbi wrote:
> 
> > > The dwc3 driver should always prepare a buffer for the next ep0 SETUP
> > > packet as soon as it retrieves the information for the current SETUP
> > > packet from the buffer.
> > >
> > > Otherwise, as you described it, if the gadget driver never sends its
> > > delayed status response then the UDC will never respond to any more
> > > control transfers.
> >
> > we _do_ prepare transfers for setup packet everytime a Status phase is
> > completed (we also restart ep0 in case of stalls):
> 
> I said that dwc3 should prepare a buffer for a SETUP packet every time
> a _SETUP_ stage is completed -- not every time a _STATUS_ stage is
> completed.
> 
> In principle the host can send a SETUP packet at any time, even in the
> middle of an ongoing transfer.  (Consider the case where a driver on
> the host unlinks a control transfer before it has completed and then
> submits a new one.)

Just FYI, the DWC3 core is designed to always respond to SETUP packets.
It has a 3-deep input buffer for SETUPs, provided the RxFIFO is set up
properly according to the databook. If the buffer fills up, then
further SETUP packets will get lost, but they will still be ACKed.

-- 
Paul

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux