If we don't know what are the actual U1/U2 exit latencies from the UDC, we're better off using maximum latencies as default. This should avoid any problems with too frequent U1/U2 entry. Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxxxxxxxx> --- include/linux/usb/gadget.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index 3667d667cab1..20cb590c658e 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h @@ -276,11 +276,19 @@ static inline void usb_ep_fifo_flush(struct usb_ep *ep) /*-------------------------------------------------------------------------*/ +/** + * struct usb_dcd_config_params - Default U1/U2 exit latencies + * @bU1DevExitLat: U1 Exit Latency in us + * @bU2DevExitLat: U2 Exit Latency in us + * + * Note that we will be setting U1/U2 exit latencies to their maximum + * by default if no value is passed by the UDC Driver. + */ struct usb_dcd_config_params { __u8 bU1DevExitLat; /* U1 Device exit Latency */ -#define USB_DEFAULT_U1_DEV_EXIT_LAT 0x01 /* Less then 1 microsec */ +#define USB_DEFAULT_U1_DEV_EXIT_LAT 10 /* us */ __le16 wU2DevExitLat; /* U2 Device exit Latency */ -#define USB_DEFAULT_U2_DEV_EXIT_LAT 0x1F4 /* Less then 500 microsec */ +#define USB_DEFAULT_U2_DEV_EXIT_LAT 2047 /* us */ }; -- 2.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html