From dea828291155b152008758cee2ac454ad64fff0a Mon Sep 17 00:00:00 2001 From: Santan Kumar Date: Fri, 9 Feb 2018 18:23:12 +0530 Subject: [PATCH] USB: xhci:Use Max packet macro to align max packet with spec Change-Id: I0b6141a17560e0b3ed21c05f2807b9f19c43d26c Signed-off-by: Santan Kumar --- drivers/usb/host/xhci.c | 2 +- drivers/usb/host/xhci.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index ca598aa5e6..d59911740f 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -568,7 +568,7 @@ int xhci_check_maxpacket(struct usb_device *udev) ctrl->devs[slot_id]->out_ctx, ep_index); in_ctx = ctrl->devs[slot_id]->in_ctx; ep_ctx = xhci_get_ep_ctx(ctrl, in_ctx, ep_index); - ep_ctx->ep_info2 &= cpu_to_le32(~MAX_PACKET_MASK); + ep_ctx->ep_info2 &= cpu_to_le32(~MAX_PACKET(MAX_PACKET_MASK)); ep_ctx->ep_info2 |= cpu_to_le32(MAX_PACKET(max_packet_size)); /* diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index 16c1c598b8..2afa38694b 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -655,7 +655,7 @@ struct xhci_ep_ctx { #define MAX_BURST_SHIFT (8) #define CTX_TO_MAX_BURST(p) (((p) >> 8) & 0xff) #define MAX_PACKET(p) (((p)&0xffff) << 16) -#define MAX_PACKET_MASK (0xffff << 16) +#define MAX_PACKET_MASK (0xffff) #define MAX_PACKET_DECODED(p) (((p) >> 16) & 0xffff) #define MAX_PACKET_SHIFT (16)