From 3e96eebc6baddacacc75f1694f06b685e0ad2b63 Mon Sep 17 00:00:00 2001 From: Manu Gautam Date: Wed, 4 May 2016 17:16:53 +0530 Subject: [PATCH] usb: xhci: Set bulk EP maxpacket to 8 for buggy FS devices Some FS devices report maxpacket size as 4 for their BULK EPs which is incorrect as per USB specification. This results in ep_config command to controller timing out and enumeration fails. As minimum maxpacket size for FS is 8, override the same for such devices. CRs-fixed: 1002876 Change-Id: I70c2210b4eb93f557eef306fcbc11308b7b33e07 Signed-off-by: Manu Gautam --- drivers/usb/host/xhci-mem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 098df6ced1c3..8e5ab373dce9 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c @@ -1476,6 +1476,8 @@ int xhci_endpoint_init(struct xhci_hcd *xhci, } break; case USB_SPEED_FULL: + if (usb_endpoint_xfer_bulk(&ep->desc) && max_packet < 8) + max_packet = 8; case USB_SPEED_LOW: break; default: