summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-17 03:58:30 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-17 03:58:30 +0400
commit6470cbc486652942dcf6c4b6420e3a521e766bbf (patch)
tree3244e6e1998031ac17e12283b2f797e60743d93b /include
parent43fe3a99d9caf10b25f9c596e9854cdae30db418 (diff)
parent024f117c2f3c4bb5df6e6696b709e0f3ed7e5dbb (diff)
downloadlinux-6470cbc486652942dcf6c4b6420e3a521e766bbf.tar.xz
Merge tag 'for-usb-next-2012-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-next
USB: Link PM fixes and Latency Tolerance Messaging Hi Greg, Here's four bug fix patches for Link PM (LPM), which are marked for 3.5-stable. There's also three patches that turn on Latency Tolerance Messaging (LTM) for xHCI host controllers and USB 3.0 devices that support this low power feature. Please queue for 3.6. Sarah Sharp
Diffstat (limited to 'include')
-rw-r--r--include/linux/usb.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index d4f9de1acd45..f8506ed0f97b 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -561,7 +561,6 @@ struct usb_device {
struct usb3_lpm_parameters u1_params;
struct usb3_lpm_parameters u2_params;
unsigned lpm_disable_count;
- unsigned hub_initiated_lpm_disable_count;
};
#define to_usb_device(d) container_of(d, struct usb_device, dev)
@@ -634,6 +633,17 @@ extern void usb_enable_lpm(struct usb_device *udev);
extern int usb_unlocked_disable_lpm(struct usb_device *udev);
extern void usb_unlocked_enable_lpm(struct usb_device *udev);
+extern int usb_disable_ltm(struct usb_device *udev);
+extern void usb_enable_ltm(struct usb_device *udev);
+
+static inline bool usb_device_supports_ltm(struct usb_device *udev)
+{
+ if (udev->speed != USB_SPEED_SUPER || !udev->bos || !udev->bos->ss_cap)
+ return false;
+ return udev->bos->ss_cap->bmAttributes & USB_LTM_SUPPORT;
+}
+
+
/*-------------------------------------------------------------------------*/
/* for drivers using iso endpoints */