Hi, >> >> How to set "bh->state" to BUF_STATE_EMPTY after the buffer is processed? >> > >> > It gets set to BUF_STATE_EMPTY in several different places, depending >> > on the purpose the buffer was used for. See bulk_in_complete (your UDC >> > driver should call this routine for every request over a bulk-IN >> > endpoint, when it is safe for the gadget driver to overwrite the data >> > in the transfer buffer and re-use the request). See also >> > get_next_command, the line just after the call to received_cbw. >> >> Thanks, i added in UDC driver to call bulk_in_complete for every >> request over a bulk in ep, now the gadget driver is able to process > > UDC shouldn't call bulk_in_complete() directly, you should be calling > request->complete() instead. >
Yes, the UDC driver calls the request->complete() which in turn calls the bulk_in_complete(). I am sorry my writing is not clear. victor -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html