diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2018-05-23 23:40:50 -0700 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2018-05-30 11:59:10 +0200 |
commit | e40406603fe22a5b18d7e8ac7a2eb0f2d2b13cf1 (patch) | |
tree | cd8ab9fda445894e78a8e764002e557db9ac9d21 | |
parent | eaaefb066c86f08fb285e73fb8c5fbf497be6b57 (diff) | |
download | u-boot-e40406603fe22a5b18d7e8ac7a2eb0f2d2b13cf1.tar.gz |
usb: xhci: Handle endianness in xhci_set_configuration()
In xhci_set_configuration(), 'Context Entries' field in the slot
context was cleared with mask LAST_CTX_MASK, but it should have
taken the endianness into consideration.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
-rw-r--r-- | drivers/usb/host/xhci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index f9c6bbb9e9..9ded14cc3c 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -536,7 +536,7 @@ static int xhci_set_configuration(struct usb_device *udev) /* slot context */ xhci_slot_copy(ctrl, in_ctx, out_ctx); slot_ctx = xhci_get_slot_ctx(ctrl, in_ctx); - slot_ctx->dev_info &= ~(LAST_CTX_MASK); + slot_ctx->dev_info &= ~(cpu_to_le32(LAST_CTX_MASK)); slot_ctx->dev_info |= cpu_to_le32(LAST_CTX(max_ep_flag + 1) | 0); xhci_endpoint_copy(ctrl, in_ctx, out_ctx, 0); |