diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-27 16:02:57 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-27 16:02:57 -0400 |
commit | 62f4b242ca43c17d9d332de0db5a708f29bfe732 (patch) | |
tree | ec4f7c3780da0f1a8d274312eebff4326db8919e | |
parent | ce26bd23d4ad180883f53709f9a2220dc771c030 (diff) | |
parent | 0730d52a86919300a39a2be37f6c140997dfb82f (diff) |
Merge tag 'for-usb-next-2013-08-27' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-next
Sarah writes:
xhci: Bug fixes for 3.12.
Hi Greg,
Here's three low-priority bug fixes that should be queued for 3.12.
They disable runtime PM for hosts that need the XHCI_RESET_ON_RESUME
quirk, fix USB 2.0 Link PM on hosts that don't have BESL support, and
prevent a bunch of log spam.
Please pull into usb-next for 3.12.
Sarah Sharp
-rw-r--r-- | drivers/usb/host/xhci-ext-caps.h | 2 | ||||
-rw-r--r-- | drivers/usb/host/xhci-ring.c | 24 | ||||
-rw-r--r-- | drivers/usb/host/xhci.c | 22 |
3 files changed, 31 insertions, 17 deletions
diff --git a/drivers/usb/host/xhci-ext-caps.h b/drivers/usb/host/xhci-ext-caps.h index 8d7a1324e2f3..9fe3225e6c61 100644 --- a/drivers/usb/host/xhci-ext-caps.h +++ b/drivers/usb/host/xhci-ext-caps.h | |||
@@ -71,7 +71,7 @@ | |||
71 | 71 | ||
72 | /* USB 2.0 xHCI 1.0 hardware LMP capability - section 7.2.2.1.3.2 */ | 72 | /* USB 2.0 xHCI 1.0 hardware LMP capability - section 7.2.2.1.3.2 */ |
73 | #define XHCI_HLC (1 << 19) | 73 | #define XHCI_HLC (1 << 19) |
74 | #define XHCI_BLC (1 << 19) | 74 | #define XHCI_BLC (1 << 20) |
75 | 75 | ||
76 | /* command register values to disable interrupts and halt the HC */ | 76 | /* command register values to disable interrupts and halt the HC */ |
77 | /* start/stop HC execution - do not write unless HC is halted*/ | 77 | /* start/stop HC execution - do not write unless HC is halted*/ |
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 7b35af167e55..411da1fc7ae8 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c | |||
@@ -3087,14 +3087,10 @@ int xhci_queue_intr_tx(struct xhci_hcd *xhci, gfp_t mem_flags, | |||
3087 | * to set the polling interval (once the API is added). | 3087 | * to set the polling interval (once the API is added). |
3088 | */ | 3088 | */ |
3089 | if (xhci_interval != ep_interval) { | 3089 | if (xhci_interval != ep_interval) { |
3090 | if (printk_ratelimit()) | 3090 | dev_dbg_ratelimited(&urb->dev->dev, |
3091 | dev_dbg(&urb->dev->dev, "Driver uses different interval" | 3091 | "Driver uses different interval (%d microframe%s) than xHCI (%d microframe%s)\n", |
3092 | " (%d microframe%s) than xHCI " | 3092 | ep_interval, ep_interval == 1 ? "" : "s", |
3093 | "(%d microframe%s)\n", | 3093 | xhci_interval, xhci_interval == 1 ? "" : "s"); |
3094 | ep_interval, | ||
3095 | ep_interval == 1 ? "" : "s", | ||
3096 | xhci_interval, | ||
3097 | xhci_interval == 1 ? "" : "s"); | ||
3098 | urb->interval = xhci_interval; | 3094 | urb->interval = xhci_interval; |
3099 | /* Convert back to frames for LS/FS devices */ | 3095 | /* Convert back to frames for LS/FS devices */ |
3100 | if (urb->dev->speed == USB_SPEED_LOW || | 3096 | if (urb->dev->speed == USB_SPEED_LOW || |
@@ -3876,14 +3872,10 @@ int xhci_queue_isoc_tx_prepare(struct xhci_hcd *xhci, gfp_t mem_flags, | |||
3876 | * to set the polling interval (once the API is added). | 3872 | * to set the polling interval (once the API is added). |
3877 | */ | 3873 | */ |
3878 | if (xhci_interval != ep_interval) { | 3874 | if (xhci_interval != ep_interval) { |
3879 | if (printk_ratelimit()) | 3875 | dev_dbg_ratelimited(&urb->dev->dev, |
3880 | dev_dbg(&urb->dev->dev, "Driver uses different interval" | 3876 | "Driver uses different interval (%d microframe%s) than xHCI (%d microframe%s)\n", |
3881 | " (%d microframe%s) than xHCI " | 3877 | ep_interval, ep_interval == 1 ? "" : "s", |
3882 | "(%d microframe%s)\n", | 3878 | xhci_interval, xhci_interval == 1 ? "" : "s"); |
3883 | ep_interval, | ||
3884 | ep_interval == 1 ? "" : "s", | ||
3885 | xhci_interval, | ||
3886 | xhci_interval == 1 ? "" : "s"); | ||
3887 | urb->interval = xhci_interval; | 3879 | urb->interval = xhci_interval; |
3888 | /* Convert back to frames for LS/FS devices */ | 3880 | /* Convert back to frames for LS/FS devices */ |
3889 | if (urb->dev->speed == USB_SPEED_LOW || | 3881 | if (urb->dev->speed == USB_SPEED_LOW || |
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index ba0ec0a96481..349d3460a17a 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
@@ -3557,10 +3557,21 @@ void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev) | |||
3557 | { | 3557 | { |
3558 | struct xhci_hcd *xhci = hcd_to_xhci(hcd); | 3558 | struct xhci_hcd *xhci = hcd_to_xhci(hcd); |
3559 | struct xhci_virt_device *virt_dev; | 3559 | struct xhci_virt_device *virt_dev; |
3560 | struct device *dev = hcd->self.controller; | ||
3560 | unsigned long flags; | 3561 | unsigned long flags; |
3561 | u32 state; | 3562 | u32 state; |
3562 | int i, ret; | 3563 | int i, ret; |
3563 | 3564 | ||
3565 | #ifndef CONFIG_USB_DEFAULT_PERSIST | ||
3566 | /* | ||
3567 | * We called pm_runtime_get_noresume when the device was attached. | ||
3568 | * Decrement the counter here to allow controller to runtime suspend | ||
3569 | * if no devices remain. | ||
3570 | */ | ||
3571 | if (xhci->quirks & XHCI_RESET_ON_RESUME) | ||
3572 | pm_runtime_put_noidle(dev); | ||
3573 | #endif | ||
3574 | |||
3564 | ret = xhci_check_args(hcd, udev, NULL, 0, true, __func__); | 3575 | ret = xhci_check_args(hcd, udev, NULL, 0, true, __func__); |
3565 | /* If the host is halted due to driver unload, we still need to free the | 3576 | /* If the host is halted due to driver unload, we still need to free the |
3566 | * device. | 3577 | * device. |
@@ -3634,6 +3645,7 @@ static int xhci_reserve_host_control_ep_resources(struct xhci_hcd *xhci) | |||
3634 | int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev) | 3645 | int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev) |
3635 | { | 3646 | { |
3636 | struct xhci_hcd *xhci = hcd_to_xhci(hcd); | 3647 | struct xhci_hcd *xhci = hcd_to_xhci(hcd); |
3648 | struct device *dev = hcd->self.controller; | ||
3637 | unsigned long flags; | 3649 | unsigned long flags; |
3638 | int timeleft; | 3650 | int timeleft; |
3639 | int ret; | 3651 | int ret; |
@@ -3686,6 +3698,16 @@ int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev) | |||
3686 | goto disable_slot; | 3698 | goto disable_slot; |
3687 | } | 3699 | } |
3688 | udev->slot_id = xhci->slot_id; | 3700 | udev->slot_id = xhci->slot_id; |
3701 | |||
3702 | #ifndef CONFIG_USB_DEFAULT_PERSIST | ||
3703 | /* | ||
3704 | * If resetting upon resume, we can't put the controller into runtime | ||
3705 | * suspend if there is a device attached. | ||
3706 | */ | ||
3707 | if (xhci->quirks & XHCI_RESET_ON_RESUME) | ||
3708 | pm_runtime_get_noresume(dev); | ||
3709 | #endif | ||
3710 | |||
3689 | /* Is this a LS or FS device under a HS hub? */ | 3711 | /* Is this a LS or FS device under a HS hub? */ |
3690 | /* Hub or peripherial? */ | 3712 | /* Hub or peripherial? */ |
3691 | return 1; | 3713 | return 1; |