aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-ring.c
diff options
context:
space:
mode:
authorSarah Sharp <sarah.a.sharp@linux.intel.com>2012-05-07 18:34:26 -0400
committerSarah Sharp <sarah.a.sharp@linux.intel.com>2012-05-18 18:42:00 -0400
commit4b2665418c81c87e7a46df690a443b3d5ac5b088 (patch)
treeaf4cb2f6e83ca3f7db6c7258832867247d0d0d13 /drivers/usb/host/xhci-ring.c
parent8306095fd2c1100e8244c09bf560f97aca5a311d (diff)
xhci: Some Evaluate Context commands must succeed.
The upcoming USB 3.0 Link PM patches will introduce new API to enable and disable low-power link states. We must be able to disable LPM in order to reset a device, or place the device into U3 (device suspend). Therefore, we need to make sure the Evaluate Context command to disable the LPM timeouts can't fail due to there being no room on the command ring. Introduce a new flag to the function that queues the Evaluate Context command, command_must_succeed. This tells the ring handler that a TRB has already been reserved for the command (by incrementing xhci->cmd_ring_reserved_trbs), and basically ensures that prepare_ring() won't fail. A similar flag was already implemented for the Configure Endpoint command queuing function. All functions that currently call xhci_configure_endpoint() to issue an Evaluate Context command pass "false" for the "must_succeed" parameter, so this patch should have no effect on current xHCI driver behavior. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Diffstat (limited to 'drivers/usb/host/xhci-ring.c')
-rw-r--r--drivers/usb/host/xhci-ring.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index c60617bb8c2e..23b4aefd1036 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -3609,12 +3609,12 @@ int xhci_queue_configure_endpoint(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr,
3609 3609
3610/* Queue an evaluate context command TRB */ 3610/* Queue an evaluate context command TRB */
3611int xhci_queue_evaluate_context(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr, 3611int xhci_queue_evaluate_context(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr,
3612 u32 slot_id) 3612 u32 slot_id, bool command_must_succeed)
3613{ 3613{
3614 return queue_command(xhci, lower_32_bits(in_ctx_ptr), 3614 return queue_command(xhci, lower_32_bits(in_ctx_ptr),
3615 upper_32_bits(in_ctx_ptr), 0, 3615 upper_32_bits(in_ctx_ptr), 0,
3616 TRB_TYPE(TRB_EVAL_CONTEXT) | SLOT_ID_FOR_TRB(slot_id), 3616 TRB_TYPE(TRB_EVAL_CONTEXT) | SLOT_ID_FOR_TRB(slot_id),
3617 false); 3617 command_must_succeed);
3618} 3618}
3619 3619
3620/* 3620/*