Commit 38145ed1 authored by Peter Chen's avatar Peter Chen

usb: chipidea: udc: fix the ENDIAN issue

Fix the ENDIAN issue when assign dTD entry.
Reported-by: default avatarkbuild test robot <lkp@intel.com>
Signed-off-by: default avatarPeter Chen <peter.chen@nxp.com>
parent af7b4801
......@@ -473,9 +473,10 @@ static void ci_add_buffer_entry(struct td_node *node, struct scatterlist *s)
int empty_td_slot_index = (CI_MAX_BUF_SIZE - node->td_remaining_size)
/ CI_HDRC_PAGE_SIZE;
int i;
u32 token;
node->ptr->token +=
cpu_to_le32(sg_dma_len(s) << __ffs(TD_TOTAL_BYTES));
token = le32_to_cpu(node->ptr->token) + (sg_dma_len(s) << __ffs(TD_TOTAL_BYTES));
node->ptr->token = cpu_to_le32(token);
for (i = empty_td_slot_index; i < TD_PAGE_COUNT; i++) {
u32 page = (u32) sg_dma_address(s) +
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment