Re: Linux USB file storage gadget with new UDC

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

 



On Thu, 25 Apr 2013, victor yeo wrote:

> For bulk out endpoint, I code the kagen2_ep_queue() to read the
> packets from the USB hardware, then call bulk_out_complete() via
> req->req.complete. Is this the correct way?

While kagen2_ep_queue() is running, there shouldn't be any packets in
the USB hardware.  The hardware should refuse to accept any packets,
sending NAKs back to the host, until a request has been submitted and 
queued.

> Or i should only read the bulk out endpoint when bulk-out endpoint
> interrupt is received?

When the request is queued, that's when you should tell the hardware to
accept data from the host.  After that, each time a packet arrives from
the host, either the hardware or the UDC driver should store the packet
data in the request's buffer.  When the buffer is full or a short
packet is received (the UDC driver's interrupt handler will know when
this happens) then the UDC driver should call req.complete.

Alan Stern

--
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