Skip to content
Snippets Groups Projects
Commit 8d7c39d3 authored by Stephen Warren's avatar Stephen Warren Committed by Marek Vasut
Browse files

usb: ci_udc: don't assume QTDs are adjacent when transmitting ZLPs


Fix ci_ep_submit_next_request()'s ZLP transmission code to explicitly
call ci_get_qtd() to find the address of the other QTD to use. This
will allow us to correctly align each QTD individually in the future,
which may involve leaving a gap between the QTDs.

Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
parent d7beeb93
No related branches found
No related tags found
No related merge requests found
......@@ -404,10 +404,11 @@ static void ci_ep_submit_next_request(struct ci_ep *ci_ep)
* only 1 is used at a time since either an IN or an OUT but
* not both is queued. For an IN transaction, item currently
* points at the second of these items, so we know that we
* can use (item - 1) to transmit the extra zero-length packet
* can use the other to transmit the extra zero-length packet.
*/
item->next = (unsigned)(item - 1);
item--;
struct ept_queue_item *other_item = ci_get_qtd(num, 0);
item->next = (unsigned)other_item;
item = other_item;
item->info = INFO_ACTIVE;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment