aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/chipidea/udc.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman2020-07-29 13:57:09 +0200
committerGreg Kroah-Hartman2020-07-29 13:57:09 +0200
commit107c89497545232acac83d71600d8030b7361ca2 (patch)
tree9dc8e1f46d35440fce42d3a1ba7320ec7b6bb429 /drivers/usb/chipidea/udc.c
parentfa56dd9152ef955bd21082c5330e4dff8621bca6 (diff)
parentd6f93d21001e4388a25b0b922e02e64bc6004d2f (diff)
Merge tag 'usb-ci-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-next
Peter writes: ENDIAN issue fix and one query controller role API is introduced. * tag 'usb-ci-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb: usb: chipidea: imx: get available runtime dr mode for wakeup setting usb: chipidea: add query_available_role interface Documentation: ABI: usb: chipidea: Update Li Jun's e-mail usb: chipidea: udc: fix the ENDIAN issue
Diffstat (limited to 'drivers/usb/chipidea/udc.c')
-rw-r--r--drivers/usb/chipidea/udc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index 6f173de1a5c1..60ea932afe2b 100644
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@ -487,9 +487,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) +