From f99298bfa7c42da8d27c2b42050941471c0866ab Mon Sep 17 00:00:00 2001 From: Andiry Xu Date: Mon, 12 Dec 2011 16:45:28 +0800 Subject: xHCI: BESL calculation based on USB2.0 LPM errata The latest released errata for USB2.0 ECN LPM adds new fields to USB2.0 extension descriptor, defines two BESL values for device: baseline BESL and deep BESL. Baseline BESL value communicates a nominal power savings design point and the deep BESL value communicates a significant power savings design point. If device indicates BESL value, driver will use a value count in both host BESL and device BESL. Use baseline BESL value as default. Signed-off-by: Andiry Xu Tested-by: Jason Fan Signed-off-by: Sarah Sharp --- include/linux/usb/ch9.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/linux/usb') diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h index 3b6f628880f8..af21f3115919 100644 --- a/include/linux/usb/ch9.h +++ b/include/linux/usb/ch9.h @@ -789,6 +789,11 @@ struct usb_ext_cap_descriptor { /* Link Power Management */ __u8 bDevCapabilityType; __le32 bmAttributes; #define USB_LPM_SUPPORT (1 << 1) /* supports LPM */ +#define USB_BESL_SUPPORT (1 << 2) /* supports BESL */ +#define USB_BESL_BASELINE_VALID (1 << 3) /* Baseline BESL valid*/ +#define USB_BESL_DEEP_VALID (1 << 4) /* Deep BESL valid */ +#define USB_GET_BESL_BASELINE(p) (((p) & (0xf << 8)) >> 8) +#define USB_GET_BESL_DEEP(p) (((p) & (0xf << 12)) >> 12) } __attribute__((packed)); #define USB_DT_USB_EXT_CAP_SIZE 7 -- cgit v1.2.2